2019-09-30 19:01:34 -04:00
|
|
|
;license:MIT
|
2019-12-25 14:15:36 -08:00
|
|
|
;(c) 2019 by 4am/Frank M.
|
2019-09-30 19:01:34 -04:00
|
|
|
|
|
|
|
!cpu 6502
|
2020-03-29 17:55:55 -07:00
|
|
|
!to "build/PRELAUNCH/H.E.R.O",plain
|
2019-09-30 19:01:34 -04:00
|
|
|
*=$106
|
|
|
|
|
|
|
|
!source "src/prelaunch/common.a"
|
|
|
|
|
2019-10-04 21:34:49 -04:00
|
|
|
+ENABLE_ACCEL
|
2019-09-30 19:01:34 -04:00
|
|
|
lda #$60
|
|
|
|
sta $4028
|
|
|
|
jsr $4000 ; decompress
|
2019-10-04 21:34:49 -04:00
|
|
|
+GET_MACHINE_STATUS
|
|
|
|
and #CHEATS_ENABLED
|
|
|
|
beq +
|
2019-10-06 10:39:59 -04:00
|
|
|
; lives in $28 (capped at 6)
|
|
|
|
; bombs in $29
|
2019-09-30 19:01:34 -04:00
|
|
|
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)
|
2019-10-04 21:34:49 -04:00
|
|
|
+
|
2019-12-23 07:31:16 -08:00
|
|
|
lda #3
|
|
|
|
sta $6040
|
|
|
|
lda #$A6
|
|
|
|
sta $6041 ; reset vector cloned from $603F
|
|
|
|
; $100 gets trashed so put it at $300
|
2019-12-23 16:24:55 -08:00
|
|
|
+NEW_RESET_VECTOR $300
|
2019-12-23 07:31:16 -08:00
|
|
|
|
2019-10-04 21:34:49 -04:00
|
|
|
+DISABLE_ACCEL
|
2019-09-30 19:01:34 -04:00
|
|
|
jmp $6000
|
2019-12-12 21:51:54 -08:00
|
|
|
|
|
|
|
!if * > $1C0 {
|
|
|
|
!error "code is too large, ends at ", *
|
|
|
|
}
|