Maybe this is also a good time to ask for clarification on the PRG-RAM part of the iNES 2 header. I find the current state of things confusing, and I'd like to be able to make it clearer on the wiki.
tepples
added this to the wiki with the edit note
"Kev clarified what to do for the 8320 bytes you get when you add 8K of RAM to an N163":
If a cartridge has both a dedicated RAM and RAM in the mapper (such as that of Namco 163), and both or neither are battery-backed, include only the size of the dedicated RAM in the header. The emulator must add mapper RAM to this size.
In another recent thread Sour and NewRisingSun
wrote:
NewRisingSun wrote:Sour wrote:After changing the header to say no work ram (I thought a discussion a long time ago had concluded that the internal RAM for this mapper shouldn't be counted in the header? Unsure.)
No, the internal work RAM should be specified, and
must be specified for games that battery-back only the internal RAM and use it for save-game purposes, such as Mindseeker. The only time that the internal work RAM is not specified is when there is both internal work RAM and 8 KiB of WRAM and both or neither are battery-backed, to prevent the non-power of two size from having to round up. For all these games, such as Megami Tensei 2, it's also possible to denote the 128 byte of work RAM as non-battery-backed (since the games will not use it for save game data but for sound or not at all, which I verified with every single game), and the 8 KiB of WRAM as battery-backed. And you need to specify the 128 byte of battery-backed EPROM in Mapper 159 as well.
There seem to be 4 relevant fields of the header: the battery backed bit, PRG-RAM unsaved, PRG-RAM saved, and submapper. Bootgod has
20 results for mapper 19 games, and there's 5 different cases represented in its data:
1. No WRAM, no battery backing.
A (no battery, 0 unsaved, 0 saved) or B (no battery, 128b unsaved, 0 saved) ?
I had interpreted the spec given on the wiki as this field normally specifying external RAM only, so I'd expect to use A here. NewRisingSun appears to expect B because of the header used in the test program, except it contradicts the statement above (neither are battery backed, so internal RAM should be unspecified?).
2. No WRAM, battery backed N163.
A (battery, 0 unsaved, 0 saved, submapper 1) or B (battery, 0 unsaved, 128b saved, submapper irrelevant) ?
I assume this was the case targeted by Kevtris' submapper 1, and A seems consistent with the wiki to me. B is how I'd interpret NewRisingSun's statement.
3. Unbacked WRAM, battery backed N163.
A (battery, 8k unsaved, 0 saved, submapper 1) or B (battery, 8k unsaved, 128b saved, submapper irrelevant) ?
- Dokuganryuu Masamune edit: NewRisingSun says this is incorrectly identified, has no WRAM but some sort of protection circuit instead? Does that need its own submapper?
-
Hydlide 3 (edit: mistakenly included here)
This category might actually be empty.
4. Only battery backed WRAM.
A (battery, 0 unsaved, 8k saved, submapper not 1) or B (battery, 128b unsaved, 8k saved, submapper irrelevant) ?
This category might actually have battery backed N163 as well. According to lidnariq it's not possible to back just one?
5. Battery backed WRAM, battery backed N163.
A (battery, 0 unsaved, 8k saved, submapper 1?) or B ? (battery, 0 unsaved, 8k saved, submapper irrelevant) ?
So...
A. My wiki interpretation seems to be that the header specified PRG-RAM is only for external RAM on N163, and submapper 1 is used to designate that battery backing also applies to internal N163 RAM. This seems to cover everything except King of Kings. Not sure if King of Kings actually needs the N163 saved, so it might be totally moot, but worst case seems to be that this game needs its own submapper for audio + battery N163. (Adding audio submappers should also imply that submapper 1 is no-audio?) This also seems consistent with
the immediately following edit suggesting that flash games should specify battery save, but 0 PRG-RAM.
B. NewRisingSun instead appears to want to specify that 128b in the RAM fields as often as possible. King of Kings becomes a special case again, but this time because the 128b bytes as "unlisted" is being used to imply that it should be saved? Have I got this correct?
Thankfully, except for King of Kings the games using audio expansion don't seem to fall on the stickier cases.