;license:MIT ;(c) 2019, 2024 by 4am/Frank M., qkumba !cpu 6502 !to "build/PRELAUNCH.INDEXED/H.E.R.O",plain *=$106 !source "src/macros.a" +ENABLE_ACCEL lda #$60 sta $4028 jsr $4000 ; decompress ldx $FBB3 cpx #6 bne + ; not a //e or //c ldx $FBC0 bne + ; not a //c lda $C405 cmp #$38 bne not_mouse lda $C407 cmp #$18 beq + ; looks like the mouse not_mouse lda #0 sta $6032 ; disable mouse-based VBL + +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 ", * }