add full ID + patching support for Laureate Learning Systems

This commit is contained in:
4am 2017-05-08 20:45:11 -04:00
parent 1708d1c333
commit 70c2132974
5 changed files with 148 additions and 3 deletions

View File

@ -118,6 +118,18 @@ IDBootloader
jsr PrintByID
jmp TraceSpecDel
;
; Try to identify Laureate Learning Systems bootloader.
; Exit via custom trace function if found.
;
+ jsr IDLaureate
bcs +
lda #s_laureate
jsr PrintByID
jsr CopyUniversal
jsr PrereadT00
bcs +
jmp TraceLaureate
;
; Try to identify Electronic Arts bootloader.
; Exit via custom trace function if found.
;

80
src/id/laureate.a Normal file
View File

@ -0,0 +1,80 @@
;-------------------------------
; IDLaureate
; identify custom bootloader seen on disks from
; Laureate Learning Systems
; loads RWTS directly into language card
;
; in: track buffer contains T00,S00
; out: C clear if Laureate bootloader was found
; (and track buffer now contains all of track 0)
; C set if not found
; all other flags clobbered
; all registers clobbered
;-------------------------------
!zone {
IDLaureate
lda #$00
ldx #$2E
ldy #$0E
jsr compare ; if T00,S00,$2E ==
!byte $AE,$FF,$08; LDX $08FF
!byte $30,$1E ; BMI +$1E
!byte $E0,$02 ; CPX #$02
!byte $D0,$05 ; BNE +$05
!byte $A9,$BF ; LDA #$BF
!byte $8D,$FE,$08; STA $08FE
bcs .exit
lda #$00
ldx #$F8
ldy #$08
jsr compare ; and T00,S00,$F8 ==
!byte $4C,$00,$B7; JMP $B700
!byte $00,$00,$00
!byte $FF,$0B
.exit
rts
}
;-------------------------------
; TraceLaureate
; Create an RWTS that can read the disk (T01+).
; The original RWTS lives at $F800, which is
; inconvenient. So, starting with our built-in RWTS,
; we copy bits and pieces to create a similar RWTS
; that lives at $B800.
;;
; in: track buffer contains all of track 0
; exits via ADStyle
;-------------------------------
!zone {
TraceLaureate
lda #$00
sta modsrc
lda #$04
clc
adc #BASEPAGE
sta modsrc+1
ldy #$E7
lda (modsrc),y
sta $B8E7
ldy #$F1
lda (modsrc),y
sta $B8F1
ldy #$FC
lda (modsrc),y
sta $B8FC
inc modsrc+1
ldy #$44
- lda (modsrc),y
sta $b900,y
iny
cpy #$A0
bne -
inc modsrc+1
ldy #$29
- lda (modsrc),y
sta $BA00,y
iny
bne -
jmp ADStyle
}

View File

@ -94,7 +94,7 @@ flag = $FF ; byte
}
; Application constants (not zero addresses)
RELBASE = $6200 ; address to move Passport code
RELBASE = $6100 ; address to move Passport code
; so that it's out of the way
LOWPOINT = $4300 ; lowest available address for code
BASEPAGE = $10 ; Special Delivery tracer assumes
@ -158,6 +158,7 @@ FirstMover
!source "id/diversidos.a"
!source "id/prontodos.a"
!source "id/d5d5f7.a"
!source "id/laureate.a"
!source "print.a"
!source "compare.a"
!source "modify.a"
@ -700,6 +701,7 @@ _applyToT00
!source "patchers/milliken.a"
!source "patchers/methods.a"
!source "patchers/jsr8b3.a"
!source "patchers/laureate.a"
_applyToAll
!source "patchers/universale7.a"
!source "patchers/runhello.a" ; (!gIsProDOS && !gIsPascal) only

47
src/patchers/laureate.a Normal file
View File

@ -0,0 +1,47 @@
;-------------------------------
; Laureate Learning Systems RWTS fixup
; annoyingly shifted by 2 sectors,
; but generally DOS-shaped
;-------------------------------
!zone {
jsr IDLaureate
bcs .exit
bcc +
.sectors
!byte $04,$04,$04,$04,$04,$04,$04,$04,$04,$05,$05,$05,$05,$05,$05,$05,$06,$06,$06
.offsets
!byte $53,$58,$5D,$9E,$A3,$A8,$E7,$F1,$FC,$35,$3F,$55,$5F,$6A,$91,$9B,$49,$D5,$D6
.values
!byte $D5,$AA,$AD,$DE,$AA,$EB,$D5,$AA,$AD,$DE,$AA,$D5,$AA,$96,$DE,$AA,$D6,$D5,$20
+ lda #$12
sta .loop+1
.loop ldy #$d1
lda .values,y
sta .valuea
sta .valueb
lda .sectors,y
ldx .offsets,y
ldy #$01
jsr compare
.valuea !byte $d1
bcc +
ldy #$01
jsr modify
.valueb !byte $d1
+ dec .loop+1
bpl .loop
lda #$0A
ldx #$12
ldy #$02
jsr compare
!byte $B1,$48
bcs .exit
ldy #$02
jsr modify
!byte $A9,$00
.exit
}

View File

@ -97,7 +97,8 @@ s_quickdos = $4E
s_diversidos = $4F
s_prontodos = $50
s_jmpb412 = $51
STRINGCOUNT = $52
s_laureate = $52
STRINGCOUNT = $53
!zone {
StringTable
@ -183,6 +184,7 @@ StringTable
!word .diversidos
!word .prontodos
!word .jmpb412
!word .laureate
;
; Text can contain substitution strings, which
; are replaced by current values at runtime. Each
@ -208,7 +210,7 @@ StringTable
; can be set directly before calling PrintByID.
;
.header
!text "Passport by 4am 2017-05-05",00
!text "Passport by 4am 2017-05-08",00
.mainmenu
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text " "
@ -462,4 +464,6 @@ StringTable
.jmpb412
!text "T02,S00 Disk calls a protection check",$8D
!text "at $B412 before initializing DOS.",$8D,00
.laureate
!text "T00,S00 Found Laureate bootloader",$8D,00
}