Catched a "cold" :/

Written by cafealpha 9 comments
Classified in : etc, Mylife Tags : mylife, treatment
Yes, a "cold" : at first I though it was just a cold, but regular medicines from doctor nearby and drugstore didn't cured anything, and it lasted for a around a week ...

data/images/20160923_catch_a_cold.jpg
Symptoms : 40℃ fever (36.5 usually),
completely dizzy,
cough again and again, etc


So I went to a larger hospital, and blood examination gave a CRP rate of 13 mg/dL ... typical limit for this is 0.30 mg/dL, so I understood that it was more serious than a cold ...
And X-rays examination showed what I was expecting : a pneumonia on left lung

So I can't guarantee I will answer emails this month, but I fought with more severe diseases, so I'll be back for sure

Update (2016/09/26) : Lost a couple of Kgs in the war, but I'm better now ! Medecine really does miracles
My pneumonia was a "walking pneumonia" (wikipedia) , and could be cured with antibiotics, hence without need to stay at hospital.

Update (2016/10/05) : I'm now 95% OK (still some cough, but not a lot). Thanks to seal1 and vbt for their support comments

Read more Catched a "cold" :/

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 !

Pseudo Saturn Kai no longer working on Action Replay ... and its rebirth !

Written by cafealpha 2 comments
Classified in : Saturn, Mylife Tags : cartridge, debug, pseudosaturn, saturn
So TehNewParalyzer told me he likes Pseudo Saturn Kai and plans to put many Pseudo Saturn Kai videos on his youtube page.
Very good ! That's great to see people still enjoying using Saturn nowadays

data/images/20160803_action_replay_metal_slug.tb.png
Metal Slug with Action Replay cartridge,
compatible until you press Start button
(Click in order to see youtube video)



At that time, his last video was about Uno DX, and was experiencing issues with it.
That's a bit weird, because this game shouldn't cause compatibility/problems ... maybe a bad burn or bad dump of the game ?

By looking at the problem in details (everything is explained in his videos, which is very convenient  ), I see that CWX loader doesn't works anymore for all his games, even the ones that played well before, but JHL loader still works well.
Very weird : CWX hasn't the best game compatibility, but should work on all known models of Saturns

So I request TehNewParalyzer to give details about this problem :
1. From loader selection menu, press B button, select "Self Test", and select "Test once only".
Please let me know if error message is displayed in "Main prgm" or "Bootstub" lines.
2. Please try CWX loader with an original game, and tell me if it booted or not.
3. If possible, please try with game burned on another CD-R brand and/or burned a different (lower or higher) speed than usually, and tell me if it boots with CWX loader or not.
4. If possible, please try with another Saturn and tell me if you can get games booting.
5. If you have a spare Pseudo Saturn cartridge (Action Replay, or Game Shark, or Memory Cart Plus, or any other clone), please give a try with it and tell me if you can get games booting.


Fortunately, there wasn't need to test after step 1 : self test feature was throwing a CRC error on when checking firmware's main program.
Okay, so it looks like cartridge flash ROM is corrupted, and consequently few areas in main program code can't longer be executed.
Why Action Replay's flash ROM would corrupt ? I don't know exactly, but I suspect :
1. Extra feature in Uno DX, corrupting cartridge's firmware in the case you use too much +4 cards
2. Poor quality of Action Replay flash chips.

Rather than thinking too long about causes, let's take measures in order to fix the problem : re-flashing the cartridge should do the job.
And it did the job : no more CRC error

data/images/20160803_pskai_self_test.tb.png
Correct self-test results after firmware re-flash.
(Click in order to see youtube video)


One of the purposes of Pseudo Saturn Kai's self test feature is to help Action Replay users : by the past, I had few reports from other users having their Action Replay no longer working, so I thought about a feature in order to check the integrity of their flash ROM.
I'm glad this feature was useful to at least one Pseudo Saturn Kai user

data/images/20160803_ice_cube.jpg



For those who want more details about Action Replay flash chips :
First, Action Replay cartridges (and their clones) are using old flash chips no longer produced, which means theses chips are either old, or counterfeit. In both cases that means the quality of this chips is a bit shady.
Moreover, Action Replay original firmware may shorten flash ROM life length, because it writes to flash ROM when cheat codes selection is changed, or when cartridge internal save functionality is used : the more you store save data, or select Action Replay codes, the more likely it is to be damaged.

