I post in this forum cos i think is a hardware releated thing.
Why the NES cant make a "ppu mem access on request" and we have to read twice 0x2007 to get the correct value? i mean electronically how this happens?
Because it's buffered. It could be compared perhaps to turning on a water faucet (VRAM being the main water line, $2007 the faucet, and the buffer the pipe inbetween). When you switch between hot/cold (changing VRAM address), you have to let it run for a second to clear out the water that was left in the pipe from before.
Well that kinda explains why we have to read twice, but not why the NES does it this way exactly (which probably was your question actually, I'm not sure). I remember there was a good thread about it somewhere (maybe on the old forum).
Using the PPU to access VRAM is usually more efficient than if it were accessed directly by the CPU, due to the auto incrementing (especially the 32-byte increment mode).
Unless you're trying to read-modify-write CHR data, as seen in Qix and Videomation and Hatris and the like.
Or performing decompression that needs access to previously outputed data.
anes,
i think.....
the ppu register data and the vram have to pass through an internal register or data bus on the ppu. so when the cpu request it, the ppu has to get it, then give it to the cpu. probably can be done with in a cpu clock since the ppu runs 3 times faster than the cpu. the patent documents show the diagram of it. but not exact as i think nintendo made some revisions to it since filing.
matt