Author Topic: Battery RAM: No But should be?  (Read 347 times)

0 Members and 1 Guest are viewing this topic.

Offline bojgrass

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Battery RAM: No But should be?
« on: September 15, 2020, 02:02 AM »
Hello! Just received my N8 Pro! Got all my games and saves moved over fairly painlessly, but have one game (Final Fantasy II) that won't save. If I have a save it will load it, but won't save. Then poking around in the options I noticed under ROM info it says Battery RAM: No. Both on the rom that's been patched with a translation and my original Japanese rom. My old N8 didn't have this problem. Is this some bug? Or have I done something wrong? More importantly: can it be fixed? (luckily I can savestate, but would like to have a RAM save as well)

Edit: I have multiple games it says no Battery RAM upon looking further.

Final Fantasy Japan
Final Fantasy II Japan
Final Fantasy III Japan (but says translation patched rom says it does have Battery RAM)
Fire Emblem 1 Japan (translation patch also says NO Battery RAM)

EDIT: took golgo 13 off my list.
« Last Edit: September 15, 2020, 02:14 PM by bojgrass »

Offline Sarge

  • Sr. Member
  • ****
  • Posts: 337
  • Karma: +16/-0
    • View Profile
Re: Battery RAM: No But should be?
« Reply #1 on: September 15, 2020, 03:57 AM »
That sounds like the headers might be wrong on your ROMs. Are you using the No-Intro set? Those are generally correct.

Golgo 13 doesn't have a save feature, so no RAM is correct in that case.
Hardcore Retro Gaming - Discuss games ten years old or older! Now with a modern gaming section!

http://hardcoreretrogaming.boards.net/

Offline bojgrass

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Battery RAM: No But should be?
« Reply #2 on: September 15, 2020, 08:01 AM »
That sounds like the headers might be wrong on your ROMs. Are you using the No-Intro set? Those are generally correct.

They are my own. Ripped directly from my cartridges.

Quote
Golgo 13 doesn't have a save feature, so no RAM is correct in that case.

Ah my bad. for some reason I remembered that game as having a save on it.

Offline nuu

  • Hero Member
  • *****
  • Posts: 1569
  • Karma: +74/-2
    • View Profile
Re: Battery RAM: No But should be?
« Reply #3 on: September 15, 2020, 03:41 PM »
How did you rip them then? Sounds like you ripped them yourself but didn't choose the right options in the dumping hardware.
You can fix headers manually using a hex editor or certain tools. Emulators Nintedulator and Mesen both have header editors.

I think there is a header database somewhere on Nesdev forums. Otherwise just use the same header as the no-intro rom does.
If you are not sure you can post the first 16 bytes of the rom image here. Open it in a hex editor and copy the bytes.

Offline bojgrass

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Battery RAM: No But should be?
« Reply #4 on: September 15, 2020, 07:14 PM »
How did you rip them then? Sounds like you ripped them yourself but didn't choose the right options in the dumping hardware.
You can fix headers manually using a hex editor or certain tools. Emulators Nintedulator and Mesen both have header editors.

It's possible. I used an INL Retro Dumper with Arekuse's software. I could probably fix it myself fairly easily. Don't have a whole lot of hex experience (and what little of that was 20+ years ago)

Quote
I think there is a header database somewhere on Nesdev forums. Otherwise just use the same header as the no-intro rom does.
If you are not sure you can post the first 16 bytes of the rom image here. Open it in a hex editor and copy the bytes.

Just for fun this is the FF2 Japan first 16 bytes (assuming that's header): 4e 45 53 1a 10 20 10 20 20 20 20 20 20 20 20 20 
This is the patched rom's first 16 bytes: 4e 45 53 1a 10 20 10 20 20 20 20 20 20 20 20 20 

I'm not sure why: but all the "20"s above show as "00" in the editor. I copy/pasted the things, so not sure why the change.

EDIT: Hex values from FCEUX:

FF2 Unpatched: 4E 45 53 1A 10 00 12 00 00 00 00 00 00 00 00 00
FF2 Patched:     4E 45 53 1A 10 00 10 00 00 00 00 00 00 00 00 00

EDIT 2: A question: is it possible these ROMs coming straight off the cartridge doesn't have that information flagged? I ask because other games I have (Legend of Zelda/Zelda II) were dumped in the same manner, but they are indicated as having battery save. What little researching/tinkering I've done since being sent down the incorrect header path: it would seem the 12s and 10s at 06 (I have no idea of what proper terms are, so apologies for that) are what dictate if there is battery saves. Altered headers of the games in question and it seems to have helped. It has helped FF2 (have actually tested it.) Anyway, just curious if that was a possibility. Appreciate all the help! :)
« Last Edit: September 15, 2020, 09:35 PM by bojgrass »

