mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-29 01:33:40 +00:00
Kernel version 0.9 : Changed timeout loop causing freeze with MAC Apple IIE Card
This commit is contained in:
parent
ed63d97fa0
commit
e6441b6b26
@ -57,7 +57,7 @@ SSC.CTL.B4800 .EQ %00001100
|
||||
SSC.CTL.B7200 .EQ %00001101
|
||||
SSC.CTL.B9600 .EQ %00001110
|
||||
SSC.CTL.B19200 .EQ %00001111
|
||||
SSC.CTL.B115200 .EQ %00010000
|
||||
SSC.CTL.B115200 .EQ %00000000
|
||||
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
@ -23,59 +23,32 @@ VSDRIVE.Init >LDAXI VSDRIVE.MSG0
|
||||
jsr PrintCStrAX
|
||||
|
||||
jsr VSDRIVE.Check
|
||||
bcc .1
|
||||
bcs .90
|
||||
|
||||
>LDAXI VSDRIVE.DRVKO
|
||||
jsr PrintCStrAX
|
||||
rts
|
||||
|
||||
lda #$C1
|
||||
|
||||
.1 jsr SSC.Detect
|
||||
bcc .2
|
||||
.1 lda #$C1 Self Modified
|
||||
|
||||
>LDAXI VSDRIVE.SSCKO
|
||||
jsr PrintCStrAX
|
||||
rts
|
||||
.2 jsr SSC.Detect
|
||||
bcs .99
|
||||
|
||||
.2 sta DRV+2 DRV.Slotn0
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
pha
|
||||
stx DRV+2 DRV.Slotn0
|
||||
sta .1+1 SlotCn
|
||||
|
||||
and #$0F
|
||||
pha slot n
|
||||
|
||||
>LDAXI VSDRIVE.SSCOK
|
||||
jsr PrintCStrAX
|
||||
|
||||
jsr VSDRIVE.Ping
|
||||
bcc .3
|
||||
|
||||
>LDAXI VSDRIVE.SRVKO
|
||||
jsr PrintCStrAX
|
||||
|
||||
lda DRV+2 DRV.Slotn0
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
ora #$C0
|
||||
inc
|
||||
cmp #$C8
|
||||
bne .1 Go try next SSC....
|
||||
|
||||
rts
|
||||
bcs .92
|
||||
|
||||
.3 >LDAXI VSDRIVE.SRVOK
|
||||
>LDAXI VSDRIVE.SRVOK
|
||||
jsr PrintCStrAX
|
||||
|
||||
jsr VSDRIVE.SetSlot
|
||||
bcc .4
|
||||
bcs .91
|
||||
|
||||
>LDAXI VSDRIVE.NOSLOT
|
||||
jsr PrintCStrAX
|
||||
rts
|
||||
|
||||
.4 pha save slot
|
||||
pha save slot
|
||||
pha 2 times
|
||||
>LDAXI VSDRIVE.DEVOK
|
||||
jsr PrintCStrAX
|
||||
@ -84,7 +57,26 @@ VSDRIVE.Init >LDAXI VSDRIVE.MSG0
|
||||
|
||||
>LDAXI VSDRIVE.OK
|
||||
jsr PrintCStrAX
|
||||
rts
|
||||
|
||||
.90 >LDAXI VSDRIVE.DRVKO
|
||||
jsr PrintCStrAX
|
||||
rts
|
||||
|
||||
.91 >LDAXI VSDRIVE.NOSLOT
|
||||
jsr PrintCStrAX
|
||||
rts
|
||||
|
||||
.92 >LDAXI VSDRIVE.SRVKO
|
||||
jsr PrintCStrAX
|
||||
|
||||
inc .1+1
|
||||
lda .1+1
|
||||
cmp #$C8
|
||||
bne .2 Go try next SSC....
|
||||
|
||||
.99 >LDAXI VSDRIVE.SSCKO
|
||||
jsr PrintCStrAX
|
||||
rts
|
||||
*--------------------------------------
|
||||
VSDRIVE.Check bit RRAMWRAMBNK2
|
||||
@ -111,26 +103,31 @@ SSC.Detect stz TmpPtr1
|
||||
lda (TmpPtr1),y
|
||||
cmp DEVSIG.Value,x
|
||||
bne .3
|
||||
|
||||
dex
|
||||
bpl .2
|
||||
lda TmpPtr1+1
|
||||
|
||||
lda TmpPtr1+1 A=SlotCN
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
tax
|
||||
tax X=SlotN0
|
||||
|
||||
stz SSC.RESET,x
|
||||
|
||||
lda #SSC.CTL.B115200+SSC.CTL.8D+SSC.CTL.1S+SSC.CMD.NOP
|
||||
pha zzzzzzz...
|
||||
pla
|
||||
|
||||
lda #SSC.CTL.CLKINT+SSC.CTL.B115200+SSC.CTL.8D+SSC.CTL.1S+SSC.CMD.NOP
|
||||
sta SSC.CTL,x
|
||||
|
||||
lda #SSC.CMD.RIRQDIS
|
||||
sta SSC.CMD,x
|
||||
txa
|
||||
lda TmpPtr1+1
|
||||
|
||||
clc
|
||||
rts
|
||||
rts X=SlotN0, A=SlotCN
|
||||
|
||||
.3 inc TmpPtr1+1 no match, try next slot....
|
||||
lda TmpPtr1+1
|
||||
@ -142,23 +139,28 @@ SSC.Detect stz TmpPtr1
|
||||
*--------------------------------------
|
||||
VSDRIVE.Ping ldx DRV+2 DRV.Slotn0
|
||||
|
||||
.1 lda SSC.STATUS,x
|
||||
bit #SSC.STATUS.TDRE Ready for transmit?
|
||||
beq .1
|
||||
|
||||
stz VSDRIVE.Ping.TO
|
||||
stz VSDRIVE.Ping.TO+1
|
||||
|
||||
ldy #10
|
||||
|
||||
.2 inc VSDRIVE.Ping.TO Wait.......
|
||||
.1 lda SSC.STATUS,x
|
||||
bit #SSC.STATUS.TDRE Ready for transmit?
|
||||
bne .2
|
||||
|
||||
inc VSDRIVE.Ping.TO Wait.......
|
||||
bne .1
|
||||
inc VSDRIVE.Ping.TO+1
|
||||
bne .2
|
||||
bne .1
|
||||
dey
|
||||
bne .2
|
||||
bne .1
|
||||
|
||||
lda #$C4 Send "D" (DIR)
|
||||
sec
|
||||
rts
|
||||
|
||||
ldy #10 10 retries...
|
||||
|
||||
.2 lda #$C4 Send "D" (DIR)
|
||||
sta SSC.DATA,x
|
||||
|
||||
stz VSDRIVE.Ping.TO
|
||||
@ -167,7 +169,13 @@ VSDRIVE.Ping ldx DRV+2 DRV.Slotn0
|
||||
.3 inc VSDRIVE.Ping.TO
|
||||
bne .4
|
||||
inc VSDRIVE.Ping.TO+1
|
||||
beq .9 Time Out.....
|
||||
bne .4
|
||||
|
||||
dey
|
||||
bne .2
|
||||
|
||||
sec
|
||||
rts Time Out.....
|
||||
|
||||
.4 lda SSC.STATUS,x
|
||||
and #SSC.STATUS.RDRF incoming char?
|
||||
@ -186,9 +194,7 @@ VSDRIVE.Ping ldx DRV+2 DRV.Slotn0
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
|
||||
|
||||
VSDRIVE.Ping.TO .BS 2
|
||||
*--------------------------------------
|
||||
* Find 2 free slots in DEVPTRS (D1 & D2)
|
||||
|
Loading…
Reference in New Issue
Block a user