I am mildly infuriated Because I can't figure out how to:
1. How to change the palettes (mainly the background)
2. How to make graphics
And 3. How to adjust the nametables
if anybody could help me I appreciate it!
PS: I am trying to program in pure ASM because I don't know any languages. (I found the opcodes of all of the intructions)
PPU Memory
Moderator: Moderators
Re: PPU Memory
Have you tried the Nerdy Nights Tutorial?
http://nintendoage.com/forum/messagevie ... eadid=7155
Sometimes it's good to start from working example code, rather than start from scratch.
The PPU can only be written to with rendering OFF (write zero to 2001)...or during v-blank.
To write to the PPU you must first set an address (2 writes to 2006), then write data to 2007.
When that is done. Set the scroll registers (2005 twice). And turn the screen on (1e to 2001).
The palette is PPU addresses 3f00-3f1f.
The main screen (nametable #0) is ppu addresses 2000-23ff.
The graphics can be made separately, and imported into the .nes file. With a tile editor.
There is a lot more to it...init code. ines header. learn 6502 asm. Which is why I recommend a tutorial.
As Einstein used to say. "Do not worry about your difficulties in Mathematics. I can assure you mine are still greater." I am currently reading through a 2000 line source code that I didn't write, trying to fix a bug that I don't understand (involving NES music). we all get frustrated.
http://nintendoage.com/forum/messagevie ... eadid=7155
Sometimes it's good to start from working example code, rather than start from scratch.
The PPU can only be written to with rendering OFF (write zero to 2001)...or during v-blank.
To write to the PPU you must first set an address (2 writes to 2006), then write data to 2007.
When that is done. Set the scroll registers (2005 twice). And turn the screen on (1e to 2001).
The palette is PPU addresses 3f00-3f1f.
The main screen (nametable #0) is ppu addresses 2000-23ff.
The graphics can be made separately, and imported into the .nes file. With a tile editor.
There is a lot more to it...init code. ines header. learn 6502 asm. Which is why I recommend a tutorial.
As Einstein used to say. "Do not worry about your difficulties in Mathematics. I can assure you mine are still greater." I am currently reading through a 2000 line source code that I didn't write, trying to fix a bug that I don't understand (involving NES music). we all get frustrated.
nesdoug.com -- blog/tutorial on programming for the NES
Re: PPU Memory
Don't forget to set the "base" nametable too (lower 2 bits of $2000), otherwise the scroll registers won't necessarily work as expected.dougeff wrote:To write to the PPU you must first set an address (2 writes to 2006), then write data to 2007.
When that is done. Set the scroll registers (2005 twice). And turn the screen on (1e to 2001).
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
P.S. If you don't get this note, let me know and I'll write you another.