PPCenter :: devblog

PPcenter. Arts and craft for my Sega Saturn. Since 1847 :D

Gamer's Cartridge out of stock :]

Written by cafealpha 5 comments
Out of stock ":]". I'm glad to have finished this batch
I don't plan to sell Gamer's Cartridge for a while, because stock of parts to build theses cartridges (electronics components, PCBs, labels, etc) is currently very low here. I'm even lacking of bubble paper used when shipping cartridges

So, what's next ? Of course, Saturn stuff  I plan to use this "break" in cartridges manufacturing and sales in order to continue Pseudo Saturn Kai development.
Main feature to add is cheat codes, which is a bit "heavy" one to implement, because processing in order to make cheat codes working isn't documented in details.
But that will be done ! Also, there are some side quests here and there regarding Pseudo Saturn Kai features. I plan to implement as far I can, so it will be limited only by my free time, my motivation, and flash ROM remaining on cartridge

data/images/20170215_sgc_v33b_gerber_preview.tb.png
Gerber preview before ordering PCB on
Seeed Studio, very classy and realistic

Edit (2017/05/11) : finally back in stock
I catched the occasion to make some minor improvements to my homepage, such as adding anchor link to some sections, adding some directions for Japanese users, etc ... and I'm already full up with writing HTML

Edit (2017/05/12) : half of the stock already reserved oO
data/images/20170512_escalated_quickly.jpg
Cartridges are assembled by hand, hence stock is small, but I'm impressed anyway

Read more Gamer's Cartridge out of stock :]

Cartridge labels available !

Written by cafealpha no comments
Finally available :]

Last June, I initially wanted to release Saturn Gamer's Cartridge with custom label, but some unexpected problems regarding label quality (not resistant to water) delayed its release, consequently, Gamer's Cartridges manufactured until now had only shell, but no label.

"Stronger" label retained for use by Gamer's Cartridge is designed for car tuning purpose, so waterproof, and even alcohol proof ! I suppose this will satisfy the requirements of typical Gamer's Cartridge user
(※) Just a (common sense) note : while labels are waterproof, cartridges themselves aren't  So no, you still can't play Saturn while taking a bath

data/images/20160914_labels.tb.jpg
Cartridges with their labels.
Bottom-right one (without LEDs) is USB dev cart.


Custom labels were the last main milestone regarding Gamer's Cartridge design : I won't design custom boxes for my cartridges.
Why ? Because I want Gamer's Cartridge users to ... use their cartridges, not collect (shelf) them

You are Saturn Gamer ? Want to share your Saturn saves with your emulator or friends ? Want to enjoy Dezaemon 2 game but don't want to purchase a modchip + memory cartridge ? Then Saturn Gamer's Cartridge is for you


Special thanks to my friend Darius who selected paper, printed labels sheet, and cut each labels
Darius provided pictures he took when cutting labels, so please enjoy the labels making-of


data/images/20160818_labels_scan.jpg
Label sheet scanned just after print-out.
Red/blue lines are used as help when cutting labels.



data/images/20160819_labels_tools.jpg
Tools used : ruler and cutter.
And also Darius' God Hand and eyes (not pictured)


data/images/20160819_labels_row_cut.jpg
In order to optimize time , labels are first cut row per row.

data/images/20160819_labels_individual_cut.jpg
After row cutting, labels are cut individually

Read more Cartridge labels available !

Wanted : custom cartridge label

