Page 1 of 1

PPU

Posted: Thu Jan 21, 2010 11:46 pm
by notinasia
Is it a derivative of the 6502? And (briefly) how does it send images to the TV or communicate with the CPU?

As always thanks for your time.

Re: PPU

Posted: Fri Jan 22, 2010 12:13 am
by tokumaru
notinasia wrote:Is it a derivative of the 6502?
Absolutely not.
how does it send images to the TV
I believe one of the pins of the chip outputs a composite video signal, which is the result of all the PPU logic.
or communicate with the CPU?
The PPU doesn't have to know about the CPU, but programs running on the CPU "talk" to the PPU by using memory-mapped registers.

Posted: Fri Jan 22, 2010 3:16 am
by Jeroen
Not trying to attack you or anything. But where did you get the idea the ppu was a 6502 derivative? A ppu and a cpu are two very different beasts. :?

Posted: Fri Jan 22, 2010 4:57 am
by tepples
Jeroen wrote:Not trying to attack you or anything. But where did you get the idea the ppu was a 6502 derivative? A ppu and a cpu are two very different beasts. :?
An APU and a CPU are also very different beasts, but the Super NES, Jaguar, Dreamcast, PlayStation 2, and Nintendo DS all have dedicated CPUs with exclusive access to the APU. OpenCL makes PC GPUs look like CPUs. So I can see where one might get confused.

Posted: Fri Jan 22, 2010 6:12 am
by Jeroen
Ok looking at it like that makes some sense. :P

Posted: Fri Jan 22, 2010 10:14 am
by notinasia
Ok, it sends out a composite video signal.

And it sounds like the PPU is an FPGA not a microprocessor, is that right?

Posted: Fri Jan 22, 2010 10:21 am
by Jaffe
Yeah, it's not a micrprocessor. But it isn't an FPA either. It has a fixed routine that it repeats over and over. Some aspects of this routine can be altered by writing to its control registers, but one can't reprogram the PPU in any way to do something outside what it has been hardwired to do.

Posted: Fri Jan 22, 2010 10:31 am
by tepples
The NES PPU is an ASIC in a separate package from the CPU and APU.

Clones differ, of course. The "NOAC" (NES-compatible computer on a chip) found in many third-party NES clones puts the CPU, APU, PPU, and two 2 KB SRAMs in one package, probably on one die. Kevin Horton's clone of the PPU is on an FPGA, along with a clone of the CPU, APU, and several mappers.

Posted: Fri Jan 22, 2010 5:04 pm
by CartCollector
No one's really answered how the CPU and PPU communicate, so I will. The CPU can directly change the PPU by writing to 8 different registers. The registers are at $2000 - $2007 from the perspective of the CPU. The CPU can change the PPU's settings, read the PPU's status, set the scrolling, and write to the name tables, palette, sprite memory, and CHR-RAM, if the cartridge has CHR-RAM.

You can also use $4014 to write to PPU memory, but I'll let you look up how to do that on your own.

Guides you should read:
http://nesdev.com/NESTechFAQ.htm (especially the "Basic" and "Programming" sections)
http://fms.komkon.org/EMUL8/NES.html