Page 1 of 1
Confirming rom uses extra WRAM?
Posted: Mon Nov 03, 2014 9:47 am
by guitarzombie
Whats the easiest way to do this?
When opening in Nestopia itll say if it uses extra WRAM. BUT even games that dont use it, it seems to come up.
Ive opened games that use TLROM and it says it uses 8k WRAM auto. How would I know what games actually NEED the
extra 8k WRAM (like Mike Tysons Intergalatic Power Punch)?
Re: Confirming rom uses extra WRAM?
Posted: Mon Nov 03, 2014 9:48 am
by tepples
Legal answer: Open the original cart with a GameBit and find out, or search
NesCartDB for the title.
Illegal answer: Unless a mapper doesn't have ports at $6000-$7FFF, an emulator will put RAM there. if the mapper itself doesn't support WRAM decoding, an emulator will likely assume the
Family BASIC circuit, which contains a 74HC20 computing NAND(M2, /PRGSEL, A14, A13). The only way to say definitively that a game
doesn't have RAM there is to use an NES 2.0 header. But because most ROMs floating around on pirate sites don't have NES 2.0 headers, I recommend running a game in a debugging emulator, such as Nintendulator or FCEUX for Windows, and watching for writes to $6000-$7FFF.
Re: Confirming rom uses extra WRAM?
Posted: Mon Nov 03, 2014 9:51 am
by guitarzombie
Simple enough! Ill try this thanks
Re: Confirming rom uses extra WRAM?
Posted: Mon Nov 03, 2014 10:04 am
by guitarzombie
Im talking about prototype games, or famicom games that were translated.
I was looking at a game that I KNOW uses TLROM and inside of nestopia it said it was TSROM.
I checked a few roms I had that had that hex area blank, but then opened up Robocop vs. Term and saw it was filled. So I know that one is legit. Sucks now I gotta try a WHOLE lot of roms to make sure haha. But thanks
Re: Confirming rom uses extra WRAM?
Posted: Mon Nov 03, 2014 10:33 am
by tepples
I can't speak for protos, other than "run it in a debugger". But in the vast majority of cases, a fan-translated Famicom game will use PRG RAM in one of two cases:
- The Japanese game used it.
- The translation's README states that it drops the original game's password system in favor of battery save.
Another thing to consider: A game might write to nonexistent RAM in standard init code but never actually depend on values read back from it. Such a game doesn't need RAM. This might be especially common for protos, whose code hasn't been trimmed down to use features of the boilerplate code that aren't actually used in the game. So if you find writes in a debugger, especially if they're of the "clear all RAM" type, also check the code after reads. Or add an NES 2.0 header without RAM and see if the game still works in an emulator that supports NES 2.0.
Re: Confirming rom uses extra WRAM?
Posted: Mon Nov 03, 2014 10:42 am
by rainwarrior
Open it in a debugger, put a breakpoint on read/write to the WRAM region, and play the game to see if anything gets written there. Here's some instructions for using FCEUX's debugger:
http://www.fceux.com/web/help/fceux.html?Debugger.html
Re: Confirming rom uses extra WRAM?
Posted: Mon Nov 03, 2014 11:21 am
by guitarzombie
Oh so code wont necessarily be there when you start the game? I opened up the game played it and just read the readout. Most of the time I didnt even need to play it.
Re: Confirming rom uses extra WRAM?
Posted: Mon Nov 03, 2014 11:49 am
by tokumaru
guitarzombie wrote:I was looking at a game that I KNOW uses TLROM and inside of nestopia it said it was TSROM.
The iNES file format, the most common format for distribution of NES ROMs, is not very good at defining boards. With the older version of the format, which is the more common one by far, it's only possible to define a mapper number, and both TLROM and TSROM use the MMC3 mapper, so it's impossible to distinguish between those 2. Also, the old iNES format can't specify whether RAM at $6000-$7FFF is present, only if it's battery backed (which is why most emulators map RAM to that range for all games). So yeah, the deductions that can be made based on the iNES header aren't the best, and you'll get inaccurate information from emulator reports.
I checked a few roms I had that had that hex area blank
Using breakpoints like rainwarrior suggested will save you the trouble of manually looking at that memory. A proper breakpoint will open the debugger on any access (read or write) to $6000-$7FFF, so you'll know that the game is using extra RAM.
guitarzombie wrote:Oh so code wont necessarily be there when you start the game? I opened up the game played it and just read the readout. Most of the time I didnt even need to play it.
Like all RAM that's not battery backed, it's empty/undefined on power up. Most games will probably access that memory very early on, which is why you don't have to play very far into the game in order to see data stored there.