From 36ecccaec14e12c15c09d72b8abe4434afba07b6 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Tue, 11 Aug 2020 12:51:53 -0700 Subject: [PATCH] fix The Last Gladiator reset vector --- src/prelaunch/last.gladiator.a | 42 +++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/prelaunch/last.gladiator.a b/src/prelaunch/last.gladiator.a index d79c2be7a..55d31a958 100644 --- a/src/prelaunch/last.gladiator.a +++ b/src/prelaunch/last.gladiator.a @@ -12,12 +12,52 @@ sta $11EA jsr $1000 ; decompress - lda #$60 + lda #$4C sta $BC00 + lda #$40 + sta $BC01 + lda #$02 + sta $BC02 + lda #callback2 + sta $BC0C + ldx #(reset_e-callback1)-1 +- lda callback1,x + sta $240,x + dex + bpl - +DISABLE_ACCEL jmp $11EF +callback1 !pseudopc $240 { + lda #reset + sta $3F3 + jmp $FB6F +reset + +READ_RAM1_NO_WRITE + jmp ($FFFC) + +callback2 + jsr $BC16 + lda $BD4C + cmp #8 + bne + + lda $2D + bne + + lda #$15 + sta $5FF2 + lda #2 + sta $5FF3 + lda #$FE + sta $5FF4 ++ rts +} +reset_e + !if * > $1C0 { !error "code is too large, ends at ", * }