PPCenter :: devblog

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

I wanted to publish an article this October ...

Written by cafealpha no comments
... and all of a sudden, November arrived

It's not like being under a quota of articles to write every months would stop the financing of my Saturn projects and in fact, as described on my "donate" page or this blog article, I don't have any interest in crowdfunding, or some kind of third party financing : if I'm not in the mood, or don't have enough free time to update this blog, then I don't update it

But well, moreover not being paid for not writing blog articles, as I actually have to pay to keep this blog alive (web page hosting is cheap but not free, but at least it's my own homepage ), I like to feed this blog from time to time even when being busy with real life things
So don't worry, I didn't stopped this blog : currently, I have one ongoing article that is waiting for its last paragraph and proofreading etc, but as I started more than two weeks ago (yes, that's my usual pace when preparing blog articles), please be patient until I finish it
I do have some ideas for future articles too, but theses are just ideas currently recorded as single lines in my TODO list, so I don't know when I actually start writing them


Regarding Pseudo Saturn Kai project, I ... didn't had a lot of free time to continue it recently In fact, I think I just turned on my Saturn once last month just to test if -as requested by someone by email- DoDonPachi worked with Pseudo Saturn Kai or not. The game worked fine here, so I turned off my dev Saturn an put it back in my closet for better times when I will be more available
BTW, I'm currently experiencing an unexpected burst of things to do at work, so it may take a while until things return back to normal But as I can't live without doing my Saturn projects, I promise that things will return back to normal as soon as possible


... Well, the contents in this article are a bit poor, so let's fill remaining space with random facts about my life recently The "okra" plant I wrote about in a previous blog article is still going well and I continue to water it regularly.

Okra in all its glory, 2018/10/18

Since summer is now finished, I no longer have to water it everyday, so that I now just do this regularly enough to prevent it from finishing yellow and burned  And yes, the kid who took back that from school completely forgot about its existence
I'm not keen on gardening (as suggested on the picture above, I don't even own a garden), but have a couple of pictures of other green things in reserve ... and I keep theses to fill future small posts

Read more I wanted to publish an article this October ...

Back to Saturn occupations

Written by cafealpha no comments
Hi everybody, I hope you had great holidays
On my side, I was busy with holidays during second half of July and whole August, but now back normal days routine

I plan to write a blog article about my holidays, but since preparing it takes longer than initially expected, please accept this small article to give a proof I'm still alive even after an handful of typhoons that crossed here during this summer

And, as I'm back to normal days routine, I would like to introduce to you -and in exclusivity- a free virtual tour to cafe-alpha's Saturn cartridges productions facilities

... Well, I'm too lazy to take a lot of pictures, so let's introduce the cartridges warehouse #2
I own three warehouses for storing cartridges before putting them on sale :
 - Warehouse #1 : receives cartridges from production facilities, and waiting for final QA testing.
 - Warehouse #2 : stores cartridges from warehouse #1 after QA testing. Also stores cartridge labels.
 - Warehouse #3 : stores cartridges which failed QA, or cartridges not for sale such as USB dev cart, or old prototypes, etc.

Warehouse #2 front entrance.
In the background can be seen the iron table ... not for
soldering, but for clothes
Please wear helmet before entering


The inside of warehouse #2

There are several labels available for Gamer's Cartridge, and I let user to choose their favorite one during ordering process. So in order to speed-up ordering process, I usually prepare one or two cartridges with popular label ... and hope that user will choose it
Of course, I also keep remaining cartridges with Action Replay labels (as received from cartridge shells supplier) so that it is possible to respond to unusual label choice too

Capacity of warehouse #1 is similar to warehouse #2, and there are no plans of construction works to extend them : developing and assembling Saturn cartridges started as an hobby, and I really don't want all the magic and fun from this hobby to vanish by making production, management, etc as serious as a work activity

Read more Back to Saturn occupations

Back from Holidays

Written by cafealpha 2 comments
Just a small post to indicate I'm back from holidays
In fact, I went back home one week ago, but didn't had time to write this article so far ... but in comparison with other articles on this blog, this one is quite timely anyway


Hand Spinner ! 540 Yens ! 売れています!
It seems I took vacations to the last place in the world where
hard spinner are still popular


Pseudo Saturn Kai development is continuing at its own rhythm. Development finally escaped from off days without a lot of progress, and is now in the period when I want to hurry to finish "this and that features" before release. Let's hope that motivation will continue flowing, and also that work won't be too greedy with my free time too

I honestly have no idea when Pseudo Saturn Kai will be ready for release except than "when it's done" So, please be more patient until having fun with cheat codes !

Among other small things, I'm currently making some updates to the credits page. Because a careless mistake until version 6.074, credits page was available only in Pseudo Saturn Kai full version, hence this will be the debut for it on next release for Action Replay users

Read more Back from Holidays

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 !

Pseudo Saturn Kai 6.074 released !

Written by cafealpha 2 comments
Pseudo Saturn Kai 6.074 released ... more than three months ago  Sorry for the late news, but that's still some quite acceptable delay in comparison to frequency I post articles in this blog

The release was initially announced on SegaXtreme forums, because it is my favorite forums for Saturn things (more than 11 years I registered to it !
Big thanks to the forum moderation/maintenance/support team for their steady good work ). Also the news was announced on SegaXtreme first ... because writing an article there takes less time than writing an article on my blog
So since I'm a lazy person, let's slightly arrange this article from what I wrote on SegaXtreme forums !


What's new in this version ? Well, there's basically, not a lot of major features (sorry !), but fix of a critical bug affecting Gamer's Cartridge, and addition of some "minor, but that I wanted to add someday" features.

______________
Features for Gamer's Cartridge users

Indirect Dump
: Dump cartridge (boot cartridge, or official memory cartridge, or any other cartridge) by compressing its contents to internal backup memory, and then extracting it to SD card when Gamer's Cartridge is inserted.
Because of small size of internal backup memory, it may be required to repeat the "insert memory cartridge → Indirect Dump → Turn off Saturn → Insert Gamer's Cartridge → Indirect Dump → Turn off Saturn" cycle several times, but at the end cartridge is dumped
Requires some motivation and free time on user side (It took me 45 minutes in order to dump my good old very first official memory cartridge), but this way of dumping doesn't requires to unsolder cartridge memory chips, which is the most important for me !
Note : if you are the lucky owner of Saturn FDD, then floppy disc is used instead of internal backup memory, and consequently dump is significantly faster and simpler.


Left : Screen display after compressing dump data
to internal backup memory
Right : Screen display after writing dump data from
internal backup memory to SD card
Theses pictures were taken on Indirect Dump's first successful test

One extra application of this feature was to dump ROMs from legacy cartridges such as X-Terminator, Satellite, ST Key and "8MEG memory cartridge". Curious people wanting to test theses cartridges theses ROMs can found them available for flashing (at your own risks) in Pseudo Saturn Kai Save Data Manager.
Special thanks to A Murder Of Crows, AtariBorn and SaturnGuru who dumped their cartridges ... and reported many bugs from early versions of Indirect Dump feature 

 
Indirect Dump development : the cut scenes
Left : dump data corruption (see below for details)
Right : Dump file CRC check error. Fortunately, only dump
computation routine was buggy, and dump feature itself was working


Save Data corruption bugfix : This corruption problem concerns saves on Saturn internal memory, with save data size making save sector allocation table finishing exactly at the end of a sector. Very few games are concerned, and the only example I could find so far is Albert Odyssey.

I found this problem when testing Indirect Dump : data compressed then written to internal save memory wasn't then correctly read and decompressed to SD card.
I initially thought this problem to be caused by Indirect Dump itself, because at the time I had this problem, I just finished to mess with data alignment error when preparing indirect dump's compressed data, so thought that this was the next bug to fix regarding Indirect Dump
Quick investigation showed that contents of read data wasn't as expected, with a small portion of data being same as data at unrelated offset ... so maybe a problem when compressing and adding header etc to Indirect Dump save data ? It took me then a around one hour of testing and code review until I was sure that culprit was actually not Indirect Dump itself, because re-read of save data didn't matched with written save data !
Then, testing Indirect Dump with same input data and virtual memory cartridge disabled worked as expected, which 99% confirmed that problem was located on virtual memory cartridge side !

So yes, "virtual memory cartridge" actually manages save data handling for all backup devices (internal save memory, memory cartridge, and even Saturn FDD too) : this is possible because Gamer's Cartridge hooks Saturn backup library at relatively high software level.
In comparison with 1:1 hardware emulation of save memory cartridge, this has the advantage of being free of capacity limitation inherent to memory cartridge's chips, and also allows to store save data individually on SD card (two files per save, vs big file containing all saves for 1:1 cartridge emulation). On the other side, all the save data handling software has to be re-written, so care has to be taken when re-implementing it

So, this is quite an uncomfortable bug I have to face : save data are corrupted when being written to internal save memory, and Gamer's Cartridge was released around 6 months before, with consequently cartridges potentially corrupting save data in the wild.
Fortunately, while being hard to find, the bug wasn't hard to fix  Basically, this was a timing error when updating current save data block ID, as described below :


Internal Save Data corruption related source code
Left : before fix
Right : after fix



Since I really didn't want to fix half of the bug (and having to fix the remaining half on other release), next step is to add a test bench tool for internal save data memory access !
"Test bench" is a program that automatically tests a lot of patterns for a given function or module. Ideally, all major modules should have their test bench, but in the real world, making test bench programs takes time, so programs are usually manually tested with 2 or 3 patterns, and then developer prays for all other patterns being bug-free 
... And to tell you the truth, this test bench was the largest one I wrote so far  It's not impossible a bug to be still hidden in an untested pattern, but anyway I'm quite confident about the reliability of internal save data support now 

Here is how test bench screen looks like on my dev environment :

SatLink and Yabause couple showing test bench screen.
SatLink and Yabause : my best friends when testing Saturn programs


Screen copy above was taken after fixing internal save data support, and I forgot to take a similar screen copy when bug wasn't yet fixed ... latest Save Data Manager CDROM's + Gamer's Cartridge with firmwave 6.037 should display error in test bench screen, so it would be funny to try it ... maybe someday 
BTW, Test Bench is still available in Save Data Manager CD-ROM (it took me a bit of time to add test bench screen, so didn't wanted to remove it after fixing internal save data corruption bug !), but this test bench screen requires a trick in order to be accessed : did you found it ?

That's all about internal save data corruption : I fixed it, and checked a lot of patterns about internal save data access, so similar problem shouldn't happen in the future !
Additionally, I didn't received any feedback from users about this bug, so let's hope it didn't corrupted game saves elsewhere than on my dev laptop



Autodump : Automatically dump saves from internal backup memory to SD card, so that they can be restored in the case they are lost because of depleted CR2032 battery, or save data manipulation error, etc.
With this feature, you won't have to say anymore "I lost all my saves because of that $%QTY@!#% CR2032 battery" 
Since this feature uses SD card, it is available on Gamer's Cartridge only. And no, I won't write save data into Action Replay's cartridge flash ROM : flash ROM chips are not designed in order to be written frequently, hence using flash ROM as read/write storage area may prematurely brick your Action Replay cartridge.
If you're not convinced about flash ROM limited write cycles, I can make some "cartridge self destruction" feature that would continuously write and erase random data to flash ROM, but don't claim that your cartridge no longer boots after that


An alternate solution in order to keep internal save data change the chip holding internal save memory to a FRAM one that doesn't requires battery to retain saves data, as detailed in db-electronics.ca.
(there are maybe other alternate solutions, so please let me know in the comments if I missed one)

The advantage of this FRAM mod is that saves are not lost when CR2032 battery is depleted. There are however several disadvantages :
 - This is an hardware mod, which requires to remove a chip, then solder another one, hence quite difficult to do.
 - CR2032 battery is still required in order to keep clock and language informations.

For being the developer of Pseudo Saturn Kai and Gamer's Cartridge, my opinion is a bit biased, but autodump is a better solution, because autodump is not an invasive mod (plug cartridge vs change chip on Saturn motherboard), and the FRAM solution doesn't allows to dump save data to modern media device. Anyway, I don't force you to like my projects, so if you don't like autodump, then don't use it


Virtual Floppy Disk Drive. Simulate Saturn Floppy Disc Drive (FDD) behavior, with save data stored on SD card.
This feature Worked fine with Dezaemon 2, which can now handle 10 saves at once (5 saves from cartridge, and 5 other saves on FDD ), but I didn't tested for other games using FDD, so any feedback is welcome.
This is a feature available on Gamer's Cartridge only too. Thanks to this feature, floppy disk access is available without having to plug any floppy disk drive to Saturn 



______________
Features for Action Replay and Gamer's Cartridge users

Proper support of FDD in Save Data Manager : Save Data Manager now supports both two partitions of Saturn floppy discs for all common operations such as copy, move, delete, import, dump, etc.
Special thanks to Dezaemon DB for big assistance in beta testing


Backup devices informations from Save Data Manager :
First device is internal backup memory : the easiest to handle
Second device is backup memory cartridge,
unconnected (zero partitions detected) in this picture
Third device is FDD : two partitions, wrong unit ID returned,
and always set at third position in devices information
array, even when cartridge is not available.
Basically, FDD is a real trouble-maker when trying to handle backup devices



Save Data Manager development cut scenes : trying to format FDD
(format for both two partitions is displayed in a single picture)
Don't worry about the horrible display of error
messages : it's (finally) improved in version 6.074


Soft Reset Patch
: Change the "A+B+C+Start key combo" soft reset from "exit to multiplayer screen" to system reset. This idea is not from me, but from neuroacid (rmenu developer).


More saves to import from Save Data Manager
. The most noticeable addition is saves from Urawaza Dataro cartridge, containing quality saves for Japanese games. Special thanks to Madroms for dumping the cartridge, and providing me its dump file 


Other
: Fixed many bugs, and added other bugs ... the usual routine 


(Not a software feature, but) future users of Gamer's Cartridge may appreciate the couple of new labels, designed by beebaraka-sensei (twitter) for artwork itself and Dezaemon DB (twitter) for the final editing of the labels. Many thanks to them for the very good work !


Dezaemon-themed labels ... could you find out the odd label ?

The design on theses labels is themed on Dezaemon 2, and as you can see, the Dezaemon character on the game cover grew in the right way 
I personally do appreciate the white themed one





Before being asked "where are the cheat codes ?", please let me reply :)
Cheat codes support is still under development. Menu in order to select game and its cheat codes is 90% done, but the bit of code in order to apply codes is still TBD. I didn't touched this feature for around half a year mostly because of lack of free time, motivation, and being busy in developing other features. I plan to finish this for "next-next release" however.
Update three months after writing the explanation above : cheat codes on Pseudo Saturn Kai are working on few games !! 
There are many things remaining until reaching an "OK to release" state, but at least the cheat codes core feature seems to work, which is quite a relief for me :)

By the way, there's a trick cheat codes selection menu in Pseudo Saturn Kai 6.074 : did you found it ? It won't do anything else than showing games list and cheats for each games, so it's not worth spending more than 10 minutes in looking for the appropriates key(s) combo and timing however.


Yes, this release have (at least) two Easter eggs available Coincidence with release timing during Easter period ? I think not


Apart from cheat codes, there are many other things scheduled for future releases : I initially planned to release everything at once, but had to make this intermediary release in order to fix the save data corruption bug on Gamer's Cartridge, so stay tuned


PS : Special thanks to Stac for beta testing  All the features above wouldn't exist without his help !!!

Read more Pseudo Saturn Kai 6.074 released !

Rss feed of the tag