PPCenter :: devblog

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

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 ?

Iso/Cue "loader" works on real hardware :]

Written by cafealpha no comments
(For more informations, you can also read this old article.)

I finally had time to use my Saturn, and I could verify that iso/cue "loader" works on real hardware !
Of course it works well when reading from RomFs, and it works also well when reading file from SD card

data/images/20150626_iso_loader.tb.jpg
My test environment ... sorry for the mess
(Micro SD card is located on top-left of the cartridge)

I lost some time to understand why data transfer from SD card was slower than expected, but finally understand why : some debug/whatever delay routine was called when accessing cartridge registers ...
Just putting some #if 0 around this delay code solved the "problem" ^^;

Read more Iso/Cue "loader" works on real hardware :]

Iso/Cue "loader" works :)

Written by cafealpha no comments
So I am making an enhanced version of Pseudo Saturn firmware.
And, as an extra feature of this firmware, I added an iso/cue "loader".
data/images/20150603_dr.evil.laser2.tb.jpg

Why the quotes around "loader" ? Because it doesn't emulates CD-block
So, it only loads few homebrew games, but it's enough for me, and I don't want to waste more time on adding CD block software emulator while better solutions (rhea, jhl's "mpeg" cart, etc) already exist.

As an other bonus, I also added RomFs support to my Saturn library
It is like romdiskfs that is widely used on linux, DS homebrew, etc, but it allows file compression, some other features, and ... is probably buggy because I coded it from scratch

(*) Virtual file system is not really new on Saturn homebrew scene, because Piratero already implemented one in libyaul a while ago


data/images/20150603_romfs_filelist.png
RomFs root folder contents. I will load sl_elf.iso file in the next paragraph.

So here is a capture of yabause running sl_elf.iso, after decompressing it from virtual file system stored in Flash memory.
sl_elf.iso is "satdemo" made by CharlesDoty, grabbed from SaturnOrbit's examples (Thank you Rockin'B for making SaturnOrbit ! After 10 years, it still have it installed on my laptop's hard disk ).

data/images/20150603_isocueloader.png
yabause running Saturn demo from iso file, near SatLink software I use in order to debug my Saturn programs.

Very big thanks to the yabause team ! I grabbed the iso/cue loading routines from yabause sources, and it was very easy to port them

Edit : I removed unused code (CD Block emulation routines, etc) from iso loader module, and .o size dropped from 74KB to 18KB oO

Edit (2015/06/26) : I tested this code on real hardware, and it works too ! Please see this article for more details.

Read more Iso/Cue "loader" works :)

Nostalgia time : ietx2 old (buggy) beta iso for download

Written by cafealpha no comments
After making some cleanup in my development folders, I found an old archive file
It is dated 2007 June 20, and contains a very early version of ietx2, which is an adaptation of yeti3D engine to Saturn.
At that time, I was using a PentiumIV processor and 80GB IDE hard disk in order to run sh-elf-gcc provided by SaturnOrbit ... very nostalgic times ... but I definitely prefer nowadays for Saturn development

Iso file can be found >>> here <<<.
(No, there are no sources available, because I didn't kept archives of sources at that time.)

Please don't waste a CD-R for this. You can try on yabause, or just look at screenshot and say "hey, very ugly stuff" however.

data/images/20150410_ieti01.png
ietx2 beta screenshot : not enough time to draw last quads in VDP1 list, hence the garbage on foreground.

data/images/20150410_ieti02.png
ietx2 beta screenshot : example of incorrect rendering when quads coordinates exceed 16 bits range.

Present version

You can find current version (ietx2) and sources of my Yeti3D adaptation here (dated 2011 April 19).
Also, there are videos of ietx2 available below. Click on the links to display them on youtube.
data/images/20150410_ietx2_01.png


Future (?) version

I'm still maintaining sources of ietx2.
I renamed project name to ietx3 (yeah, I'm not very original when choosing project names ), and now use a lite version of Yeti3D PRO engine ... "lite" means original, minus a lot of features, in order to keep a decent frame rate, and fitting to Saturn resources.
You can find some videos (binaries are not released, sorry) on my youtube channel :

Read more Nostalgia time : ietx2 old (buggy) beta iso for download

Backup Manager - Early Version #1

Written by cafealpha 8 comments
So I'm currently making a Saturn Backup Data Manager utility.
What's this ? It is a remake of "Memory Manager" utility present in Saturn BIOS.
data/images/20150204_backup_manager_sega1.png
Sega Memory Manager utility : main screen

It already exists, and can be used from BIOS, so why making such an utility ?
I have some reasons that pushed me making this, and one of theses is that Memory Manager user interface is very cheap, especially, it doesn't allows to select multiple backup data and copy/delete them. (Dear Sega, why didn't you developed this feature ??)
Also, there are some new features I would like to add, such as hex-edit of memory data ... I have very few time to play now (real life, children, cancer, etc), so 999 lives in Backup data is a must-have feature

This utility is currently WIP, so no download link is available right now, but it is WIP enough to publish screens on my blog
So here is what it looks like now :
data/images/20150204_backup_manager1.png
Backup Data Manager Main Screen

Don't trust the development progress only by looking at the main menu : everything behind is far for being finished
But at least, menu library itself is more or less completed, and I'm very glad about this point.

Here is a comparison of data selection screens :
data/images/20150204_backup_manager_sega2.png
Data Selection (Sega)
data/images/20150204_backup_manager3.png
Data Selection (this utility)

Yeah, I know that Japanese text is not displaying properly ... this will be fixed, but the priority for this is low, so please be patient.
And what is the green text display on Backup Data Manager screen ? This is multiple items selection

As a bonus, here are screens of Backup Manager running on real hardware.
Pictures were taken last September, when I still had a modchipped Saturn ready for use ... after that I was busy with medical stuff, and moving to a new apartment, so my Saturn I used for testing is currently hidden in a cardboard ...
data/images/20150204_backupmngr_hwtest1.tb.jpg
Early version of Backup Manager, picture was taken 4 months ago.
Can you spot the differences with current version ? ^^


data/images/20150204_backupmngr_hwtest2.tb.jpg
SatLink running on my 8 years old laptop, connected to my Saturn via USB dev cart.
This development environment is by faaar more convenient than $500+ vintage
development hardware/carts/whatever floating on ebay ♪



Among the things I would like to add before a release, there is the Saturn FDD support ... but I don't own Saturn FDD unit, and the cheapest unit I could find on auction sites costs 10'000 Yens, and the seller doesn't guarantee that it still works ...
I won't pay 10K Yens for a vintage objet I will only use once a year (and I fear my wife would trash it if she founds it ), so if somebody is ready to give some time for beta testing with Saturn Floppy Disk Drive, please let me know in the comments

Read more Backup Manager - Early Version #1

Rss feed of the tag