• Contact
  • Journal
  • Home
  • Atari2600
  • Stella (Hardware Info)
  • 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 35%
      • 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
      • Hardware
      • RAMUse
      • Code

      • Journal
    • 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
    • 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
    • Hardware
    • HauntedHouse
      • RAMUse1
      • Code1
      • RAMUse2
      • Code2

      • Journal
    • Pyramid
      • RAMUse
      • Code

      • RAMUse1
      • Code1

      • Journal
    • RaakaTu
      • RAMUse
      • Code

      • Journal
    • Bedlam
      • RAMUse
      • Code

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

  • Tools
    • Blend
      • blend.zip

      • Journal
  • Stella (Atari 2600 Hardware)
  • TIA (read)
  • TIA (write)
  • TIA (read ghost)
  • PIA

Stella (Atari 2600 Hardware)

On the web: Stella Programmer's Guide

The address decoding for the 2600 is very simple. The TIA is accessed if A12 is 0 and A7 is 0. The TIA is selected if (address&1080 == 0000).

The TIA chip uses the 6 lower address lines A0-A5. The reads seem to ignore A4 and A5.

The addresses have different read/write definitions and many of them are strobes that are triggered by writing any value.

Note that the 6502 has an 8-bit stack pointer. The CPU automatically sets the upper byte of the address to 01. The RIOT chip RAM ghosts from 00xx to 01xx putting the stack in RAM.

TIA (read)

0000r CXM0P XX...... Collisions D7=M0/P1, D6=M0/P0
0001r CXM1P XX...... Collisions D7=M1/P0, D6=M1/P1
0002r CXP0FB XX...... Collisions D7=P0/PF, D6=P0/BL
0003r CXP1FB XX...... Collisions D7=P1/PF, D6=P1/BL
0004r CXM0FB XX...... Collisions D7=M0/PF, D6=M0/BL
0005r CXM1FB XX...... Collisions D7=M1/PF, D6=M1/BL
0006r CXBLPF X....... Collisions D7=BL/PF
0007r CXPPMM XX...... Collisions D7=P0/P1, D6=M0/M1
0008r INPT0 X....... Paddle input 0
0009r INPT1 X....... Paddle input 1
000Ar INPT2 X....... Paddle input 2
000Br INPT3 X....... Paddle input 3
000Cr INPT4 X....... Latched inputs (joystick buttons)
000Dr INPT5 X....... Latched inputs (joystick buttons)

TIA (write)

