3 ms·
Note that some of these features require special hardware support in the cartridge. The NES cartridge connector exposes CPU and PPU (picture processing unit) pi
by mrob 7y ago
Note that some of these features require special hardware support in the cartridge. The NES cartridge connector exposes CPU and PPU (picture processing unit) pins, and the simplest games ("NROM") connect ROM chips directly to them. More advanced designs add an additional memory management controller (commonly called a "mapper"):
https://wiki.nesdev.com/w/index.php/MMC https://wiki.nesdev.com/w/index.php/MMC
The animated backgrounds are accomplished by the mapper bank switching the character (tile) memory. The parallax scrolling is accomplished by the mapper counting scanlines and generating an interrupt when the correct scanline is reached, so the CPU can change the PPU scroll registers mid-frame with the correct timing. Later mappers like the the MMC5 could precisely time mid-frame bank changes to support more than 256 tiles on screen at once, and to support 8x8 attribute blocks instead of 16x16.
The ultimate mapper feeds arbitrary data to the PPU to simulate having a bitmapped display with 8x1 attribute blocks (the PPU only reads attribute memory once every 8 pixels, so that's a hard limit). Tom Murphy implemented this with a Raspberry Pi (which isn't ideally suited to the task, so there are timing imperfections causing graphical glitches, but theoretically it could be done without them):
https://www.youtube.com/watch?v=ar9WRwCiSr0 https://www.youtube.com/watch?v=ar9WRwCiSr0