Iso/Cue "loader" works :)

Written by cafealpha no comments
Classified in : etc, Saturn, Programming, Mylife Tags : saturn, iso, loader, firmware, beta
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 :)

Saturn cartridge firmware flasher utility : major (final ?) update

Written by cafealpha 6 comments
Classified in : Saturn Tags : saturn, cartridge, flash, restore, utility
I made many fixes to my flasher utility. (Old article available here , even older article available here)

Changelog :
  - Tested on around 30 Action Replay cartridges. It was working fine for all known flash chips.
  - Ask for confirmation before returning to multiplayer screen.
  - Return back to initial screen in the case user don't want to go to multiplayer screen.
  - Retrieve and display chips IDs when firmware selection menu is displaying.
  - Fixed erase/flash operations for AT29C010 flash chips.
  - Minor fix about text display.
  - Fix for BFBF/1010 flash chips.
  - In the case Action Replay flash chips is supected, display disclaimer
    before flashing as a typical Action Replay flash device (SST29EE).
  - Refresh vendor/device IDs display during error/disclaimer message display
    in the case flash is not recognized.
  - Major changes in menu related routines.
  - Added key auto repeat feature : holding Up/Down button should scroll automatically now.
  - Added erase verification test.
  - If erase/write verification test failed, display informations about failure.
  - Use FRT-based delay during flash write/erase.
  - Changed highlight color in menus.
  - Change color of vendor/device strings according to chips flashability.
     - Hopeless   : red
     - Maybe OK   : yellow
     - Recognized : green

