From 7aa0d715648ffd194290e629ea8c8f4951b3f9b3 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Sat, 30 Oct 2021 19:45:45 -0700 Subject: [PATCH] better Spy vs Spy 2 reset --- src/macros.a | 23 +++++++++++++++++++++++ src/prelaunch/spy.vs.spy.2.a | 6 +++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/macros.a b/src/macros.a index 894c01a51..6cca3387d 100755 --- a/src/macros.a +++ b/src/macros.a @@ -379,6 +379,29 @@ +RESET_VECTOR .addr } +!macro NEW_RESET_VECTOR_64K .addr { + lda #$2C + sta .addr + lda #$89 + sta .addr+1 + lda #$C0 + sta .addr+2 + lda #$4C ; JMP $FAA6 to reboot + sta .addr+3 + lda #$A6 + sta .addr+4 + lda #$FA + sta .addr+5 + lda #<.addr + sta $3F2 + sta $FFFC + lda #>.addr + sta $3F3 + sta $FFFD + eor #$A5 + sta $3F4 +} + ; for 64k games on ][+ which either hang or restart ; updates reset hook to reboot on ctrl-reset !macro LC_REBOOT { diff --git a/src/prelaunch/spy.vs.spy.2.a b/src/prelaunch/spy.vs.spy.2.a index 75deef497..2c3f6d2cc 100644 --- a/src/prelaunch/spy.vs.spy.2.a +++ b/src/prelaunch/spy.vs.spy.2.a @@ -8,7 +8,8 @@ !source "src/prelaunch/common.a" +ENABLE_ACCEL - +NEW_RESET_VECTOR $70 + +NEW_RESET_VECTOR_64K $70 + lda #$60 sta $DBE sta $DE2 @@ -19,8 +20,7 @@ +ENABLE_ACCEL jsr $BCFC ; decompress +DISABLE_ACCEL - jsr $DE5 - jmp $4000 + jmp $DE5 !if * > $1C0 { !error "code is too large, ends at ", *