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

View File

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

View File

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

View File

@ -1959,9 +1959,19 @@ pl_render: !zone
bne + bne +
lda $2001 lda $2001
cmp $4001 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 ++ beq ++
+ jsr copyScreen ; if it was, restore by copying hgr1 to hgr2 + jsr copyScreen ; restore by copying hgr1 to hgr2
jsr makeLines jsr makeLines ; and regenerate line pointers on aux zp
lda #0
sta diskOpCt
++ jmp renderFrame ; then go ahead and render ++ jmp renderFrame ; then go ahead and render
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------