• Contact
  • Journal
  • Home
  • Arcade
  • The Pit
  • Hardware
  • Site
  • Page
  • Amiga
    • Rainbow Islands
      • 1loader-dec
      • 1loader
      • boot
      • orig-boot
      • Journal
  • Arcade
    • Asteroids 80%
      • Hardware
      • RAMUse
      • Code

      • DVG
      • VectorROM

      • Journal
    • Crazy Climber 1%
      • BigSpriteGraphics.pdf
      • Buildings.pdf
      • cclimber.asm
      • CharEnc.inc
      • CrazyClimberMemoryMapInfo.pdf
      • GraphicsAndCharacterAssetInfo.pdf
      • MemoryMap.inc
    • Defender 75%
      • RAMUse
      • Hardware
      • Bank1
      • Bank2
      • Bank3
      • Bank7
      • BankFixed
      • Mapping.txt
      • SoundHardware
      • SoundRAMUse
      • SoundCode
      • Defender-Theory-Early.pdf
      • Defender-Theory-Later.pdf
      • Defender.CPU.jpg
      • Defender.ROM.B&W.jpg
      • Defender.Vid.B&W.jpg
      • SoundROM.txt
    • Frogger (Sound)
      • SoundHardware
      • SoundRAMUse
      • SoundCode

      • Hardware
      • RAMUse
      • Code

      • GFX

      • Journal
    • Galaga 5%
      • CPU1 (Main)
      • CPU2 (Secondary)
      • CPU3 (Sound)
      • GFX1 (Characters)
      • GFX2 (Sprites)
      • PROMcolors
      • PROMpaletteChar
      • PROMpaletteSprite

      • CPU1Fix

      • Journal
    • Moon Patrol 75%
      • Hardware
      • RAMUse
      • Code

      • GFX1 (Text)
      • GFX2 (Sprites)
      • GFX3 (Mountains)
      • GFX4 (Hills)
      • GFX5 (City)
      • ImageBackgroundColors
      • SpriteColors
      • SpriteColorSets
      • TextColors

      • MoonPatrolSound
      • SoundHardware
      • SoundRAMUse
      • SoundCode

      • Journal
    • Omega Race 10%
      • Hardware
      • RAMUse
      • MainBoard

      • SoundHardware
      • SoundRAMUse
      • SoundBoard

      • DVGPROM
      • VectorROM

      • Journal
    • Phoenix 90%
      • Hardware
      • RAMUse
      • Code

      • Background
      • Foreground

      • Journal

      • Scramble HHi
        • phoenixj-func-main2.pdf
        • phoenixj-func-main2.scap
        • phoenixj.asm-may2025.txt
        • phoenixj.asm-may2025.txt.pdf
    • Space Invaders
      • invaders.asm
      • Hardware
      • RAMUse
      • Code

      • Journal
    • The Pit
      • Hardware
      • RAMUse
      • Code
    • Time Pilot (Sound)
      • SoundHardware
      • SoundRAMUse
      • SoundCode

      • Hardware
      • RAMUse
      • Code

      • Journal
    • Sea Wolf 1%
      • Hardware
      • RAMUse
      • Code

      • Journal
    • Scramble 1%
      • SoundHardware
      • SoundRAMUse
      • SoundCode

      • Journal
  • Atari2600
    • Stella (Hardware Info)
    • Asteroids 5%
      • RAMUse
      • Code

      • Journal
    • Battle Zone 1%
      • RAMUse
      • Code

      • Journal
    • Chess 1%
      • RAMUse
      • Code

      • Journal
    • Combat 10%
      • RAMUse
      • Code
      • CodePAL

      • Journal
    • Double Gap
      • Code
      • DoubleGap.asm

      • Journal
    • Entombed 1%
      • RAMUse
      • Code

      • Journal
    • ET 1%
      • RAMUse
      • Code

      • Journal
    • Burger Time 1%
      • RAMUse
      • CodeBank0
      • CodeBank1
      • CodeBank2
      • CodeBank3
      • CodeBank4
      • CodeBank5
      • CodeBank6
      • CodeBank7

      • Journal
    • Missile Command 1%
      • RAMUse
      • Code

      • Journal
    • Space Invaders 1%
      • RAMUse
      • Code

      • Journal
  • CoCo
    • Hardware
    • Early Work
    • Pyramid
      • RAMUse
      • Code

      • Journal
    • Raaka Tu
      • RAMUse
      • Code

      • Journal
    • Bedlam
      • RAMUse
      • Code

      • Journal
    • Madness & Minotaur
      • Walk Through
        • after_start.txt
        • after_start.cas
        • after_1.txt
        • after_1.cas
        • after_2.txt
        • after_2.cas
        • after_3.txt
        • after_3.cas
        • after_4.txt
        • after_4.cas
        • after_5.txt
        • after_5.cas
        • after_6.txt
        • after_6.cas
        • after_7.txt
        • after_7.cas
        • after_8.txt
        • after_8.cas
        • after_9.txt
        • after_9.cas
        • after_10.txt
        • after_10.cas
        • after_11.txt
        • after_11.cas
        • after_12.txt
        • after_12.cas
        • after_13.txt
        • after_13.cas
        • after_14.txt
        • after_14.cas
        • after_15.txt
        • after_15.cas
        • after_16.txt
        • after_16.cas
        • after_17.txt
        • after_17.cas
        • after_18.txt
        • after_18.cas
        • after_19.txt
        • after_19.cas
        • after_20.txt
        • after_20.cas
        • after_21.txt
        • after_21.cas
        • after_22.txt
        • after_22.cas
        • after_23.txt
        • after_23.cas
        • after_24.txt
        • after_24.cas
        • after_25.txt
        • after_25.cas
      • RAMUse
      • Code

      • SaveGameViewer

      • Journal
    • Mega-Bug
      • RAMUse
      • Code

      • Journal
    • Popcorn
      • RAMUse
      • Code

      • Journal
    • Daggorath
      • RAMUse
      • Code

      • Level Maps

      • Journal
    • Downland 5%
      • RAMUse
      • Code

      • Journal
    • Audio Analyzer 5%
      • RAMUse
      • Code

      • Journal
    • Doubleback
      • RAMUse
      • Code

      • Journal
  • NES
    • Zelda 5%
      • Hardware
      • RAMUse
      • Bank0
      • Bank1
      • Bank2
      • Bank3
      • Bank4
      • Bank5
      • Bank6
      • Bank7

      • Journal
    • Kid Icarus 1%
      • Hardware
      • RAMUse
      • Bank0
      • Bank1
      • Bank2
      • Bank3
      • Bank4
      • Bank5
      • Bank6
      • Bank7

      • Journal
  • Gameboy
    • Hardware
    • Link's Awakening 1%
      • RAMUse
      • Bank00
      • Bank01
      • Bank02
      • Bank03
      • Bank04
      • Bank05
      • Bank06
      • Bank07
      • Bank08
      • Bank09
      • Bank0A
      • Bank0B
      • Bank0C
      • Bank0D
      • Bank0E
      • Bank0F
      • Bank10
      • Bank11
      • Bank12
      • Bank13
      • Bank14
      • Bank15
      • Bank16
      • Bank17
      • Bank18
      • Bank19
      • Bank1A
      • Bank1B
      • Bank1C
      • Bank1D
      • Bank1E
      • Bank1F

      • Journal
    • Tetris 1%
      • RAMUse
      • Code

      • Journal
  • TRS80
    • HardwareLevel2
    • HardwareLevel1
    • HardwareDisk
    • HauntedHouse
      • RAMUse1
      • Code1
      • RAMUse2
      • Code2

      • Journal
    • Pyramid
      • RAMUse
      • Code

      • RAMUse1
      • Code1

      • Journal
    • RaakaTu
      • RAMUse
      • Code

      • Journal
    • Bedlam
      • RAMUse
      • Code

      • Journal
    • Xenos
      • RAMUse
      • Code
      • Section1
      • Section2
      • Section3
      • Section4
      • Section5
      • Section6
      • Section7
      • Section8
      • Section9
      • SSVDOBJS
      • USVDOBJS

      • Journal
  • Virus
    • Morris Worm 1%
      • Journal
    • Stoned
      • Journal

  • Tools
    • Blend
      • blend.zip

      • Journal
  • The Pit — Hardware
    • Memory & I/O map
    • IN0 — joystick + dig/fire (read at 0xA000, active-low then complemented)
    • IN1 — coin / start (read at 0xA800, active-high)
    • LS259 control latch (write 0xB000–0xB007, one address per bit, data on d0)
    • Sprite record format (4 bytes each, staged at 0x8220, copied to 0x9840)

