Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Boot ROM

Note

This page is currently a stub and needs more detail. Several parts of the boot ROM have not been decided yet, and are listed at the bottom of this page.

Every time the console starts, it runs the boot ROM before the game. The boot ROM is not optional, and it is not built into the emulator. It is a separate file that the emulator loads into its own region of memory, and if that file is missing the emulator will not start.

The intro animation can be skipped by pressing any binary input on any of the 8 controllers after the heafer is checked.

Region

Where the boot ROM starts is defined in starts is defined in the memory map. Unlike the game’s ROM, which is really RAM, the boot ROM is truly read-only and writes to it are ignored. A game that corrupts memory can never stop the console from starting again.

Boot Sequence

  1. The emulator loads the boot ROM file into the boot ROM region, and copies the game file into the ROM region.
  2. RAM, VRAM and I/O start out zeroed.
  3. The CPU starts running the boot ROM.
  4. The boot ROM plays the intro and checks the game’s header: the magic number and the format version. If either is wrong, it shows an error instead of starting the game.
  5. The boot ROM puts the console into a clean state.
  6. The boot ROM starts the game by jumping to the game’s reset vector, using JumpIndirect on the reset vector at rom start + 0x10.

File Format

The boot ROM file the emulator needs is a raw binary file starting at where the boot ROM starts in memory, the CPU starts at its first byte.

Not Decided Yet

  • Exactly what state the console is in when a game starts, which step 5 has to produce.
  • What the error screen looks like, and what the boot ROM does after showing it.
  • Where the emulator looks for the boot ROM file.