Hai!
I'm trying to learn how to code an emulator, I know it's likely just another one for the pile of existing emulators. But, it's more for a learning exercise. So far emulating the 6502, working great! So i started to tackle the PPU of course. And I'm hitting some stumbling points.
The big one I can't wrap my head around, and my google-fu hasn't been too helpful, is how or where the other 32 colors in the palette are defined. What I mean is addresses 0x3F00 to 0x3F1F are the various "colors" which are 32 colors. However, all the tables I've seen have 64 colors in them. The other 32 look more like pastel colors. So have i just not dived enough in the PPU to discover where a flag is set to produce the other 32 colors, like a "bank" switch in the palette?
Now the sources I've been using as guidelines usually just hard code the 64 values, but how are they addressed? If the PPU can only request up to 0x3F1F how would it obtain those other colors. I'm not needing someone to hold my hand through it, just to point where maybe this info exists in the nesdev wiki. Or let me know if I just need to emulate more of the PPU.
I thought for sure getting the hard coded stuff (the various ROMs) would be the best place to start.
Thanks for any help!
I'm trying to learn how to code an emulator, I know it's likely just another one for the pile of existing emulators. But, it's more for a learning exercise. So far emulating the 6502, working great! So i started to tackle the PPU of course. And I'm hitting some stumbling points.
The big one I can't wrap my head around, and my google-fu hasn't been too helpful, is how or where the other 32 colors in the palette are defined. What I mean is addresses 0x3F00 to 0x3F1F are the various "colors" which are 32 colors. However, all the tables I've seen have 64 colors in them. The other 32 look more like pastel colors. So have i just not dived enough in the PPU to discover where a flag is set to produce the other 32 colors, like a "bank" switch in the palette?
Now the sources I've been using as guidelines usually just hard code the 64 values, but how are they addressed? If the PPU can only request up to 0x3F1F how would it obtain those other colors. I'm not needing someone to hold my hand through it, just to point where maybe this info exists in the nesdev wiki. Or let me know if I just need to emulate more of the PPU.
I thought for sure getting the hard coded stuff (the various ROMs) would be the best place to start.
Thanks for any help!