FastChip MB everywhere

This commit is contained in:
Peter Ferrie 2020-07-23 12:37:27 -07:00
parent 06e8f07e48
commit 6149eac1e8
9 changed files with 233 additions and 34 deletions

View File

@ -24,9 +24,38 @@
lda #$a5
sta $A22 ; patch - don't decrease lives
+
lda #$4C
sta $8FFF
sta $9010
lda #<callback1
sta $9000
lda #>callback1
sta $9001
lda #<callback2
sta $9011
lda #>callback2
sta $9012
lda #$C5
sta $902A
+DISABLE_ACCEL
jmp $845
callback1
sec
sbc #8
cmp #2
bcc +
- jmp $9014
+ ldy #$84
jmp $9003
callback2
sec
sbc #8
cmp #2
bcs -
jmp $902C
!if * > $1C0 {
!error "code is too large, ends at ", *
}

View File

@ -16,6 +16,10 @@
pha
lda #$60
sta $9462
lda #<callback1
sta $950E
lda #>callback1
sta $950F
jsr $9442
pla
beq +
@ -26,6 +30,23 @@
inc $9d ; game relies on it
jmp $9600
callback1
lda #$4C
sta $D7D9
lda #<callback2
sta $D7DA
lda #>callback2
sta $D7DB
jmp $D7C5
callback2
sec
sbc #7
cmp #2
bcc +
jmp $D7E7
+ jmp $D7DD
!if * > $1C0 {
!error "code is too large, ends at ", *
}

View File

@ -16,6 +16,10 @@
pha
lda #$60
sta $9462
lda #<callback1
sta $950E
lda #>callback1
sta $950F
jsr $9442
pla
beq +
@ -26,6 +30,23 @@
inc $9d ; game relies on it
jmp $9600
callback1
lda #$4C
sta $D7D9
lda #<callback2
sta $D7DA
lda #>callback2
sta $D7DB
jmp $D7C5
callback2
sec
sbc #7
cmp #2
bcc +
jmp $D7E7
+ jmp $D7DD
!if * > $1C0 {
!error "code is too large, ends at ", *
}

View File

@ -18,9 +18,35 @@
lda #$ad
sta $7FD5 ; patch - don't decrease lives
+
lda #$4C
sta $AF79
sta $AF8C
lda #<callback1
sta $AF7A
lda #>callback1
sta $AF7B
lda #<callback2
sta $AF8D
lda #>callback2
sta $AF8E
+DISABLE_ACCEL
jmp $3FFD
callback1
sec
sbc #8
cmp #2
bcc +
- jmp $AF93
+ jmp $AF7D
callback2
sec
sbc #8
cmp #2
bcs -
jmp $AF90
!if * > $1C0 {
!error "code is too large, ends at ", *
}

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am, qkumba
!cpu 6502
!to "build/PRELAUNCH/PITFALL.II",plain
@ -12,6 +12,17 @@
sta $3D34
jsr $0800 ; decompress
+RESET_VECTOR reset
lda #$4C
sta $2DF5
sta $2E06
lda #<callback1
sta $2DF6
lda #>callback1
sta $2DF7
lda #<callback2
sta $2E07
lda #>callback2
sta $2E08
+DISABLE_ACCEL
jmp $6000 ;612A copies pages 2E & 2F to AE & AF for final location
@ -19,6 +30,21 @@ reset
+READ_RAM2_NO_WRITE
jmp ($FFFC)
callback1
sec
sbc #8
cmp #2
bcc +
- jmp $AE0A
+ jmp $ADF9
callback2
sec
sbc #8
cmp #2
bcs -
jmp $AE21
!if * > $1C0 {
!error "code is too large, ends at ", *
}

View File

@ -7,36 +7,27 @@
!source "src/prelaunch/common.a"
+ENABLE_ACCEL
lda #$60
sta $A37
jsr $800 ; find and load "DOS"
ldx #$60
stx $BFE5
jsr $BFC8
lda #$4C
sta $4047
+GET_MOCKINGBOARD_SPEECH
bcs +
lda #$60
sta $40FB ; no speech chip, pretend no MB
+
+DISABLE_ACCEL ; otherwise Mockingboard detection fails
lda #0
jsr $4000
lda #<reset
sta $3F2
sta $FFFC
lda #>reset
sta $FFFD
lda #$4C
sta $BFE5
+READ_RAM1_WRITE_RAM1 ; fix crash on //c+
jmp $404A
reset
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
lda #3
sta $56 ; ldrhi
lda $D401
pha
lda $D403
pha
lda #<rraiders_mb
ldy #>rraiders_mb
jsr LoadFileDirect
pla
sta $D403
pla
sta $D401
+READ_ROM_NO_WRITE
jmp $FAA6
jmp $300
rraiders_mb
!byte 25
!text "PRELAUNCH/RESQ.RAIDERS.MB"
!if * > $1C0 {
!error "code is too large, ends at ", *

View File

@ -0,0 +1,71 @@
;license:MIT
;(c) 2020 by qkumba
!cpu 6502
!to "build/PRELAUNCH/RESQ.RAIDERS.MB",plain
*=$300
!source "src/constants.a" ; no code in these
!source "src/macros.a"
lda #$60
sta $A37
jsr $800 ; find and load "DOS"
ldx #$60
stx $BFE5
jsr $BFC8
lda #$4C
sta $4047
+GET_MOCKINGBOARD_SPEECH
bcs +
lda #$60
sta $40FB ; no speech chip, pretend no MB
+
lda #$60
sta $4024
+DISABLE_ACCEL ; otherwise Mockingboard detection fails
lda #0
jsr $4000
lda #$20
sta $4024
lda #$4C
sta $4110
sta $411A
lda #<callback1
sta $4111
lda #>callback1
sta $4112
lda #<callback2
sta $411B
lda #>callback2
sta $411C
jsr $4024
+READ_RAM1_WRITE_RAM1 ; fix crash on //c+
lda #<reset
sta $3F2
sta $FFFC
lda #>reset
sta $FFFD
lda #$4C
sta $BFE5
jmp $404A
reset
+READ_ROM_NO_WRITE
jmp $FAA6
callback1
sec
sbc #5
cmp #2
bcc +
- jmp $4144
+ jmp $4114
callback2
sec
sbc #4
cmp #3
bcs -
jmp $411E

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by qkumba/Frank M.
;(c) 2019-2020 by qkumba/Frank M.
!cpu 6502
!to "build/PRELAUNCH/SKYFOX",plain
@ -38,6 +38,7 @@
jmp $67BD
callback
sec
sbc #8
cmp #2
rts

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2019 by 4am
;(c) 2019-2020 by 4am, qkumba
!cpu 6502
!to "build/PRELAUNCH/SPY.STRIKES.BAK",plain
@ -11,7 +11,8 @@
lda #$60
sta $0849
jsr $0800 ; decompress
+GET_MACHINE_STATUS
+READ_RAM2_NO_WRITE
lda MachineStatus
and #CHEATS_ENABLED
beq +
; lives in $17
@ -19,7 +20,19 @@
sta $6AE7 ; patch - don't decrease lives
sta $87EE ; patch - don't increase lives
+
+DISABLE_ACCEL
lda MockingboardStuff
asl
bpl skipmb
lsr
and #7
ora #$30
sta $8F33
lda #3
sta $8FEC
skipmb
jsr DisableAccelerator
+READ_ROM_NO_WRITE
jmp $6000
!if * > $1C0 {