Written by cafealpha 4 comments
Good and bad news for people interested in my cartridge .
The good news is that cartridge (Saturn Gamer's cartridge) and its firmware (Pseudo Saturn Kai) are more or less ready for release
After release, project sources (PCB design files, and Pseudo Saturn Kai source code) will be publicly available, and few carts (not a lot) will be available for sale.

The bad news is that there are still few thing I would like to improve before release.

Among theses things I would like to improve, there is a custom label for cartridge case : I'm currently using second hand Action Replay cases for my project, and really don't like Action Replay label.
In fact, I removed theses ugly labels ... it was hard to do (I don't know why they're using glue so strong !), but I really couldn't stand theses out-fashioned labels

Rather than designing label by myself, it's probably better to ask everybody about their favorite design for Gamer's cartridge label !
In fact, as labels will be printed by batch of 12 per page, it's OK to print different labels at once, then, let future user choosing his favorite label when ordering cartridge :)

Rules :
 1. Width : 946 pixels, Height : 592 pixels.
Adding some margin around your label is encouraged.
Of course, larger images are accepted, but please respect image ratio, and please keep in mind that it will be resized to 946x592 when adding text or small details.
 2. Image format supported on my PC : PNG or JPG.
(Please ask if you prefer other format.)
 3. Display following cartridge description text in English :
        Saturn Gamer's cartridge
        http://ppcenter.free.fr/satcart/#gamers
         ✔ Plays CD-R game backups. (※)
         ✔ Memory Cartridge. (※)
         × Cartridge RAM.
         × Play games from SD card.
        (※) Some games may be incompatible.
 4. Copyrighted images usage forbidden.
 5. Deadline : a couple of weeks (= middle of May 2016).
 6. You allow me to re-use your label in this and future projects.


Tips :
 - If possible, please use plain color (black, white, or anything else) for label outline : as labels will be hand-cutted, I plan to add some margin around label itself, in order to avoid defect due to bad cut. (2017/03/12: my friend Darius does good job regarding label cutting, so the outline is not required )
 - It's OK to add some non-English text, but in this case, you need to display cartridge description text in English, as described in rule 3.
 - (Added 2017/03/12) Please use relatively large font for text on the label so that it can be readable after printing. At 946x592 dimensions, recommended text height is over 25 pixels. This obviously depends on font used, contrast with neighboring background, etc.
 - (Added 2017/03/12) It's OK to remove the "× Cartridge RAM." and "× Play games from SD card." messages if theses doesn't fits in the label.

Reward :
 - Your name in Pseudo Saturn Kai firmware credits


How to submit :
Please submit your label here in the comment of this article, or directly by contacting me.
In both cases, file can't be uploaded, so please provide your label(s) via external host site (imgur, sendspace, or anything else).
You can also submit your label to Pseudo Saturn Kai official thread on segaxtreme forums.


Notes :
 - I may reject dull/offendant/whatever label(s).
 - Cartridge case will be available in both black or white colors, and black will be the most available color.
 - Custom label for USB dev cart is welcome too.



Want to make your own label ? Great :)
And want some stuff to start from ? No problem, you can find some cartridge pictures below :

Cow logo, used in cartridge PCB :
 - vache.gif : initial image from which everything started.
 - vache0.bmp : first version of vache logo (silkscreen only, bottom of the PCB).
 - logo_vache.png : latest version of vache logo (silkscreen, solder mask, top right of the PCB).
 - vache_06_2_2+cornes2_-_finale.png : pixel art image used to make logo_vache.png.

Pictures of cartridge PCBs :
 - 20140314_rev2a_front.jpg : Rev 2a cartridge : Gamer's cartridge ancestor, nothing worked.
 - 20140918_vmem_first_ver_sat.jpg : First time Virtual Memory Cart worked on real hardware : PCB and dev Saturn used at that time.
 - 20140918_vmem_first_ver_tv.jpg : First time Virtual Memory Cart worked on real hardware : debug stuff displayed on sreen.
 - 20150628_rev2f_front.jpg : My Rev 2f cartridge used to debug Pseudo Saturn Kai.
 - 20150718_memcart.png : Rev 3.1 cartridge preview, last step before ordering it to PCB house.
 - 20160119_logo1.jpg : Cow logo, from vache0.bmp.
 - 20160119_logo2.jpg : Cow logo, logo_vache.png (available in Rev 3.3 and Rev 3.3a PCB only).
 - 20160126_rev33_front.jpg : Rev 3.3 PCB, front side.
 - 20160224_rev33_raw.jpg : Rev 3.3 PCB, ICs except SD card socket unsoldered.
 - 20160305_rev33a_front.jpg : Rev 3.3a PCB, front side.
 - 20160315_rev31_back.jpg : Rev 3.1 PCB, rear side.
 - 20160318_pskai_main_screen.jpg : Pseudo Saturn Kai main screen.
 - 20160324_rev32_rear.jpg : Rev 3.2 cartridge rear side.

Images related to USB dev cart :
 - 20120709_usb_dev_cart_logo.jpg : My favorite logo for USB dev cart
 - 20160308_routing_printout.jpg : very old (Rev 1c proto ?) routing printout.


Not interested in designing a cartridge label, but interested in Saturn cartridge ?
No problem, the Saturn Homebrew Cartridges's gallery section is waiting for you

data/images/20160512_satcart_gallery.tb.png
Saturn Homebrew Cartridges gallery
Click on the link if you want to see more

(Added 2017/03/12) : All the images above can be used without restrictions.

Edit
: everything is now available here.
Future contributions are always welcome

Re-edit : here is what it looks like after printing :
data/images/20160622_gamers_cart_label.tb.jpg
Gamer's Cartridges with labels
Thanks to jjennings089 for label design and printing

