diff --git a/src/Tiles.s b/src/Tiles.s index d109938..040465d 100644 --- a/src/Tiles.s +++ b/src/Tiles.s @@ -428,22 +428,22 @@ UserHook1 rtl ; A = Table proc index ; ; see TileProcTables in static/TileStore.s -tblPtr equ blttmp _SetTileProcs +:tblPtr equ blttmp ; Multiple the proc index by 6 to get the correct table entry offset asl - sta tblPtr + sta :tblPtr asl - adc tblPtr - sta tblPtr + adc :tblPtr + sta :tblPtr ; Add this offset to the base table address tya - adc tblPtr - sta tblPtr + adc :tblPtr + sta :tblPtr ; Set the pointer to this bank @@ -451,20 +451,20 @@ _SetTileProcs phk pla and #$00FF - sta tblPtr+2 + sta :tblPtr+2 ; Lookup the tile procedures ldy #0 - lda [tblPtr],y + lda [:tblPtr],y stal K_TS_BASE_TILE_DISP,x ldy #2 - lda [tblPtr],y + lda [:tblPtr],y stal K_TS_SPRITE_TILE_DISP,x ldy #4 - lda [tblPtr],y + lda [:tblPtr],y stal K_TS_ONE_SPRITE,x rts diff --git a/src/Tool.s b/src/Tool.s index cbdd55b..8559852 100644 --- a/src/Tool.s +++ b/src/Tool.s @@ -746,6 +746,7 @@ _TSSetOverlay _TSExit #0;#8 +; UpdateOverlay(top, bottom, proc) _TSUpdateOverlay :proc equ FirstParam+0 :bottom equ FirstParam+4 diff --git a/src/blitter/Template.s b/src/blitter/Template.s index 227b751..efd33be 100644 --- a/src/blitter/Template.s +++ b/src/blitter/Template.s @@ -240,14 +240,14 @@ epilogue_1 tsc ; its passed state, because having the carry bit clear prevents evaluation of ; the V bit. ; -; Version 2: In order to improve performance, especially for two-layer tiles + sprites, the -; snippet code was revised to have a fixed structure so that the constant DATA and -; MASK values always exist in the same location, regarless of the tile type. The -; tradeoff is that there is a different entry point into the snippet based on the -; tile type, but that is significantly cheaper to lookup and patch into the code -; field JMP instruction than it is to rebuild 20+ bytes of code each time. +; In order to improve performance, especially for two-layer tiles + sprites, the +; snippet code has a fixed structure so that the constant DATA and MASK values +; always exist in the same location, regarless of the tile type. The +; tradeoff is that there is a different entry point into the snippet based on the +; tile type, but that is significantly cheaper to lookup and patch into the code +; field JMP instruction than it is to rebuild 20+ bytes of code each time. ; -; There are different snippet templates + offset tables based on the EngineMode +; There are different snippet templates + offset tables based on the EngineMode ; ; EngineMode ; diff --git a/src/render/Dynamic.s b/src/render/Dynamic.s index 3c9cdf2..228a534 100644 --- a/src/render/Dynamic.s +++ b/src/render/Dynamic.s @@ -286,7 +286,7 @@ DynamicOverTwoLyr ; tile blitter in the TwoLayer function set sees that a tile is marked as DAMAGED, it must ; restore the original code structure before proceeding. ; -; The damages area is not too bad -- just the 10 bytes from [2, 10] are overwritten and must be +; The damaged area is not too bad -- just the 10 bytes from [2, 10] are overwritten and must be ; restored. This is actually less work than a lot of the snippet macros were doing before ; applying the fixed snippet optimization. DynamicUnderTwoLyr