Reset vector fixes (#95)

This commit is contained in:
frankmilliron 2019-12-31 13:29:20 -08:00 committed by 4am
parent a2de3b2190
commit e3cf6fb733
5 changed files with 82 additions and 29 deletions

27
src/prelaunch/ballblazer.a Executable file
View File

@ -0,0 +1,27 @@
;license:MIT
;(c) 2019 by Frank M.
!cpu 6502
!to "build/PRELAUNCH/BALLBLAZER",plain
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $5FEB
jsr $5FCC ; decompress1
lda #$60
sta $BE20
+DISABLE_ACCEL
jsr $BE00 ; decompress2/title
lda #1
sta $415 ; gets patched to LC reset vector
jmp $400
!if * > $1C0 {
!error "code is too large, ends at ", *
}

38
src/prelaunch/fs2.a Executable file
View File

@ -0,0 +1,38 @@
;license:MIT
;(c) 2019 by Frank M.
!cpu 6502
!to "build/PRELAUNCH/FS2",plain
*=$106
!source "src/prelaunch/common.a"
;+ENABLE_ACCEL ; can't
lda #$2C
sta $1C0
lda #$82
sta $1C1
lda #$C0
sta $1C2
lda #$4C ; add reboot hook @ $1C0
sta $1C3
lda #$A6
sta $1C4
lda #$FA
sta $1C5
lda #$C0
sta $81D3 ; cloned to $3F2
sta $7C6E ; cloned to $FFFC
lda #$01
sta $81D4 ; cloned to $3F3
sta $7C71 ; cloned to $FFFD
lda #$A4
sta $81CB ; cloned to $3F4
jmp $24F8
!if * > $1C0 {
!error "code is too large, ends at ", *
}

View File

@ -12,9 +12,15 @@
sta $81D
jsr $800 ; decompress
lda #1
+NEW_RESET_VECTOR $280
lda #$80
sta $2001
sta $2016
sta $812E
lda #$02
sta $2006
sta $201B ; reset vector patch
sta $8133 ; (yes, that's 3 times)
+DISABLE_ACCEL
jmp $8FD

View File

@ -1,22 +0,0 @@
;license:MIT
;(c) 2019 by Frank M.
!cpu 6502
!to "build/PRELAUNCH/RASTER.BLASTER",plain
*=$106
!source "src/prelaunch/common.a"
;+ENABLE_ACCEL ; can't
lda #$60
sta $825
jsr $800 ; decompress/set reset vector
+RESET_VECTOR $100
jsr $8200 ; title
jmp $FEBC ; demo
!if * > $1C0 {
!error "code is too large, ends at ", *
}

16
src/prelaunch/xevious.a Normal file → Executable file
View File

@ -8,6 +8,14 @@
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
+READ_RAM2_WRITE_RAM2
lda #<reset
sta $FFFC
sta $3F2 ; $3F3/3F4 already set to page 1
lda #>reset
sta $FFFD ; reset vector patch
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
sta patch2+1
@ -27,7 +35,7 @@ patch1
sta $ACE8
lda #>patch2
sta $ACE9
jmp $AC48 ; decompress 2
jmp $AC48 ; decompress 2/first title
patch2
lda #0 ; SMC
beq +
@ -38,11 +46,7 @@ patch2
sta $750D ; patch - don't increase lives
sta $894F ; patch - don't increase lives
+
lda #<reset
sta $FFFC
lda #>reset
sta $FFFD
jmp $0600
jmp $0600 ; play demo/start game
!if * > $1C0 {
!error "code is too large, ends at ", *