More reliable checks for the destruction of 3D rasterizer's line table on aux zp.

This commit is contained in:
Martin Haye 2019-06-13 08:50:38 -07:00
parent 929d884e41
commit 6c22417d4a
4 changed files with 17 additions and 2 deletions

View File

@ -325,6 +325,7 @@ loMemBegin: !pseudopc $800 {
jmp __internalErr
_fixedRTS:
rts ; fixed place to find RTS, for setting V flag
_diskOpCt !byte 0 ; count of disk ops since last render
__aux_dispatch:
sec
@ -411,6 +412,7 @@ _jbrk jmp $1111 ; self-modified by init
; Clear carry to call opendir, set carry to call rdwrpart
; On return, A contains status (for opendir only)
callProRWTS:
inc _diskOpCt
; Copy the parameters to aux zero page
ldx #$F
- sta clrAuxZP

View File

@ -513,6 +513,7 @@ _crout = _prY+3
_waitKey = _crout+3
_internalErr = _waitKey+3
fixedRTS = _internalErr+3
diskOpCt = fixedRTS+1
; Debug macros
!macro safeBell {

View File

@ -14,6 +14,7 @@
!convtab "../include/hiBitAscii.ct"
; Other equates
!source "../include/mem.i"
!source "../include/prorwts.i"
target = $3 ; len 1
@ -256,6 +257,7 @@ _writeMarks: !zone
sec
; fall through to final ProRWTS command
callProRWTS:
inc diskOpCt
stx sizelo
sty sizehi
sta reqcmd

View File

@ -1959,9 +1959,19 @@ pl_render: !zone
bne +
lda $2001
cmp $4001
bne +
lda $2C00
cmp $4C00
bne +
lda $2C01
cmp $4C01
bne +
lda diskOpCt ; check if any disk ops (ProRWTS can use aux zp)
beq ++
+ jsr copyScreen ; if it was, restore by copying hgr1 to hgr2
jsr makeLines
+ jsr copyScreen ; restore by copying hgr1 to hgr2
jsr makeLines ; and regenerate line pointers on aux zp
lda #0
sta diskOpCt
++ jmp renderFrame ; then go ahead and render
;-------------------------------------------------------------------------------