Namco Pac-Man/Memory Mapped I/O

From Obscure Wiki
< Namco Pac-Man
Revision as of 01:04, 13 May 2023 by Lidnariq (talk | contribs) (Nothing surprising here, but warrants pedantic description)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Sprite Attributes (read/write, $4FF2-4FFD)

The twelve bytes from $4FF2 through 4FFD choose sprite number, palette, and flip.

4FF0, 4FF1, 4FFE, and 4FFF are never drawn because the video hardware is drawing 36 columns of tiles instead of 32.

IN0 (read-only, $5000-503F)

Reads return Player 1 joystick, one DIP switch, coin acceptors, and "credit" button

IN1 (read-only, $5040-507F)

Reads return Player 2 joystick, "test" button, start buttons, and "table" button

DIPSW (read-only, $5080-50BF)

Reads return six DIP switches and two solder jumpers

Open bus (read-only, $50C0-50FF)

Reads aren't driven.

Interrupt enable and acknowledge (write-only, $5000, $5008, ... $5038)

If high, start of vblank asserts Z80 /IRQ input. If low, /IRQ input is reset and start of vblank cannot assert Z80 /IRQ input.

Mute (write-only, $5001, $5009, ... $5039)

If low, sound generator DAC and volume multipler is forced to zero. If high, sound generator DAC works normally

Ignored (write-only, $5002, $5004, $5005, $5006, $500A, ... $503E)

These four latched bits exist, but are connected to nothing.

Screen rotation (write-only, $5003, $500B, ... $503B)

If high, the tilemap, sprites, and tiles are rotated 180 degrees. For use in cocktail cabinets.

Coin counter (write-only, $5007, $500F, ... $503F)

If high, the coin counter pin is pulled low.

Sound RAM 1 (write-only, $5040-504F)

RAM is only 4 bits wide: top 4 bits are ignored.

The exact interpretation of these nybbles depends on the contents of the sound sequencer ROM.

The stock ROM uses

  • $5045: Voice 1 waveform selector (bottom 3 bits)
  • $504A: Voice 2 waveform selector
  • $504F: Voice 3 waveform selector

Sound RAM 2 (write-only, $5050-505F)

RAM is only 4 bits wide: top 4 bits are ignored.

The exact interpretation of these nybbles depends on the contents of the sound sequencer ROM.

The stock ROM uses:

  • $5050-5054: 20 bits of waveform pitch as a fraction of 96kHz
  • $5055: Voice 1 volume
  • $5056-5059: 16 bits of waveform pitch
  • $505A: Voice 2 volume
  • $505B-505E: 16 bits of waveform pitch.
  • $505F: Voice 3 volume

Sprite coordinates (write-only, $5062-506D)

Big number = top right corner.

Bytes at $5060, 5061, 506E, 506F exist but aren't used

Ignored (write-only, $5070-50BF)

No hardware listens to writes in these addresses

Watchdog reset (write-only, $50C0-50FF)

A counter is incremented every vblank. Writes to this address clear this counter. When 15, the CPU and the registers at $5000-5007 are reset.