Save Game Extractor: Backup Saves Via Audio

Talking from total ignorance, in yabause with satiator suport there is a not full implemented command.
satiator/satiator-yabause, line 118.

This command really loads menu.bin or menu.bin is only a file for test purposes???
There is some variables referencing "bios".
 
@rorirub

I have an alpha of Save Game Copier that adds the "Dump Memory" option . I haven't tested much but here's a screenshot dumping the BIOS:
dump.png


You can get the alpha here: Release Dump Memory Alpha · slinga-homebrew/Save-Game-Copier.
 
Registered just so I could say Thanks and that this is incredible! I was playing around with this last night and it works great. And here's the kicker: my laptop doesn't even have a proper microphone or line-in jack, just a combo jack for headsets and I don't have a proper connector for it. So, I literally just had the audio play through a 20 year old set of crappy PC speakers into my laptop's microphone... And it worked! Amazing!

Bash:
user@lubuntu-virtualbox:~$ minimodem -R 44100 -r 1200 --sync 0xAB --stopbits 4 --startbits 4 > sonicjam.bin
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=130 confidence=2.506 ampl=0.816 bps=1192.05 (0.7% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=130 confidence=2.458 ampl=0.819 bps=1191.58 (0.7% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=118 confidence=2.470 ampl=0.823 bps=1192.52 (0.6% slow) ###
^Cuser@lubuntu-virtualbox:~python3 sgex.py sonicjam.bin
Save Game Extractor
(github.com/slinga-homebrew/Save-Game-Extractor)

Errors Corrected: 4
Transmitted Filename: SONICJAM_01
Transmitted Save Size: 1408
Transmitted MD5: f433d95b7a4e348058326ae812785f52
Computed MD5: f433d95b7a4e348058326ae812785f52

MD5 hashes validate, save is correct.
Wrote save game SONICJAM_01 to disk
 
Glad to hear you were able to get SGEX to work wirelessly. I'm surprised there were so few errors. I get about 1 bit flip per 500 bytes or so when I have my Saturn wired directly to the line-in on my PC. I would expect wirelessly to have much higher error rates.
 
Glad to hear you were able to get SGEX to work wirelessly. I'm surprised there were so few errors. I get about 1 bit flip per 500 bytes or so when I have my Saturn wired directly to the line-in on my PC. I would expect wirelessly to have much higher error rates.
Any tips for reducing the error rate? I picked up the Sabrent USB audio adapter you mentioned in chat. I was able to transfer a ~2000 byte file successfully (from my FDD, no less), but my Sega Rally records always fail. That file is ~5000 bytes. Tried transferring it from both internal memory and floppy and just can't get it to come through. Always get the same error:

Code:
tim@lubuntu-virtualbox:~/Saturn Saves$ python3 ./sgex.py rally_records.bin
Save Game Extractor
(github.com/slinga-homebrew/Save-Game-Extractor)

Reed Solomon couldn't decode buffer, too many errors.
<class 'reedsolo.ReedSolomonError'>
 
Presumably you've copied it over multiple times? What are the file sizes like? For rally_records.bin. Do the sizes vary? Are the MD5 sums of the files the same?

There might be some other bug going on. I've transferred 20k Fire Pro saves before without issue (with Reed Solomon fixing a few errors).

What was your error rate on the 2000 byte file? The confidence values above (when you were transferring over-the-air) look kind of low. With a cable plugged in I would expect around ~4.0 or higher confidence.

It looks like from your screenshot you are working in a VM. What if you saved the audio file directly as a .WAV or whatever. Use whatever recording software you want. Then use minimodem's file input option ("-f") to process it?

And if you have the minimodem command prompt output I can take a look at that as well.
 
Last edited:
I'll have to take some time to play around with it and get specific answers to your questions, but I just tried again and here's the output:

Bash:
tim@lubuntu-virtualbox:~/Saturn Saves$ minimodem -R 44100 -r 1200 --sync 0xAB --stopbits 4 --startbits 4 > rally_records.bin
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=130 confidence=3.931 ampl=1.255 bps=1198.59 (0.1% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=130 confidence=4.034 ampl=1.255 bps=1197.65 (0.2% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=130 confidence=4.002 ampl=1.253 bps=1197.18 (0.2% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=130 confidence=4.020 ampl=1.257 bps=1198.82 (0.1% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=130 confidence=4.020 ampl=1.255 bps=1198.35 (0.1% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###
                                                                                                                                                                                           
### NOCARRIER ndata=130 confidence=4.008 ampl=1.256 bps=1198.12 (0.2% slow) ###                                                                                                            
### CARRIER 1200 @ 1200.0 Hz ###                                                                                                                                                            
                                                                                                                                                                                           
### NOCARRIER ndata=130 confidence=4.108 ampl=1.258 bps=1198.35 (0.1% slow) ###                                                                                                            
### CARRIER 1200 @ 1200.0 Hz ###                                                                                                                                                            
                                                                                                                                                                                           
### NOCARRIER ndata=130 confidence=3.963 ampl=1.256 bps=1198.59 (0.1% slow) ###                                                                                                            
### CARRIER 1200 @ 1200.0 Hz ###                                                                                                                                                            
                                                                                                                                                                                           
### NOCARRIER ndata=130 confidence=3.949 ampl=1.254 bps=1197.88 (0.2% slow) ###                                                                                                            
### CARRIER 1200 @ 1200.0 Hz ###                                                                                                                                                            
                                                                                                                                                                                           
### NOCARRIER ndata=130 confidence=4.116 ampl=1.256 bps=1197.88 (0.2% slow) ###                                                                                                            
### CARRIER 1200 @ 1200.0 Hz ###                                                                                                                                                            
                                                                                                                                                                                           
### NOCARRIER ndata=130 confidence=4.019 ampl=1.257 bps=1198.59 (0.1% slow) ###                                                                                                            
### CARRIER 1200 @ 1200.0 Hz ###                                                                                                                                                            
                                                                                                                                                                                           
### NOCARRIER ndata=130 confidence=3.914 ampl=1.254 bps=1197.88 (0.2% slow) ###                                                                                                            
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=128 confidence=4.012 ampl=1.255 bps=1197.85 (0.2% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=130 confidence=4.025 ampl=1.255 bps=1198.12 (0.2% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=129 confidence=4.000 ampl=1.256 bps=1198.58 (0.1% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=128 confidence=4.099 ampl=1.256 bps=1197.85 (0.2% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=128 confidence=4.046 ampl=1.255 bps=1198.09 (0.2% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=129 confidence=4.029 ampl=1.255 bps=1197.40 (0.2% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=128 confidence=4.049 ampl=1.257 bps=1198.81 (0.1% slow) ###
### CARRIER 1200 @ 1200.0 Hz ###

### NOCARRIER ndata=111 confidence=4.147 ampl=1.256 bps=1197.52 (0.2% slow) ###
^Ctim@lubuntu-virtualbox:~/Saturn Saves$ ls -lh | grep rally
-rw-rw-r-- 1 tim tim 2.5K Oct 30 21:26 rally_records.bin
tim@lubuntu-virtualbox:~/Saturn Saves$ python3 ./sgex.py rally_records.bin
Save Game Extractor
(github.com/slinga-homebrew/Save-Game-Extractor)

Reed Solomon couldn't decode buffer, too many errors.
<class 'reedsolo.ReedSolomonError'>

Edit: I just tried recording to WAV first. The test "This is Cool" transmission worked just fine like that, but the full file failed with the same error as above.
 
Last edited:
Would you mind sending me the wav file? I can see if anything make sense.

Unfortunately it looks like bytes are getting dropped in transmission. All of the chunks should be ndata=130 (except for the last). I'm seeing quite a few 129s, 128, etc. The Reed Solomon encoding I'm using can't recover missing bytes, only flipped bits. If you compare the size of rally_records.bin to the total transfer size in SGC you will see the sizes don't match.
 
I appreciate the follow-up. Just now had a chance to come back to this. Here's the original .wav that I used to create the rally_records.bin file from the output above. (Or at least, I'm pretty sure it's the same one. It's been a few weeks!)
 

Attachments

That was actually a fun brain teaser.

Code:
python3 sgex.py rally2.bin
Save Game Extractor
(github.com/slinga-homebrew/Save-Game-Extractor)

Errors Corrected: 6
Transmitted Filename: RALLYPLUS_0
Transmitted Save Size: 5056
Transmitted MD5: 1884dd2a14312001e07dc1642e67c5ef
Computed MD5: 1884dd2a14312001e07dc1642e67c5ef

MD5 hashes validate, save is correct.
Wrote save game RALLYPLUS_0 to disk

If you are curious here's how I did it:
1) I reviewed all of the "### NOCARRIER ndata=130" values. Each transmission (except the last) should be 128 bytes + 2 sync bytes. I noticed the 6th one was only 129 so it clearly lost a byte.
2) I grabbed the entire block containing the missing byte. I then inserted a 0x00 at position 0-254 until Reed Solomon was able to decode. RS is able to recover bit flips not missing bytes.
3) Once I found an offset that worked I edited the rally.bin file and added a 0x00 there.
4) I was now able to run SGEX and RS was able to recover correctly
 

Attachments

Nice. Seems like this could this be done programmatically?

I have some huge files (like Sega Rally and other racing game ghost data) that I'd like to back up, but clearly it doesn't make sense to do this manually.
 
Basically if you know the number of missing bytes it shouldn't be too hard to script it up.

Do the large files not compress well?

Also stumped why you are running into these issues. Could you try recording via your phone (assuming you have line-in, dunno if that's possible) or with another laptop? Maybe the AV cables? Power issues to the Saturn? I don't claim to know what I'm talking about, just some things to try out.
 
Hi,

Is it possible to dump a working bios with the Save Game Extractor?

I tried, and I've now got 4 separate bin files, but have no idea what do do with them. How do I combine these as a working bios file?

Thanks.
 
Should be as simple as stripping off the first 64 bytes of each file and combining.

I did that (removed first 64 bytes of each file and combined), but Mednaffe says the file is too big. It's 519,2 KiB (531 644).

Have you managed to do this yourself?

If I test my audio connection, "This is COOL" comes through just right. Also, sending backups seems to work (there's some errors but your script corrects them).

Should there be some kind of error correction script for bios also?
 
Should be as simple as stripping off the first 64 bytes of each file and combining.

It seems to be working now:

I ran all 4 bin files through your sgex.py script, which apparently fixed quite a lot of errors in them. It didn't work at first because of some filename issue, but as I edited the script to get the filename working, it ran and saved corrected bins.

Then I removed first 64 bytes from each of them and combined.

As a result I got file size of 512,0 KiB (524 288) and by a quick look it seems to work.

Thanks.
 
Sorry for reviving a fairly old thread, but I'm having difficulty getting minimodem work. I'm not super savvy in linux environments, so probably doing something dumb that somebody more knowledgeable can point right to and know where my error is.

I have cygwin and minimodem running on my windows 10 pc. I installed all the packages per the minimodem github. I can here the test audio generated by SGEX, through my desktop speakers. The cursor in the cygwin window just sits there blinking after the minimodem command is run, but does not display the test message.
cygwin window.png

I did get an error when running make check as part of the minimodem install (amplitude tests failed). I was able to run the echo hello test code within minimodem and hear the test sound.

make check failures.PNG


Oh , and I did configure my PC line in for 44100 hz.

line in_44100.PNG


Any help is appreciated. Just trying to get a few saves from one sega saturn to another (without going into more details on why much simpler methods cannot work on the target saturn).
 
Back
Top