Fixed stepping on a bunch of GS jump tables

Disabled fill-mode code in bank E1, because it wasn’t useful enough, and was stepping all over important GS things.
This commit is contained in:
blondie7575 2018-07-28 15:46:54 -07:00
parent f599267718
commit d0c67b907d
4 changed files with 15 additions and 9 deletions

View File

@ -61,7 +61,7 @@ beginGameplay:
jsr compileTerrain
jsr clipTerrain
jsl renderTerrainSpans
; jsl renderTerrainSpans ; Part of the now disabled fill-mode renderer
gameplayLoop:
jsr kbdScan
@ -120,7 +120,7 @@ gameplayLoopRender:
lda terrainDirty
beq gameplayLoopProjectiles
BORDER_COLOR #$3
jsl renderTerrainSpans
; jsl renderTerrainSpans ; Part of the now disabled fill-mode renderer
jsr renderTerrain
stz terrainDirty
BORDER_COLOR #$1
@ -260,7 +260,7 @@ endGame:
;
scrollMap:
jsr unclipTerrain
jsl unrenderTerrainSpans
; jsl unrenderTerrainSpans ; Part of the now disabled fill-mode renderer
jsr unrenderPlayers
jsr unrenderProjectiles

Binary file not shown.

View File

@ -64,6 +64,12 @@ main:
.byte $cc
.addr fileClose
jmp loadData
; Note that we skip E1 code bank loading now. This was used for the
; fill mode terrain renderer, which is disabled until further notice
; There isn't enough safe room in E1 to do everything we wanted and the fill
; mode rendering isn't useful enough to keep
NATIVE
; Copy code into bank E1
@ -72,7 +78,11 @@ main:
ldy #$800 ; Must match terrain_e1 .org
jsr copyBytes
; Copy vram table into bank E1
; Note that there's a GS memory manager jump table at 1680 - 16BB
; in E1 that we have to work around. If we step on it, warm reboots and other
; critical things start to fail.
phb
lda #vramRowInvertedSpanLookupEnd-vramRowInvertedSpanLookup-1
ldx #vramRowInvertedSpanLookupEnd-1
@ -82,16 +92,12 @@ main:
EMULATION
jmp loadData
; Mystery jump table at 1680 - 16BB
ioError:
brk
;;;;;;;;;;;;;;;;;;;;;
loadData:
; Open the sprite bank file
jsr PRODOS
.byte $c8

View File

@ -235,7 +235,7 @@ unclipTerrainLoop:
dex
dex
dex
cpx STACKPT ; When x hits the top of the stack, we're done
cpx STACKPTR ;#$e6f-7 ;$1000 ; When x hits the top of the stack, we're done
bne unclipTerrainLoop
pld
@ -271,7 +271,7 @@ compileTerrainLoop:
bra compileTerrainLoop
compileTerrainDone:
jsl compileTerrainSpans
;jsl compileTerrainSpans ; Part of the now disabled fill-mode renderer
RESTORE_AY
rts