Merge pull request #75 from frankmilliron/master

Reset vector & accel fixes
This commit is contained in:
4am 2019-12-20 23:24:59 -05:00 committed by GitHub
commit 6e1e3e55c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 140 additions and 17 deletions

View File

@ -7,7 +7,6 @@
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $3f06
jsr $3eb1 ; decompress
@ -24,7 +23,6 @@
lda #1
sta $5B30 ; reset vector patch
+DISABLE_ACCEL
jmp $5c00
!if * > $1C0 {

View File

@ -7,9 +7,23 @@
!source "src/prelaunch/common.a"
inc $3f4 ; reset vector patch
; (overwrites LC so reboot)
jmp $800
lda #$60
sta $9DE
jsr $800 ; decompress
lda #$82
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update TR hook to reboot
lda #0
sta $FFFC
lda #1
sta $FFFD ; reset vector fix
lda #8 ; x=45, y=1 here
jmp $B800
!if * > $1C0 {
!error "code is too large, ends at ", *

View File

@ -17,8 +17,17 @@
lda #$a5
sta $1cb0 ; patch - don't decrease lives
+
inc $3F4 ; reset vector patch
; trashes LC, so reboot
lda #$82 ; READ_ROM_NO_WRITE
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update TR hook to reboot
+READ_RAM2_WRITE_RAM2
lda #0
sta $FFFC
lda #1
sta $FFFD ; LC reset vector fix
+DISABLE_ACCEL
jmp $8000

View File

@ -7,7 +7,6 @@
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $603A
jsr $6000
@ -21,7 +20,6 @@
lda #$96 ; patch $847 - JMP ($3F2)
sta $849 ; to JMP $9600
+DISABLE_ACCEL
jmp $800
!if * > $1C0 {

View File

@ -11,9 +11,10 @@
lda #$60
sta $8237
jsr $3FFD ; decompress
+DISABLE_ACCEL
lda #$60
sta $B845
jsr $B837
jsr $B837 ; spaceship load scene
+GET_MACHINE_STATUS
and #CHEATS_ENABLED
beq +
@ -26,7 +27,6 @@
lda #1
sta $A8BC ; reset vector patch
+DISABLE_ACCEL
jmp $A720
!if * > $1C0 {

34
src/prelaunch/head.on.a Executable file
View File

@ -0,0 +1,34 @@
;license:MIT
;(c) 2019 by qkumba
!cpu 6502
!to "build/PRELAUNCH/HEAD.ON",plain
*=$106
!source "src/prelaunch/common.a"
lda #$2C
sta $7000
lda #$88
sta $7001
lda #$C0
sta $7002
lda #$6C ; JMP ($FFFC)
sta $7003 ; 'Reenter'
lda #$FC
sta $7004
lda #$FF
sta $7005 ; re-establish LC hook
lda #0
sta $3F2
lda #$70
sta $3F3
lda #$D5
sta $3F4 ; reset vector patch
jmp $2000
!if * > $1C0 {
!error "code is too large, ends at ", *
}

View File

@ -7,7 +7,30 @@
!source "src/prelaunch/common.a"
inc $3f4 ; reset vector patch (reboot)
lda #$60
sta $920
jsr $800 ; decompress
lda #$60
sta $9f1
jsr $9AD
jsr $9050
lda #$60
sta $4018
jsr $4000 ; LC switched in
lda #$82
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update TR hook to reboot
lda #0
sta $FFFC
lda #1
sta $FFFD ; reset vector fix
jmp $800
!if * > $1C0 {

View File

@ -7,7 +7,6 @@
!source "src/prelaunch/common.a"
ldy #6
- lda $100-1,y
sta $180-1,y ; move hook to $180
@ -16,7 +15,11 @@
lda #$80
sta $3F2 ; reset vector patch
jmp $3FF5
lda #$60
sta $7D1F
jsr $3FF5 ; unpack
jmp $BA00
!if * > $1C0 {
!error "code is too large, ends at ", *

View File

@ -5,8 +5,9 @@
!to "build/PRELAUNCH/KID.NIKI",plain
*=$106
!source "src/prelaunch/common.a"
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $6069
@ -21,7 +22,7 @@
lda #$AD
sta $BD34 ; patch - don't decrease lives
+
+DISABLE_ACCEL
jmp $61E3
!if * > $1C0 {

View File

@ -8,6 +8,7 @@
!source "src/prelaunch/common.a"
+USES_TEXT_PAGE_2
+ENABLE_ACCEL
lda #$60
sta $813
jsr $800 ; decompress
@ -17,6 +18,7 @@
lda #1
sta $104A ; reset vector patch
+DISABLE_ACCEL
jmp $1000
!if * > $1C0 {

39
src/prelaunch/quadrant.6112.a Executable file
View File

@ -0,0 +1,39 @@
;license:MIT
;(c) 2019 by qkumba
!cpu 6502
!to "build/PRELAUNCH/QUADRANT.6112",plain
*=$106
!source "src/prelaunch/common.a"
lda #$60
sta $872
jsr $800 ; title
lda #$2C
sta $100
lda #$88
sta $101
lda #$C0
sta $102
lda #$6C ; JMP ($FFFC)
sta $103 ; 'Reenter'
lda #$FC
sta $104
lda #$FF
sta $105 ; re-establish LC hook
lda #0
sta $3f2
lda #1
sta $3f3
lda #$A4
sta $3f4 ; reset vector patch
jmp $2007
!if * > $1C0 {
!error "code is too large, ends at ", *
}

View File

@ -8,9 +8,10 @@
!source "src/prelaunch/common.a"
+USES_TEXT_PAGE_2
+ENABLE_ACCEL
lda #$60
sta $863
jsr $800
jsr $800 ; unpack
lda #0
sta $AE2A
@ -19,6 +20,7 @@
lda #$A4
sta $AE28 ; reset vector patch
+DISABLE_ACCEL
jmp $AE27