From eb548343a7238f30b1d8fad75f489c53333c623c Mon Sep 17 00:00:00 2001 From: Lucas Scharenbroich Date: Mon, 26 Jun 2023 13:19:12 -0500 Subject: [PATCH] Fix offset calc --- demos/lite/App.Main.s | 17 +++++++++++------ src/Render.s | 2 +- src/static/TileStore.s | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/demos/lite/App.Main.s b/demos/lite/App.Main.s index cc0f708..add1b63 100644 --- a/demos/lite/App.Main.s +++ b/demos/lite/App.Main.s @@ -107,19 +107,24 @@ SlowSprites equ 0 jsr HandleKeys ; Do the generic key handlers bcs :do_more - brl :do_render + bra :evt_loop :do_more and #$007F + cmp #'a' + bne :not_a + dec ScreenX +:not_a cmp #'s' + bne :not_s + inc ScreenX +:not_s :do_render jsr :next_frame brl :evt_loop :next_frame -; inc ScreenX -; inc ScreenY -; pei ScreenX -; pei ScreenY -; _GTESetBG0Origin + pei ScreenX + pei ScreenY + _GTESetBG0Origin pea $FFFE _GTERender diff --git a/src/Render.s b/src/Render.s index e011658..7ca0cfb 100644 --- a/src/Render.s +++ b/src/Render.s @@ -653,7 +653,7 @@ _RenderLite ; jsr _DrawFinalPass ldx #0 - lda ScreenHeight + ldy ScreenHeight jsr _BltRange lda StartYMod208 ; Restore the fields back to their original state diff --git a/src/static/TileStore.s b/src/static/TileStore.s index 54bc4c1..63010ae 100644 --- a/src/static/TileStore.s +++ b/src/static/TileStore.s @@ -137,7 +137,7 @@ JTableOffset ENT ; physical word index that each instruction is intended to be placed at is in the comment. bra *-3 ; wrap around CodeFieldEvenBRA ENT - bra *+6 ; 81 -- need to skip over the JMP loop that passed control back + bra *+6 ; 81 -- need to skip over the JMP loop that passes control back bra *+9 ; 80 bra *+12 ; 79 bra *+15 ; 78