In short, it now has nearly the same compatibility as legacy arflash/Atlas utility, while being SGL-free (it doesn't uses Sega libraries), compatible with newer flash chips, embedding several firmwares in a same executable file, etc, etc.

In the case this flasher is not compatible with your Action Replay (it may happen, I don't decide about future revisions of Action Replay cartridges), please let me know in this article's comments or by email .
However, please note that I don't plan to add new features to this utility. New features were added during beta testing phase, and I really thanks beta testers for this.

Some screenshots from beta testers :
data/images/20150115_gameofyou_bfbf_1212.tb.jpg
BFBF/1212 flash chip, now recognized as SST/Greenliant type.
Picture provided by gameofyou1.


data/images/20150304_tabajaralabs_0101_2020.jpg
0101/2020 flash chips : everything is working fine, as in the previous version of the flasher utility.
Picture provided by TabajaraLabs.



data/images/20150305_amoc_53bf_4707.tb.jpg

data/images/20150305_amoc_53bf_4707_cart.tb.jpg
Weird 53BF/4707 flash chips : one chip is recognized as typical BF/07 (SST), while the other doesn't returns its vendor/device IDs.
As you can see on PCB picture, flash chips on right side are different, so that they return different vendor/device IDs.
Pictures provided by A Murder Of Crows.



data/images/20150316_sonic_dcer_1f1f_d5d5_fail.tb.jpg

data/images/20150316_sonic_dcer_1f1f_d5d5_ok.tb.jpg

data/images/20150316_sonic_dcer_1f1f_d5d5_cart.tb.jpg
1F1F/D5D5 flash chips : pictures before and after I fix the Flasher utility.
It (finally) works on latest version
Pictures provided by Sonic Dreamcaster.


data/images/20150315_zorlon_bfbf_1010.tb.jpg

data/images/20150317_saturnar_bfbf_1010_cart.tb.jpg

data/images/20150315_zorlon_bfbf_1010.tb.jpg
BFBF/1010 flash chips : according to datasheet, theses flash chips have twice more memory than usual chips (total 256KB -> 512KB).
However, a look at cartridge PCB between C6 capacitor and bottom-right flash chip shows that most significant address bit is grounded, so only 256KB can be addressed from Saturn ... what a pity
Pictures provided by SaturnAR and Zorlon.


You can download Flasher utility and its source code here : flasher_arp_20150326.7zhttp://ppcenter.webou.net/pskai/
Disclaimer #1 : You will loose your cartridge backup data after flashing it.
Disclaimer #2 : I'm not responsible in the case I brick your cartridge and/or damage your Saturn.

Note : I didn't made PseudoSaturn firmware. All thanks about PseudoSaturn firmware must go to CyberwarriorX.

Read more Saturn cartridge firmware flasher utility : major (final ?) update

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

Treatment report (2014/12/22) : MRI

Written by cafealpha no comments
Today was a MRI day !
MRI taken so far (4 or 5 times) were took with contrast medium (liquid sent via intravenous in order to see clearly veins), but this time was the first time without contrast medium !
It was a little strange that catheter were not used this time, and it was so "easy mode" that I half felt asleep during MRI exposure session  ^^;

One anecdote about this day is that when I entered in MRI room in order to put off clothes and wait for my turn, atmosphere in the room was a little strained, and 3 bodyguard shaped guys were waiting with MRI technical staff.
Maybe theses guys are maintenance staff ? But they definitely didn't looked like : they only stare at the window and monitors showing the MRI patient just before me.
When it was my turn, I understood why atmosphere was a little strained : bodyguard shaped guys took handcuffs and put them to the MRI patient just before me : he was a prisoner, and today was something like his "quarter-liberty day" outside the prison !
It was the first time I saw a prisoner for real (not on the TV, internet, whatever) in Japan.

Additional CT is scheduled for next month, so see you later for my next adventures


PS : I'm looking for a laptop better than the one I'm using now. Is there somebody to help me ?
My requirements are as follow :
 - No need brand new laptop, used laptop is OK
 - Screen resolution >= 1366 x 768
 - DDR3 SO-DIMM memory slots x 2
 - RAM address area >= 8GB
 - Battery for offline use >= 2 hours
 - CPU >= Core 2 Duo
 - Japanese or US qwerty keyboard
 - No need of OS, HDD and RAM, I already have theses parts here.
 - No more than USD 150
 - Easy to purchase in Shikoku area (Japan).
I looked in Hard Off ... only found a SNK 95 Saturn cartridge and very old or very expensive laptops.
I looked in PC Depot ... only found a good Sony laptop very cheap ... with broken LCD. And of course, nothing about LCD damage indicated near price tag
Any other idea where to search ?

I plan to use this laptop for Saturn development stuff

Here is a picture of the laptop I'm currently using :
data/images/20141222_laptop.tb.jpg
Old stuff from 2007, with 2GB RAM (no more addressable space ... what a pity), and a 512GB SSD.

Read more Treatment report (2014/12/22) : MRI

New USB dev cart - currently debugging

Written by cafealpha 4 comments
Classified in : Saturn, Mylife Tags : saturn, usb dev cart, IC, firmware, debug
Few weeks ago, I had some free time (only one day however) to populate new USB dev carts
data/images/20140829_usb_dev_cart.tb.jpg
USB dev carts during different populating states
"This isn't even my final form"

I could populate 3 boards ... third one is not on the picture, while a couple of capacitors is missing on second one, but this is a matter of 5 minutes to solder.
After that, time was missing, and what's more problematic, ICs were missing too >_<

I soldered my last flash chips (on the right side of the cart), as well as my last USB chips and connectors (top left side of the cart) ... and my last 100nF decoupling capacitor (everywhere near all ICs) too ... it's a shame about the capacitors because they cost absolutely nothing and they are required everywhere in the cart.

So what's the plan from now ? I'm currently improving USB dev cart firmware, and plan to sell the completed cartridge on the bottom right corner of the picture when firmware will be ready for release.
From that money, I will buy a new stock of ICs to populate other PCBs
Why not buying ICs now ? Simply because I don't have enough budget for that, and also because buying ICs in few quantities is too much expensive : IC price decrease with quantity, and shipping fees are free when more than of USD100 of ICs are purchased.


So let's come the interesting part : firmware, which means software !
Last month I had enough about PCB design with Kicad, so that was good to get back with my Saturn and USB connect it to my laptop

data/images/20140829_dev_env.tb.jpg
My Saturn development environment : no expensive vintage development kit,
only a modchipped Saturn, USB dev cart and 7 years old laptop are enough.

So of course I lost a lot of time with stupid software troubles.
Here is a list of the troubles. I hope that writing them here will prevent me from repeating the same mistakes in the future.

 1) Data alignment problem : one structure is 1 byte packed, and some long word was put a non 4 multiple offset in this structure. It is usually easy to spot, but ...
 - It doesn't cause problem under yabause (? not verified, please tell me if I'm wrong), so this problem was unnoticed until I test it under real hardware.
 - It happened during program initialization, before USB transfer would allow me to easily find why my Saturn freezes.
 - I was sleepy at this time

 2) Adding byte size to unsigned long* pointer ... it resulted in pointer set 4 times farther than expected ... really stupid bug
Oh, and in the same fashion, a similar bug in Action Replay flasher utility prevented from writing more than half of flash memory size ... it's good that I could fix this bug before anybody notice it

 3) Saturn freezes when reading flash vendor/device IDs.
As usual, when Saturn freezes, it is during program startup, when USB can't be used for debug ^^;
This problem was the most interesting one : some parts of the firmware runs directly from Flash ROM, and it seems that reading flash vendor/device IDs makes whole flash returning theses IDs, resulting in invalid instruction from CPU ... this is just a guess, correct me if I'm wrong.
This problem was corrected in a very Q&D way : return 0xBFBF/0xB7B7 in FlashGetVendorID/FlashGetDeviceID functions
I have a better idea to fix this, but it requires to modify cartridge flasher utility ... I made enough flasher utility stuff recently (I'm enough in fixing compatibility issues with Action Replay old flash chips !), so I will fix this later.

Read more New USB dev cart - currently debugging

Rss feed of the tag