mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-19 07:30:41 +00:00
Kernel 0.94
This commit is contained in:
parent
e774d6e44b
commit
ba1bb3996e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -41,86 +41,86 @@ XRW.START cld $D8 to flag language card bank 1 (main)
|
||||
lda XRW.montimeh
|
||||
bne .1
|
||||
*--------------------------------------
|
||||
L59BD jsr XRW.AllPhasesOff make sure all motor phases are off
|
||||
|
||||
lda IO.D2.ReadMode,x turn off write enable X = slot $S0
|
||||
nop
|
||||
nop
|
||||
|
||||
lda bloknml
|
||||
L59BD lda bloknml
|
||||
ldx bloknml+1
|
||||
stx XRW.ReqTrack calculate block's track and sector.
|
||||
|
||||
ldy #$05
|
||||
|
||||
.11 asl
|
||||
.1 asl
|
||||
rol XRW.ReqTrack
|
||||
dey
|
||||
bne .11
|
||||
bne .1
|
||||
|
||||
asl
|
||||
bcc .12
|
||||
bcc .2
|
||||
|
||||
ora #$10 adjust for upper 4 bits of track
|
||||
|
||||
.12 lsr
|
||||
.2 lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
sta XRW.ReqSector
|
||||
*--------------------------------------
|
||||
jsr XRW.AllPhasesOff make sure all motor phases are off
|
||||
|
||||
lda IO.D2.ReadMode,x turn off write enable X = slot $S0
|
||||
nop
|
||||
nop
|
||||
|
||||
jsr XRW.CheckMotorOn
|
||||
|
||||
php save test results
|
||||
lda #$E8
|
||||
php save motor on state : NZ if on
|
||||
|
||||
lda #$E8 24 up to 0
|
||||
sta XRW.montimeh
|
||||
|
||||
lda unitnum determine drive 1 or 2.
|
||||
cmp XRW.LastUnitUsed same drive used before ?
|
||||
cmp XRW.LastUnitUsed same slot/drive used before ?
|
||||
sta XRW.LastUnitUsed save it for next time.
|
||||
php keep results of compare.
|
||||
|
||||
asl get drive # into carry.
|
||||
lda IO.D2.DrvOn,x turn on the drive.
|
||||
bcc L5362 branch if drive 1 selected.
|
||||
bcc .3 branch if drive 1 selected.
|
||||
inx select drive 2.
|
||||
|
||||
L5362 lda IO.D2.DrvSel1,x
|
||||
.3 lda IO.D2.DrvSel1,x
|
||||
|
||||
ldx A2L
|
||||
lda IO.D2.DrvOn,x turn on the drive.
|
||||
|
||||
plp was it the same drive ?
|
||||
beq L5372 yes.
|
||||
beq .5 yes.
|
||||
|
||||
plp indicate drive off by setting z-flag.
|
||||
plp NZ: indicate drive off by setting z-flag.
|
||||
|
||||
ldy #7
|
||||
lda #0 150 ms delay before stepping.
|
||||
|
||||
.1 jsr XRW.Wait100usecA
|
||||
.4 jsr XRW.Wait100usecA
|
||||
dey
|
||||
bne .1
|
||||
bne .4
|
||||
|
||||
php
|
||||
php Z set
|
||||
|
||||
L5372 plp
|
||||
bne L538E
|
||||
.5 plp was motor on ?
|
||||
bne L538E if so, don't wait.
|
||||
|
||||
* motor was off, wait for it to speed up
|
||||
|
||||
L537F lda #1
|
||||
.6 lda #1
|
||||
jsr XRW.Wait100usecA wait 100us for each count in montime
|
||||
|
||||
lda XRW.montimeh
|
||||
bmi L537F count up to 0000
|
||||
bmi .6 count up to 0000
|
||||
|
||||
* motor should be up to speed,
|
||||
* if it looks stopped then the drive is not present
|
||||
|
||||
jsr XRW.CheckMotorOn is drive present ?
|
||||
beq XRW.E.ND
|
||||
|
||||
* now check: if it is not the status disk command,
|
||||
* locate the correct sector for this operation
|
||||
|
||||
*--------------------------------------
|
||||
L538E lda A4L get command #
|
||||
bne .1
|
||||
|
||||
@ -764,11 +764,11 @@ XRW.Seek ldx XRW.UnitIndex
|
||||
jsr XRW.WaitSeekTime
|
||||
|
||||
jsr XRW.AllPhasesOff
|
||||
jsr XRW.WaitSeekTime
|
||||
lda #40
|
||||
jsr XRW.Wait100usecA
|
||||
bra .1
|
||||
|
||||
.8 jsr XRW.Wait25600usec
|
||||
jsr XRW.Wait25600usec
|
||||
*--------------------------------------
|
||||
XRW.AllPhasesOff
|
||||
ldx A2L
|
||||
@ -790,6 +790,8 @@ XRW.QPhaseOn pha
|
||||
tay
|
||||
|
||||
lda IO.D2.Ph0On,x
|
||||
nop
|
||||
nop
|
||||
lda IO.D2.Ph0On,y
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -809,58 +811,70 @@ XRW.ReadAddr ldy #$FC
|
||||
|
||||
ldx A2L get slot #
|
||||
|
||||
L569D iny
|
||||
bne L56A5 counter LO
|
||||
.1 iny
|
||||
bne .2 counter LO
|
||||
|
||||
inc XRW.CheckSum counter HI
|
||||
beq rderr
|
||||
|
||||
L56A5 lda IO.D2.RData,x read nibl
|
||||
bpl L56A5 *** no page cross ***
|
||||
.2 lda IO.D2.RData,x read nibl
|
||||
bpl .2
|
||||
|
||||
L56AA cmp #$D5 address mark 1 ?
|
||||
bne L569D
|
||||
.3 cmp #$D5 address mark 1 ?
|
||||
bne .1
|
||||
|
||||
nop nibl delay
|
||||
|
||||
L56AF lda IO.D2.RData,x
|
||||
bpl L56AF *** no page cross ***
|
||||
.4 lda IO.D2.RData,x
|
||||
bpl .4
|
||||
|
||||
cmp #$AA address mark 2 ?
|
||||
bne L56AA if not, is it address mark 1 ?
|
||||
bne .3 if not, is it address mark 1 ?
|
||||
|
||||
ldy #$03 index for 4 byte read
|
||||
|
||||
L56BA lda IO.D2.RData,x
|
||||
bpl L56BA *** no page cross ***
|
||||
.5 lda IO.D2.RData,x
|
||||
bpl .5
|
||||
|
||||
cmp #$96 address mark 3 ?
|
||||
bne L56AA if not, is it address mark 1
|
||||
bne .3 if not, is it address mark 1
|
||||
|
||||
sei ???ALREADY DONE by XDOS.devmgr??? no interrupts until address is tested.
|
||||
lda #$00 init checksum
|
||||
|
||||
L56C6 sta XRW.CheckSum
|
||||
.6 sta XRW.CheckSum
|
||||
|
||||
L56C9 lda IO.D2.RData,x read 'odd bit' nibl
|
||||
bpl L56C9 *** no page cross ***
|
||||
.7 lda IO.D2.RData,x read 'odd bit' nibl
|
||||
bpl .7
|
||||
|
||||
rol align odd bits, '1' into lsb.
|
||||
sta XRW.Temp4x4 save them.
|
||||
|
||||
L56D2 lda IO.D2.RData,x read 'even bit' nibl
|
||||
bpl L56D2 *** no page cross ***
|
||||
.8 lda IO.D2.RData,x read 'even bit' nibl
|
||||
bpl .8
|
||||
|
||||
and XRW.Temp4x4 merge odd and even bits.
|
||||
sta XRW.AddrField.C,y store data byte.
|
||||
eor XRW.CheckSum
|
||||
dey
|
||||
bpl L56C6 loop on 4 data bytes.
|
||||
bpl .6 loop on 4 data bytes.
|
||||
|
||||
tay if final checksum non-zero,
|
||||
bne rderr then error.
|
||||
|
||||
.9 lda IO.D2.RData,x
|
||||
bpl .9
|
||||
|
||||
ldy XRW.UnitIndex Succesfull REad, update Drive table
|
||||
cmp #$DE
|
||||
bne rderr
|
||||
|
||||
.10 lda IO.D2.RData,x
|
||||
bpl .10
|
||||
|
||||
cmp #$AA
|
||||
bne rderr
|
||||
|
||||
ldy XRW.UnitIndex Succesfull Read, update Drive table
|
||||
|
||||
lda XRW.AddrField.V
|
||||
sta XRW.D2VolNum-1,y
|
||||
|
@ -1145,7 +1145,6 @@ TERMX.CLRSCR.1 ldy #24
|
||||
|
||||
TERMX.CLRSCR.2 sty .1+1
|
||||
|
||||
sta SET80STORE
|
||||
.1 cpx #$ff SELF MODIFIED
|
||||
beq .9
|
||||
jsr TERMX.SETUP.L1X
|
||||
@ -1153,6 +1152,9 @@ TERMX.CLRSCR.2 sty .1+1
|
||||
|
||||
bit bActive
|
||||
bpl .4
|
||||
|
||||
sta SET80STORE
|
||||
|
||||
sta SETPAGE2
|
||||
jsr .7
|
||||
|
||||
@ -1167,6 +1169,7 @@ TERMX.CLRSCR.2 sty .1+1
|
||||
|
||||
inx
|
||||
bra .1
|
||||
|
||||
.7 ldy #39
|
||||
.8 sta (ZPScrBaseL1),y
|
||||
dey
|
||||
@ -1296,7 +1299,9 @@ TERMX.COPY.XtoL1
|
||||
sta ZPScrBaseL2
|
||||
lda SCR.BASEH,x
|
||||
sta ZPScrBaseL2+1
|
||||
|
||||
sta SET80STORE
|
||||
|
||||
sta SETPAGE2
|
||||
jsr .6
|
||||
sta CLRPAGE2
|
||||
@ -1368,6 +1373,7 @@ SetCharAtY.SCR pha
|
||||
tay
|
||||
pla
|
||||
|
||||
sta SET80STORE
|
||||
sta CLRPAGE2
|
||||
bcs .2
|
||||
sta SETPAGE2
|
||||
|
@ -379,7 +379,7 @@ RWDRV.START cld ProDOS will check that byte!!!
|
||||
inc +1 for skipping Aux BANK 0
|
||||
plx move page into X
|
||||
|
||||
* php Disable IRQ as no vector set in RW Banks
|
||||
php Disable IRQ as no vector set in RW Banks
|
||||
sei
|
||||
|
||||
beq RWDRV.GOAUX move from/to aux page0/1
|
||||
@ -418,10 +418,6 @@ RWDRV.RW.DST sta ($FF),y
|
||||
iny
|
||||
bne RWDRV.RW.SRC
|
||||
|
||||
.HS 24 BIT Zero Page to skip RTS
|
||||
.LIST ON
|
||||
RWDRV.RTS rts $FF58 Must Be RTS
|
||||
.LIST OFF
|
||||
dec DRV.BUFF+1
|
||||
dec DRV.A2H
|
||||
dex
|
||||
@ -431,8 +427,7 @@ RWDRV.RTS rts $FF58 Must Be RTS
|
||||
sta CLRREADAUX
|
||||
sta CLRWRITEAUX
|
||||
|
||||
* plp
|
||||
cli
|
||||
plp
|
||||
|
||||
RMDRV.CMDSTATUS
|
||||
RWDRV.MAXLO ldx #$FF return device block count in X,Y...
|
||||
@ -597,10 +592,6 @@ RWDRVX.SIZE .EQ RWDRVX.B.END-RWDRVX.B.START
|
||||
*--------------------------------------
|
||||
* CONTROL SECTION :
|
||||
*--------------------------------------
|
||||
.DO RWDRV.RTS=$FF58
|
||||
.ELSE
|
||||
ERROR:RWDRV.RTS <> $FF58
|
||||
.FIN
|
||||
.DO RWDRV.SIZE>$9B
|
||||
ERROR:RWDRV.SIZE too big
|
||||
.FIN
|
||||
|
Loading…
x
Reference in New Issue
Block a user