PPCenter :: devblog

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

Dezaemon 2 Save Game Manager 3 : test on CD-R

Written by cafealpha 4 comments
As indicated in the title of this article, I tried to verify if Dezaemon 2 Save Game Manager 3 (DZ2SGM3) is working correctly from CD-R on an unmodded Saturn.


Dezaemon 2 Save Game Manager 3 (Beta v6.212)

The reason this video was taken is that somebody contacted me to know if DZ2SGM3 works correctly with an "all-in-one" ©®TM red cartridge. But as I don't own such kind of cartridge, I did my best with the few things I can use here.

Initial goal was to test public version (v6.274, 2018/12/28) with official memory cartridge on Saturn with modchip installed, but ...
  • My modded Saturn was buried too deep in my closet; I was too lazy to exhume it ...
  • The CD-R on which I burned public version of DZ2SGM3 didn't wanted to be read from Saturn; I was too lazy to re-burn it ...

So this ended in testing on an unmodded Saturn with Gamer's Cartridge  I couldn't test it by myself, but I'm confident DZ2SGM3 can be used on official memory cartridge and on "all-in-one" ©®TM red cartridge too. "It works, trust me I'm an engineer !"

I did my best to develop DZ2SGM3, but as of a self-produced project (developed on my free time, didn't begged any money for it and on the contrary, I pay my homepage provider to host it), I don't have the budget nor the time to test on all combinations of backup memory cartridges and modchips/ODE/Pseudo Saturn cartridge/whatever with this application.
So if someone is owning an "all-in-one" ©®TM red cartridge and appreciating shooting-up games, that would be cool to receive some feedback about DZ2SGM3 compatibility in the comments of this article



Additionally, I'm also sometimes asked what kind of cartridge is required to play Dezaemon 2 games.
The answer is both simple but also a bit complex too, so maybe it would be a good idea to write about it in this blog

The simple answer is "DZ2SGM3 is compatible with any cartridge providing in-game backup memory feature".
→ DZ2SGM3 was developed simply as an application using standard backup API detailed by SEGA and should work with any cartridge supported by this standard backup API.

Even if I'm the main developer and manufacturer of Gamer's Cartridge, that's not a reason to restrict my software projects to this specific kind cartridge  I kept support for a wide range of backup devices for the simple reason that it's cool to make more and more people appreciating games on Saturn


The complex answer comes from the two following points :
 - There are many kind of cartridges, and not all provide in-game backup memory
 - As DZ2SGM3 is not an official application, it is required for the Saturn to be able to boot applications from CD-R


Rather than writing boring theory about the internals of each kind of cartridge (is there somebody other than me interested in that ?), let's simply detail the compatibility status and the pro and cons and also the additional requirements needed to get DZ2SGM working for each kind of cartridge


① Official Memory Cartridge
That's the official memory cartridge, sold by Sega during the good old times Saturn was still a commercial product.
Because of that, production of theses cartridges stopped around 20 years ago and consequently cartridges available today may damage easily.
The only advantage is that it's an official product, made with genuine electronic parts ... but it's now a bit too late if you want any official support for repairing a broken cartridge
It's not possible to install Pseudo Saturn Kai on such kind of cartridge, so additional mod (installation of modchip or ODE) is required to use DZ2SGM.

Pro : Official product from Sega.
Cons : Contents may suddenly corrupt : don't use to store important save data.
Additional requirement : modchip or ODE


② Action Replay
The super famous Action Replay : main advantage is from being relatively cheap, widely available, and to provide 1MB/4MB expansion memory.

Disadvantage is that technology used in theses cartridge didn't changed significantly for the last 20 years and that in the meanwhile production of this technology (flash ROM and RAM) stopped. For that reason, quality may not be at the meet even if cartridge is sold as "brand new".

In-game backup memory feature is not available for such kind of cartridge : even if advertised as featuring "4M memory card", this is available only from cartridge :games aren't able to access it.
Additionally, this "4M memory card" is a bit ambiguous because it refers to the best effort when save data buffer (internally stored in cartridge 4M expansion memory) can be compressed into lower half of cartridge flash ROM = 128 KB ... if data can't be compressed then an error message will be displayed.
It would had been more honest to advertise that as "Guaranteed 128KB, maximum 4MB memory card not accessible from game", but this is a bit less sexy in term of advertising

Because of the lack of in-game memory feature, it is required to use a separate backup device (such as Saturn floppy disk drive) to use DZ2SGM.

Pro : Widely available, relatively cheap, and provides 1MB/4MB expansion memory.
Cons : In-game backup memory feature not supported.
Additional requirement : Saturn floppy disk drive.


③ Gameshark, and other clones
That's Action Replay without 1MB/4MB expansion memory and usually worse overall quality : if you have one still working, it is worth trying to use it but if that's not the case then considering for (at least) an Action Replay is usually wise decision.

Similarly to Action Replay, because of the lack of in-game memory feature it is required to use a separate backup device (such as Saturn floppy disk drive) to use DZ2SGM.

Pro : Worth using if you found a spare cartridge still in working condition.
Cons : No 1MB/4MB expansion memory. Poor hardware quality.
Additional requirement : Saturn floppy disk drive.


④ Memory Card Plus
That's more or less a Gameshark with a specific firmware installed. Main advantage of this firmware is that it allows games to directly access cartridge backup memory.

Similarly to Gameshark, hardware quality is questionable, which makes backup memory to be easily corrupted. Additionally, backup memory capacity is around 200 KB so that it usually can't handle more than three Dezaemon 2 user games.
Installation of Pseudo Saturn Kai will remove backup memory feature, so additional mod (installation of modchip or ODE) is required to use DZ2SGM.

The little side story about this cartridge is that its unique way of handling backup memory gave me the idea and motivation to develop Gamer's Cartridge
Back in end of 2012, I thought only mapped memory chip could be accessed as in-game backup memory.
But seeing that this cartridge was featuring only boot ROM (I tried to dump backup memory ROM, but didn't found anything there and instead there was a small firmware and save data stored in boot ROM area) made me realizing that anything could actually be shown as backup memory device to a game, which was the start point of Gamer's Cartridge project.

Pro : This gave me the idea to develop Gamer's Cartridge !
Cons : Access is not so reliable : whole contents can be wiped after writing one save there. Installing Pseudo Saturn Kai removes the memory cartridge feature.
Additional requirement : modchip or ODE.


⑤ "all-in-one" ©®TM red cartridge
That's the equivalent of Action Replay and official memory cartridge blended in a single PCB. Main advantage is to feature theses two cartridges in a single one, which is convenient for playing a wide range of games.

Major disadvantage is that similarly to Action Replay and official memory cartridge, technology used didn't changed significantly for the last 20 years and that in the meanwhile production of this technology (flash ROM and RAM) stopped. For that reason, quality may not be at the meet even if cartridge is sold as "brand new".

Additionally, similarly to official memory cartridge there is only limited save data integrity check available (file system is rudimentary, and only the first bytes of the ROM are check to verify if a backup memory cartridge is available or not), which is a design flaw from SEGA : it works fine in ideal conditions of cartridge correctly inserted and ROM not corrupted, but will ask to format the cartridge in all other cases.
That's acceptable if you just want to copy save data (there are plenty available in Pseudo Saturn Kai Save Data Manager, so have fun with them !) and play a little to a game, but not recommended if you want to play a RPG and won't stand to suddenly lose all your progression in the game.

Pro : Both official Memory and Action Replay in a same cartridge.
Cons : Contents may suddenly corrupt : don't use to store important save data.
Additional requirement : none.


⑥ Gamer's Cartridge
Well, that's my own cartridge project, so my opinion may be a bit biased, but it's recommended if you don't want your saves to be corrupted : as SD card file system is used, it is significantly stronger than the file system used on official memory cartridge.
It is also handy if you want to backup or share your save data because exporting saves to PC can be done by simply copying files from SD card.

Additionally, it features virtual floppy disk device support, which doubles the number of Dezaemon 2 user games simultaneously available : it is limited to 5 games with other backup memory cartridges (and count may be lower because of ROM size limitation) while a total of 10 games (5 on cartridge device, and 5 other ones on virtual floppy disk) can be handled by Gamer's Cartridge.

Moreover, DZ2SGM can be accessed directly from SD card so that there's no need to swap between DZ2SGM CD-R and Dezaemon 2 CD-ROM.
Major lack of this cartridge is the non-availability of expansion RAM. Also, as SD card access is not super fast, save data access is a bit slower than on other cartridges.

Pro : No risk of losing saves because of data corruption. Data can be easily backed up to PC or shared with other gamers.
Cons : Limited availability. 1MB/4MB expansion memory not available.
Additional requirement : none, and DZ2SGM can be run from SD card.



DISCLAIMER : play Dezaemon 2 (and other Saturn games) at your own risks ! I'm not responsible of any eventual damages caused to your save data, you Saturn, your cartridge, your dog or anything else !



SMALL REQUEST : I don't have the budget nor the free time to test DZ2SGM3 on all combinations and variations of cartridge and ODEs.
So it would be very appreciated to receive feedback about if it works on your own Saturn setup

Feedback can be left by simply adding a comment at the bottom of this article : it is free, doesn't requires any kind of registration, and takes something like 5 minutes to be written ♪ In advance, thank you for the feedbacks

Read more Dezaemon 2 Save Game Manager 3 : test on CD-R

CRC merge done !

Written by cafealpha 4 comments
Among the boring tasks remaining in Pseudo Saturn Kai development, there was "IP header CRCs merge to cheat codes list" task remaining ...
... There was, because I finally finished to merge the CRCs I could gather here !
Well, I think there are still 20-30% of the games in cheat codes list still not associated with any CRC, but anyway that's a fair amount of work done so far



Last CRC merged, at the end of cheat codes list
Left text file : list of IP headers and their CRCs for each games I have here
Right text file : Pseudo Saturn Kai cheat codes list


What is that CRC thing ? That's a value I use in order to identify each Saturn games. Thanks to such CRC value, it's possible to easily associate each cheat codes to a given game, and consequently automatically select game in cheat codes list according to CD-ROM inserted in Saturn CD lid.
You don't like to manually select a game from cheat codes "select game" menu ? Me too So that I added this "automagically select game" thing in Pseudo Saturn Kai cheat code feature


By the way, it's probably a bit late for a surprise effect, but I'm glad to to announce that cheat codes feature will be available in Pseudo Saturn Kai next release

Basically, cheat codes handler now works ... for a majority of games tested so far. And user interface regarding cheat codes stuff is more or less okay ... but still needs to be perfected here and there.

So as you guessed, there are still details to complete until considering Pseudo Saturn Kai cheat codes feature ready for public release, and unfortunately polishing details usually (always) require time in software development, so let's hope next release will be available in a near future, which is "this year" in my own time scale regarding Saturn projects


Nights into dream cheat codes working !
That's the first game I used in order to test assembly version
of cheat codes handler


Having fun with cheat codes and USB connectivity on Radiant Silvergun
In-game memory contents are mine ! Ph34r my l33t h4Cklng sKI1lZ


So, the next development jobs are to support multiple CRCs per game : cheat codes list have several CRCs defined for some games (this is typically used for games using several CD-ROMs), but Pseudo Saturn Kai currently supports one CRC per game.
Modifying the cheats list → data conversion utility in order to support multiple CRCs will be also an occasion to add some extra verification stuff regarding CRC, such as verifying that two different games don't collide on the same CRC, which is something like around 2500 different CDs versus 4 billions possible CRCs ... hence should be OK, but who know what may happen when developing software


After that, it will be probably be the time to do some testing on as many games as possible, in order to verify that cheat code and game are correctly associated, and to verify that cheat codes are correctly working, etc.
Such task will require a significant manpower, hence to find a lot of beta testers. So if you're ready to give a hand, please stay tuned

Read more CRC merge done !

WIP : Saturn Save Data Manager, Pseudo Saturn Kai & USB dev cart, etc

Written by cafealpha 6 comments
Pseudo Saturn Kai  firmware development is currently paused in order to focus development into Save Data Manager application

Saturn Save Data Manager is an application in order to manage (copy, delete, etc) save data on your Saturn.
Basically, it is similar to the save data manager provided by Saturn BIOS, but also offers extra things, such as multiple selection of items to copy/delete, GPL license, and also save data import from various formats.

data/images/20160125_bupmngr_main_screen.tb.png
Saturn Save Data Manager main screen running on emulator.
It also works on real hardware, but I was too lazy
 to take a picture of my TV screen


At first, this Save Data Manager was made only in order to test Virtual Memory Cart behavior, so maybe user interface looks a little cheap, but I plan to improve this in the future according to first users eventual feedback


I really want to thank two people whose work helped to make this application :
 - Rockin-B : for his good old SaveGameManager application (yes, I copied the name of the application).
 - hitomi2500 : for his ss-save-parser application that really helped to understand Saturn Save Data structure. Also, I merged its Save Import related sources to my project, so that copying save data from dump file is possible directly on Saturn too


And, there's one screen that I need to show from ss-save-parser application : the "extract options screen". This is image is worth a thousand words when trying to explain how save data is arranged in Saturn backup RAM

data/images/20160125_save_data_structure.png
THE screen everyone need to see before
hacking Saturn saves data
Save data is arranged as header
(containing save name, comment, etc),
then blocks allocation table,
then data itself, with header data at
the beginning of each blocks.




Extra #1 : last month, I took a video of USB dev cart in action !
Nothing really spectacular however, but please watch it if you want to see what developing application with USB dev cart looks like
data/images/20151217_usb_dev_cart_demo.jpg
My dev laptop, a plain, not modded Saturn and USB dev cart,
ready for testing Saturn application on real hardware


Summary of the video (more details available in youtube page of the video) :
 - USB dev cart firmware update
 - CD-ROM unlock by using Pseudo Saturn hack
 - Upload and execution of program from PC to Saturn via USB, allowing testing of application performing CD-ROM access.


Extra #2 : with this USB dev cart, I could dump Shining Force Scenario 1 saves from Gosub .
You can find theses saves here.
data/images/20160112_gosub_sf3sc1_t.jpg
Backup cartridge with gosub's saves on it.
Thanks to Darius for providing me the cartridge

Gosub pushed each Shining Force character to their maximum competence on real hardware without using any cheat.
Really impressing work oO


Extra #3 : last month, my car reached its life achievement : 777777 kilometers :]
data/images/20160120_lucky_seven.tb.jpg
Wow. Many lucky seven. So beauty
Next challenge : 777 777 kilometers !


Read more WIP : Saturn Save Data Manager, Pseudo Saturn Kai & USB dev cart, etc

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 ?

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

Rss feed of the tag