Reset vector fixes (#89)

This commit is contained in:
frankmilliron 2019-12-26 11:38:32 -08:00 committed by 4am
parent fa21e80bb6
commit 0b924e936e
6 changed files with 101 additions and 4 deletions

View File

@ -7,8 +7,23 @@
!source "src/prelaunch/common.a"
; clobbers $100, sets LC & page 3 reset vectors
+NEW_RESET_VECTOR $7000
lda #$4C
sta $7003 ; JMP not (JMP)
lda $104
sta $7004
lda $105 ; clone actual TR reentry point to $7000
sta $7005 ; loops between LC and $7000 otherwise
+READ_RAM2_WRITE_RAM2
lda #0
sta $FFFC
lda #$70
sta $FFFD ; LC reset vector fix to $7000
+READ_ROM_NO_WRITE
jmp $2000
!if * > $1C0 {

View File

@ -7,9 +7,14 @@
!source "src/prelaunch/common.a"
; reboot on reset during title
+READ_RAM2_WRITE_RAM2
+LC_REBOOT
+READ_ROM_NO_WRITE
lda #$60
sta $920
jsr $800 ; decompress
jsr $800 ; decompress/title
lda #$60
sta $9f1
@ -18,9 +23,9 @@
lda #$60
sta $4018
jsr $4000 ; LC switched in
jsr $4000 ; sets reset vector/LC switched in
+LC_REBOOT
+LC_REBOOT ; change it back to reboot
jmp $800

3
src/prelaunch/plasmania.a Normal file → Executable file
View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by qkumba
;(c) 2019 by qkumba/Frank M.
!cpu 6502
!to "build/PRELAUNCH/PLASMANIA",plain
@ -8,6 +8,7 @@
!source "src/prelaunch/common.a"
+USES_TEXT_PAGE_2
+NEW_RESET_VECTOR $BFF0 ; overwrites $100 once game starts
jmp $800
!if * > $1C0 {

31
src/prelaunch/shuffleboard.a Executable file
View File

@ -0,0 +1,31 @@
;license:MIT
;(c) 2019 by Frank M.
!cpu 6502
!to "build/PRELAUNCH/SHUFFLEBOARD",plain
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $3EE2
jsr $3EBB ; decompress
lda #$60
sta $1021
jsr $1000 ; title/set reset vector
lda #$2C
sta $97FF
sta $97F3
sta $B1A2 ; BIT changing reset
+RESET_VECTOR $100
+DISABLE_ACCEL
jmp $A03B
!if * > $1C0 {
!error "code is too large, ends at ", *
}

22
src/prelaunch/space.quarks.a Executable file
View File

@ -0,0 +1,22 @@
;license:MIT
;(c) 2019 by Frank M.
!cpu 6502
!to "build/PRELAUNCH/SPACE.QUARKS",plain
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $3E9D
jsr $3E65 ; decompress/set reset vector
+RESET_VECTOR $100
+DISABLE_ACCEL
jmp $200
!if * > $1C0 {
!error "code is too large, ends at ", *
}

23
src/prelaunch/space.raiders.a Executable file
View File

@ -0,0 +1,23 @@
;license:MIT
;(c) 2019 by Frank M.
!cpu 6502
!to "build/PRELAUNCH/SPACE.RAIDERS",plain
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $8F09
jsr $8EF1 ; decompress
lda #1
sta $401A ; reset vector patch
+DISABLE_ACCEL
jmp $4000
!if * > $1C0 {
!error "code is too large, ends at ", *
}