There are ways to improve this problem : the simplest one is to use SST39SF flash chips (5V logic, still produced ), but that requires changes on Action Replay PCB, and to make several changes Action Replay firmware (because write access to new flash chips is not compatible with old ones).

Changes in PCB is probably not a real problem for Action Replay manufacturers, since Action Replay PCB is shrinking year by year (in order to reduce manufacturing costs) so I suppose that Action Replay manufacturer still have at least one guy capable of designing PCB ...

Changes in Action Replay firmware is probably what's preventing manufacturers from using new flash chips : people who wrote Action Replay original firmware (around 20 years ago !) are probably retired now, and I doubt there are still people fluent with SH2 assembly working in Action Replay manufacturing field



A little unrelated (but I'm too lazy to create an article just for that) : Pseudo Saturn Kai compatibility list is growing little by little
There are currently 259 games available in the compatibility list, so there are high chances to find your favorite game listed in it

Special thanks to people who contributed to this list, especially Thales Peres, who provided test reports for around 150 games !

Read more Pseudo Saturn Kai no longer working on Action Replay ... and its rebirth !

[Dev journal] Pseudo Saturn Kai game loader weird bug, and its bugfix

Written by cafealpha 3 comments
Classified in : Saturn, Programming Tags : loader, software, bug, development, debug
(Note : this bug was fixed something like 3 months ago. Pseudo Saturn Kai I first released last month works well  )

First : of course, old versions of Pseudo Saturn (versions up to 0.832) work
But who knows what may happen when doing software engineering (and any other engineering in fact) : it's very common to break something without directly modifying anything to it !

So it happened : in December 2015, Pseudo Saturn Kai beta tester reported that it wasn't possible to load CD-R game.

data/images/20160325_loader_bug.tb.jpg
What game loader bug looks like.
disc_type=0x0003 means that CD-ROM authentication failed


As usual, I first asked if something was wrong on tester side  "Bad game dump ?", "Bad burn to CD-R ?", "Did you do something else bad ?", etc.
(I know that's a bad habit to suspect beta testers doing something wrong, but it sometimes help in fixing problems)

Beta tester was actually doing his job well, and bug couldn't be reproduced in next beta version, so I though it was caused by outdated intermediate file in build process (this happens, for example when I modify header file only : I'm too lazy to fix makefiles about this ) : cleaning up whole project and rebuilding everything prevents such kind of problem.

But I wasn't satisfied with such "half-baked" bugfix, and actually could hear it saying to me "I'll be back"


And, two months after that time, I receive same bug report from same beta tester ...
Well, at least, I didn't had to re-ask him if he tested correctly or not : it was clear that this was December 2015 bug returning back.


First, let's verify do simple things and try to reproduce the bug here : my "main" dev Saturn is a modchipped one that plays CD-R, even when firmware is reported not working. Trying with a "plain" (unmodded) Saturn actually reproduces the bug : cartridge boots, but definitely doesn't want to play CD-R.
In same conditions, let's try with an old version of the firmware : oh, it can play CD-R

So I could "feel" the bug, and its capricious nature.
"Typical" capricious bug is "uninitialized global variable" one, that reproduces after doing the same action twice, or after going to a given screen, returning back to another screen, and doing a given action.
Saturn has relatively few RAM available, and I don't want to use dynamic memory allocation on such "low specs embedded device", so such "uninitialized global variable" happens from time to time.

But this bug was even more capricious than "uninitialized global variable" one : same action reproduces the bug with a given firmware, but can't reproduce the bug with another firmware

First, since I have no idea about the cause of such bug, I added some debug screen that displays few details (= the return values of each functions called when unlocking the CDROM unit), and also some text-based logs, plus RAM dumps stored SD card : that was one of the reasons why I made SD card-based cartridge for Saturn : it allows to prepare bug report on user side

So I "just" have to wait until bug is reproduced with next versions, and beg for logs/dumps/etc on that time.
Of course, the bug reproduced, and of course ... logs/dumps/etc didn't helped a lot

data/images/20160408_sakura_6008.tb.jpg
Game loader failure screen.
Basically, it shows that something is wrong after
calling cd_move_sector_data_cd_auth function.


Fortunately, there are some explanations about Pseudo Saturn CD unlock exploit on assembler forums :
1. Use the Put Sector Data command to put a whole bunch of sectors into the CDB - all with FAD 150, Mode 2 in their headers.
2. Call End Data Transfer to push them into the selector.
3. Call Copy Sector Data, starting a copy of all those fake sectors into the selector that the Authenticate Disc command will be using.
4. Immediately (like 15 microseconds later immediately) call the Authenticate Disc command, specifying the same selector.


"Immediately" : firmware have to be fast on step 4.
And what changes in CD-ROM unlock code from a firmware beta version to another is basically its execution start address.
So I started to think : "maybe CD-ROM unlock code will work better if loaded from a constant address ?" : to do this, I moved all CD-ROM code to a separate stub, loaded from a constant address (0x06004000).

And bug didn't reappeared so far

Okay, this way of fixing things without a proper verification is a bit dirty
But it works, and that's the most important
(I suspect the cause of this bug related to SH2 cache : if SH-2 have to refresh cache during time critical section of CD-ROM exploit, code takes too long to execute, and CD-ROM exploit fails ... it's just a guess, and I realized about it after fixing it.)

Special thanks to Stac, Shazz and A Murder of Crows for beta testing
And special thanks to jhl and CyberWarriorX for detailing Pseudo Saturn's CD-ROM exploit ! This helped a lot in fixing this bug

Read more [Dev journal] Pseudo Saturn Kai game loader weird bug, and its bugfix

RC2 - The good one

Written by cafealpha no comments
Classified in : PPCenter, Saturn, Programming Tags : none
Pseudo Saturn Kai Release Candidate 1 : flasher utility wasn't very intuitive to use → fixed.
Release Candidate 2 seems to work fine, so ...

I officially declare Pseudo Saturn Kai version 6.036 as first publicly released version

Want to upgrade your cartridge firmware ?
No problem, firmware installer, source code, and many other things are available from /pskai/#download address


Many thanks to beta testers who could make this project mature enough to be releasable
And of course, many thanks to Pseudo Saturn team too

Note : this doesn't means that Pseudo Saturn Kai is bug-free !
But, I consider that Pseudo Saturn Kai is stable enough to open it to circle wider than beta testers. If you find a bug, please report it in Pseudo Saturn Kai official thread .


On my side, releasing Pseudo Saturn Kai was the occasion to :
 - Release Gamer's Cartridge (page is still not up-to-date, I shall update it soon)
 - Delete beta builds for testers : here is the delete log as a souvenir :
Response:    250 Deleted Planche_20160514.png
Response:    250 Deleted Planche_20160514.pdf
Response:    250 Deleted pskai_20160426_wip.7z
Response:    250 Deleted pskai_20160424_wip.7z
Response:    250 Deleted pskai_20160421_wip_6028.7z
Response:    250 Deleted pskai_20160416_custom_logo.7z
Response:    250 Deleted pskai_20160415_wip.7z
Response:    250 Deleted pskai_20160414_wip_6025.7z
Response:    250 Deleted pskai_20160414_wip_6022.7z
Response:    250 Deleted pskai_20160412_wip_6019.7z
Response:    250 Deleted pskai_20160412_sakura_wars_deza2.7z
Response:    250 Deleted pskai_20160411_sakura_wars.7z
Response:    250 Deleted pskai_20160410_wip.7z
Response:    250 Deleted 20160409_jhl_cd_hack.7z
Response:    250 Deleted pskai_20160408_ubc_test_v2.7z
Response:    250 Deleted pskai_20160408_ubc_test.7z
Response:    250 Deleted pskai_20160408_sdm_flasher.7z
Response:    250 Deleted pskai_20160406_ubc_debug.7z
Response:    250 Deleted pskai_20160404_vmem_test.7z
Response:    250 Deleted pskai_20160403_wip.7z
Response:    250 Deleted pskai_20160402_jhl_cd_hack-v2.7z
Response:    250 Deleted pskai_20160331_jhl_cd_hack.7z
Response:    250 Deleted pskai_20160331_O3.7z
Response:    250 Deleted pskai_20160329_compat_vmem_test.7z
Response:    250 Deleted pskai_20160328_wip.7z
Response:    250 Deleted pskai_20160326_wip_saves.7z
Response:    250 Deleted pskai_20160324_ftx.7z
Response:    250 Deleted pskai_20160324_ftx_flasher.7z
Response:    250 Deleted pskai_20160323_linktest.7z
Response:    250 Deleted pskai_20160320_flasher_ftx.7z
Response:    250 Deleted pskai_20160318_satlink.7z
Response:    250 Deleted pskai_20160311_ftx_sdm.7z
Response:    250 Deleted SMPSCL5_20160311.7z
Response:    250 Deleted flasher_arp_20151005_tp.7z
Response:    250 Deleted 20160308_pskai_wip_flasher.7z
Response:    250 Deleted 20160308_pskai_wip.7z
Response:    250 Deleted 20160306_pskai_savemanager_flasher.7z
Response:    250 Deleted 20160305_FlashSave000.7z
Response:    250 Deleted 20160228_pskai_savemanager_flasher.7z
Response:    250 Deleted 20160226_pskai_flasher.7z
Response:    250 Deleted 20160226_pskai_lowram.7z
Response:    250 Deleted 20160223_pskai_wip.7z
Response:    250 Deleted 20160222_pskai_latest.7z
Response:    250 Deleted 20160222_pskai_5.776.7z
Response:    250 Deleted 20160216_pskai_loader_fix.7z
Response:    250 Deleted 20160216_pskai_test.7z
Response:    250 Deleted 20160215_pskai_wip.7z
Response:    250 Deleted 20160214_pskai_wip_jhl_cd_hack_test.7z
Response:    250 Deleted 20160214_pskai_wip.7z
Response:    250 Deleted 20160210_pskai_wip_saves.7z
Response:    250 Deleted 20151230_pskai_wip_saves.7z
Response:    250 Deleted 20160209_ReyVGM_test2.7z
Response:    250 Deleted 20160209_ReyVGM.7z
Response:    250 Deleted 20160205_ReyVGM.7z
Response:    250 Deleted 20160204_ReyVGM.7z
Response:    250 Deleted 20160203_ReyVGM_test.7z
Response:    250 Deleted 20160202_ReyVGM_test.7z
Response:    250 Deleted 20160129_commslink_saves.7z
Response:    250 Deleted 20160127_pskai_shazz.7z
Response:    250 Deleted 20160129_vfk_test.7z
Response:    250 Deleted 20160126_bkram_planetweb.7z
Response:    250 Deleted 20160125_bkram_test.7z
Response:    250 Deleted 20160124_bkram_test.7z
Response:    250 Deleted 20160112_sonicr_save_test.7z
Response:    250 Deleted 20151230_pskai_hybrid_device.7z
Response:    250 Deleted 20151223_pskai_v2.7z
Response:    250 Deleted 20151223_pskai.7z
Response:    250 Deleted 20151219_pskai_bootstub.7z
Response:    250 Deleted 20151218_flasher_src.7z
Response:    250 Deleted 20151218_pskai_wip.7z
Response:    250 Deleted 20151214_pskai_rmenu_dbg.7z
Response:    250 Deleted 20151110_pskai_spi_fix.7z
Response:    250 Deleted 20151002_pskai_selftest.7z
Response:    250 Deleted 20151031_pskai_scu_test.7z
Response:    250 Deleted 20151030_pskai_sd_card_debug.7z
Response:    250 Deleted 20151028_pskai_fat_io_lib.7z



Completely unrelated : I'm experiencing troubles with my email provider (*1), and consequently plan to change to another one soon.
(*1) : mail provider is sometimes messing up with email titles, such as using neighboring (unrelated) conversation title when sending email ...

data/images/20160609_y_u_no_mail.tb.jpg
Y U NO MAIL ?

If you're waiting for one week or more for a reply from me, please re-contact me
Email timeout value is "one week" : I'm not a machine, so please don't mailbomb me if I can't reply you soon

Read more RC2 - The good one

Rss feed of the articles