diff --git a/src/App.Main.s b/src/App.Main.s index d8c5bb0..ff807db 100644 --- a/src/App.Main.s +++ b/src/App.Main.s @@ -136,8 +136,6 @@ NO_MUSIC equ 1 ; turn music + tool load sta BankLoad ; Store "Bank Pointer" jsr MovePlayerToOrigin ; Put the player at the beginning of the map - lda #74 - jsr SetBG0XPos lda #DIRTY_BIT_BG0_REFRESH ; Redraw all of the tiles on the next Render ora #DIRTY_BIT_BG1_REFRESH @@ -1307,3 +1305,6 @@ qtRec adrl $0000 + + + diff --git a/src/Render.s b/src/Render.s index b24f3b7..3ff9e90 100644 --- a/src/Render.s +++ b/src/Render.s @@ -73,7 +73,7 @@ Render jsr _ApplyBG1XPosPre jsr _UpdateBG0TileMap -; jsr _UpdateBG1TileMap + jsr _UpdateBG1TileMap jsr _ApplyBG0XPos ; Patch the PEA instructions with exit BRA opcode jsr _ApplyBG1XPos ; Patch the PEA instructions with exit BRA opcode @@ -140,5 +140,6 @@ Render + diff --git a/src/TileMap.s b/src/TileMap.s index 791d1fe..885fb2a 100644 --- a/src/TileMap.s +++ b/src/TileMap.s @@ -502,7 +502,7 @@ _UpdateBG1TileMap sta :Left :DoXUpdate - jsr _DrawRectBG1 ; Fill in the rectangle. + jmp _DrawRectBG1 ; Fill in the rectangle. :NoXUpdate rts @@ -568,11 +568,9 @@ _DrawRectBG1 asl ; This is the number of bytes to move the Offset to advance from the end of sta :Span ; one line to the beginning of the next -; Now we need to figure out the code field tile coordinate of corner of -; play field. That is, becuase the screen is scrolling, the location of -; tile (0, 0) could be anywhere within the code field +; Now we need to figure out the tile coordinate of corner of play field. - lda BG1StartYMod208 ; This is the code field line that is at the top of the screen + lda BG1StartYMod208 ; This is the line that is at the top of the screen and #$FFF8 ; Clamp to the nearest block lsr lsr @@ -658,3 +656,10 @@ _DrawRectBG1 + + + + + + + diff --git a/src/blitter/Tiles.s b/src/blitter/Tiles.s index cb4f260..25209f7 100644 --- a/src/blitter/Tiles.s +++ b/src/blitter/Tiles.s @@ -753,9 +753,12 @@ CopyTileBG1 adc BG1YTable,y tay - pei BG1DataBank - plb + sep #$20 + lda BG1DataBank + pha plb ; set the bank + rep #$20 + pla ; pop the tile ID jsr RenderTileBG1 @@ -771,3 +774,6 @@ CopyTileBG1 + + +