Read more Wanted : custom cartridge label

Firmware development - will it work somewhere else than in my dev Saturn ?

Written by cafealpha 6 comments
I'm still developing the firmware for my custom cartridge, and it worked enough so that I could take a video of it running on real hardware


data/images/20151028_pskai_sdcard_test.jpg
Click on the image in order to see its youtube video.
You can also click here in order to download .avi file.


Video may be blurry, so here are some additional pictures :
data/images/20151029_testcart_usb.tb.jpg
USB & SD card cartridge.
This is the cartridge I mainly use for testing on real hardware
(USB port is used for debug purposes)


data/images/20151029_testcart_beta.tb.jpg
SD card cartridge for Saturn.
This is the version I plan to release in the case development continues well


data/images/20151029_flatcube_from_sd_card.tb.jpg
Flatcube demo loaded and executed from SD card.
This picture is here in order to put a link to the homepage of flatcube demo author


And last but not least, many thanks to beta testers for their cooperation and patience

data/images/20151028_pskai_bt2_saturn.tb.jpg
Beta cartridge loaded on modded Japanese Saturn.
Thanks to
MeteK for beta testing and taking this picture
Last week, MeteK reported that basic SD card access worked on his Saturn

data/images/20151028_pskai_bt1_screen.tb.jpg
Pseudo Saturn Kai System Information screen.
Thanks to Alexandre Souza from www.tabalabs.com.br
for beta testing and taking this picture 

data/images/20151112_tabajaralabs_noshell.tb.jpg - data/images/20151112_tabajaralabs_shell.tb.jpg
Additional pictures from Alexandre : cartridge without, then with shell.
Alexandre is currently trying to 3D print cartridge shells. Please do your best


I still can't getting things working on Alexandre side : SD card doesn't respond to SPI requests from Saturn via my cartridge ... I suppose this is due to a bad hardware design on cartridge side, but I still need to investigate about this ...

Edit (2015/11/11) : it is fixed and verified here
Fortunately, it was not an hardware error, but a firmware (SH-2 side) error.
About details : I access SD card by using SPI protocol, and the reason some cards couldn't be initialized was due to the fact that commands were incorrectly received by SD card.
Sending a dummy synchronization byte before sending command to SD card fixed the problem.
data/images/20151111_sdtest_satlink.tb.png
Log taken from my dev Saturn : first half is SD card initialization sequence,
and second half is data blocks reading.

data/images/20151111_sdtest_yabause_log.tb.png
It works under custom build of yabause too
Thanks to this, most of the tests could be done on PC,
which saved a lot of development time.
Thank you yabause team



After doing some testings on my side, I could verify that :
 - SD card access works fine on all the 6 Saturns I own
 - Some SD card can't be accessed via my cartridge, while the others work fine. (← fixed)

data/images/20151102_test_saturns.tb.jpg
Saturns used for testing.
The one on the top of the picture is my good old dev unit

