mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-10 21:29:37 +00:00
IRQ, NSC, ACOS, CIFS, SRW
This commit is contained in:
parent
a336e2122f
commit
3880d48b57
Binary file not shown.
Binary file not shown.
|
@ -249,7 +249,7 @@ CORE.FWREF >LDA.G hFWRefBuf
|
|||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.Run lda #$0 RTS
|
||||
CORE.Run lda #$60 RTS
|
||||
sta (ZPCodeBufPtr)
|
||||
|
||||
jsr CORE.Cleanup
|
||||
|
@ -702,6 +702,41 @@ CORE.IsDigit10 cmp #'0'
|
|||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.CheckOP jsr CORE.GetCharNB
|
||||
bcs CORE.CheckCP.CSYN
|
||||
|
||||
cmp #'('
|
||||
bne CORE.CheckCP.CSYN
|
||||
|
||||
jsr CORE.GetNextCharNB skip (
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.CheckComma jsr CORE.GetCharNB
|
||||
bcs CORE.CheckCP.CSYN
|
||||
|
||||
cmp #','
|
||||
bne CORE.CheckCP.CSYN
|
||||
|
||||
jsr CORE.GetNextCharNB skip ,
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.CheckCP jsr CORE.GetCharNB
|
||||
bcs CORE.CheckCP.CSYN
|
||||
|
||||
cmp #')'
|
||||
bne CORE.CheckCP.CSYN
|
||||
|
||||
jsr CORE.GetNextCharNB skip )
|
||||
clc
|
||||
rts
|
||||
|
||||
CORE.CheckCP.CSYN
|
||||
lda #E.CSYN
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CORE.CheckCharNB
|
||||
cmp #C.SPACE
|
||||
beq .9
|
||||
|
|
|
@ -55,8 +55,8 @@ EXP.Eval.R lda EXP.AOPS
|
|||
bcs .21
|
||||
|
||||
jsr EXP.FNjmpX
|
||||
bcs .99
|
||||
|
||||
bcs .99
|
||||
bra .40
|
||||
|
||||
.21 jsr EXP.VARLookup
|
||||
|
|
|
@ -13,17 +13,17 @@ FN.KEY
|
|||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
FN.LEN jsr CORE.GetCharNB
|
||||
bcs .90
|
||||
|
||||
cmp #'('
|
||||
bne .90
|
||||
FN.LEN jsr CORE.CheckOP
|
||||
bcs .99
|
||||
|
||||
jsr EXP.Eval
|
||||
bcs .99
|
||||
|
||||
lda EXP.TYPE
|
||||
beq .91
|
||||
beq .90
|
||||
|
||||
jsr CORE.CheckCP
|
||||
bcs .99
|
||||
|
||||
ldx #0
|
||||
|
||||
|
@ -38,51 +38,30 @@ FN.LEN jsr CORE.GetCharNB
|
|||
clc
|
||||
rts
|
||||
|
||||
.90 lda #E.CSYN
|
||||
sec
|
||||
rts
|
||||
|
||||
.91 lda #E.TMISMATCH
|
||||
.90 lda #E.TMISMATCH
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
FN.LEFTd jsr CORE.GetCharNB
|
||||
bcs .90
|
||||
|
||||
cmp #'('
|
||||
bne .90
|
||||
|
||||
jsr CORE.GetNextCharNB skip (
|
||||
bcs .90
|
||||
FN.LEFTd jsr CORE.CheckOP
|
||||
bcs .99
|
||||
|
||||
jsr EXP.Eval
|
||||
bcs .99
|
||||
|
||||
lda EXP.TYPE
|
||||
beq .91
|
||||
beq .90
|
||||
|
||||
jsr CORE.GetCharNB
|
||||
bcs .90
|
||||
|
||||
cmp #','
|
||||
bne .90
|
||||
|
||||
jsr CORE.GetNextCharNB skip ,
|
||||
bcs .90
|
||||
jsr CORE.CheckComma
|
||||
bcs .99
|
||||
|
||||
jsr EXP.Eval
|
||||
bcs .99
|
||||
|
||||
lda EXP.TYPE
|
||||
bne .91
|
||||
|
||||
jsr CORE.GetCharNB
|
||||
bcs .90
|
||||
|
||||
cmp #')'
|
||||
bne .90
|
||||
|
||||
jsr CORE.GetNextCharNB skip )
|
||||
jsr CORE.CheckCP
|
||||
bcs .99
|
||||
|
||||
ldx #0
|
||||
|
||||
|
@ -98,11 +77,7 @@ FN.LEFTd jsr CORE.GetCharNB
|
|||
clc
|
||||
rts
|
||||
|
||||
.90 lda #E.CSYN
|
||||
sec
|
||||
rts
|
||||
|
||||
.91 lda #E.TMISMATCH
|
||||
.90 lda #E.TMISMATCH
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
|
@ -112,10 +87,76 @@ FN.PEEK
|
|||
FN.RANDOM
|
||||
FN.RIGHTd
|
||||
FN.RNDd
|
||||
FN.STRd
|
||||
lda #E.CSYN
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
FN.STRd jsr CORE.CheckOP
|
||||
bcs .99
|
||||
|
||||
jsr EXP.Eval
|
||||
bcs .99
|
||||
|
||||
lda EXP.TYPE
|
||||
bne .90
|
||||
|
||||
jsr CORE.CheckCP
|
||||
bcs .99
|
||||
|
||||
ldx #0
|
||||
|
||||
.1 lda CCODE.STR,x
|
||||
jsr CODE.EmitByte
|
||||
inx
|
||||
cpx #CCODE.STR.LEN
|
||||
bne .1
|
||||
|
||||
lda #'$'
|
||||
sta EXP.TYPE
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.90 lda #E.TMISMATCH
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
FN.TIMEd
|
||||
FN.VAL
|
||||
lda #E.CSYN
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
FN.VAL jsr CORE.CheckOP
|
||||
bcs .99
|
||||
|
||||
jsr EXP.Eval
|
||||
bcs .99
|
||||
|
||||
lda EXP.TYPE
|
||||
beq .90
|
||||
|
||||
jsr CORE.CheckCP
|
||||
bcs .99
|
||||
|
||||
ldx #0
|
||||
|
||||
.1 lda CCODE.VAL,x
|
||||
jsr CODE.EmitByte
|
||||
inx
|
||||
cpx #CCODE.VAL.LEN
|
||||
bne .1
|
||||
|
||||
stz EXP.TYPE
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.90 lda #E.TMISMATCH
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
FN.WHENd
|
||||
*--------------------------------------
|
||||
FN.WIDTH
|
||||
lda #E.CSYN
|
||||
sec
|
||||
|
|
|
@ -501,6 +501,22 @@ CCODE.LEFT >PULLW ZPPtr2 cnt
|
|||
.8
|
||||
|
||||
CCODE.LEFT.LEN .EQ *-CCODE.LEFT
|
||||
*--------------------------------------
|
||||
CCODE.STR >PULLYA int
|
||||
pha
|
||||
>PUSHW ZPStrBuf
|
||||
>PUSHW L.MSG.INT16
|
||||
pla
|
||||
>PUSHYA
|
||||
>PUSHBI 2
|
||||
>SYSCALL sprintf
|
||||
>PUSHW ZPStrBuf
|
||||
CCODE.STR.LEN .EQ *-CCODE.STR
|
||||
*--------------------------------------
|
||||
CCODE.VAL >PULLYA str
|
||||
>SYSCALL atoi
|
||||
>PUSHYA
|
||||
CCODE.VAL.LEN .EQ *-CCODE.VAL
|
||||
*--------------------------------------
|
||||
.INB usr/src/bin/acos.s.code
|
||||
.INB usr/src/bin/acos.s.core
|
||||
|
|
|
@ -262,31 +262,32 @@ NSC.Write php
|
|||
.8 plp
|
||||
rts
|
||||
*--------------------------------------
|
||||
NSC.Select sta $C300
|
||||
NSC.Select
|
||||
* sta $C300
|
||||
lda $C00B Workaround for Ultrawarp bug
|
||||
|
||||
lda $C304 Reset DS1216E comparison register with READ A2=1
|
||||
|
||||
ldx #8 Read 8 bytes...
|
||||
ldy #8 Read 8 bytes...
|
||||
|
||||
.3 lda DS1216E.PATTERN-1,x
|
||||
phx
|
||||
ldx #8 ....of 8 bits
|
||||
.3 lda DS1216E.PATTERN-1,y
|
||||
phy
|
||||
|
||||
.4 ldy #0
|
||||
ldy #8 ....of 8 bits
|
||||
|
||||
.4 ldx #0
|
||||
lsr
|
||||
bcc .5
|
||||
|
||||
iny
|
||||
inx
|
||||
|
||||
.5 pha
|
||||
lda $C300,y Write Pattern bit in A0, with A2=0
|
||||
pla
|
||||
dex
|
||||
.5 bit $C300,x Write Pattern bit in A0, with A2=0
|
||||
|
||||
dey
|
||||
bne .4
|
||||
|
||||
plx
|
||||
dex
|
||||
ply
|
||||
dey
|
||||
bne .3
|
||||
|
||||
rts
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
NEW
|
||||
AUTO 3,1
|
||||
*--------------------------------------
|
||||
IO.D2.SeekTimeR .EQ 58 LIBBLKDEV Recalibration
|
||||
IO.D2.SeekTimeF .EQ 58 LIBBLKDEV Track Formatter
|
||||
IO.D2.SeekTimeB .EQ 58 LIBBLKDEV Boot Block
|
||||
IO.D2.SeekTimeP .EQ 58 ProDOS.FX initial
|
||||
IO.D2.SeekTimeR .EQ 28 LIBBLKDEV Recalibration
|
||||
IO.D2.SeekTimeF .EQ 28 LIBBLKDEV Track Formatter
|
||||
IO.D2.SeekTimeB .EQ 28 LIBBLKDEV Boot Block
|
||||
IO.D2.SeekTimeP .EQ 28 ProDOS.FX initial
|
||||
IO.D2.SeekTimeI .EQ 10 ProDOS.FX increment -> until > 128
|
||||
*--------------------------------------
|
||||
IO.D2.Ph0Off .EQ $C080
|
||||
|
|
|
@ -390,17 +390,18 @@ BB.Seek lda BB.HdrTrk get track we're on
|
|||
cmp BB.TargetQTrack
|
||||
bne .3
|
||||
|
||||
lsr CS if X,Y on
|
||||
|
||||
lda #0
|
||||
jsr BB.Wait100usecA
|
||||
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
ldy BB.Slotn0
|
||||
lda IO.D2.DrvOn,y
|
||||
bcc .90
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
|
||||
lda IO.D2.DrvOn,y
|
||||
.90
|
||||
*--------------------------------------
|
||||
BB.Read ldx BB.Slotn0
|
||||
|
||||
|
|
|
@ -85,7 +85,6 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
|||
|
||||
jsr D2.SeekPhOnY we are on 0/4 or 2/4 track
|
||||
|
||||
lda #1
|
||||
bra .9 no wait, next operation will be phy/plx/Ph0On,y
|
||||
|
||||
.1 cmp D2.TargetQTrack we are on 1/4 or 3/4
|
||||
|
@ -129,24 +128,23 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
|||
|
||||
.8 lda #IO.D2.SeekTimeF
|
||||
|
||||
.9 jsr D2.Wait100usecA ...wait...
|
||||
jsr D2.Wait100usecA ...wait...
|
||||
|
||||
lda D2.CurrentQTrack
|
||||
.9 lda D2.CurrentQTrack
|
||||
cmp D2.TargetQTrack
|
||||
bne .3
|
||||
|
||||
lsr CS if X,Y on
|
||||
|
||||
jsr D2.Wait25600usec
|
||||
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
ldy D2.Slotn0
|
||||
lda IO.D2.DrvOn,y
|
||||
bcc .90
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
|
||||
lda IO.D2.DrvOn,y
|
||||
|
||||
rts
|
||||
.90 rts
|
||||
|
||||
D2.SeekPhOnY and #6
|
||||
ora D2.Slotn0
|
||||
|
|
|
@ -530,7 +530,7 @@ CIFS2.FOpen jsr ReadSocket
|
|||
|
||||
jsr CheckSMBStatus
|
||||
bcs .90
|
||||
>DEBUG
|
||||
|
||||
>LDYAI S.FD.REG
|
||||
>SYSCALL2 GetMem
|
||||
bcs .91
|
||||
|
@ -569,13 +569,14 @@ CIFS2.FOpen jsr ReadSocket
|
|||
>SYSCALL2 mknod
|
||||
|
||||
.91 jsr FreeRespData
|
||||
|
||||
stz CIFS.Status
|
||||
bra .90
|
||||
|
||||
.9 jsr Exit.NODATA
|
||||
beq .99
|
||||
|
||||
.90 >POP 6
|
||||
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CIFS.FClose jsr GetPFD
|
||||
|
@ -631,22 +632,82 @@ CIFS2.FClose sta hFILE
|
|||
lda hFILE
|
||||
jsr CIFS.CloseDir
|
||||
|
||||
lda hResp
|
||||
>SYSCALL2 FreeMem
|
||||
|
||||
jmp Exit.OK
|
||||
|
||||
.9 jmp Exit.NODATA
|
||||
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CIFS.FRead
|
||||
clc
|
||||
>RET 5
|
||||
CIFS.FRead ldy #4 hNod
|
||||
lda (pStack),y
|
||||
|
||||
jsr GetPFD
|
||||
|
||||
jsr GetCtx
|
||||
|
||||
ldx #S.SMB.H.CMD.READ.ANDX
|
||||
jsr RequestSetupX
|
||||
|
||||
ldx #0
|
||||
|
||||
.1 lda SMB.ComRead.H,x
|
||||
sta (ZPReqPtr),y
|
||||
iny
|
||||
inx
|
||||
cpx #SMB.ComRead.H.Len
|
||||
bne .1
|
||||
|
||||
jsr ReqSetupPtr2
|
||||
|
||||
ldy #S.FD.REG.REF
|
||||
lda (pFD),y
|
||||
pha
|
||||
iny
|
||||
lda (pFD),y
|
||||
|
||||
ldy #S.NETBIOS+S.SMB.H+6 FileID
|
||||
sta (ZPReqPtr),y
|
||||
pla
|
||||
dey
|
||||
sta (ZPReqPtr),y
|
||||
|
||||
|
||||
|
||||
jsr SetReqLen
|
||||
|
||||
jsr WriteSocket
|
||||
bcs .9
|
||||
|
||||
jmp Sleep
|
||||
|
||||
.9 >RET 5
|
||||
*--------------------------------------
|
||||
CIFS2.FRead
|
||||
CIFS2.FRead jsr ReadSocket
|
||||
bcs .9
|
||||
|
||||
jsr GetRespData
|
||||
|
||||
jsr CheckSMBStatus
|
||||
bcs .90
|
||||
|
||||
lda hResp
|
||||
>SYSCALL2 FreeMem
|
||||
|
||||
ldy #1
|
||||
lda (pStack),y
|
||||
ora (pStack)
|
||||
clc
|
||||
>RET 5
|
||||
beq .90
|
||||
|
||||
stz CIFS.Status Back to CIFS.FRead for next chunk
|
||||
|
||||
jmp Sleep2
|
||||
|
||||
.9 jsr Exit.NODATA
|
||||
beq .99
|
||||
|
||||
.90 >POP 5
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CIFS.FWrite ldy #4 hNod
|
||||
lda (pStack),y
|
||||
|
@ -785,6 +846,8 @@ CIFS2.FWrite jsr ReadSocket
|
|||
clc
|
||||
beq .90
|
||||
|
||||
stz CIFS.Status Back to CIFS.FWrite for next chunk
|
||||
|
||||
jmp Sleep2
|
||||
|
||||
.9 jsr Exit.NODATA
|
||||
|
@ -924,7 +987,8 @@ CIFS2.Rename jsr ReadSocket
|
|||
jsr CheckSMBStatus
|
||||
bcs .99
|
||||
|
||||
jmp Exit.OK
|
||||
jsr Exit.OK
|
||||
bra .99
|
||||
|
||||
.9 jmp Exit.NODATA
|
||||
|
||||
|
|
|
@ -1181,12 +1181,12 @@ SMB.ComRead.H .DA #10 WORD COUNT
|
|||
.HS FF000000 NO MORE CMD
|
||||
.BS 2 FID
|
||||
.BS 4 Offset
|
||||
.BS 2 MaxCountOfBytesToReturn
|
||||
.HS 0001 MaxCountOfBytesToReturn
|
||||
.HS 0000 MinCountOfBytesToReturn
|
||||
.HS 00000000 Timeout
|
||||
.HS 0000 Remaining
|
||||
.HS 0000 ByteCount
|
||||
SMB.ComRead.H.Len .EQ *-SMB.ComRead.H
|
||||
* .BS 2 ByteCount
|
||||
*--------------------------------------
|
||||
SMB.ComWrite.H .DA #12 WORD COUNT
|
||||
.HS FF000000 NO MORE CMD
|
||||
|
|
|
@ -12,8 +12,8 @@ IRQ ldx #$FA save 6 bytes of page 0
|
|||
inx
|
||||
bne .2
|
||||
|
||||
lda mslot
|
||||
sta IRQ.DoneCn+2
|
||||
* lda mslot
|
||||
* sta IRQ.DoneCn+2
|
||||
|
||||
* ldx #0
|
||||
|
||||
|
@ -57,11 +57,11 @@ IRQ.Done ldx #$FA
|
|||
inx
|
||||
bne .1
|
||||
|
||||
lda CLRC8ROM
|
||||
* lda CLRC8ROM
|
||||
|
||||
IRQ.DoneCn lda $C100 SELF MODIFIED
|
||||
lda IRQ.DoneCn+2
|
||||
sta mslot
|
||||
*IRQ.DoneCn lda $C100 SELF MODIFIED
|
||||
* lda IRQ.DoneCn+2
|
||||
* sta mslot
|
||||
|
||||
rti
|
||||
*--------------------------------------
|
||||
|
|
|
@ -354,11 +354,12 @@ LDR.LCBNK1 lda RRAMWRAMBNK1 switch in LC bank 1
|
|||
DS1216E.DATA1 .EQ idxl
|
||||
DS1216E.DATA2 .EQ A1L
|
||||
*--------------------------------------
|
||||
LDR.ClkDevScan lda RDCXROM
|
||||
|
||||
php
|
||||
LDR.ClkDevScan php
|
||||
sei
|
||||
|
||||
lda RDCXROM
|
||||
php
|
||||
|
||||
sta SETCXROM
|
||||
|
||||
sta $C300
|
||||
|
@ -376,32 +377,34 @@ LDR.ClkDevScan lda RDCXROM
|
|||
|
||||
dex
|
||||
bne .1
|
||||
|
||||
sta $C300
|
||||
*--------------------------------------
|
||||
* sta $C300
|
||||
lda $C00B Workaround for Ultrawarp bug
|
||||
|
||||
lda $C304 Reset DS1216E comparison register with READ A2=1
|
||||
|
||||
ldx #8 Read 8 bytes...
|
||||
ldy #8 Read 8 bytes...
|
||||
|
||||
.3 ldy #8 ....of 8 bits
|
||||
.3 lda DS1216E.SIG-1,x
|
||||
phy
|
||||
|
||||
lda DS1216E.SIG-1,x
|
||||
ldy #8 ....of 8 bits
|
||||
|
||||
.4 lsr
|
||||
bcs .5
|
||||
.4 ldx #0
|
||||
lsr
|
||||
bcc .5
|
||||
|
||||
bit $C300
|
||||
bra .50
|
||||
inx
|
||||
|
||||
.5 bit $C301 Write Pattern bit in A0, with A2=0
|
||||
.5 bit $C300,x Write Pattern bit in A0, with A2=0
|
||||
|
||||
.50 dey
|
||||
dey
|
||||
bne .4
|
||||
|
||||
dex
|
||||
ply
|
||||
dey
|
||||
bne .3
|
||||
|
||||
*--------------------------------------
|
||||
ldx #8
|
||||
|
||||
.6 ldy #8
|
||||
|
@ -421,7 +424,9 @@ LDR.ClkDevScan lda RDCXROM
|
|||
|
||||
sta CLRCXROM
|
||||
|
||||
.8 ldx #8
|
||||
.8 plp
|
||||
|
||||
ldx #8
|
||||
|
||||
.9 lda DS1216E.DATA1-1,x
|
||||
cmp DS1216E.DATA2-1,x
|
||||
|
|
|
@ -7,36 +7,39 @@ NEW
|
|||
*--------------------------------------
|
||||
DS1216E.DATA .EQ $200 Reverted YY MM DD Day HH mm SS CS
|
||||
*--------------------------------------
|
||||
NCLK.START lda RDCXROM
|
||||
|
||||
php
|
||||
NCLK.START php
|
||||
sei NO IRQ !!!
|
||||
|
||||
lda RDCXROM
|
||||
php
|
||||
|
||||
sta SETCXROM
|
||||
|
||||
sta $C300
|
||||
* sta $C300
|
||||
lda $C00B Workaround for Ultrawarp bug
|
||||
|
||||
lda $C304 Reset DS1216E comparison register with READ A2=1
|
||||
|
||||
ldx #8 Read 8 bytes...
|
||||
ldy #8 Read 8 bytes...
|
||||
|
||||
.1 ldy #8 ....of 8 bits
|
||||
.1 lda DS1216E.PATTERN-1,y
|
||||
phy
|
||||
|
||||
lda DS1216E.PATTERN-1,x
|
||||
ldy #8 ....of 8 bits
|
||||
|
||||
.2 lsr
|
||||
bcs .3
|
||||
.2 ldx #0
|
||||
lsr
|
||||
bcc .3
|
||||
|
||||
bit $C300
|
||||
bra .30
|
||||
inx
|
||||
|
||||
.3 bit $C301 Write Pattern bit in A0, with A2=0
|
||||
.3 bit $C300,x Write Pattern bit in A0, with A2=0
|
||||
|
||||
.30 dey
|
||||
dey
|
||||
bne .2
|
||||
|
||||
dex
|
||||
ply
|
||||
dey
|
||||
bne .1
|
||||
|
||||
ldx #8
|
||||
|
@ -102,7 +105,8 @@ NCLK.START lda RDCXROM
|
|||
|
||||
sta CLRCXROM
|
||||
|
||||
.8 rts
|
||||
.8 plp
|
||||
rts
|
||||
*--------------------------------------
|
||||
DS1216E.PATTERN .HS 5CA33AC55CA33AC5 Reverted 7->0
|
||||
*--------------------------------------
|
||||
|
|
|
@ -785,7 +785,6 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
|||
|
||||
jsr XRW.SeekPhOnY we are on 0/4 or 2/4 track : PhY on
|
||||
|
||||
lda #1
|
||||
bra .9 no wait, next operation will be phy/plx/Ph0On,y
|
||||
|
||||
.1 cmp XRW.TargetQTrack we are on 1/4 or 3/4
|
||||
|
@ -829,23 +828,23 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
|||
|
||||
.8 lda XRW.SeekTime
|
||||
|
||||
.9 jsr XRW.Wait100usecA ...wait...
|
||||
jsr XRW.Wait100usecA ...wait...
|
||||
|
||||
lda XRW.CurrentQTrack
|
||||
.9 lda XRW.CurrentQTrack
|
||||
cmp XRW.TargetQTrack
|
||||
bne .3
|
||||
|
||||
lsr CS if X,Y on
|
||||
|
||||
jsr XRW.Wait25600usec
|
||||
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
ldy A2L
|
||||
lda IO.D2.DrvOn,y
|
||||
bcc .90
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
|
||||
lda IO.D2.DrvOn,y
|
||||
clc Exit wit CC (recalibrate)
|
||||
.90 clc Exit wit CC (recalibrate)
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.SeekPhOnY and #6
|
||||
|
|
|
@ -52,14 +52,15 @@ NSC.Print sty TmpPtr1
|
|||
DS1216E.DATA1 .EQ $10
|
||||
DS1216E.DATA2 .EQ $18
|
||||
*--------------------------------------
|
||||
NSC.Detect lda RDCXROM
|
||||
|
||||
php
|
||||
NSC.Detect php
|
||||
sei
|
||||
|
||||
lda RDCXROM
|
||||
php
|
||||
|
||||
sta SETCXROM
|
||||
|
||||
sta $C300
|
||||
* sta $C300
|
||||
lda $C00B Workaround for Ultrawarp bug
|
||||
|
||||
ldx #8
|
||||
|
@ -75,40 +76,40 @@ NSC.Detect lda RDCXROM
|
|||
dex
|
||||
bne .1
|
||||
|
||||
sta $C300
|
||||
* sta $C300
|
||||
lda $C00B Workaround for Ultrawarp bug
|
||||
|
||||
lda $C304 Reset DS1216E comparison register with READ A2=1
|
||||
|
||||
ldx #8 Read 8 bytes...
|
||||
ldy #8 Read 8 bytes...
|
||||
|
||||
.3 ldy #8 ....of 8 bits
|
||||
.3 lda DS1216E.PATTERN-1,x
|
||||
phy
|
||||
|
||||
lda DS1216E.PATTERN-1,x
|
||||
ldy #8 ....of 8 bits
|
||||
|
||||
.4 lsr
|
||||
bcs .5
|
||||
.4 ldx #0
|
||||
lsr
|
||||
bcc .5
|
||||
|
||||
bit $C300
|
||||
bra .50
|
||||
inx
|
||||
|
||||
.5 bit $C301 Write Pattern bit in A0, with A2=0
|
||||
.5 bit $C300,x Write Pattern bit in A0, with A2=0
|
||||
|
||||
.50 dey
|
||||
dey
|
||||
bne .4
|
||||
|
||||
dex
|
||||
ply
|
||||
dey
|
||||
bne .3
|
||||
|
||||
*--------------------------------------
|
||||
ldx #8
|
||||
|
||||
.6 ldy #8
|
||||
|
||||
.7 lda $C304
|
||||
|
||||
lsr
|
||||
ror DS1216E.DATA2-1,x
|
||||
|
||||
dey
|
||||
bne .7
|
||||
|
||||
|
@ -120,7 +121,9 @@ NSC.Detect lda RDCXROM
|
|||
|
||||
sta CLRCXROM
|
||||
|
||||
.8 ldx #8
|
||||
.8 plp
|
||||
*--------------------------------------
|
||||
ldx #8
|
||||
|
||||
.81 lda DS1216E.DATA1-1,x
|
||||
cmp DS1216E.DATA2-1,x
|
||||
|
@ -129,7 +132,7 @@ NSC.Detect lda RDCXROM
|
|||
dex
|
||||
bne .81
|
||||
|
||||
sec
|
||||
* sec from CMP
|
||||
rts
|
||||
|
||||
.9 clc
|
||||
|
|
Loading…
Reference in New Issue
Block a user