Mercurial > hg > Members > kono > nitros9-code
changeset 352:a9169e6c5f3f
Moved rampak driver and descriptors from rampak/ dir
author | boisy |
---|---|
date | Thu, 25 Jul 2002 05:07:50 +0000 |
parents | 486e94f18be0 |
children | 24b2c1cd3a3a |
files | 3rdparty/drivers/disto/defsfile 3rdparty/drivers/disto/makefile 3rdparty/drivers/disto/r0.asm 3rdparty/drivers/disto/rampak.asm |
diffstat | 4 files changed, 258 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/3rdparty/drivers/disto/defsfile Thu Jul 25 05:05:16 2002 +0000 +++ b/3rdparty/drivers/disto/defsfile Thu Jul 25 05:07:50 2002 +0000 @@ -1,4 +1,3 @@ -Level equ 2 use os9defs use scfdefs use systype
--- a/3rdparty/drivers/disto/makefile Thu Jul 25 05:05:16 2002 +0000 +++ b/3rdparty/drivers/disto/makefile Thu Jul 25 05:07:50 2002 +0000 @@ -1,13 +1,29 @@ include ../../../Makefile.rules +L1_256 = $(AFLAGS) -aLevel=1 -aRAMSize=1 +L2_256 = $(AFLAGS) -aLevel=2 -aRAMSize=1 +L1_512 = $(AFLAGS) -aLevel=1 -aRAMSize=2 +L2_512 = $(AFLAGS) -aLevel=2 -aRAMSize=2 + DEPENDS = ./Makefile -DRVRS = parallel.dr -DESCS = pp.dd - +DRVRS = rampak.dr parallel.dr +DESCS = r0_256_l1.dd r0_256_l2.dd r0_512_l1.dd r0_512_l2.dd pp.dd ALLOBJS = $(DRVRS) $(DESCS) all: $(ALLOBJS) $(DEPENDS) +r0_256_l1.dd: r0.asm + $(AS) $(ASOUT)$@ $< $(L1_256) + +r0_512_l1.dd: r0.asm + $(AS) $(ASOUT)$@ $< $(L1_512) + +r0_256_l2.dd: r0.asm + $(AS) $(ASOUT)$@ $< $(L2_256) + +r0_512_l2.dd: r0.asm + $(AS) $(ASOUT)$@ $< $(L2_512) + clean: $(RM) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/drivers/disto/r0.asm Thu Jul 25 05:07:50 2002 +0000 @@ -0,0 +1,43 @@ + nam R0 + ttl Disto RAM Pak descriptor + +* Disassembled 98/08/24 11:29:00 by Disasm v1.6 (C) 1988 by RML + +MPISlot equ 2 (slot 0-3) + + ifp1 + use defsfile + use rbfdefs + endc + +tylg set Devic+Objct +atrv set ReEnt+rev +rev set $02 + + mod eom,name,tylg,atrv,mgrnam,drvnam + + fcb DIR.!ISIZ.!SHARE.!PEXEC.!PWRIT.!PREAD.!EXEC.!UPDAT. mode byte + fcb HW.Page extended controller address + fdb $FF40 physical controller address + fcb initsize-*-1 initilization table size + fcb DT.RBF device type:0=scf,1=rbf,2=pipe,3=scf + fcb MPISlot drive number + fcb 0 step rate + fcb TYP.NSF drive device type + fcb DNS.MFM media density:0=single,1=double + fdb 32*RAMSize number of cylinders (tracks) + fcb 1 number of sides + fcb 1 verify disk writes:0=on + fdb 64 # of sectors per track + fdb 64 # of sectors per track (track 0) + fcb 1 sector interleave factor + fcb 1 minimum size of sector allocation + +initsize equ * +name fcs /R0/ +mgrnam fcs /RBF/ +drvnam fcs /RamPak/ + + emod +eom equ * + end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/drivers/disto/rampak.asm Thu Jul 25 05:07:50 2002 +0000 @@ -0,0 +1,196 @@ +******************************************************************** +* RamPak - Disto RAM Pak device driver +* +* $Id$ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* 2 Original Disto version by Brian Lantz BL +* 3 Removed copyright info, removed useless BGP 98/10/20 +* register saves, optimized, changed port +* address in descriptor to hold port address +* of RAM pak instead of MPI. + + nam RamPak + ttl Disto RAM Pak device driver + +* Disassembled 98/04/20 09:57:05 by Disasm v1.5 (C) 1988 by RML + + ifp1 + use defsfile + use rbfdefs + endc + +tylg set Drivr+Objct +atrv set ReEnt+rev +rev set $01 +edition set 3 + + mod eom,name,tylg,atrv,start,size + +* RBF Data Area + rmb 129 + +* Free for driver use +ORGSlot rmb 1 + +size equ . + fcb $FF + +name fcs /RamPak/ + fcb edition +* fcc /(C) 1985 BRIAN A. LANTZ/ +* fcb $0D +* fcc /LICENSED TO DISTO/ + +start lbra Init + lbra Read + lbra Write + lbra GetStat + lbra SetStat + lbra Term + +* Init +* +* Entry: +* Y = address of device descriptor +* U = address of device memory area +* +* Exit: +* CC = carry set on error +* B = error code +* +Init ldd #($FF*256)+3 + stb V.NDRV,u + leax DRVBEG,u +* For each B, compute total sectors... +Init010 sta V.TRAK,x + pshs b,a + lda IT.CYL+1,y + ldb IT.SCT+1,y + mul + std DD.TOT+1,x + puls b,a + leax DRVMEM,x + decb + bne Init010 + rts + +* Write +* +* Entry: +* B = MSB of the disk's LSN +* X = LSB of the disk's LSN +* Y = address of path descriptor +* U = address of device memory area +* +* Exit: +* CC = carry set on error +* B = error code +* +Write pshs cc + bsr SlctSlot + ldy V.PORT,u +WritLoop lda ,x+ + stb ,y + sta 3,y + incb + bne WritLoop + bra RestSlot + +* Read +* +* Entry: +* B = MSB of the disk's LSN +* X = LSB of the disk's LSN +* Y = address of path descriptor +* U = address of device memory area +* +* Exit: +* CC = carry set on error +* B = error code +* +Read cmpx #$0000 + beq ReadLSN0 + +ReadSect pshs cc + bsr SlctSlot + ldy V.PORT,u +ReadLoop stb ,y + lda 3,y + sta ,x+ + incb + bne ReadLoop + +* Restore the original MPI slot value we saved off +RestSlot lda >ORGSlot,u + sta >MPI.Slct + puls cc + clrb + rts + +* Read LSN0 into our path descriptor +ReadLSN0 pshs y + bsr ReadSect + puls y + ldx PD.BUF,y + lda <PD.DRV,y + leay DRVBEG,u + ldb #DRVMEM + mul + leay d,y + ldb #DD.SIZ-1 +LSN0Loop lda b,x + sta b,y + decb + bne LSN0Loop + rts + + +* This routine selects the MPI slot +* Exit: X = address of path descriptor buffer +SlctSlot orcc #IntMasks mask interrupts + lda >MPI.Slct get current selected slot + sta >ORGSlot,u save off + lda PD.DRV,y get drive no. + ldb #$11 + mul multiply drive no. times $11 + stb >MPI.Slct set new MPI slot no. + tfr x,d + sta >$FF42 write LSN hi byte to PAK + stb >$FF41 write LSN lo byte to PAK + ldx PD.BUF,y load X with address of path buffer + clrb + rts + +* GetStat +* +* Entry: +* A = function code +* Y = address of path descriptor +* U = address of device memory area +* +* Exit: +* CC = carry set on error +* B = error code +* +GetStat comb + ldb #E$UnkSvc + rts + +SetStat +* Term +* +* Entry: +* U = address of device memory area +* +* Exit: +* CC = carry set on error +* B = error code +* +Term clrb + rts + + emod +eom equ * + end