Hi, I am reading about how the PPU registers work from the Wiki. Going through the pages, I am having a bit of confusion with understanding the access to the $2007 PPUDATA register.
It says here:
IIRC, the VRAM address is obtained through $2006, where it has been written twice to memory by the CPU. Is my understanding on how the full 16-bit VRAM address is obtained, correct?
1. CPU writes to $2006.
-> The address latch gets filled with this byte.
2. CPU writes to $2006
-> The VRAM is constructed from (pseudo-code)
3. CPU writes to $2007
4. PPU uses the
Now, here is where I am stuck... Is the increment happening on vramAddr? Or, is the increment happening in $2006. I am confused about this because These values are only 8-bits and addresses are be 16-bits, right? Where do I write the low/high bytes in this case?
It says here:
Quote:
VRAM read/write data register. After access, the video memory address will increment by an amount determined by bit 2 of $2000.
IIRC, the VRAM address is obtained through $2006, where it has been written twice to memory by the CPU. Is my understanding on how the full 16-bit VRAM address is obtained, correct?
1. CPU writes to $2006.
-> The address latch gets filled with this byte.
2. CPU writes to $2006
-> The VRAM is constructed from (pseudo-code)
Code:
vramAddr = (latch.value << 8) | mem.get(0x2006)
3. CPU writes to $2007
4. PPU uses the
Code:
vramAddr
and writes to PPU memory with data found in $2007. Now, here is where I am stuck... Is the increment happening on vramAddr? Or, is the increment happening in $2006. I am confused about this because These values are only 8-bits and addresses are be 16-bits, right? Where do I write the low/high bytes in this case?