
I am writing a (kinda) didactic NES emulator. I've already finished the CPU and most of the PPU, but I am in doubt over some things. I am trying to run Super Mario Bros, which I know is difficult, but I can already play the whole game (and even hear basic sounds and music!). I wish to know:
1. How does it fill up the palettes? It seems to be writing to the $3300-$331F PPU area, but I thought that address mirrored down to $2300-$231F (and ended up changing on-screen tiles). Making it mirror to $3F00-$3F1F works, but I'm not sure if that's correct.
2. How does the nametable select (lowest bits written to port $2000) work? Does it affect writing to/reading from nametables, or does it just affects how PPU renders things? I get to see question blocks from the next screen on the title screen.
I tested my emulator with tutorial games (like ones that teach scrolling), and they worked perfectly, including palettes, so I don't know what's wrong.


