struct nes {
Memory cpuMemory;
Memory ppuMemory;
Memory objectAttributeMemory;
CPU cpu;
PPU ppu;
APU apu;
Cartridge cartridge;
Interrupts interrupts;
MMU mmu;
GUI gui;
Joypad joypads[NES_NUM_JOYPADS];
};
- CPU and PPU each have their own address space
- Separate area for sprite attributes in memory known as "object attribute memory". CPU writes to this, PPU reads from it.
Many device are free to generate their own interrupts, which are then handled by the CPU (unless it is currently ignoring interrupts).
There are three general types of interrupts:
- NMI - Non Maskable Interrupts, interrupts which the CPU cannot "mask away", it must handle them
- IRQ - Interrupt ReQuests, interrupts which the CPU is free to ignore
- RESET - The initial power on / reset interrupt generated when you hit the power switch