mirror of
https://github.com/a2-4am/4cade.git
synced 2025-08-07 18:25:24 +00:00
35
src/prelaunch/up.n.down.a
Normal file → Executable file
35
src/prelaunch/up.n.down.a
Normal file → Executable file
@@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019 by 4am/Frank M.
|
||||||
|
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/PRELAUNCH/UP.N.DOWN",plain
|
!to "build/PRELAUNCH/UP.N.DOWN",plain
|
||||||
@@ -7,18 +7,24 @@
|
|||||||
|
|
||||||
!source "src/prelaunch/common.a"
|
!source "src/prelaunch/common.a"
|
||||||
|
|
||||||
|
lda #$03 ; reset vector to $103
|
||||||
|
sta $2D4E
|
||||||
|
lda #$01 ; (game uses the 3 value to set STA $'03'F2
|
||||||
|
sta $2D50 ; so reset has to be somewhere $xx03
|
||||||
|
sta $2DB1 ; unless you want to waste more time making this reboot)
|
||||||
|
|
||||||
+GET_MACHINE_STATUS
|
+GET_MACHINE_STATUS
|
||||||
and #CHEATS_ENABLED
|
and #CHEATS_ENABLED
|
||||||
sta patch+1
|
sta patch+1
|
||||||
ldx #$0B ; copy patch code to zero page (stack will be destroyed by the time we need to patch)
|
ldx #$2A-1 ; copy patch code to zero page
|
||||||
- lda patch,x
|
- lda patch,x ; (stack will be destroyed by the time we need to patch)
|
||||||
sta $F4,x
|
sta $80,x
|
||||||
dex
|
dex
|
||||||
bpl -
|
bpl -
|
||||||
lda #$F4 ; call patch instead of $200
|
lda #$80 ; call patch instead of $200
|
||||||
sta $4061
|
sta $4054
|
||||||
lda #$00
|
lda #$00
|
||||||
sta $4062
|
sta $4055 ; updated here for new .po file locations
|
||||||
jmp $2D2C
|
jmp $2D2C
|
||||||
patch
|
patch
|
||||||
lda #0 ; SMC
|
lda #0 ; SMC
|
||||||
@@ -27,7 +33,20 @@ patch
|
|||||||
lda #$B5
|
lda #$B5
|
||||||
sta $0912 ; patch - don't decrease lives
|
sta $0912 ; patch - don't decrease lives
|
||||||
+
|
+
|
||||||
jmp $0200 ; continue with load
|
lda #$2C
|
||||||
|
sta $103
|
||||||
|
lda #$82
|
||||||
|
sta $104
|
||||||
|
lda #$C0
|
||||||
|
sta $105
|
||||||
|
lda #$4C ; add reboot hook @ $103
|
||||||
|
sta $106
|
||||||
|
lda #$A6
|
||||||
|
sta $107
|
||||||
|
lda #$FA
|
||||||
|
sta $108
|
||||||
|
|
||||||
|
jmp $200 ; continue to game
|
||||||
|
|
||||||
!if * > $1C0 {
|
!if * > $1C0 {
|
||||||
!error "code is too large, ends at ", *
|
!error "code is too large, ends at ", *
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2019 by 4am
|
;(c) 2019 by 4am/qkumba/Frank M.
|
||||||
|
|
||||||
!cpu 6502
|
!cpu 6502
|
||||||
!to "build/PRELAUNCH/XEVIOUS",plain
|
!to "build/PRELAUNCH/XEVIOUS",plain
|
||||||
|
Reference in New Issue
Block a user