From 9cb78ea33f888abf36884161ec660fa659c63dc0 Mon Sep 17 00:00:00 2001 From: frankmilliron <34376619+frankmilliron@users.noreply.github.com> Date: Tue, 26 Oct 2021 21:13:07 -0700 Subject: [PATCH] Stargate reset fix (#403) * Stargate reset fix * Add files via upload --- src/prelaunch/spider.raid.a | 8 ++++++-- src/prelaunch/stargate.a | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/prelaunch/stargate.a diff --git a/src/prelaunch/spider.raid.a b/src/prelaunch/spider.raid.a index 01a03c88c..dc305cd0b 100644 --- a/src/prelaunch/spider.raid.a +++ b/src/prelaunch/spider.raid.a @@ -1,5 +1,5 @@ ;license:MIT -;(c) 2019 by qkumba +;(c) 2019 by qkumba/Frank M. !cpu 6502 !to "build/PRELAUNCH.INDEXED/SPIDER.RAID",plain @@ -8,13 +8,17 @@ !source "src/prelaunch/common.a" +ENABLE_ACCEL + lda #$60 sta $3F0E jsr $3EB9 ; decompress + + lda #1 + sta $40D3 ; reset vector + lda #$60 sta $40F1 jsr $4000 - +RESET_VECTOR $100 +DISABLE_ACCEL jmp $4246 diff --git a/src/prelaunch/stargate.a b/src/prelaunch/stargate.a new file mode 100644 index 000000000..5244360ef --- /dev/null +++ b/src/prelaunch/stargate.a @@ -0,0 +1,33 @@ +;license:MIT +;(c) 2021 by Frank M. + +!cpu 6502 +!to "build/PRELAUNCH.INDEXED/STARGATE",plain +*=$106 + + !source "src/prelaunch/common.a" + + +ENABLE_ACCEL + + lda #$60 + sta $4697 + jsr $800 ; decompress + + lda #$60 + sta $9A03 + jsr $9A00 ; decompress2 + + lda #0 + sta $47F2 + lda #1 + sta $47F3 + lda #$A4 + sta $47F4 ; reset vector (moved to $3F2/3/4) + + +DISABLE_ACCEL + + jmp $5000 + +!if * > $1C0 { + !error "code is too large, ends at ", * +}