data/images/20151102_test_sd_ng.tb.jpg
SD card that aren't recognized by my cartridge.
Edit (2015/11/11) : I fixed firmware and 32GB micro SD card above was recognized
(I didn't tested with the other SD cards, but I suppose it is now OK too.)

data/images/20151102_test_sd_ok.tb.jpg
SD cards that were correctly recognized by my cartridge.



To conclude this article, I have to say than this project doesn't make exception to Muphy's Law :
Anything that can go wrong will go wrong

Beginning of year (2015) : Virtual Memory Cart related debug. After verifying that it has the chance to work, I temporary stop its development, mostly because I was bored to continue development of this feature ^^;
Until this summer : a lot of struggle with Pseudo Saturn 0.831/0.832/flasher/etc related things.
September : SD card library related troubles. Try to get a solution by using -and trying to fix- thinfat32 library. Using fat_io_lib was a better choice, thank you hitomi2500 for your advice about this library
October ~ Now : Troubles with SD card on Alexandre side ... will work if another SD card is used (currently waiting for test results) ?

Anything that can go wrong will go wrong
But at least, beta cartridge half works, so I can safely continue its development


I plan to release the first batch of cartridges with SD card included, so that there won't be incompatibility issues on user side.
As my project is a low cost one, and also because it won't load commercial games, I plan to sell the cartridges with low cost (8GB or maybe 16GB) SD cards.
Edit (2015/11/11) : SD card compatibility is likely to be fixed, and as far as possible I don't want to do SD card stock management/etc, I will probably release cartridges only.
There still no release date to announce, because some fixes/features addition/testing/etc is remaining, and also because I mostly do this for fun

Read more Firmware development - will it work somewhere else than in my dev Saturn ?

libfat : maybe you need to loose some weight :D

Written by cafealpha 3 comments
So as you may know, I'm (still) developing the hardware/firmware/everything else for my SD card-based Saturn Cartridge.

One the main module for the firmware of this cartridge is File System access library.

As you may know, there are many File System existing in real worls : FAT, NTFS, exFat, ReiserFs, etc.
And in my project, I choose to use FAT32 in order to access files and directories.
Why FAT32 ? Just because it offers the best rate of advantages vs disadvantages in my project scope.
Advantages :
 - Available everywhere, from Windows 98 to every Linux distribution.
 - Detailed (?) specs available on MS website, lots of free source code available elsewhere.
 - Little resource requirement (at least 1~2KB of work RAM, and few tenths of program memory for code).
Disadvantages :
 - A little hard to understand why internal data structure is so messy ... more understandable after reading FAT16 specs.
 - Complex Long FileName support, and patented by MS too.
 - Write performances may be poor under certain conditions. Example : fragmented file system + large partition size.
 - Free source code available everywhere is sometimes buggy / bloated.

At the very beginning of the project (nearly 4 years ago !), I choose DharmaniTech FAT32 library , and it was easy to use, so that I could read files without many problems on software development side.
But it only supports <512 bytes file write, and a lot of advanced features weren't available, so I then switched to thinfat32 library .
Thinfat32 library was a pain to adapt to Saturn, and some advanced features weren't available, or didn't worked, so I rapidly switched to libfat .

Libfat is great, works without any major trouble, and even supports FAT16
So I kept libfat as FAT32 library for around 3 years.
But one problem of libfat is ... its weight (<- yeah, I wanted to put this pun somewhere ).
 - Sector caching is cool, but library doesn't work without it, so we need at least 8KB of work RAM for it.
 - Source code is very complete, but also very complex, so unless you aren't a talented developer, so can't customize it easily ... and unfortunately I'm not a talented developer
 - Library supports nearly everything for file/directory manipulation, so size after compilation is a little big (around 50KB IIRC).

You may ask : "why complaining about few KBs of RAM ? Saturn got plenty of RAM to use !"
Well, yes and no. My project (on game game backup from/to SD card) of resources :
 - Work RAM : 24KB ... not contiguous : 16KB+8KB
 - Program memory : work RAM, or cartridge ROM (1MB). I choose to run program directly from ROM.

And, in a (maybe) future hardware project, I may need to port FAT32 library to microcontroller, so few resources will be mandatory.

So last month, I dropped libfat, and started to look for a simpler & better FAT32 library.
When selecting a starting point for development, my choice pointed to thinfat32, not because it was perfect, but because I had some experience with it in the past, so that I know where I should start to fix things

First, I dropped some features I don't need :
 - Long FileName when writing files : LFN can be read, but only 8.3 files can be written ... it's enough for my needs
 - Long path : changed maximum size for file path from MAX_PATH (260 bytes) to 96 bytes ... it's enough for me, and saves some RAM.
 - Only one file open at once : it saves some RAM.
 - Other ? (don't remember)

Then started to fix/debug/etc the library :
 - Big/low endian support ... Saturn and PC endianness is different
 - Directory creation fix.
 - File creation in non-root directory fix.
 - Added test bench under windows ... there was one stub in original sources, but with very limited test range ...
 - Better log support.
 - FS info support.
 - FAT16 support ... not working yet (), but at least it works better than in original sources
 - File append fix ... original sources support file append ... only in the case source file is multiple of 512 bytes ... this bug took me many time to spot
 - Clock support when setting file timestamp ... original sources supported only fixed (dummy) timestamp.
 - File listing within a directory.
 - Source code cleanup.
 - MANY fixes.

Complaints about thinfat32 library may look severe, but I really thanks its author to publicly release it !
Thanks to him, I know have something that fits my needs, and have a deeper knowledge regarding FAT32 structure

Last but not least, here are some screenshots :
data/images/20151021_thinfat_testprog.tb.png
Test program contents :
In this screenshot, I first create one directory,
then write 3 files inside it.


data/images/20151021_thinfat_testbench.tb.png
Test program execution - just in order to show
a command line screenshot on my blog

data/images/20151021_thinfat_testresults.tb.png
Result in (virtual) test drive :
one directory and 3 files are created !

This is just the beginning of the development : I still need to test under Saturn emulator (yabause ), then on real hardware (Saturn + custom cartridge ).

Read more libfat : maybe you need to loose some weight :D

Rss feed of the tag