0000w VSYNC ......X. D1=1 starts the vertical sync
0001w VBLANK XX....X. D1=1 starts the vertical blank (D6 and D7 config INPT0-5)
0002w WSYNC strobe Halts processor until leading edge of horizontal blank
0003w RSYNC strobe Resets sync counter (used in chip testing)
0004w NUSIZ0 ..XXXXXX Number and size of player/missile P0
0005w NUSIZ1 ..XXXXXX Number and size of player/missile P0
0006w COLUP0 XXXXXXX. Color-luminance of player 0
0007w COLUP1 XXXXXXX. Color-luminance of player 1
0008w COLUPF XXXXXXX. Color-luminance of play filed
0009w COLUBK XXXXXXX. Color-luminance of background
000Aw CTRLPF ..XX.XXX Control playfield, priorities, and ball size
000Bw REFP0 ....X... D3=1 reflects player 0
000Cw PEFP1 ....X... D3=1 reflects player 1
000Dw PF0 XXXX.... Playfield 0 bits (upper 4 bits)
000Ew PF1 XXXXXXXX Playfield 1 bits
000Fw PF2 XXXXXXXX Playfield 2 bits
0010w RESP0 strobe Set horizontal position of player 0
0011w RESP1 strobe Set horizontal position of player 1
0012w RESM0 strobe Set horizontal position of missile 0
0013w RESM1 strobe Set horizontal position of missile 1
0014w RESBL strobe Set horizontal position of ball
0015w AUDC0 ....XXXX Noise, tone, division control channel 0
0016w AUDC1 ...XXXXX Noise, tone, division control channel 1
0017w AUDF0 ...XXXXX Frequency divider channel 0
0018w AUDF1 ....XXXX Frequency divider channel 1
0019w AUDV0 ....XXXX Volume channel 0
001Aw AUDV1 ....XXXX Volume channel 1
001Bw GRP0 XXXXXXXX Player 0 graphics
001Cw GRP1 XXXXXXXX Player 1 graphics
001Dw ENAM0 ......X. D1=1 to enable missile 0
001Ew ENAM1 ......X. D1=1 to enable missile 1
001Fw ENABL ......X. D1=1 to enable ball
0020w HMP0 XXXX.... Horizontal motion offset for player 0
0021w HMP1 XXXX.... Horizontal motion offset for player 1
0022w HMM0 XXXX.... Horizontal motion offset for missile 0
0023w HMM1 XXXX.... Horizontal motion offset for missile 1
0024w HMBL XXXX.... Horizontal motion offset for ball
0025w VDELP0 .......X D0=1 to delay player 0 one vertical line
0026w VDELP1 .......X D0=1 to delay player 1 one vertical line
0027w VDELBL .......X D0=1 to delay ball one vertical line
0028w RESMP0 ......X. D1=1 to reset missile 0 to player 0
0029w RESMP1 ......X. D1=1 to reset missile 1 to player 1
002Aw HMOVE strobe Executes horizontal motions
002Bw HMCLR strobe Clears all horizontal motion registers
002Cw CXCLR strobe Clears all collision registers

TIA (read ghost)

These are the same registers as above but accessed with a ghost address to allow for different names.

0030r CXM0P XX...... Collisions D7=M0/P1, D6=M0/P0
0031r CXM1P XX...... Collisions D7=M1/P0, D6=M1/P1
0032r CXP0FB XX...... Collisions D7=P0/PF, D6=P0/BL
0033r CXP1FB XX...... Collisions D7=P1/PF, D6=P1/BL
0034r CXM0FB XX...... Collisions D7=M0/PF, D6=M0/BL
0035r CXM1FB XX...... Collisions D7=M1/PF, D6=M1/BL
0036r CXBLPF X....... Collisions D7=BL/PF
0037r CXPPMM XX...... Collisions D7=P0/P1, D6=M0/M1
0038r INPT0 X....... Paddle input 0
0039r INPT1 X....... Paddle input 1
003Ar INPT2 X....... Paddle input 2
003Br INPT3 X....... Paddle input 3
003Cr INPT4 X....... Latched inputs (joystick buttons)
003Dr INPT5 X....... Latched inputs (joystick buttons)

PIA

The PIA (R.I.O.T.) is accessed if A12 is 0 and A7 is 1. If A9 is 0 then the 128 bytes of RAM are selected. If A9 is 1 then the PIA timer registers are selected.

The TIA REGS are selected if (address&1280 == 0280).

The TIA RAM is selected if (address&1280 == 0080).

The PIA chip uses the lower 7 address lines A0-A6. Thus the 007F mask below.

0280 SWCHA Port A Hand controllers
0281 SWACNT Port A DDR
0282 SWCHB Port B Console switches
D7 : P1 difficulty (0=amateur, 1=pro)
D6 : P0 difficulty (0=amateur, 1=pro)
D5 : not used
D4 : not used
D3 : color or B/W (0=B/W, 1=color)
D2 : not used
D1 : game select (0=pressed)
D0 : game reset (0=pressed)
0283 SWBCNT Port B DDR
0284 INTIM Timer output (read only)
0294 TIM1T Set 1 clock interval (write only)
0295 TIM8T Set 8 clock interval (write only)
0296 TIM64T Set 64 clock interval (write only)
0297 TIM1024T Set 1024 clock interval (write only)