Mapper Banks Question

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
family_programmer
Posts: 20
Joined: Mon Apr 11, 2005 6:04 am
Location: Kiev, Ukraine
Contact:

Mapper Banks Question

Post by family_programmer »

I don't understand how to determine which banks to use. I've seen gbaguy's code use bank0 for code, bank1 for init info (where prog starts, vblank, etc), and bank2 as CHR-ROM.
Then he .org's bank0 at $8000 and bank1 at $FFFA, which seems reasonable CPU memory locations. But then he .org's bank2 at $0000 which would be at zero page in the CPU memory map (but at the pattern table in the PPU memory map). So how it is done to make the mapper "know" where to put the stuff, CPU mem or PPU mem?
Is it a matter of a certain bank number, or which addresses to use?

I'm using nesasm.
"Wearing of this garment does not enable you to fly."
-- On a child sized Superman costume.
Hyde
Posts: 101
Joined: Mon Sep 27, 2004 11:51 pm

Post by Hyde »

That has to do with the order things should be put together according to the iNES format. First you gotta have the 16-byte header; Then you got your PRG banks following one another; Finally, any CHR pages would be appended to the end of the image. (i.e. right after the PRG pages). The ORGs have nothing to do with the programming memory map: that scheme is just a way of putting the iNES image together.
Post Reply