defeat Spiradisc slot check, remove unsupported

also move boot code beyond $17FF to avoid Hard Hat Mack overwrite
This commit is contained in:
Peter Ferrie 2019-03-12 19:05:13 -07:00
parent 10ff5a8240
commit ecdde035ef
4 changed files with 51 additions and 61 deletions

View File

@ -35,7 +35,6 @@
MLI = $BF00
KEY = $C000
STROBE = $C010
REBOOT = $FAA6
TEXT = $FB2F
HOME = $FC58
COUT = $FDED
@ -71,36 +70,46 @@ Boot
jsr HOME
ldx #$00
- lda $C600,x
sta $1600,x
sta $8600,x
inx
bne -
lda $165C
lda $865C
cmp #$80
bne +
lda #$18
sta $865C
lda #$08
sta $165D
lda #$B7
sta $16A5
sta $865D
lda #$F7
sta $8666
lda #$D9
sta $8682
lda #$BE
sta $869D
ldx #$B8
stx $86A3
dex
stx $86A5
+ lda #<Tracer
ldx #>Tracer
ldy $16F8
ldy $86F8
cpy #$4C
bne @iigs
; entry point for Disk II controller
sta $16F9 ; lo byte of callback
stx $16FA ; hi byte of callback
sta $86F9 ; lo byte of callback
stx $86FA ; hi byte of callback
beq @tryboot
@iigs
ldy $16FB
ldy $86FB
cpy #$4C
bne RebootImmediately
bne @unknowncontroller
; entry point for IIgs smart controller
sta $16FC ; lo byte of callback
stx $16FD ; hi byte of callback
sta $86FC ; lo byte of callback
stx $86FD ; hi byte of callback
@tryboot
jmp IDBoot
@unknowncontroller
jmp RebootImmediately
jmp $C600
Tracer
jsr IDBroderbund
@ -112,21 +121,7 @@ Tracer
jsr IDSirius
bcc BeginTheBoot
; [execution falls through here]
Unsupported
lda $C082
lda $C0E8
jsr TEXT
jsr HOME
lda #s_header
jsr PrintByID
lda #s_unsupported
jsr PrintByID
bit STROBE
- lda KEY
bpl -
bit STROBE
RebootImmediately
jmp REBOOT
; [and runs anyway]
BeginTheBoot
sec ;match boot-time flags and registers
@ -163,13 +158,11 @@ PrintByID
;
s_header = $00
s_mainmenu = $01
s_unsupported =$02
STRINGCOUNT = $03
STRINGCOUNT = $02
StringTable
!word @header
!word @mainmenu
!word @unsupported
@header
!text "Anti-M v1.1-dev by 4am 2019-03-12"
@ -179,9 +172,6 @@ StringTable
!text " Insert original disk in slot 6 drive 1",$8D
!text $8D
!text " and press <RETURN> to boot",$00
@unsupported
!text $8D
!text " Unsupported game (sorry)",$00
!src "src/compare.a"
!src "src/idbroderbund.a"

View File

@ -4,20 +4,20 @@
IDBoot
; try to determine sector type based on found boot sector
lda #$60
sta $167B
jsr $1600
sta $867B
jsr $8600
bcc +
lda #$90
sta $167B
-- lda #$90
sta $867B
; found D5 AA 96 T00S00 D5 AA AD, proceed as 16-sector
- clc
jmp $165D
jmp $865D
; found D5 AA not-96
; check for out-of-order D5 AA AD
+ cmp #$AD
beq -
beq --
; otherwise, loop in case we will see D5 AA B5
cmp #$B5
@ -25,7 +25,7 @@ IDBoot
; found D5 AA B5, assume 13-sector
lda #$90
sta $167B
sta $867B
; build 5-and-3 decoder table
ldx #$00
@ -49,17 +49,17 @@ IDBoot
; patch boot PROM to recognise 13-sector instead
lda #$B5
sta $1677
sta $8677
lda #$9A
sta $16A7
sty $16B0
inc $16B1
sty $16C2
inc $16C3
sty $16D1
inc $16D2
sta $86A7
sty $86B0
inc $86B1
sty $86C2
inc $86C3
sty $86D1
inc $86D2
- lda @decode53,y
sta $16D5,y
sta $86D5,y
iny
bne -
lda #$02
@ -151,6 +151,6 @@ IDBoot
@run53
ldx #$60
bcs +
jmp $165D
jmp $865D
+ jmp ($44)
}

View File

@ -66,10 +66,10 @@ IDBroderbund
bne @maybeDMM
lda $0302
cmp #$2E
bne @unsupported
bne @runanyway
lda $0303
cmp #$9A
bne @unsupported
bne @runanyway
;
; found Choplifter protection
;
@ -94,17 +94,18 @@ IDBroderbund
sta $0326
lda #>@choplifterCallback
sta $0327
@runanyway
jmp $0301
@maybeDMM
cmp #$8C
bne @unsupported
bne @runanyway
lda $030B
cmp #$4D
bne @unsupported
bne @runanyway
lda $0323
cmp #$60
bne @unsupported
bne @runanyway
;
; found David's Midnight Magic protection
;
@ -127,10 +128,6 @@ IDBroderbund
lda #>@DMMCallback
sta $0323
jmp $0301
; TODO
@unsupported
jmp Unsupported
@copyChoplifter
!pseudopc $1700 {

View File

@ -39,4 +39,7 @@ IDSpiraDisc
sta $B606
lda #$24
sta $B60A
; and slot checksum-failure branching
lda #$FD
sta $BF41
+ jmp $B800