Home | Forums | What's new | Resources | |
SDLoader v0.12: run binaries from SD Card and backup/restore saves |
Murzik - Aug 29, 2022 |
1 | 2 | 3 | ... | 10 | Next> |
Murzik | Aug 29, 2022 | |||||||||||||||
Hello! Update: I created patch for Pseudo Saturn Kai Lite v6.483 (lastest version) which adds SDLoader capabilities. This patch allows PSKAI Lite to launch boot.bin file placed at SD card root. For example, you may place SDLoader binary as boot.bin. Patch and instructions in attachment (PSKAISD.zip) tzmwx designed great pcb to avoid finding spare controller connector. You may download gerbers and check info in his post... Here is nice video with english subtitles, showing SDLoader in action (though, a little older version used), and also, another great idea of making adapter for it. Hope, author will release his adapter shell 3d model for others to repeat.
UPDATE: v0.381 changelog: - video compatibility fixes v0.374: - code cleanup v0.372: - X+Y+Z+START for returning to CD PLAYER - Enabled dumping for ROM carts which failed vendor_id/device_id probing v0.37: - Merged Serial Loader into SDLoader. When in "main" menu, serial loader enabled. How to use it check at /Serial/serial.txt - Rom carts flashing: added additional write check for safety v0.35: - Experimental: Enabled backup/flashing for boot rom carts (flashing tested ok on SST29EE010 based "red cart") (not all memory supported, if unsupported, flashing will be disabled, report probed vendor_id/device_id if you want to add support for it) - Use flashing at your own risk, backup first. If something goes wrong at flashing process, you must have alternative way to restore cart firmware. Remember, it is experimental feature. v0.34: - Enabled restoring for other compatible backup ram carts (need test reports) - Enabled filebrowser to select backup file to restore (no more hardcoded filenames for restore) Attached is new version v0.32 - Little speedup, SH2 cpu clocked at 28Mhz instead of 26Mhz (before executing loaded binaries, it switched to default 26Mhz) - transfer speed more than 90kb/sec Short version: It is just a Proof Of Concept. I wanted to backup my saves from saturn. What SDloader do: - Loads and run binaries from sd card connected to Saturn second game port. - Save/Load saturn battery backed ram to/from sd card (approx. it takes 4s to backup saturn saves to sdcard). Saves format is raw dump of battery backed ram (64kb), same as in Yabause (bkram.bin). Tested SDLoader with non sdhc, 2gb sdcard, with fat16. Probably will work with sdhc and fat32. At default, this tool loads file boot.bin to 0x06004000 from sdcard and run it from there. If you create plain text file named boot.cfg, you may load any other file, to any location and run it from any entry point (or just load one binary, but jump to some bios/arp function, or something, you decide yourself how to use it). SDLoader use Petit FatFs - tiny fatfs library, so, it cant create new files. To backup your saturn saves, you need to create (place on sdcard) 64kb file bkramsv.bin which will be updated (overwrited) by SDLoader with your saturn saves. You may create it with dd (dd if=/dev/zero of=bkramsv.bin bs=64k count=1) or with fsutil (fsutil file createnew bkramsv.bin 65536), or use bkram.bin (64kb) from Yabause. Name it bkramsv.bin, place at sd card root, and SDload will overwrite it with your saturn internal saves, and/or name it bkramld.bin and SDload restore it to your saturn internal battery backed ram. Update: included sample bkramsv.bin, bkramld.bin and boot.cfg in attachment to this topic. Long version: Wanted to backup saves from my saturn, so i decided to do sd card tool which use second gamepad port to communicate with sd cards. It is just a proof of concept, but it works. To match levels, fastest and cheaper way was to utilize microsd module (you may get one in any electronic diy shop, get microsd one, as it includes 5v tolerant buffer ic and 3.3v voltage regulator). If you dont want to use, or dont have such module at hand, use any basic level shifting and do not wire sdcard directly to saturn gameport2. As it is quick proof of concept, for SDLoader i used Petit FatFs - tiny fatfs library, so, it is limited to work only with existed files (no function to create new files). Also, tested it with 2GB sdcard (probably, not sdhc) with fat16 fs. It may work with sdhc and fat32, but i not tested it. So, to backup saves from Saturn to sdcard, you need to prepare 64kb file named bkramsv.bin place it at sd card root (SDLoader will overwrite it with your actual saves), and to load saves from sdcard to Saturn, SDLoader looks for 64kb bkramld.bin. Also, it may load and run binary from sdcard. Default, it looks for file "boot.bin", load it to 0x06004000 and run from there. But if you create file boot.cfg with simple format: file=FILE.NAM load=0xNNNNNNNN start=0xMMMMMMM it will try to load FILE.NAM to 0xNNNNNNNN and jump to 0xMMMMMMMM About speed, it takes aprox. 4s to backup 64kb backup ram (saves) to sd card. And about 9s to load and execute 40kb binary. Wiring (sd card to saturn game port 2). Remember to shift levels, do not connect sdcard directly to saturn game port:
As for port pinout: if you look at game port on console from front, it is 1 to 9 from left to right SD card (regular non- sdhc with FAT tested and works ok, sdhc and FAT32 probably will work too) filenames and structure SD card ROOT: boot.bin (optional, if you want to load and run something) boot.cfg (highly optional, if you want to load and run other file than boot.bin and not to default memory location) bkramsv.bin (64kb, optional, if you want to backup your saturn internal saves to sdcard, may use bkram.bin from yabause, just rename it and SDload will overwrite it with your saturn saves) bkramld.bin (64kb, optional, if you want to import saves from sdcard to your saturn, may use bkram.bin from Yabause, just rename it) Update: included sample bkramsv.bin, bkramld.bin and boot.cfg in attachment to this topic. |
dibz | Aug 30, 2022 | |||
This is a super cool project. Great job! |
Knight0fDragon | Aug 30, 2022 | |||
Was not expecting this, thought it was some update to your falcom translation. This is absolutely awesome news. |
Knight0fDragon | Sep 2, 2022 | |||
If it takes 4 seconds to do a 64KB file, then it seems that they are only pulling 16KB/s, Could need some optimizing to make it work faster. |
Murzik | Sep 4, 2022 | |||||
Hi
Sure. You want to place it in RomFs of Pseudo Saturn? Or if you want to place it in some specific CS0 area, let me know, and i will provide binary for it. Upd. Just checked - it works from RomFs at PSKAI (at least in Yabause). Also it works if converted to arp firmware with cafe-alfa's... mkfirm tool. But, i suppose, variant with placing it at RomFs in Pseudo Saturn Kai is much more useful. So, would be glad to hear your success story! |
mrkotfw | Sep 4, 2022 | |||
This looks great! I take it that your SD card adapter has a 5v to 3.3v convert built in? If so, which one did you purchase? |
tzmwx | Sep 4, 2022 | |||||
a MICROSD MODULE |
braza | Sep 5, 2022 | |||
Thanks for the file in .bin mode. Do you have mkfirm.exe ? I can't find it anywhere, not even on the blog. |
Murzik | Sep 5, 2022 | |||||||||
Most common option - it is same module version as in tzmwx message.
You may get it at SatCom... page on cafe-alpha site. It is in Download section, in SatCom_release_20110426 archive. |
Murzik | Sep 5, 2022 | |||
Just 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. So, you may try to load and run it from sdcard. Attached xdelta... patch for original PSKAI256.BIN from current PSKAI official release (pskai_release_20211113, found at \tools\pskai_sdm.iso image, in FW directory). Original PSKAI256.BIN md5 bbe5f0ced74427e6e1cfb2c65309f975 To patch: xdelta3-3.1.0-x86_64.exe -d -s PSKAI256.BIN PSKAI256toBIN.xdelta boot.bin ..then just place boot.bin at sd card root To braza: Maybe it will be handy for you, if you will overwrite your cart with mkfirm. Any way, will be glad to hear about your experience. |
braza | Sep 5, 2022 | |||
10000000000000 X thank you, thank you....
mkfirm tool work, and you sdloader ! |
braza | Sep 8, 2022 | |||
Thank you ! I recorded in action replay and tested version 0.121 and it is working better. |
tzmwx | Sep 10, 2022 | |||
Worked perfectly V.0.124 Incompatible with 3D control pad |
braza | Sep 10, 2022 | |||
I make SDloader in batery Door. |
1 | 2 | 3 | ... | 10 | Next> |