The Pit — Hardware

The Pit runs on Zilec Electronics' "roundup"-family board (MAME driver `taito/roundup.cpp`, machine `thepitu1`). The main CPU is a Zilog Z80 clocked at 3.072 MHz (18.432 MHz / 3 / 2), giving 50688 cycles/frame at a 60.606 Hz refresh; the native raster is 256×224, displayed rotated (MAME `ROT90`).

A second Z80 drives the sound hardware — two AY-3-8910 PSGs — receiving command bytes from the main CPU through the sound latch at `0xB800`.

Three hardware invariants matter when reading the map below: (1) a read and a write at one address can be different devices — `0xB800` reads the watchdog and writes the sound latch; (2) a read is not always pure — reading `0xB800` *kicks* the watchdog; (3) the LS259 control latch at `0xB000`–`0xB007` is bit-addressable — one address per bit, the data on d0.

Memory & I/O map

Address Name Description
0000:4fff rom Program ROM, 20480 bytes (`thepitu1` main-CPU parts p38b.ic38 + p39b.ic39 + p40b.ic40 + p41b.ic41 + p33b.ic33)
8000:87ff workRam Work RAM (see Work RAM)
8800:8bff colorRam Colour RAM, per-tile colour; mirror at 0x8c00-0x8fff
9000:93ff videoRam Video RAM / tilemap, 0x20-wide rows; mirror at 0x9400-0x97ff
9800:983f attrRam Attribute RAM: per-column (×2) vertical scroll — column N scrolls by attrRam[N*2]
9840:985f spriteRam Sprite RAM, 8 sprites × 4 bytes; the NMI copies the 0x8220 staging block here each frame
a000 in0 R: IN0 joystick + dig/fire, active-low, LS157-muxed with cocktail IN2 by mainLatch b6 then complemented. W: nop (not hooked up)
a800 in1 R: IN1 coin + start, active-high
b000 dsw R: DIP switches (the read side of address b000)
b000 mainLatch W (b000-b007): the LS259 control latch — NMI enable, coin-lockout, sound-enable, flip-X + IN0/IN2 mux, flip-Y (bit table below)
b800 soundLatch W: sound command byte to the sound CPU
b800 watchdog R: watchdog reset — the read is the kick, the returned byte is discarded

