Programming the Atari VCS for Fun
Paul Dixon @lordelph paul@elphin.com
http://github.com/lordelph/2600intro
An XBox it Ain’t!
128 bytes
of RAM
remember
these?
6507 CPU
0.5 MIPS
160 x 192
pixels.
Hmmm….
So let’s make something!
PFData0
.byte #%00000000
.byte #%01010000
.byte #%01010000
.byte #%01010000
.byte #%01110000
.byte #%01010000
.byte #%01010000
.byte #%01010000
.byte #%00000000
Design a playfield…
ScanLoop
STA WSYNC
; load our playfield data
LDA PFData0,X
STA PF0
LDA PFData1,X
STA PF1
LDA PFData2,X
STA PF2
DEX
BNE MorePlayfield
LDX #18 ;reset playfield counter
MorePlayfield
DEY ; decrement scanline counter
BNE ScanLoop ; next scan line
This loader uses 26
cycles per
scanline. We only
have 22 cycles
before the TV
starts displaying
the line! OMFG!
Why do this to yourself?
• It’s a fun intellectual challenge
• Great introduction to assembler
• Serves to remind you how wasteful
something like this is
$ext=array_pop(
explode(‘.’, $filename)
);
“You can’t have art
without resistance in
the materials”
Paul Dixon @lordelph paul@elphin.com
http://github.com/lordelph/2600intro
William Morris

Atari 2600 Programming for Fun

  • 1.
    Programming the AtariVCS for Fun Paul Dixon @lordelph paul@elphin.com http://github.com/lordelph/2600intro
  • 2.
    An XBox itAin’t! 128 bytes of RAM remember these? 6507 CPU 0.5 MIPS 160 x 192 pixels. Hmmm….
  • 4.
    So let’s makesomething!
  • 5.
    PFData0 .byte #%00000000 .byte #%01010000 .byte#%01010000 .byte #%01010000 .byte #%01110000 .byte #%01010000 .byte #%01010000 .byte #%01010000 .byte #%00000000 Design a playfield…
  • 6.
    ScanLoop STA WSYNC ; loadour playfield data LDA PFData0,X STA PF0 LDA PFData1,X STA PF1 LDA PFData2,X STA PF2 DEX BNE MorePlayfield LDX #18 ;reset playfield counter MorePlayfield DEY ; decrement scanline counter BNE ScanLoop ; next scan line This loader uses 26 cycles per scanline. We only have 22 cycles before the TV starts displaying the line! OMFG!
  • 8.
    Why do thisto yourself? • It’s a fun intellectual challenge • Great introduction to assembler • Serves to remind you how wasteful something like this is $ext=array_pop( explode(‘.’, $filename) );
  • 9.
    “You can’t haveart without resistance in the materials” Paul Dixon @lordelph paul@elphin.com http://github.com/lordelph/2600intro William Morris