4cade/src/prelaunch/g.i.joe.a
2020-04-24 15:45:26 -07:00

45 lines
878 B
Plaintext

;license:MIT
;(c) 2020 by qkumba
!cpu 6502
!to "build/PRELAUNCH/G.I.JOE",plain
*=$106
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $99f
jsr $800 ; decompress
+READ_RAM1_WRITE_RAM1
lda MachineStatus
and #CHEATS_ENABLED
beq +
lda #<callback1
sta $D45C
lda #<callback2
sta $D5A2
lda #>callback1
sta $D45D
sta $D5A3
+
bit $C083
jsr DisableAccelerator
bit $C08B
jmp $D400
callback1
lda #$AD
sta $63FA ; patch - don't increase hits
jmp $6000
callback2
lda #$AD
sta $14B5 ; patch - don't decrease lives
jmp $1100
!if * > $1C0 {
!error "code is too large, ends at ", *
}