iNES_header[8] specifies how many RAM banks are there?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
iNES_header[8] specifies how many RAM banks are there?
by on (#60439)
According to http://fms.komkon.org/EMUL8/NES.html , the iNES_header[8] specifies how many 8KB RAM banks are present.

What's this exactly? Isn't the RAM internal to the Nintendo?
the iNES header specifies information related to the cartridge, not the Nintendo, as far as I know.

Are there cartridges with their own RAM banks?

And, isn't the RAM only 2KB mirrored four times?

And also, about CHR and PRG ROM banks, is there a doc on how is bank switching implemented from the standpoint of the emulator?
Is there any bank switching with Mapper #0 aka no mapper, aka NROM?

by on (#60442)
Quote:
Are there cartridges with their own RAM banks?


Many developers found the supplied 2 KB to be inadequate and they used additional RAM that was put on the cartridges.

Quote:
And also, about CHR and PRG ROM banks, is there a doc on how is bank switching implemented from the standpoint of the emulator?
Is there any bank switching with Mapper #0 aka no mapper, aka NROM?


As far as I know, there is none, but I might be wrong.
Re: iNES_header[8] specifies how many RAM banks are there?
by on (#60443)
Petruza wrote:
Isn't the RAM internal to the Nintendo?

The NES has 2KB of internal work RAM, and several carts have 8KB of extra work RAM, for a total of 10KB. That information in the header is for the few carts that have more than 8KB of RAM.

Quote:
And also, about CHR and PRG ROM banks, is there a doc on how is bank switching implemented from the standpoint of the emulator?

There is information describing how each mapper works, but how they are implemented is totally subjective, and depends a lot on how the emulator is structured.

Quote:
Is there any bank switching with Mapper #0 aka no mapper, aka NROM?

No.

by on (#60451)
Thanks!

So I'll delay mappers implementation to a later dev stage, for now NROM games, mainly SMB will do for testing and debugging of basic emulator functionality.

PS: Gee, I have the feeling I'm gonna get a bill any moment with the charge for all the advices I'm getting from this forum. :D

by on (#60455)
SMB is actually a rather tricky game for multiple reasons, you might be better off trying Donkey Kong or something if you want to get the most basic parts working.