Why Super Mario Bros. 3's Status Bar Never Scrolls
Tick By Tick
0:00 / 0:00
Why Super Mario Bros. 3's Status Bar Never Scrolls
4 218 просмотров · 10 дн. назад
Tick By Tick
74 подписчика
4 218 просмотров · 10 дн. назад
In Super Mario Bros. 3 the status bar stays perfectly still while the level scrolls above it, and nothing in the NES asked for that. The order comes from a chip inside the cartridge. I took that chip apart in my own NES emulator, written in C, and measured what the games actually do with it.
The console can only ask a cartridge for 32,768 bytes of program and 8,192 bytes of graphics, and those ceilings never moved. The Legend of Zelda is four times the first one; Super Mario Bros. 3 is eight times the first and sixteen times the second. So the game writes to its own read-only memory. Nothing in the ROM changes: a chip on the cartridge catches the write and changes which part of the cartridge answers the same addresses. Zelda's MMC1 takes each command one bit at a time, five writes per command, 347,469 writes in two minutes. The MMC3 in Super Mario Bros. 3 takes two, and counts screen lines: on line 191 of every frame it interrupts the processor, and the game swaps six graphics banks halfway down the picture. Your Zelda save lives there too: 8,192 bytes of ordinary RAM that a battery never lets power off.
The code on screen is my emulator's model of these chips, not the chips themselves, and the video says where my model simplifies.
The full source of the emulator, in C: https://github.com/TickByTickDev/NES-Emu
Chapters
0:00 Two ceilings that never moved (the 32 KB window)
1:21 A cartridge with nobody inside (no mapper at all)
2:05 Writing to something you can't write to (bank switching)
3:01 The MMC1 talks one bit at a time (its serial port)
4:57 What those commands move (banks and mirroring)
6:07 What the power cut doesn't take (battery-backed save RAM)
7:11 Select, then write (the MMC3)
8:15 The line counter, and the cut across the picture (scanline IRQ)
10:34 Zoom out
This is the last part of The NES, piece by piece. Every video stands on its own; the other parts of the console are here:
The CPU: • The NES CPU Can’t Multiply. It Ran Super M...
The cartridge: • Twenty Times Bigger Than the Machine That ...
Mappers: • This NES Game Swaps Its Own Code 17 Times ...
The PPU: • 2,048 Bytes Can’t Hold a Screen. The NES N...
The sound: • How the NES Makes Music Without a Sound Chip
Sources
NESdev Wiki: CPU memory map, PPU memory map, PPU pattern tables, PPU rendering, Mapper, NROM, UxROM, MMC1, MMC3, iNES
NesCartDB: The Legend of Zelda (NES-SNROM), Super Mario Bros. 3 (NES-TSROM)
Gameplay recorded in my own emulator. No ROMs are distributed.
#NES #Emulator #RetroGaming