Fix bug in tile rendering and tile sheet copying

This commit is contained in:
Lucas Scharenbroich 2022-05-18 22:49:14 -05:00
parent fd07ead8ed
commit fc48330061
4 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
; A = low word ; A = low word
_LoadTileSet _LoadTileSet
sta tmp0 sta tmp0
stx tmp2 stx tmp1
ldy #0 ldy #0
tyx tyx
:loop lda [tmp0],y :loop lda [tmp0],y

View File

@ -242,6 +242,7 @@ TSPtr equ FirstParam
tax tax
lda TSPtr,s lda TSPtr,s
jsr _LoadTileSet jsr _LoadTileSet
_TSExit #0;#4 _TSExit #0;#4
; Insert the GTE code ; Insert the GTE code

View File

@ -86,7 +86,6 @@ _PopDirtyTile2 ; alternate entry point
; Bank = Tile Store ; Bank = Tile Store
; D = Page 2 ; D = Page 2
_PopDirtyTilesFast _PopDirtyTilesFast
; brk $EE
ldx DP2_DIRTY_TILE_COUNT ; This is pre-multiplied by 2 ldx DP2_DIRTY_TILE_COUNT ; This is pre-multiplied by 2
bne pdtf_not_empty ; If there are no items, exit bne pdtf_not_empty ; If there are no items, exit
at_exit rts at_exit rts

View File

@ -13,9 +13,9 @@ NoSpriteFast
lda TileStore+TS_CODE_ADDR_HIGH,x ; load the bank of the target code field line lda TileStore+TS_CODE_ADDR_HIGH,x ; load the bank of the target code field line
pha ; and put on the stack for later. Has TileStore bank in high byte. pha ; and put on the stack for later. Has TileStore bank in high byte.
ldy TileStore+TS_CODE_ADDR_LOW,x ; load the address of the code field ldy TileStore+TS_CODE_ADDR_LOW,x ; load the address of the code field
lda TileStore+TS_TILE_ADDR,x ; load the address of this tile's data (pre-calculated)
lda TileStore+TS_BASE_TILE_DISP,x ; go to the tile copy routine (just basics) lda TileStore+TS_BASE_TILE_DISP,x ; go to the tile copy routine (just basics)
stal nsf_patch+1 stal nsf_patch+1
lda TileStore+TS_TILE_ADDR,x ; load the address of this tile's data (pre-calculated)
plb ; set the code field bank plb ; set the code field bank
nsf_patch jmp $0000 nsf_patch jmp $0000