IN0 — joystick + dig/fire (read at 0xA000, active-low then complemented)

The read at `0xA000` is muxed (mainLatch b6 selects the IN0 upright port vs the IN2 cocktail port) and complemented, so the ROM works on the active-high form: idle reads `0x00`, a pressed bit reads 1.

Bit Mask Input
0 0x01 Left
1 0x02 Right
2 0x04 Down
3 0x08 Up
4 0x10 Dig / fire (BUTTON1)

IN1 — coin / start (read at 0xA800, active-high)

Bit Mask Input
0 0x01 Coin
1 0x02 Start 2P
2 0x04 Start 1P

LS259 control latch (write 0xB000–0xB007, one address per bit, data on d0)

The latch is an 8-bit LS259 addressable latch (IC42): each of the eight addresses `0xB000`–`0xB007` sets its own bit from data bit 0.

Address Bit Line
b000 0 NMI mask / enable (the main loop writes 1 to arm the vblank NMI)
b002 2 Coin lockout
b003 3 Sound enable
b006 6 Flip-X + IN0/IN2 input-mux select (cocktail)
b007 7 Flip-Y

Sprite record format (4 bytes each, staged at 0x8220, copied to 0x9840)

Sprite RAM holds 8 sprites of 4 bytes each. Each record decodes as: byte0 → screen position on one axis; byte1 → tile `code & 0x3f` plus flip-X (0x40) / flip-Y (0x80); byte2 → `color = (byte2 & 7) * 4` plus a priority bit3 (a set bit3 draws the sprite over high-priority background); byte3 → the other screen axis. Under the display's upright (ROT270) view, byte0 is the screen-horizontal coordinate and byte3 the screen-vertical.