In most ordinary mappers, cartridge RAM resides at CPU $6000-$7FFF. Games which use that RAM will read from it and write to it. I understand that if you want to detect whether a game uses cartridge RAM and you cannot find an image of its PCB, the best approach would be to monitor the area at CPU $6000-$7FFF. This can be done via setting a breakpoint on accesses to that area.
There are games that may have vestigial code that writes to RAM because the development cartridge had RAM but the programmers figured out how to avoid using it on production cartridges. Extra RAM cost more money BITD. I have figured that reads from RAM are the accesses to watch out for. Execution of code from RAM should be rare in a cartridge system, but if there is execution then there must be RAM.
But even then, a read from the cartridge RAM could be a false positive. There are a few games that are known to read from RAM not because they have RAM there, but because they rely on open bus behavior. When reading from open bus, a game is not reading a definable memory value but whatever happened to be on the bus just before the read, typically the high byte of the address. Two well-known cases are Low-G-Man and Battletoads & Double Dragon. At this point you need to apply reasoning to the instances where this occurs. "Is this really RAM usage?" "Why does this game read only at a boss fight?" "Is there any rhyme or reason to the game's writes?"
Also, I have found that a game like Battle of Olympus reads from RAM when you start a new game or enter a password without having written to the RAM beforehand. The routine appears to read 64 bytes from the CPU RAM area to update the $2007 PPU register. It doesn't really seem to care what the values are because the program corrects itself by the time the next image appears.
Does anyone care to add anything to this summary?
There are games that may have vestigial code that writes to RAM because the development cartridge had RAM but the programmers figured out how to avoid using it on production cartridges. Extra RAM cost more money BITD. I have figured that reads from RAM are the accesses to watch out for. Execution of code from RAM should be rare in a cartridge system, but if there is execution then there must be RAM.
But even then, a read from the cartridge RAM could be a false positive. There are a few games that are known to read from RAM not because they have RAM there, but because they rely on open bus behavior. When reading from open bus, a game is not reading a definable memory value but whatever happened to be on the bus just before the read, typically the high byte of the address. Two well-known cases are Low-G-Man and Battletoads & Double Dragon. At this point you need to apply reasoning to the instances where this occurs. "Is this really RAM usage?" "Why does this game read only at a boss fight?" "Is there any rhyme or reason to the game's writes?"
Also, I have found that a game like Battle of Olympus reads from RAM when you start a new game or enter a password without having written to the RAM beforehand. The routine appears to read 64 bytes from the CPU RAM area to update the $2007 PPU register. It doesn't really seem to care what the values are because the program corrects itself by the time the next image appears.
Does anyone care to add anything to this summary?