Atari 2600 Programming for Fun
-
Upload
paul-dixon -
Category
Software
-
view
286 -
download
1
Transcript of Atari 2600 Programming for Fun
![Page 1: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/1.jpg)
Programming the Atari VCS for FunPaul Dixon @lordelph [email protected]
http://github.com/lordelph/2600intro
![Page 2: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/2.jpg)
An XBox it Ain’t!
128 bytes
of RAM
remember
these?
6507 CPU
0.5 MIPS
160 x 192
pixels.
Hmmm….
![Page 3: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/3.jpg)
![Page 4: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/4.jpg)
So let’s make something!
![Page 5: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/5.jpg)
PFData0
.byte #%00000000
.byte #%01010000
.byte #%01010000
.byte #%01010000
.byte #%01110000
.byte #%01010000
.byte #%01010000
.byte #%01010000
.byte #%00000000
Design a playfield…
![Page 6: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/6.jpg)
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!
![Page 7: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/7.jpg)
![Page 8: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/8.jpg)
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)
);
![Page 9: Atari 2600 Programming for Fun](https://reader030.fdocuments.us/reader030/viewer/2022020120/587dc6c31a28ab1b498b747d/html5/thumbnails/9.jpg)
“You can’t have art
without resistance in
the materials”
Paul Dixon @lordelph [email protected]
http://github.com/lordelph/2600intro
William Morris