9
Programming the Atari VCS for Fun Paul Dixon @lordelph [email protected] http://github.com/lordelph/2600intro

Atari 2600 Programming for Fun

Embed Size (px)

Citation preview

Page 1: Atari 2600 Programming for Fun

Programming the Atari VCS for FunPaul Dixon @lordelph [email protected]

http://github.com/lordelph/2600intro

Page 2: Atari 2600 Programming for Fun

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
Page 4: Atari 2600 Programming for Fun

So let’s make something!

Page 5: Atari 2600 Programming for Fun

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

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
Page 8: Atari 2600 Programming for Fun

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

“You can’t have art

without resistance in

the materials”

Paul Dixon @lordelph [email protected]

http://github.com/lordelph/2600intro

William Morris