2020-02-28 23:33:10 +00:00
|
|
|
;license:MIT
|
|
|
|
;(c) 2020 by qkumba
|
|
|
|
|
|
|
|
!cpu 6502
|
|
|
|
!to "build/PRELAUNCH/BERZAP.MB",plain
|
|
|
|
*=$200
|
|
|
|
|
|
|
|
!source "src/constants.a" ; no code in these
|
|
|
|
!source "src/macros.a"
|
|
|
|
|
|
|
|
+GET_MOCKINGBOARD_SLOT_AND_MACHINE_STATUS
|
|
|
|
and #CHEATS_ENABLED
|
|
|
|
beq ++
|
|
|
|
php
|
|
|
|
lda #$ad
|
|
|
|
ldy $3d94
|
|
|
|
cpy #$ce
|
|
|
|
bne +
|
|
|
|
sta $3d94 ; patch - don't decrease lives
|
|
|
|
sta $6573 ; patch - don't increase lives
|
2020-05-12 02:07:36 +00:00
|
|
|
sta $76b9 ; patch - don't increase lives
|
2020-02-28 23:33:10 +00:00
|
|
|
+ ldy $684e
|
|
|
|
cpy #$ee
|
|
|
|
bne +
|
|
|
|
sta $684e ; patch - don't increase lives
|
|
|
|
sta $735f ; patch - don't increase lives
|
|
|
|
+ ldy $6a70
|
|
|
|
cpy #$ee
|
|
|
|
bne +
|
|
|
|
sta $6a70 ; patch - don't increase lives
|
|
|
|
sta $72d7 ; patch - don't increase lives
|
|
|
|
+ plp
|
|
|
|
|
|
|
|
++ bcc skipmb
|
|
|
|
cpx #$C4
|
2021-04-05 18:38:42 +00:00
|
|
|
beq skipslot
|
2020-02-28 23:33:10 +00:00
|
|
|
txa
|
2020-03-02 17:58:43 +00:00
|
|
|
|
|
|
|
ldx $3FCD ;find #$C4s
|
|
|
|
cpx #$C4
|
|
|
|
bne ++
|
2020-02-28 23:33:10 +00:00
|
|
|
ldy #0
|
|
|
|
- ldx $3FCD,Y ;find #$C4s
|
|
|
|
cpx #$C4
|
|
|
|
bne +
|
|
|
|
sta $3FCD,Y ;Replace #$C4 with detected slot
|
2020-03-02 17:58:43 +00:00
|
|
|
+ iny
|
|
|
|
bne -
|
|
|
|
|
|
|
|
++ ldx $9743 ;find #$C4s
|
|
|
|
cpx #$C4
|
|
|
|
bne ++
|
|
|
|
- ldx $9743,Y ;find #$C4s
|
2020-02-28 23:33:10 +00:00
|
|
|
cpx #$C4
|
|
|
|
bne +
|
|
|
|
sta $9743,Y ;Replace #$C4 with detected slot
|
2020-03-02 22:33:38 +00:00
|
|
|
+ ldx $988D,Y ;find #$C4s
|
2020-02-28 23:33:10 +00:00
|
|
|
cpx #$C4
|
|
|
|
bne +
|
|
|
|
sta $988D,Y ;Replace #$C4 with detected slot
|
2020-03-02 22:33:38 +00:00
|
|
|
+ ldx $ACE0,Y ;find #$C4s
|
2020-02-28 23:33:10 +00:00
|
|
|
cpx #$C4
|
|
|
|
bne +
|
|
|
|
sta $ACE0,Y ;Replace #$C4 with detected slot
|
|
|
|
+ iny
|
|
|
|
bne -
|
|
|
|
sta $9A63
|
|
|
|
sta $9A6B
|
|
|
|
sta $AB1D
|
|
|
|
|
2020-03-02 17:58:43 +00:00
|
|
|
++ ldx $89D5 ;find #$C4s
|
|
|
|
cpx #$C4
|
2021-04-05 18:38:42 +00:00
|
|
|
bne skipslot
|
2020-03-02 17:58:43 +00:00
|
|
|
ldy #0
|
|
|
|
- ldx $89D5,Y ;find #$C4s
|
|
|
|
cpx #$C4
|
|
|
|
bne +
|
|
|
|
sta $89D5,Y ;Replace #$C4 with detected slot
|
|
|
|
+ ldx $9464,Y ;find #$C4s
|
|
|
|
cpx #$C4
|
|
|
|
bne +
|
|
|
|
sta $9464,Y ;Replace #$C4 with detected slot
|
|
|
|
+ iny
|
|
|
|
bne -
|
|
|
|
|
2021-04-05 18:38:42 +00:00
|
|
|
skipslot
|
|
|
|
jsr setopt
|
|
|
|
|
2020-02-28 23:33:10 +00:00
|
|
|
skipmb
|
2021-04-05 18:38:42 +00:00
|
|
|
jmp ($b599)
|
|
|
|
|
|
|
|
setopt
|
2020-07-17 16:48:01 +00:00
|
|
|
lda $65AB
|
|
|
|
cmp #3
|
|
|
|
bne ++
|
|
|
|
+READ_RAM2_NO_WRITE
|
|
|
|
lda MockingboardStuff
|
2021-04-05 18:38:42 +00:00
|
|
|
ldx #3 ; MB/A
|
|
|
|
ldy #0
|
2020-07-17 16:48:01 +00:00
|
|
|
asl
|
|
|
|
bpl +
|
2021-04-05 18:38:42 +00:00
|
|
|
ldx #1 ; Sound2
|
|
|
|
+ bcc +
|
|
|
|
txa
|
|
|
|
eor #2
|
|
|
|
tax
|
|
|
|
inx ; Sound/Speech or MB/C
|
|
|
|
lsr
|
|
|
|
tay ; Speech1 or Speech2
|
|
|
|
+ stx $380
|
|
|
|
sty $381
|
2020-07-19 20:51:36 +00:00
|
|
|
lda #$0D
|
|
|
|
sta $FF
|
2021-04-05 18:38:42 +00:00
|
|
|
lda #$2C
|
|
|
|
sta skipslot
|
|
|
|
+READ_ROM_NO_WRITE
|
|
|
|
++ rts
|