2017-05-04 14:54:59 +00:00
|
|
|
;-------------------------------
|
|
|
|
; IDPascal
|
|
|
|
; identify Apple Pascal bootloader
|
|
|
|
;
|
2021-06-20 04:18:55 +00:00
|
|
|
; in: $0800..$08FF contains T00,S00
|
|
|
|
; first page of track buffer also contains T00,S00
|
|
|
|
; out: C clear if Apple Pascal bootloader found
|
|
|
|
; C set otherwise
|
|
|
|
; A = 0
|
|
|
|
; X = 0
|
|
|
|
; all other registers & flags clobbered
|
2017-05-04 14:54:59 +00:00
|
|
|
;-------------------------------
|
2021-06-19 02:06:12 +00:00
|
|
|
!macro IDPascal {
|
2017-05-04 14:54:59 +00:00
|
|
|
;
|
|
|
|
; Apple Pascal signature (version < 1.3)
|
2021-09-25 23:40:29 +00:00
|
|
|
; 7th position not included, to catch alternate jump
|
2017-05-04 14:54:59 +00:00
|
|
|
; addresses (e.g. Wizardry I, Sundog Frozen Legacy)
|
2021-09-25 23:40:29 +00:00
|
|
|
; 8th position not included, to catch PFS
|
2017-05-04 14:54:59 +00:00
|
|
|
;
|
|
|
|
lda #$00
|
2019-04-16 05:39:12 +00:00
|
|
|
tax
|
2021-09-25 23:40:29 +00:00
|
|
|
ldy #$06
|
2017-05-04 14:54:59 +00:00
|
|
|
jsr compare ; if T00,S00,$00 ==
|
|
|
|
!byte $01
|
|
|
|
!byte $E0,$60
|
|
|
|
!byte $F0,$03
|
2021-09-25 23:40:29 +00:00
|
|
|
!byte $4C
|
2021-06-19 02:06:12 +00:00
|
|
|
bcc @notPascal ; passport-test-suite/Wizplus.woz [C=0] matches
|
2021-09-25 23:40:29 +00:00
|
|
|
; passport-test-suite/PFS A02.woz [C=0] matches
|
2017-05-04 14:54:59 +00:00
|
|
|
;
|
|
|
|
; Apple Pascal 1.3 signature [thanks Marco V.]
|
|
|
|
;
|
2021-06-19 02:06:12 +00:00
|
|
|
; passport-test-suite/Triangles Through Octagons.woz [C=1] reaches here
|
2017-05-04 14:54:59 +00:00
|
|
|
jsr compare ; or if T00,S00,$00 ==
|
|
|
|
!byte $01
|
|
|
|
!byte $E0,$70
|
|
|
|
!byte $B0,$04
|
2021-09-30 01:18:11 +00:00
|
|
|
!byte $E0
|
2021-06-19 02:06:12 +00:00
|
|
|
@notPascal ; passport-test-suite/Triangles Through Octagons.woz [C=0] matches
|
2017-05-04 14:54:59 +00:00
|
|
|
}
|