mirror of
https://github.com/a2-4am/passport.git
synced 2024-05-28 21:41:27 +00:00
70 lines
1.9 KiB
Plaintext
Executable File
70 lines
1.9 KiB
Plaintext
Executable File
;-------------------------------
|
|
; #DISKVOL
|
|
; non-standard disk volume prevents
|
|
; disk from loading its own files
|
|
; or even its own DOS
|
|
;-------------------------------
|
|
!zone {
|
|
; gTrack = 0
|
|
; Caller found DOS 3.3 RWTS
|
|
|
|
lda #$01
|
|
ldx #$EE
|
|
tay
|
|
jsr compare ; and T00,S01,$EE ==
|
|
!byte $FB
|
|
bcs .exit
|
|
|
|
ldx #$FB
|
|
ldy #$04
|
|
jsr compare ; and T00,S01,$FB ==
|
|
!byte $00,$01,$EF,$D8
|
|
bcs .exit
|
|
|
|
lda gForceDiskVol
|
|
beq .yes ; passport-test-suite/Might and Magic.woz [Z=1] matches
|
|
|
|
lda gIsPanglosDOS
|
|
ora gCapturedDiskVolumeNumber
|
|
bne +
|
|
lda gDiskVolumeNumber
|
|
cmp #$FE
|
|
bne .yes
|
|
+
|
|
ldx #$EB
|
|
jsr compare1 ; and T00,S01,$EB !=
|
|
!byte $FE
|
|
bcc .exit
|
|
jsr compare1 ; and T00,S01,$EB !=
|
|
!byte $00
|
|
bcc .exit
|
|
.yes
|
|
lda #$08
|
|
ldx #$10
|
|
ldy #$05
|
|
jsr compare ; and T00,S08,$10 ==
|
|
!byte $A0,$03 ; LDY #$03
|
|
!byte $B1,$48 ; LDA ($48),Y
|
|
!byte $48 ; PHA
|
|
bcc .veryyes ; passport-test-suite/The Incredible Laboratory.woz [C=0] matches
|
|
|
|
ldx #$16 ; or T00,S08,$16 == the same thing
|
|
; (variation used by PanglosDOS)
|
|
jsr compare ; preserves A/X/Y
|
|
!byte $A0,$03
|
|
!byte $B1,$48
|
|
!byte $48
|
|
bcs .exit
|
|
|
|
.veryyes
|
|
jsr PrintByID ; preserves registers
|
|
!byte s_diskvol
|
|
|
|
lda #$08
|
|
inx
|
|
inx ; now $12 or $18 (depending on which compare matched)
|
|
jsr modify2 ; then set T00,S08,$12/18 =
|
|
!byte $A9,$00 ; LDA #$00
|
|
.exit
|
|
}
|