gr: tunnel: works now

This commit is contained in:
Vince Weaver 2021-06-06 01:21:14 -04:00
parent cda248e40c
commit 735f357728
2 changed files with 36 additions and 15 deletions

View File

@ -15,8 +15,6 @@ NEWCOLOR = $FF
FULLGR = $C052
HLINE = $F819 ;; HLINE Y,$2C at A
VLINE = $F828 ;; VLINE A,$2D at Y
SETCOL = $F864 ; COLOR=A
@ -27,25 +25,28 @@ tunnel:
; 10 GR:N=7
jsr SETGR
bit FULLGR
; bit FULLGR
lda #$7
sta NEWCOLOR
outer:
; 20 FOR X=0 TO 4
lda #0
sta COUNT
clc
adc #16
sta COUNTMAX
cycle:
; 30 FOR I=X TO 15+X STEP 5:COLOR=0
ldx COUNT
lda COUNT
tax
clc
adc #16
sta COUNTMAX
iloop:
lda #0
sta COLOR
@ -80,8 +81,15 @@ iloop:
jsr HLINE
; VLIN J,W AT I ; VLINE A,$2D at Y
; VLIN J,W AT Z ; VLINE A,$2D at Y
txa
tay
lda J
jsr VLINE
; VLIN J,W AT Z ; VLINE A,$2D at Y
ldy Z
lda J
jsr VLINE
; COLOR=N
lda NEWCOLOR
@ -99,16 +107,23 @@ iloop:
jsr HLINE
; VLIN J,W AT J ; VLINE A,$2D at Y
ldy J
lda J
jsr VLINE
; VLIN J,W AT W ; VLINE A,$2D at Y
ldy V2
lda J
jsr VLINE
lda #150
jsr WAIT
; N=N+1
inc NEWCOLOR
lda #75
jsr WAIT
; 50 NEXT:N=N-4
txa
@ -128,7 +143,7 @@ iloop:
inc COUNT
lda COUNT
cmp #4
cmp #5
bne cycle
dec NEWCOLOR
@ -140,4 +155,4 @@ iloop:
end:
; 70 GOTO 20
jmp cycle
jmp outer

View File

@ -1,5 +1,11 @@
; 5 REM BY @hisham_hm Mar 7 @AppleIIBot
; buggy version that looks cool
; took a while, but there are two bugs. COUNT (and thus X) gets the wrong
; value and never resets, mostly due to the jmp at the end going
; to the wrong place. The init of COUNTMAX is wrong too
H2 = $2C
V2 = $2D
COLOR = $30