slinga-homebrew / Save-Game-Extractor

Transmit Sega Saturn save game files as audio. Based on minimodem
GNU General Public License v3.0
31 stars 3 forks source link

Dragon Force Fails to extract #3

Closed whitezombie2000 closed 4 years ago

whitezombie2000 commented 4 years ago

I'm getting a message "What the heck too small: 18058" every time I try to extract it. It's a bigger save file and takes about ten minutes.

https://imgur.com/a/p2MhvuB

slinga-homebrew commented 4 years ago

I'll have to take a look at the code and see where I messed up.

whitezombie2000 commented 4 years ago

I can't upload a save that I tried to dumped with Save-Game-Extractor because after it fails its 0 bytes. I can provide a save dumped from the Saturn Gamer's Cartridge but I don't know if that will help you. It doesn't take long to get into the game and create a save.

DR_FORCE_00.zip

whitezombie2000 commented 4 years ago

I have three saves on my external. Only the save DR_FORCE_00 which is the first save is failing to extract. DR_FORCE_01 and DR_FORCE_02 extracted fine from the external. I moved each save to internal one by one, its a big save, the internal can only keep one, and got the same results trying to extract. DR_FORCE_00 fails to extract from the internal, but DR_FORCE_01 and DR_FORCE_02 extract fine.

slinga-homebrew commented 4 years ago

I made a Dragon Force save and unfortunately it wasn't the same size as yours after compression. I'm not sure what the issue is but I made a debug ISO for you to try: https://github.com/slinga-homebrew/Save-Game-Extractor/releases/tag/0.96.2.

Let me know if that fixes your issue. I can test with the save you supplied as well.

whitezombie2000 commented 4 years ago

I tried your debug ISO but it loads Save Game Copier and not the Extractor. So i'm not sure if that's a mistake or not. You can try my supplied save if you want to but it doesn't seem to matter. I tried the supplied save, created a new one with Wein, and it fails extracting DR_FORCE_00. Interestingly I tried a new game with Mikhal and Teiris and had no issue with their DR_FORCE_00 file on the internal. I also tried my Japanese Saturn and produced the same results as my American Saturn.

slinga-homebrew commented 4 years ago

Sorry about that. Fail on my part. I reuploaded the ISO: https://github.com/slinga-homebrew/Save-Game-Extractor/releases/tag/0.96.2. It should says Save Game Extractor Ver 0.97.1 when you boot it.

slinga-homebrew commented 4 years ago

What I'm stumped with is why you get a 0-byte file. Even if there is an error later in the transmission you should still have received some of the file.

whitezombie2000 commented 4 years ago

So can you extract file DR_FORCE_00 with Wein successfully?

slinga-homebrew commented 4 years ago

I haven't tried yet. I got the same error message "What the heck too short" but I was testing on an emulator.

slinga-homebrew commented 4 years ago

5517 % 128 = 13. So it's likely that for very small sizes I have an issue. 128 is the transmit block size.

whitezombie2000 commented 4 years ago

Still fails, What the heck too small: 9770 with the test ISO. Here is the dumped file.

dftest3.zip

whitezombie2000 commented 4 years ago

Ok even though I got the error, the extraction still worked. I was able successfully copy the the DR_FORCE._00 back to the wiped internal memory and load the save.

@ubuntu3:~/Save-Game-Extractor$ python3 sgex.py dftest3.bin Save Game Extractor (github.com/slinga-homebrew/Save-Game-Extractor)

Errors Corrected: 2 Transmitted Filename: DR_FORCE_00 Transmitted Save Size: 18144 Transmitted MD5: 6ad39bd7c2bfa63d0d1556eda830ca50 Computed MD5: 6ad39bd7c2bfa63d0d1556eda830ca50

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

whitezombie2000 commented 4 years ago

Ok I went back and tested 0.97 again. I got the what the heck too small error with the first save file like normal but the dumped file was not 0 bytes. So maybe I had some bad transmissions when previously testing with 0.97. Again I was able to successfully run the python script, copy it back over to the Saturn even with the what the heck to small error.

@ubuntu3:~/Save-Game-Extractor$ python3 sgex.py dftest6.bin Save Game Extractor (github.com/slinga-homebrew/Save-Game-Extractor)

Errors Corrected: 3 Transmitted Filename: DR_FORCE_00 Transmitted Save Size: 18144 Transmitted MD5: 306c7bc9757fe48980f96d1925f6f4d9 Computed MD5: 306c7bc9757fe48980f96d1925f6f4d9

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

dftest6.zip

slinga-homebrew commented 4 years ago

I thought I removed the what the heck message in the latest build. I'm glad it worked.

I do think I need to test with small transfer sizes (or small sizes % 128). Let me know if you still have issues.

whitezombie2000 commented 3 years ago

Is there a way to do this on a laptop via an inexpensive USB adapter with line in or some other method? I ask because most laptops only have microphone and line out. I was using a desktop with the blue line in port but was looking for a more portable method.

slinga-homebrew commented 3 years ago

I used this USB adapter on my laptop: https://www.amazon.com/gp/product/B00IRVQ0F8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1. $8.00

whitezombie2000 commented 3 years ago

That has line in and it works? I see microphone in and audio out on that USB adapter which most laptops already have. Line in is usually colored blue.

slinga-homebrew commented 3 years ago

I didn't know there was a difference between microphone in and line in. I used the microphone in and it worked fine on my laptop.

whitezombie2000 commented 3 years ago

I tried the microphone in port on a laptop, it failed the "this is cool" test, and it didn't transfer any save data. Maybe that USB adapter has line in which is why it works. Maybe I will order one and try it. If you plug the USB adapter into Windows and go to sound devices, does it show line in?

slinga-homebrew commented 3 years ago

I don't have a Windows machine to test on.

whitezombie2000 commented 3 years ago

I ordered the Sabrent USB adapter and I will let you know if it works when I get it. Are you running Ubuntu?

slinga-homebrew commented 3 years ago

I'm on Linux Mint which which is based on Ubuntu.

whitezombie2000 commented 3 years ago

I finally got the USB adapter and it works great using the pink microphone plugin. Looking at the sound devices listed in Ubuntu I see "Internal Microphone - Built-in Audio" listed and the USB adapter "Microphone - Audio Adapter (Unitek Y247A)". I find it very strange that the USB microphone works for this but the built in one on the side of the laptop doesn't. I think I tried the built in pink microphone port on the desktop PC and it didn't work too. Again thanks for your help, this is an awesome tool!

slinga-homebrew commented 3 years ago

Woot. Glad you got it working.