cleanup (don't copy HGR address tables to zero page, it's not any faster from there)

This commit is contained in:
4am 2020-11-21 17:41:19 -05:00
parent 9a1cceb49e
commit fb7ab115d0
2 changed files with 30 additions and 21 deletions

View File

@ -1,10 +1,10 @@
!macro COPY_SELF_TO_AUXMEM {
!macro COPY_TO_AUXMEM .startpage, .pagecount {
ldx #.pagecount
lda #.startpage
sta $FF
lda #$00
sta $FE
tay
lda #$60
sta $FF
tax
sta $c005
- lda ($FE),y
sta ($FE),y
@ -15,3 +15,7 @@
bne -
sta $c004
}
!macro COPY_SELF_TO_AUXMEM {
+COPY_TO_AUXMEM $60, $60
}

View File

@ -5,14 +5,12 @@
!to "build/FX/DHGR.SOFT.DIAG",plain
*=$6000
row = $C8
src = $C9
dst = $CB
y = $CD
col = $CE
counter = $CF
zphgrrowlo = $D0
zphgrrowhi = $E8
src = $F0
dst = $F2
row = $FC
y = $FD
col = $FE
counter = $FF
!macro INC_HGR_HI_BY .blocks {
lda dst+1
@ -59,13 +57,7 @@ zphgrrowhi = $E8
!source "src/fx/macros.a"
!source "src/fx/fx.dhgr.common.a"
+COPY_SELF_TO_AUXMEM
ldx #$30
- lda hgrrowlo-1, x
sta zphgrrowlo-1, x
dex
bne -
+COPY_TO_AUXMEM $60, $07
lda #(40+24+7-1) ; columns + rows + blocks per row - 1
sta counter
@ -79,10 +71,10 @@ ColLoop
sty y
RowLoop
ldx row
lda zphgrrowlo, x
lda hgrrowlo, x
sta src
sta dst
lda zphgrrowhi, x
lda hgrrowhi, x
sta dst+1
tax
eor #$60
@ -279,11 +271,24 @@ RowLoop
+LBNE ColLoop
@exit rts
; next table can not cross a page boundary
!if <* > $E8 {
!align 255, 0
}
hgrrowlo
!byte $00,$80,$00,$80,$00,$80,$00,$80
!byte $28,$A8,$28,$A8,$28,$A8,$28,$A8
!byte $50,$D0,$50,$D0,$50,$D0,$50,$D0
; next table can not cross a page boundary
!if <* > $E8 {
!align 255, 0
}
hgrrowhi
!byte $20,$20,$21,$21,$22,$22,$23,$23
!byte $20,$20,$21,$21,$22,$22,$23,$23
!byte $20,$20,$21,$21,$22,$22,$23,$23
!if * > $6700 {
!error "Code too large, adjust COPY_TO_AUXMEM macro"
}