liveBook · Manning

Game cartridge

As explained in Classic Game Programming on the NES: Make your own retro video game

A game cartridge is a removable NES game medium containing program data, graphics data, and optional memory hardware.

A game cartridge is a removable NES game medium containing program data, graphics data, and optional memory hardware. It gives the console access to ROM and can extend the system with additional RAM, VRAM, or battery-backed RAM. section 1.2 section 5.1

A cartridge can provide several kinds of storage and hardware:

  • Program and data space, supplied as fixed or bank-switched ROM; up to 32K is available at one time. section 1.2
  • Pattern-table storage for tile and sprite graphics, commonly an 8K cartridge section that may be ROM or writable RAM. section 1.2
  • Optional working RAM, extra VRAM, or battery-backed RAM for saving progress. section 1.2

NES software must follow a cartridge structure so the console recognizes it as a valid title. Assembly segments place code or data into corresponding ROM or RAM areas, while RAM values can be written but disappear when power is removed. section 5.1

Bank switching for larger games

Early cartridges were limited to 16K or 32K of game-code ROM and 8K of pattern ROM. Mapper chips let larger cartridges swap memory banks into the NES's 64K address space. Writing to mapper-controlled memory locations selects the active PRG ROM or CHR ROM bank. section 16.2.1

Figure 1.4 NES architecture

Use the NES architecture diagram to connect cartridge memory with the CPU, PPU, internal RAM, and graphics storage. section 1.2

Figure 16.1 Standard NES cartridge memory layout

Use the standard cartridge memory layout to identify the usual PRG ROM and CHR ROM regions. section 16.2.1

How Classic Game Programming on the NES: Make your own retro video game covers it

How deep it goes
Defines ROM, RAM, cartridge sections, and bank switching, then stops short of specifying individual mapper implementations.
Examples
Uses NES memory layouts, assembler segments, pattern storage, and mapper-controlled bank selection as concrete examples.
What it assumes
Introduces the ROM-versus-RAM distinction and segment placement while assuming familiarity with neither cartridge internals nor mapper choices.
What you can do after
Operate/configure NES program layouts with ROM, RAM, assembler segments, and mapper-controlled memory banks.
How it connects
Connects cartridges with NES architecture, ROM, RAM, VRAM, the PPU, bank switching, and mappers.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Classic Game Programming on the NES: Make your own retro video game. The section links point to the parts of the book it draws on.