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

      • DVG
      • VectorROM

      • Journal
    • Centipede
      • Hardware
      • RAMUse
      • Code
    • 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
    • Donkey Kong (AI)
      • Hardware
      • RAMUse
      • Code
    • 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
    • Pooyan (AI)
      • Hardware
      • RAMUse
      • Code
    • 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
    • Tempest
      • Hardware
      • RAMUse
      • Code
    • The Pit (AI)
      • 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
  • ColossalCave
    • CodeOrg
    • DataOrg

    • Code350
    • Data350
  • 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
  • Hardware
    • Memory & I/O map
    • IN0 — trackball X, cabinet, service, VBLANK (read at 0x0C00, MIXED polarity)
    • IN1 — controls + coins (read at 0x0C01, active-low, idle 0xFF)
    • IN2 — trackball Y (read at 0x0C02)
    • LS259 output latch (0x1C00–0x1C07, one address per line, value = data bit 7)
    • Video — mushroom-field tilemap + sprites

Hardware

Centipede runs on Atari's 1981 Centipede PCB (MAME driver `atari/centiped.cpp`, machine `centiped`). The CPU is a MOS 6502 clocked at 1.512 MHz (12.096 MHz / 8). The 6502 halves to 0.756 MHz whenever it touches playfield RAM (`0x0400`–`0x07BF`) — the video hardware steals the bus there — so the real per-frame instruction count is lower than the nominal 25200 cycles and depends on what the code is doing. The frame rate is a flat 60 Hz. The native raster is 256×256 with a 256×240 visible window; the monitor is mounted rotated 90° counter-clockwise (MAME `ROT270`, a portrait cabinet).

The player controls a shooter along the bottom of the screen with a trackball, not a joystick: the trackball's X and Y are analogue deltas read as up/down counters (a 4-bit magnitude plus a sign bit) at two input ports, not as direction bits.

Two hardware conventions matter when reading the map. (1) A read and a write at one address can be different devices — most visibly at `0x2000`, where a read returns program ROM and a write kicks the watchdog. (2) A bank of single-bit outputs lives in an LS259 addressable latch at `0x1C00`–`0x1C07`: one address per line, and the value written is data bit 7 (`write_d7`) — the coin counters, the two player LEDs (inverted), and the screen-flip bit.

The one interrupt is an IRQ (not an NMI), asserted by the video counter chain a few times per frame; the program acknowledges it by writing `0x1800` (`irq_ack_w`), which clears the 6502 IRQ line. High scores survive power-off in an EAROM (a small serial NVRAM) at `0x1600`–`0x173F`. Sound is a POKEY custom chip at `0x1000`–`0x100F` (also the source of the hardware random number the game reads).

Memory & I/O map

Address Name Description
0000:03ff workRam Work RAM (see Work RAM)
0400:07bf videoRam Video RAM — a 32×30 grid of tile codes (the mushroom field and text)
07c0:07ff spriteRam Sprite RAM — 16 objects × 4 fields (the shooter, centipede segments, spider, flea, scorpion, shots)
0800 dsw1 R: DIP switch bank 1 (lives, bonus, difficulty, language)
0801 dsw2 R: DIP switch bank 2 (coinage)
0c00 in0 / trackballX R: IN0 — trackball X (bits 0-3 count, bit 7 sign), cabinet DIP (bit 4), service (bit 5, active-low), VBLANK (bit 6, active-high)
0c01 in1 R: IN1 (active-low) — start 1P/2P, fire, tilt, coins, service
0c02 in2 / trackballY R: IN2 — trackball Y (bits 0-3 count, bit 7 sign)
0c03 in3 R: IN3 — cocktail P2 joystick (unused on the upright board)
1000:100f pokey R/W: POKEY sound chip; a read returns the hardware random number / pot state
1400:140f paletteRam W: colour RAM — the live palette the video hardware reads
1600:163f earomWrite W: EAROM (high-score NVRAM) data
1680 earomControl W: EAROM control
1700:173f earomRead R: EAROM data
1800 irqAck W: acknowledge/clear the 6502 IRQ line
1c00:1c07 outLatch W (D7): LS259 output latch — one address per line (coin counters, LEDs, screen flip)
2000 rom / watchdog R: program ROM. W: watchdog reset
2000:3fff rom Program ROM, 8192 bytes (`centiped` parts 136001-307.d1 + -308.e1 + -309.fh1 + -310.j1)

IN0 — trackball X, cabinet, service, VBLANK (read at 0x0C00, MIXED polarity)

Bit Mask Input
0–3 0x0f Trackball X magnitude (this frame's horizontal delta)
4 0x10 DIP: cabinet (0 = upright)
5 0x20 Service (active-low)
6 0x40 VBLANK (active-high — the program polls it to sync to the frame)
7 0x80 Trackball X sign (direction)

IN1 — controls + coins (read at 0x0C01, active-low, idle 0xFF)

Bit Mask Input
0 0x01 Start 1P
1 0x02 Start 2P
2 0x04 Fire
3 0x08 Fire (cocktail)
4 0x10 Tilt
5 0x20 Coin 1
6 0x40 Coin 2
7 0x80 Service credit

IN2 — trackball Y (read at 0x0C02)

Bit Mask Input
0–3 0x0f Trackball Y magnitude (this frame's vertical delta)
7 0x80 Trackball Y sign (direction)

LS259 output latch (0x1C00–0x1C07, one address per line, value = data bit 7)

Address Line
1c00 Coin counter (left)
1c01 Coin counter (centre)
1c02 Coin counter (right)
1c03 Player-1 start LED (inverted)
1c04 Player-2 start LED (inverted)
1c07 Screen flip (cocktail)

Addresses `0x1C05`–`0x1C06` are unused.

Video — mushroom-field tilemap + sprites

The playfield is a 32×30 tilemap at `0x0400`–`0x07BF`: one tile code per cell, holding the mushroom field and the on-screen text. Sprite RAM at `0x07C0`–`0x07FF` holds 16 objects of four bytes each — the shooter, the centipede's segments, the spider, the flea, the scorpion, and the shots — each record giving a picture number, a colour, and a screen position. The colours are not fixed in a PROM: the program writes a live palette into colour RAM at `0x1400`–`0x140F`, which the video hardware reads as it draws (this is how the game flashes and recolours the field between waves). The character and sprite pictures come from two `0x800` bitplane ROMs (8×8 characters and 8×16 sprites decode from the same data).