mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-17 22:30:44 +00:00
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
;license:MIT
|
|
;(c) 2019 by 4am/Frank M.
|
|
|
|
!cpu 6502
|
|
!to "build/PRELAUNCH/H.E.R.O",plain
|
|
*=$106
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
+ENABLE_ACCEL
|
|
lda #$60
|
|
sta $4028
|
|
jsr $4000 ; decompress
|
|
+GET_MACHINE_STATUS
|
|
and #CHEATS_ENABLED
|
|
beq +
|
|
; lives in $28 (capped at 6)
|
|
; bombs in $29
|
|
lda #$A5
|
|
sta $6387 ; patch - don't decrease lives after dying
|
|
lda #$2C
|
|
sta $717E ; patch - don't call routine that decreases bombs after planting one
|
|
; (routine needs to decrease bombs because it's called at the end of each level
|
|
; to give you a bonus for each bomb left, so instead we patch one caller but
|
|
; not the other so you can plant a bomb without using up a bomb then get the
|
|
; maximum 'unused bombs' bonus and advance to the next level)
|
|
+
|
|
lda #3
|
|
sta $6040
|
|
lda #$A6
|
|
sta $6041 ; reset vector cloned from $603F
|
|
; $100 gets trashed so put it at $300
|
|
+NEW_RESET_VECTOR $300
|
|
|
|
+DISABLE_ACCEL
|
|
jmp $6000
|
|
|
|
!if * > $1C0 {
|
|
!error "code is too large, ends at ", *
|
|
}
|