Random game
Random game
Random game
GTIA Part 2 - Listing 1A GTIA Part 2 - Listing 1A
Listing 1
100 GRAPHICS 11:POKE 712,0:POKE 559,0
110 DL=PEEK(560)+PEEK(561)*256+4
120 FOR X=0 TO 79:COLOR INT(X/5)
130 PLOT X,0:DRAWTO Y,191:NEXT X
140 COLOR 0:FOR X=0 TO 15:PLOT X*5,0
150 DRAWTO X*5,191:NEXT X
160 FOR X=0 TO 7:FOR Y=20 TO 23
170 PLOT 0,X*24+Y:DRAWTO 79,X*24+Y
180 NEXT Y:NEXT X
190 FOR X=23 TO 71 STEP 24
200 POKE DL+X,143:NEXT X
210 FOR X=121 TO 190 STEP 24
220 POKE DL+X,143:NEXT X
230 POKE 512,128:POKE 513,6:M=1663
240 M=M+1:READ D:IF D=999 THEN 260
250 POKE M,D:GOTO 240
260 POKE DL+95,207:POKE 54286,192
270 POKE 559,34:GOTO 270
300 DATA 216,72,173,153,6,24,105,2
310 DATA 141,10,212,141,26,208,201
320 DATA 14,208,2,169,0,141,153,6
330 DATA 104,64,0,999  
Listing 2
               1000        .OR $0680
               1010        .TA $4000
               1020 *
               1030 * DEFINE SYSTEM EQUATES
               1040 *
D40A-          1050 WSYNC  .ED $D40A  ;WAIT VERTICAL SYNC REGISTER.
D01A-          1060 COLBK  .EQ $DOIA  ;GTIA BACKGROUND COLOR REGISTER.
               1070 *
               1080 * START OF GTIA HANDLER
               1090 *
0680- D8       1100 START CLD         ;CLEAR THE DECIMAL MODE.
0681- 48       1110 PHA               ;SAVE THE 'A' REGISTER ON STACK.
0682- AD 99 06 1120 LDA STORE         ;GET COLOR VALUE INTO THE
0685- 18       1130 CLC               ; A RESISTER, CLEAR THE
0686- 69 02    1140 ADC $$02          ; CARRY FLAG AND ADD TWO.
0688- 8D 0A D4 1150 STA WSYNC         ;WAIT FOR VERTICAL SYNC.
068B- 8D 1A D0 1160 STA COLBK         ;CHANGE BACKGROUND COLOR.
068E- C9 0E    1170 CMP 41$0E         ;TEST FOR LAST LEGAL COLOR.
0690- D0 02    1180 BNE OUT           ;SKIP IF SO.
0692- A9 00    1190 LDA 000           ;RESET COLOR REGISTER POINTER
0694- 8D 99 06 1200 OUT STA STORE     ;AND SAVE FOR NEXT DLI.
0697- 68       1210 PLA               ;RESTORE THE 'A' REGISTER.
0698- 40       1220 RTI               ;RETURN FROM INTERRUPT.
1230 *
1240 * COLOR POINTER
1250 *
0699- 00       1260 STORE  .HS 00  

This is non-commercial site, its content is based on Atari 8-bit home computer contents and references.
If you feel your rights are violated by showing/using any part of contents of your product represented on this page, please contact me immediatelly so I can remove it!