fix Nightmare Gallery demo crash

This commit is contained in:
Peter Ferrie 2023-04-15 10:13:03 -07:00
parent d8f404cfc5
commit 01f5176544
1 changed files with 10 additions and 2 deletions

View File

@ -8,18 +8,25 @@
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
+NEW_RESET_VECTOR $BE00
lda #$60
sta $404B
jsr $4000 ; decompress
lda #<callback ; lets fix ROM calls to WAIT/$FCA8
ldx #(callback_e-callback)-1
- lda callback,x
sta $BE20,x
dex
bpl -
lda #$20 ; lets fix ROM calls to WAIT/$FCA8
sta $16A9 ; which behave differently
sta $80EE ; on different machines
sta $8799 ; (fixes slow scream on //c+ & //gs)
sta $8C8F
sta $8CC4
sta $8CE1
lda #>callback
lda #$BE
sta $16AA
sta $80EF
sta $879A
@ -47,6 +54,7 @@ wait3 sbc #$01
sbc #$01
bne wait2
rts
callback_e
!if * > $1C0 {
!error "code is too large, ends at ", *