NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode


Subjectabout mappers...  
Posted byle_cholet
Posted on6/18/02 7:58 PM
From IP65.94.58.48  



I've just started to implement mappers in my emu. I'm having trouble with mapper #2 (the easiest one). Firebug docs says something like this:

$8000 - $FFFF : PPPPPPPP
|
+->Select 16K ROM bank at $8000

What does Select 16K ROM bank at $8000 means? Does the value PPPPPPPP is some sort of an offset? like if the game write 1 at addr 0x8000, will it mean that any read made after will return value from 0x8400 to 0x8800?

Another way to explain what i think is:

read at 0x8010 = read at (0x8010 + (16k * PPPPPPPP)) = 0x8410

This is not clear at all for me, so any help is welcome.




SubjectRe: about mappers... new  
Posted byle_cholet
Posted on6/19/02 02:09 AM
From IP65.94.59.218  



Umm, i think i was totaly wrong there. the data written is nothing but the bank number of the prg data right? like if you write 1, you will swap bank 1 ($4000 - $8000 in the cart) to $8000 - $c000 right? Anyway, it seems to work more like this as i dont have any bad opcode.

Now, there is nothing in vram and i was expecting the game to write data to it by itself. Maybe i dont fully understand yet. Firebug said that each mapper 2 game have 8k of vram at PPU $0000. What am I supposed to do with that?




SubjectRe: about mappers... new  
Posted byquietust
Posted on6/27/02 7:29 PM



Regarding "mapper #2" (NES-UNROM/UOROM):

1. You are correct; the value you write to $8000-$FFFF is a 16KB bank number that then gets swapped into $8000-$BFFF (and the last 16KB bank in the ROM gets mapped to $C000-$FFFF). Note, however, that the UNROM board only handles up to 128KB of PRG ROM and the UOROM board only handles up to 256KB of PRG ROM, so you should be masking off the upper 4 (or 5) bits of the value written.

2. You just allocate 8KB of RAM at PPU $0000-$1FFF and let the game write data to it (and read any data back from it). If you do not allow writes, you'll get nothing but a black (or whatever the background color is) screen (and the game will likely lock up).

--
Quietust
P.S. If you don't get this note, let me know and I'll write you another.


Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo