Hi all,
I just started NES programming a few days ago. I wanted to know what is this "bank" ...bank switching and mapper?
Also how do I get in more graphics (presently its 1 page for sprite and 1 page for background) for my game ?
Please explain
.
The NES reserves an area of only 32KB for the programs to stay in, and the first few games stayed below that limit. Soon that wasn't enough for the increasing complexity of the games, and the developers wished for more space to put levels, music and so on.
This became possible by making carts with some extra hardware, responsible for mapping pieces of a program larger than 32KB into the space the NES could see, according to commands on the program. So the carts contain programs larger than 32KB, and the game can select (by writing to memory-mapped registers) different parts of the larger ROM to be visible in the small window the NES can see at a time.
The exact same things happens with graphics: the NES only sees 8KB at a time, but games can select different parts of a larger ROM to be visible in that 8KB window.
A bank is just the unity that can be mapped into some part of the visible window, and its size depends on how the mapper divides the window.
As mappers became more sophisticated they started doing more than just mapping memory... Some of them can count scanlines and generate IRQs, manipulate name table mirroring, even multiply numbers and provide extra sound channels.