mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-27 09:34:38 +00:00
Kernel version 0.9 : Implementing Block Device Support
This commit is contained in:
parent
89058db18a
commit
89f0b22a7a
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
@ -125,11 +125,6 @@ CS.RUN ldy #bCANCEL
|
||||
lda (pData),y
|
||||
bmi .99
|
||||
|
||||
ldy #bSTOP
|
||||
lda (pData),y
|
||||
bmi .8
|
||||
|
||||
|
||||
|
||||
|
||||
.8 clc
|
||||
@ -139,42 +134,7 @@ CS.RUN ldy #bCANCEL
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
|
||||
lda (pEvent),y
|
||||
ldy #S.PS.hStdIn
|
||||
cmp (pPs),y
|
||||
bne .9
|
||||
|
||||
lda (pEvent)
|
||||
and #S.EVT.F.KEY is it a KEY event?
|
||||
beq .9
|
||||
|
||||
ldy #S.EVT.DATAHI is it an O or SAPPLE key ?
|
||||
lda (pEvent),y
|
||||
bne .9
|
||||
|
||||
ldy #S.EVT.DATALO
|
||||
lda (pEvent),y
|
||||
cmp #$03 Ctrl-C
|
||||
bne .1
|
||||
|
||||
lda #$FF
|
||||
ldy #bCANCEL
|
||||
sta (pData),y
|
||||
bra .8
|
||||
|
||||
.1 cmp #$13 Ctrl-S
|
||||
bne .8
|
||||
|
||||
ldy #bSTOP
|
||||
lda (pData),y
|
||||
eor #$FF
|
||||
sta (pData),y
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
|
||||
.9 sec
|
||||
CS.DOEVENT sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT lda hLIBBLKDEV
|
||||
@ -190,9 +150,9 @@ CS.END
|
||||
OptionList >PSTR "L"
|
||||
OptionVars .DA #bLL
|
||||
*--------------------------------------
|
||||
MSG.USAGE >CSTR "Usage : FORMAT <BLOCKDEV> [VOLUME.NAME]\n -L : Low-Level Format\n"
|
||||
MSG.OK >CSTR "[OK]\n"
|
||||
MSG.ERR >CSTR "[%h]\n"
|
||||
MSG.USAGE >CSTR "Usage : FORMAT <BLOCKDEV> [VOLUME.NAME]\r\n -L : Low-Level Format\r\n"
|
||||
MSG.OK >CSTR "[OK]\r\n"
|
||||
MSG.ERR >CSTR "[%h]\r\n"
|
||||
*--------------------------------------
|
||||
LIBBLKDEV >PSTR "libblkdev.o"
|
||||
DefaultVolName >PSTR "BLANK"
|
||||
@ -206,7 +166,6 @@ DS.START
|
||||
VolName .BS 16
|
||||
DevName .BS 4
|
||||
bCANCEL .BS 1
|
||||
bSTOP .BS 1
|
||||
bLL .BS 1
|
||||
DS.END
|
||||
.ED
|
||||
|
@ -75,9 +75,13 @@ L.TrkWriter .DA TrkWriter
|
||||
L.ProDOS.Boot .DA ProDOS.Boot
|
||||
.DA 0
|
||||
*/--------------------------------------
|
||||
* In PUSHW = DevSize (in 512b blocks)
|
||||
* Out: X=BlockCount (max 22)
|
||||
* A=PageCount (max 44)
|
||||
* #GetProDOSCatSize
|
||||
* Compute space needed for ProDOS Catalog
|
||||
* ##In :
|
||||
* PUSHW = DevSize (in 512b blocks)
|
||||
* ##Out :
|
||||
* X=BlockCount (max 22)
|
||||
* A=PageCount (max 44)
|
||||
*\--------------------------------------
|
||||
GetProDOSCatSize
|
||||
>PULLAX A=DevSizeLo
|
||||
@ -105,18 +109,19 @@ GetProDOSCatSizeAX
|
||||
asl A = Total pages needed to build catalog.
|
||||
rts
|
||||
*/--------------------------------------
|
||||
* BuildProDOSCat
|
||||
* In: PUSHW = DevSize (in 512b blocks)
|
||||
* PUSHW = VolName (PSTR)
|
||||
* PUSHW = DstBuf (Zero filled)
|
||||
* Blk0 : ProDOS.BootBlk
|
||||
* Blk1 : SOS.BootBlk
|
||||
* Blk2,3,4,5 : Volume Directory
|
||||
* Blk6.... : Volume Bitmap (4096/Blk)
|
||||
* max devSize = 65535 -> max 16 Bitmap Blk
|
||||
* absolute MAX DstBuf size=
|
||||
* 7 for Disk II(280blk),3.5(1600),3.5HD(2880)
|
||||
* 22 for 32mb Hardisk...
|
||||
* #BuildProDOSCat
|
||||
* ##In :
|
||||
* PUSHW = DevSize (in 512b blocks)
|
||||
* PUSHW = VolName (PSTR)
|
||||
* PUSHW = DstBuf (Zero filled)
|
||||
* Blk0 : ProDOS.BootBlk
|
||||
* Blk1 : SOS.BootBlk
|
||||
* Blk2,3,4,5 : Volume Directory
|
||||
* Blk6.... : Volume Bitmap (4096/Blk)
|
||||
* max devSize = 65535 -> max 16 Bitmap Blk
|
||||
* absolute MAX DstBuf size=
|
||||
* 7 for Disk II(280blk),3.5(1600),3.5HD(2880)
|
||||
* 22 for 32mb Hardisk...
|
||||
*\--------------------------------------
|
||||
BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
||||
>PULLW ZPPtr2 VolName
|
||||
|
@ -342,7 +342,7 @@ DevMgrInit.SP ldy #$ff
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
DevMgrInit.DII
|
||||
DevMgrInit.DII
|
||||
rts
|
||||
*--------------------------------------
|
||||
DevMgrInit.BLK
|
||||
@ -353,8 +353,19 @@ DevMgrInit.AddDev
|
||||
inc DevMgr.Count
|
||||
jsr K.GetDevByIDA
|
||||
>STYA ZPPtr1
|
||||
|
||||
ldy #S.DEV-1
|
||||
|
||||
.1 lda SP.DEV,y
|
||||
sta (ZPPtr1),y
|
||||
dey
|
||||
bne .1
|
||||
rts
|
||||
*--------------------------------------
|
||||
SP.DEV .BS 2 JMP
|
||||
.DA #S.DEV.S.BLOCK S
|
||||
>PSTR "S1D1" 5 bytes
|
||||
*--------------------------------------
|
||||
SmartPort.OFS .HS 07010305
|
||||
SmartPort.SIG .HS 00200003
|
||||
*--------------------------------------
|
||||
@ -369,10 +380,6 @@ SP.DEV.STATUS .DA #3
|
||||
SP.STATUS1 .BS 4
|
||||
SP.STATUS2 .BS S.DEVSTAT
|
||||
*--------------------------------------
|
||||
SP.DEV .BS 2 JMP
|
||||
.BS 1 S
|
||||
>PSTR "S1D1" 5 bytes
|
||||
*--------------------------------------
|
||||
SP.DRV cld
|
||||
ldy #7
|
||||
lda (pDev),y
|
||||
@ -382,6 +389,17 @@ SP.DRV.lo ldy #$ff
|
||||
SP.DRV.hi lda #$ff
|
||||
jmp A2osX.PRTCALL
|
||||
*--------------------------------------
|
||||
DII.DRV cld
|
||||
lda #$ff DSSS0000
|
||||
cpx #DEVMGR.CONTROL
|
||||
bcs .9
|
||||
|
||||
|
||||
|
||||
|
||||
.9 lda #MLI.ERR.BADCALL
|
||||
rts
|
||||
*--------------------------------------
|
||||
BLK.DRV
|
||||
*--------------------------------------
|
||||
EvtMgrInit lda #$A5
|
||||
|
Loading…
x
Reference in New Issue
Block a user