changeset 2277:7c0f40fd3fbc

SERINIT now sends PD.PAR byte as mode byte to server expanded to 15 ports: T0-T7, U0-U6
author boisy
date Tue, 29 Dec 2009 00:48:58 +0000
parents 1e9ab13274ba
children c0f94d69544e
files level1/modules/dwtdesc.asm level1/modules/scdwt.asm level2/coco3_6309/modules/makefile
diffstat 3 files changed, 45 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/level1/modules/dwtdesc.asm	Tue Dec 29 00:15:54 2009 +0000
+++ b/level1/modules/dwtdesc.asm	Tue Dec 29 00:48:58 2009 +0000
@@ -1,5 +1,5 @@
 ********************************************************************
-* T0 - Drivewire Virtual Serial Port on T0
+* DWTDesc - Drivewire Virtual Serial Device Descriptor
 *
 * $Id$
 *
@@ -29,7 +29,7 @@
 
          mod   eom,name,tylg,atrv,mgrnam,drvnam
 
-         IFEQ  TNum
+         IFNE  UTIL
          fcb   UPDAT.+SHARE.   	mode byte (share set to prevent multiple access on /T0)
          ELSE
          fcb   UPDAT.    	mode byte
@@ -38,7 +38,7 @@
          fdb   $FF00+TNum      physical controller address
          fcb   initsize-*-1 initilization table size
          fcb   DT.SCF     device type:0=scf,1=rbf,2=pipe,3=scf
-         IFEQ  TNum
+         IFNE  UTIL
          fcb   $00,$00,$00,$00,$00,$00,$00,$00
          fcb   $00,$00,$00,$00,$00,$00,$00,$00
          fcb   $00,$00,$00
@@ -63,7 +63,11 @@
          fcb   C$BSP      backspace echo character
          fcb   C$BELL     line overflow character (bell)
          ENDC
-         fcb   $00        init value for dev ctl reg
+         IFNE  UTIL
+         fcb   $03        mode byte for utility descriptor
+		 ELSE
+         fcb   $00        mode byte for terminal descriptor
+		 ENDC
          fcb   B600       baud rate
          fdb   name       copy of descriptor name address
          fcb   $00        acia xon char
@@ -75,7 +79,11 @@
          IFNE  TERM
 name     fcs   /Term/
          ELSE
+		 IFNE  UTIL
+name     fcc   /U/
+		 ELSE
 name     fcc   /T/
+         ENDC
          fcb   176+TNum
          ENDC
 mgrnam   fcs   /SCF/
--- a/level1/modules/scdwt.asm	Tue Dec 29 00:15:54 2009 +0000
+++ b/level1/modules/scdwt.asm	Tue Dec 29 00:48:58 2009 +0000
@@ -322,11 +322,13 @@
 			stx   	RxBufEnd,u      	;save Rx buffer end address
 
 			* tell DW we have a new port opening
+			ldb		PD.PAR,u		; get our port mode
+			pshs    b
 			ldb		<V.PORT+1,u		; get our port #			
 			lda     #OP_SERINIT 	; command 
 			pshs   	d      			; command + port # on stack
 			leax    ,s     			; point X to stack 
-			ldy     #2          	; 2 bytes to send
+			ldy     #3          	; # of bytes to send
 			
 			IFGT  Level-1
 			ldu   	<D.DWSubAddr
@@ -336,7 +338,7 @@
     		jsr     6,u      		; call DWrite
     		
 			*for now setstat does not respond    		
-    		leas	2,s				;clean dw args off stack
+    		leas	3,s				;clean dw args off stack
     		
 InitEx		equ		*
 			puls	cc,pc
@@ -354,7 +356,7 @@
 * Interrupt handler  - Much help from Darren Atkinson
 
 			
-IRQMulti3   anda    #$07		;mask first 5 bits, a is now port #+1
+IRQMulti3   anda    #$1F		;mask first 5 bits, a is now port #+1
   			deca				;we pass +1 to use 0 for no data
             pshs    a			;save port #
          	cmpb	RxGrab,u	;compare room in buffer to server's byte
@@ -477,7 +479,7 @@
 
 * save back D on stack and build our U
             pshs    d
-  			anda    #$07		;mask first 5 bits, a is now port #+1
+  			anda    #$1F		;mask first 5 bits, a is now port #+1
   			deca				;we pass +1 to use 0 for no data
 * here we set U to the static storage area of the device we are working with
 			IFGT    Level-1
--- a/level2/coco3_6309/modules/makefile	Tue Dec 29 00:15:54 2009 +0000
+++ b/level2/coco3_6309/modules/makefile	Tue Dec 29 00:48:58 2009 +0000
@@ -56,7 +56,9 @@
 		v1.dw v2.dw v3.dw v4.dw v5.dw \
 		v6.dw v7.dw \
 		scdwt.dr term_scdwt.dt t0_scdwt.dd t1_scdwt.dd t2_scdwt.dd t3_scdwt.dd \
-                t4_scdwt.dd t5_scdwt.dd t6_scdwt.dd
+                t4_scdwt.dd t5_scdwt.dd t6_scdwt.dd t7_scdwt.dd \
+		u0_scdwt.dd u1_scdwt.dd u2_scdwt.dd u3_scdwt.dd \
+                u4_scdwt.dd u5_scdwt.dd u6_scdwt.dd
 
 PIPE		= pipeman.mn pipeman_named.mn \
 		piper.dr \
@@ -217,6 +219,30 @@
 t6_scdwt.dd: dwtdesc.asm
 	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aTNum=6
 
+t7_scdwt.dd: dwtdesc.asm
+	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aTNum=7
+
+u0_scdwt.dd: dwtdesc.asm
+	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aUTIL=1 -aTNum=8
+
+u1_scdwt.dd: dwtdesc.asm
+	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aUTIL=1 -aTNum=9
+
+u2_scdwt.dd: dwtdesc.asm
+	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aUTIL=1 -aTNum=10
+
+u3_scdwt.dd: dwtdesc.asm
+	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aUTIL=1 -aTNum=11
+
+u4_scdwt.dd: dwtdesc.asm
+	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aUTIL=1 -aTNum=12
+
+u5_scdwt.dd: dwtdesc.asm
+	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aUTIL=1 -aTNum=13
+
+u6_scdwt.dd: dwtdesc.asm
+	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aUTIL=1 -aTNum=14
+
 # DriveWire 3 RBF descriptors
 ddx0.dd: dwdesc.asm
 	$(AS) $< $(ASOUT)$@ $(AFLAGS) -aDD=1 -aDNum=0