From 01a71c43bc96f275bf98d78e48b20bcb3415e781 Mon Sep 17 00:00:00 2001 From: 4am Date: Thu, 5 Mar 2020 07:37:14 -0500 Subject: [PATCH] Epyx Reboot Fixes (#122) --- src/prelaunch/ss.baseball.a | 22 ++++++++++++++++++++++ src/prelaunch/ss.basketball.a | 22 ++++++++++++++++++++++ src/prelaunch/summer.games.ii.a | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100755 src/prelaunch/ss.baseball.a create mode 100755 src/prelaunch/ss.basketball.a create mode 100755 src/prelaunch/summer.games.ii.a diff --git a/src/prelaunch/ss.baseball.a b/src/prelaunch/ss.baseball.a new file mode 100755 index 000000000..95d37060e --- /dev/null +++ b/src/prelaunch/ss.baseball.a @@ -0,0 +1,22 @@ +;license:MIT +;(c) 2020 by Frank M. + +!cpu 6502 +!to "build/PRELAUNCH/SS.BASEBALL",plain +*=$106 + + !source "src/prelaunch/common.a" + + +ENABLE_ACCEL + lda #$60 + sta $9EB + jsr $800 ; decompress + + inc $3F4 ; reboot + + +DISABLE_ACCEL + jmp $B700 ; could probably hook further + +!if * > $1C0 { + !error "code is too large, ends at ", * +} diff --git a/src/prelaunch/ss.basketball.a b/src/prelaunch/ss.basketball.a new file mode 100755 index 000000000..f77f98236 --- /dev/null +++ b/src/prelaunch/ss.basketball.a @@ -0,0 +1,22 @@ +;license:MIT +;(c) 2020 by Frank M. + +!cpu 6502 +!to "build/PRELAUNCH/SS.BASKETBALL",plain +*=$106 + + !source "src/prelaunch/common.a" + + +ENABLE_ACCEL + lda #$60 + sta $9EB + jsr $800 ; decompress + + inc $3F4 ; reboot + + +DISABLE_ACCEL + jmp $B700 ; could probably hook further + +!if * > $1C0 { + !error "code is too large, ends at ", * +} diff --git a/src/prelaunch/summer.games.ii.a b/src/prelaunch/summer.games.ii.a new file mode 100755 index 000000000..aa64fce9b --- /dev/null +++ b/src/prelaunch/summer.games.ii.a @@ -0,0 +1,33 @@ +;license:MIT +;(c) 2020 by Frank M. + +!cpu 6502 +!to "build/PRELAUNCH/SUMMER.GAMES.II",plain +*=$106 + + !source "src/prelaunch/common.a" + + ;+ENABLE_ACCEL + lda #$60 + sta $A13 + jsr $800 ; decompress + + lda #$60 + sta $D048 ; set hook + lda #$FF ; restore A to original + jsr $D003 ; let 'em set up vectors which we'll nuke + ldx #$FF + txs ; we skipped the stack nuke so let's do that now + + +LC_REBOOT + lda #0 + sta $D9FC + lda #1 + sta $D9FD ; copied back into LC reset vector each event + + ;+DISABLE_ACCEL ; LC is overwritten by this point + jmp $6000 + +!if * > $1C0 { + !error "code is too large, ends at ", * +}