Offline Sarge

  • Sr. Member
  • ****
  • Posts: 337
  • Karma: +16/-0
    • View Profile
Re: Battery RAM: No But should be?
« Reply #5 on: September 16, 2020, 02:53 AM »
Ah, yeah, that's probably what happened. Might not have even been your fault, just something quirky with the dump process that didn't identify the SRAM properly.

There are tools out there to edit the headers. Something like this might work: https://www.romhacking.net/utilities/665/

Also, I didn't know about that GUI from Arekuse. Definitely going to give that a go and see if it works with my old INL dumper.
« Last Edit: September 16, 2020, 05:05 AM by Sarge »
Hardcore Retro Gaming - Discuss games ten years old or older! Now with a modern gaming section!

http://hardcoreretrogaming.boards.net/

Offline nuu

  • Hero Member
  • *****
  • Posts: 1569
  • Karma: +74/-2
    • View Profile
Re: Battery RAM: No But should be?
« Reply #6 on: September 16, 2020, 05:48 PM »
Just for fun this is the FF2 Japan first 16 bytes (assuming that's header): 4e 45 53 1a 10 20 10 20 20 20 20 20 20 20 20 20 
This is the patched rom's first 16 bytes: 4e 45 53 1a 10 20 10 20 20 20 20 20 20 20 20 20 

I'm not sure why: but all the "20"s above show as "00" in the editor. I copy/pasted the things, so not sure why the change.

EDIT: Hex values from FCEUX:

FF2 Unpatched: 4E 45 53 1A 10 00 12 00 00 00 00 00 00 00 00 00
FF2 Patched:     4E 45 53 1A 10 00 10 00 00 00 00 00 00 00 00 00
If those last 9 bytes really are "20" they would be very wrong, no game has such values. They should all be "00" for FF2 with an iNES header (a NES 2.0 header is a different story though). It might be a problem how they are copied. If your hex editor has an option to copy as a hex string, use that.

My FF2 (Japan) rom from no-intro also has this "4E 45 53 1A 10 00 12 00 00 00 00 00 00 00 00 00" header so that should be correct. Byte 6 (the 7th byte) should indeed be "12" which indicates the following: horizontal mirroring, battery backup and mapper #1 (MMC1). If you change it to "10" it would indicate the same things except the battery backup flag is not set, just like you say. If you can read hexadecimal numbers you can see that in byte 6, bit 1 (second bit from the right in the byte) should be "1" to flag that battery backup is used by the game.
Source: https://wiki.nesdev.com/w/index.php/INES#Flags_6


EDIT 2: A question: is it possible these ROMs coming straight off the cartridge doesn't have that information flagged? I ask because other games I have (Legend of Zelda/Zelda II) were dumped in the same manner, but they are indicated as having battery save. What little researching/tinkering I've done since being sent down the incorrect header path: it would seem the 12s and 10s at 06 (I have no idea of what proper terms are, so apologies for that) are what dictate if there is battery saves. Altered headers of the games in question and it seems to have helped. It has helped FF2 (have actually tested it.) Anyway, just curious if that was a possibility. Appreciate all the help! :)
The ROM chip on the cartridge doesn't have any mapper or cartridge metadata, just the game software. The iNES header was invented by emulator authors and you must add that yourself when you dump a game so that emulators and flashcarts can play it. However, since you use the INL dumper it probably does that for you. If Zelda and FF2 acts differently I can only assume you used the wrong dumping script/setting or whatever, or if it somehow detects things automatically, it just didn't work on this game like Sarge mentioned. I have no experience with an INL dumper so I can't say more than that.

Offline Sarge

  • Sr. Member
  • ****
  • Posts: 337
  • Karma: +16/-0
    • View Profile
Re: Battery RAM: No But should be?
« Reply #7 on: September 16, 2020, 11:09 PM »
Let's just say the INL dumper is quite a bit more complicated than the Retrode 2 for dumping. You definitely have to pay attention to all the settings, and even then, you might not get it to produce what you're expecting. It's easier with the new setup and the Lua scripts - that custom script language for the kazzo/anago setup was even more complicated.

I was looking last night for a Sunsoft-4 dump script, and I'm not entirely sure which one to use, if any of them work. There's an anago script for it, so if I get desperate I could try to port it over to the Lua format. Not sure it's worth it, though, for a game that I don't have any saves on and no particular nostalgia for (Maharaja).
Hardcore Retro Gaming - Discuss games ten years old or older! Now with a modern gaming section!

http://hardcoreretrogaming.boards.net/