better Spy vs Spy 2 reset

This commit is contained in:
Peter Ferrie 2021-10-30 19:45:45 -07:00
parent 131218e9ef
commit 7aa0d71564
2 changed files with 26 additions and 3 deletions

View File

@ -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 {

View File

@ -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 ", *