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

Binary file not shown.

View File

@ -64,6 +64,12 @@ main:
.byte $cc .byte $cc
.addr fileClose .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 NATIVE
; Copy code into bank E1 ; Copy code into bank E1
@ -72,7 +78,11 @@ main:
ldy #$800 ; Must match terrain_e1 .org ldy #$800 ; Must match terrain_e1 .org
jsr copyBytes jsr copyBytes
; Copy vram table into bank E1 ; 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 phb
lda #vramRowInvertedSpanLookupEnd-vramRowInvertedSpanLookup-1 lda #vramRowInvertedSpanLookupEnd-vramRowInvertedSpanLookup-1
ldx #vramRowInvertedSpanLookupEnd-1 ldx #vramRowInvertedSpanLookupEnd-1
@ -82,16 +92,12 @@ main:
EMULATION EMULATION
jmp loadData
; Mystery jump table at 1680 - 16BB
ioError: ioError:
brk brk
;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;
loadData: loadData:
; Open the sprite bank file ; Open the sprite bank file
jsr PRODOS jsr PRODOS
.byte $c8 .byte $c8

View File

@ -235,7 +235,7 @@ unclipTerrainLoop:
dex dex
dex 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 bne unclipTerrainLoop
pld pld
@ -271,7 +271,7 @@ compileTerrainLoop:
bra compileTerrainLoop bra compileTerrainLoop
compileTerrainDone: compileTerrainDone:
jsl compileTerrainSpans ;jsl compileTerrainSpans ; Part of the now disabled fill-mode renderer
RESTORE_AY RESTORE_AY
rts rts