mirror of
https://github.com/a2-4am/4cade.git
synced 2024-12-29 10:33:08 +00:00
cleanup (don't copy HGR address tables to zero page, it's not any faster from there)
This commit is contained in:
parent
9a1cceb49e
commit
fb7ab115d0
@ -1,10 +1,10 @@
|
|||||||
!macro COPY_SELF_TO_AUXMEM {
|
!macro COPY_TO_AUXMEM .startpage, .pagecount {
|
||||||
|
ldx #.pagecount
|
||||||
|
lda #.startpage
|
||||||
|
sta $FF
|
||||||
lda #$00
|
lda #$00
|
||||||
sta $FE
|
sta $FE
|
||||||
tay
|
tay
|
||||||
lda #$60
|
|
||||||
sta $FF
|
|
||||||
tax
|
|
||||||
sta $c005
|
sta $c005
|
||||||
- lda ($FE),y
|
- lda ($FE),y
|
||||||
sta ($FE),y
|
sta ($FE),y
|
||||||
@ -15,3 +15,7 @@
|
|||||||
bne -
|
bne -
|
||||||
sta $c004
|
sta $c004
|
||||||
}
|
}
|
||||||
|
|
||||||
|
!macro COPY_SELF_TO_AUXMEM {
|
||||||
|
+COPY_TO_AUXMEM $60, $60
|
||||||
|
}
|
||||||
|
@ -5,14 +5,12 @@
|
|||||||
!to "build/FX/DHGR.SOFT.DIAG",plain
|
!to "build/FX/DHGR.SOFT.DIAG",plain
|
||||||
*=$6000
|
*=$6000
|
||||||
|
|
||||||
row = $C8
|
src = $F0
|
||||||
src = $C9
|
dst = $F2
|
||||||
dst = $CB
|
row = $FC
|
||||||
y = $CD
|
y = $FD
|
||||||
col = $CE
|
col = $FE
|
||||||
counter = $CF
|
counter = $FF
|
||||||
zphgrrowlo = $D0
|
|
||||||
zphgrrowhi = $E8
|
|
||||||
|
|
||||||
!macro INC_HGR_HI_BY .blocks {
|
!macro INC_HGR_HI_BY .blocks {
|
||||||
lda dst+1
|
lda dst+1
|
||||||
@ -59,13 +57,7 @@ zphgrrowhi = $E8
|
|||||||
!source "src/fx/macros.a"
|
!source "src/fx/macros.a"
|
||||||
!source "src/fx/fx.dhgr.common.a"
|
!source "src/fx/fx.dhgr.common.a"
|
||||||
|
|
||||||
+COPY_SELF_TO_AUXMEM
|
+COPY_TO_AUXMEM $60, $07
|
||||||
|
|
||||||
ldx #$30
|
|
||||||
- lda hgrrowlo-1, x
|
|
||||||
sta zphgrrowlo-1, x
|
|
||||||
dex
|
|
||||||
bne -
|
|
||||||
|
|
||||||
lda #(40+24+7-1) ; columns + rows + blocks per row - 1
|
lda #(40+24+7-1) ; columns + rows + blocks per row - 1
|
||||||
sta counter
|
sta counter
|
||||||
@ -79,10 +71,10 @@ ColLoop
|
|||||||
sty y
|
sty y
|
||||||
RowLoop
|
RowLoop
|
||||||
ldx row
|
ldx row
|
||||||
lda zphgrrowlo, x
|
lda hgrrowlo, x
|
||||||
sta src
|
sta src
|
||||||
sta dst
|
sta dst
|
||||||
lda zphgrrowhi, x
|
lda hgrrowhi, x
|
||||||
sta dst+1
|
sta dst+1
|
||||||
tax
|
tax
|
||||||
eor #$60
|
eor #$60
|
||||||
@ -279,11 +271,24 @@ RowLoop
|
|||||||
+LBNE ColLoop
|
+LBNE ColLoop
|
||||||
@exit rts
|
@exit rts
|
||||||
|
|
||||||
|
; next table can not cross a page boundary
|
||||||
|
!if <* > $E8 {
|
||||||
|
!align 255, 0
|
||||||
|
}
|
||||||
hgrrowlo
|
hgrrowlo
|
||||||
!byte $00,$80,$00,$80,$00,$80,$00,$80
|
!byte $00,$80,$00,$80,$00,$80,$00,$80
|
||||||
!byte $28,$A8,$28,$A8,$28,$A8,$28,$A8
|
!byte $28,$A8,$28,$A8,$28,$A8,$28,$A8
|
||||||
!byte $50,$D0,$50,$D0,$50,$D0,$50,$D0
|
!byte $50,$D0,$50,$D0,$50,$D0,$50,$D0
|
||||||
|
|
||||||
|
; next table can not cross a page boundary
|
||||||
|
!if <* > $E8 {
|
||||||
|
!align 255, 0
|
||||||
|
}
|
||||||
hgrrowhi
|
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
|
!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"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user