SDLoader v0.12: run binaries from SD Card and backup/restore saves

I make SDloader in batery Door.
Wow. This approach open doors to another idea - connect sdcard to sh2 hw serial port, and as Saturn's communication port connector have weak 5v and lacks spare pin to use as cs (only few sd cards will work with grounded cs, if any, as its non standard),so, with same internal placement and wiring of sdcard module its possible to overcome all mentioned troubles by taking good 5v and same cs pin as used for gameport2 version and wiring rest to serial port lines going to communication port connector. Speed may increase dramatically.
 
Just did quick test build, configured to use sd card connected to master sh2 serial port (SCI) which is available at COMMUNICATION CONNECTOR (near A/V OUT).
It still use CS line from gameport2, but one may freely try to keep it active low by wiring it to GND, but porbably no one sd card will like it (as assertion/deassertion of CS used in standard sd card initialization process).
Also, dont take 5v from COMMUNICATION CONNECTOR, as it is too weak.

And last, but not least, it is not tested on real hw. As it is a first draft build, high chances that it will fail.
 

Attachments

  • wiring_sci.jpg
    wiring_sci.jpg
    93.4 KB · Views: 199
  • sdloader_sci.zip
    sdloader_sci.zip
    104 KB · Views: 152
Last edited:
Thank you, tzmwx! Very nice way to avoid searching for spare controller connector, like it!
I added support for analog pad, and, also, cant resistate to tweak byte shifting a little, now total instructions count per 1 byte = 136. DIdnt tested it on real hw yet. But at least it works now on mednafen with "ss.input.port1 3dpad" option. Would be cool if you will try it on your config!
Tested!Worked perfectly ! Thank u
When will the backup function of external 4M memory card be added?
 
Last edited:
When will the backup function of external 4M memory card be added?

Here is v0.126a with external backup ram carts support (press LSHIFT/RSHIFT to switch between Int/Ext). Same restrictions by petit fatfs applied (need to put files to sdcard root for SDLoader to write backup:
for save/for load/cart type/size
"bkramsv.bin", "bkramld.bin", "internal battery backed RAM", 65536
"bksv512k.bin", "bkld512k.bin", "ext. 4Mbit backup RAM", 524288
"bksv1m.bin", "bkld1m.bin", "ext. 8Mbit backup RAM", 1048576
"bksv2m.bin", "bkld2m.bin", "ext. 16Mbit backup RAM", 2097152
"bksv4m.bin", "bkld4m.bin", "ext. 32Mbit backup RAM",4194304

...files to save backups are included in archive)

Not tested at real hw. Please, report your result if its possible
 

Attachments

Incredible work. I won't be losing my Sega Rally & OutRun records anymore!

for fun, patched lastest official PSKAI Lite version (256kb) firmware bin (PSKAI256.BIN) to make it bootable binary to load and run from 0x6004000 and also "enabled" rom-less mode (no cart mode). Seems to work on Yabause.

Does this mean that we could load pseudo kai from an SD card and, for instance, place a netlink adapter into the cart slot to play online while using burned discs (i.e. without the need of a modchip)? Thanks in advance!
 
Good afternoon

Version 0.126a did not work the backup function, it is giving an error opening bkramsv.bin.

The function to run applications bin (boot.bin) is working normally.]

Version 0.124 is perfect.
 
Last edited:
Hi! Thank you, braza!

Fixed bug with error opening backup ram files. Now it is 0.127
(didnt tested with actual backup ram carts).
 

Attachments

Last edited:
Thank you, braza! I am glad that it works ok, as there was large code rewrite! Will be glad to hear from tzmwx if it works with external backups.
 
Thank you, braza! I am glad that it works ok, as there was large code rewrite! Will be glad to hear from tzmwx if it works with external backups.
0.127!When I press the RSHIFT(or LSHIFT), the display flashes a bit, what is displayed on the screen does not change, and the backup mode is not switched.

(In addition:At real HW,The Sega Saturn does not have external memory cards larger than 4Mb [IC:AT29C040A 512KB])
 
Incredible work. I won't be losing my Sega Rally & OutRun records anymore!



Does this mean that we could load pseudo kai from an SD card and, for instance, place a netlink adapter into the cart slot to play online while using burned discs (i.e. without the need of a modchip)? Thanks in advance!
no, the sega saturn must boot from Cart, MPEG slot, or CD in that order.
 
0.127!When I press the RSHIFT(or LSHIFT), the display flashes a bit, what is displayed on the screen does not change, and the backup mode is not switched.

(In addition:At real HW,The Sega Saturn does not have external memory cards larger than 4Mb [IC:AT29C040A 512KB])
If Backup Ram Cartridge was set correctly, the Backup Ram switched(press the R or L button) with no issue,FYI
Internal Backup Ram.jpg
Extend Backup Ram.jpg
 
0.127!When I press the RSHIFT(or LSHIFT), the display flashes a bit, what is displayed on the screen does not change, and the backup mode is not switched.
Thank you, tzmwx!
Now, it use bios functions to detect external backup carts.
But as safety measure, restoring function only enabled for Internal backup ram. Lets first check if it detects ext ram and dumps is.
And currently, no support for 3rd party backup ram carts, which use their own memory management boot code.


If Backup Ram Cartridge was set correctly, the Backup Ram switched(press the R or L button) with no issue,FYI
Thank you! In v0.127 i didnt used bios functions for ext cart detection, just checked Cart ID byte at 0x24FFFFFF
Now, it use bios functions to detect carts, so probably it will see any cart that is compatible with bios backup functions
 

Attachments

Last edited:
Debug and speedup experimental version 0.127c
- same external RAM cart codebase as in 0.127b, only added debug output
- very experimental sdcard speedup improvements (111 instructions/byte), not yet tested on real hw
 

Attachments

Last edited:
Thank you! Please, tell, is sd card init/read/write works in this version? If yes, i will try to do more optimization, and if not - i will revert everything related to sd card to previous version.
 
Thank you very much! I will optimize it more for next version, as there is already few ideas how to cut instructions per byte count.
 
Back
Top