P
PyBoy4mo ago
ttv94

.sav file not being picked up

Moving the thread here: dumb question: I have a pokemon blue ".gb" file and ".sav" file. But when I start pyboy from the terminal with python3 -m pyboy "Pokemon - Blue Version (USA, Europe) (SGB Enhanced).gb" it just says "new game". Doesn't seem to recognize the save state.
21 Replies
ttv94
ttv94OP4mo ago
@BET Adsorption so I just change by .sav file ext to .state?
BET Adsorption
BET Adsorption4mo ago
to .sram maybe
ttv94
ttv94OP4mo ago
oddly still doesn't work. Just says "new game" with no option to continue
BET Adsorption
BET Adsorption4mo ago
and the name of your rom file and save file?
thatguy
thatguy4mo ago
Make sure it is in the same directory as your .gb file
BET Adsorption
BET Adsorption4mo ago
ls -l for me name them something sane too. maybe without spaces. blue.gb blue.sram
ttv94
ttv94OP4mo ago
I also tried renaming them each to blue.gb and blue.sav but that didn't work. Lastly tried copying blue.sav and relabeling as blue.sram but that didn't work either
No description
ttv94
ttv94OP4mo ago
same directory
thatguy
thatguy4mo ago
That doesn't say blue.gb and blue.sram
BET Adsorption
BET Adsorption4mo ago
and just new game?
ttv94
ttv94OP4mo ago
yes, I was showing you the starting directory files so we could work from step 0. I renamed them as you asked - happy to send more screenshots if needed. these were created automatically using the Epilogue GB Operator. correct, does not say 'continue'
BET Adsorption
BET Adsorption4mo ago
her eyou want blue.gb blue.gb.ram blue.gb.state try that then run pyboy THEN press X it should load the state
ttv94
ttv94OP4mo ago
interesting - got assertion error. Note that "blue.gb.ram" only existed after starting pyboy not before. The Epilogue GB Operator can only create .gb and .sav files
No description
BET Adsorption
BET Adsorption4mo ago
open pyboy, press z to save a state make sure that state is correctly named then try to load it with x i am assuming your save state is not going to work as-is
ttv94
ttv94OP4mo ago
weird, I just got it to work with the mGBA emulator - so it looks like it is a pyboy issue given multiple emulators can pick up on the .sav file
BET Adsorption
BET Adsorption4mo ago
@Bækalfen
thatguy
thatguy4mo ago
saving a state is different than saving a save file Remove everything but the rom from the directory, save the file and check the name/location of it. Also see if that file can reload.
Bækalfen
Bækalfen4mo ago
On PyBoy the file is not named .sav, but .ram, as you might have found out. The error in the screen shot is you pressing ctrl-c, so does it work? Ah, I see the assertion you mean now. You can send the .ram/.sav file (not the ROM!)? Then I'll look at it You can also add --log-level=DEBUG to the command line. Maybe it tells you something more Your file is the right size, and PyBoy reads banks at a fixed 8KB banks. So the only dynamic part is if your ROM reports too many banks (more than 4). This is how it should look:
pyboy.core.cartridge.cartridge DEBUG Loading ROM file: 1048576 bytes
pyboy.core.cartridge.cartridge DEBUG Cartridge type: 0x13 - MBC3, SRAM, Battery
pyboy.core.cartridge.cartridge DEBUG Cartridge size: 64 ROM banks of 16KB, 4 RAM banks of 8KB
pyboy.core.cartridge.cartridge DEBUG Loading ROM file: 1048576 bytes
pyboy.core.cartridge.cartridge DEBUG Cartridge type: 0x13 - MBC3, SRAM, Battery
pyboy.core.cartridge.cartridge DEBUG Cartridge size: 64 ROM banks of 16KB, 4 RAM banks of 8KB
Notice: 4 RAM banks of 8KB
thatguy
thatguy4mo ago
Unlikely but is it possible it's in a gbc format?
Sky
Sky4mo ago
Have you tried inizialining pyboy with cgb=True? It shouldn't make any difference on the save, but it's worth a try
Bækalfen
Bækalfen4mo ago
Shouldn’t matter for that part of the code where the error is

Did you find this page helpful?