Structs

A struct containg all the buttons for one controller and whether they are pressed (true) or not (false)
Emulating an NTSC PPU chip

Enums

Vram has 4 banks, while there is only memory for 2. That means that two of the banks are copies of the other two
There are 8 PPU registers, available to the cpu.

Constants

CPU frequency constant. This assumes NTSC emulation (instead of PAL). That’s also what’s emulated in the rest of the ppu.
The width of the NES output video signal
The height of the NES output video signal

Traits

To use your cpu with the provided PPU library, you need to implement this trait for your CPU.

Functions

Runs the cpu with the ppu. Takes ownership of the cpu, creates a PPU instance, and runs the tick function at the correct rate.
Runs the cpu as if connected to a PPU, but doesn’t actually open a window. This can be useful in tests.
Like run_cpu_headless, but takes a cycle limit after which the function returns.