2020-02-28 23:33:10 +00:00
|
|
|
;license:MIT
|
2022-04-25 22:09:50 +00:00
|
|
|
;(c) 2020, 2022 by qkumba
|
2020-02-28 23:33:10 +00:00
|
|
|
|
|
|
|
!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 ++
|
2022-04-25 22:09:50 +00:00
|
|
|
|
2021-04-05 18:38:42 +00:00
|
|
|
ldy #0
|
2021-04-05 22:10:41 +00:00
|
|
|
sty $382 ; joystick
|
2022-04-25 22:09:50 +00:00
|
|
|
ldx #2
|
|
|
|
iny ; Sound/Speech I
|
|
|
|
|
|
|
|
+READ_RAM2_NO_WRITE
|
|
|
|
bit MockingboardStuff
|
|
|
|
bmi + ; SC-01
|
|
|
|
ldx #0
|
|
|
|
dey ; Sound II
|
|
|
|
bvc + ; no speech
|
|
|
|
ldx #4
|
|
|
|
ldy #2 ; Mockingboard "C"
|
2021-04-05 18:38:42 +00:00
|
|
|
+ stx $380
|
|
|
|
sty $381
|
2020-07-19 20:51:36 +00:00
|
|
|
lda #$0D
|
|
|
|
sta $FF
|
2021-04-05 22:10:41 +00:00
|
|
|
lda #$30
|
|
|
|
sta $385
|
2021-04-05 18:38:42 +00:00
|
|
|
lda #$2C
|
|
|
|
sta skipslot
|
|
|
|
+READ_ROM_NO_WRITE
|
|
|
|
++ rts
|