Mercurial > hg > Members > kono > nitros9-code
changeset 3288:a418110ecb44
Adding Dragon Plus builds with native 80 column and VRAM disk support
line wrap: on
line diff
--- a/3rdparty/drivers/compusense/VDisk.asm Sun Jul 05 23:12:42 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -******************************************************************** * VDisk - DragonPlus virtual (ram) disk driver * * $Id$ * * Edt/Rev YYYY/MM/DD Modified by * Comment * ------------------------------------------------------------------ * - 1986/??/?? * Original Compusense distribution version * * 2005-09-01, P.Harvey-Smith. * Disassembled and cleaned up. * nam VDisk ttl Virtual disk device driver for Dragon Plus. * Disassembled 2005/05/31 16:27:51 by Disasm v1.5 (C) 1988 by RML ifp1 use /dd/defs/defsfile endc tylg set Drivr+Objct atrv set ReEnt+rev rev set $02 mod eom,name,tylg,atrv,start,size u0000 rmb 6 u0006 rmb 9 u000F rmb 1 u0010 rmb 20 u0024 rmb 219 size equ . fcb $FF name equ * fcs /VDisk/ L0013 fcb $00 L0014 fcb $00 SignonMess fcc 'VDISK (C) COPYRIGHT COMPUSENSE LIMITED 1985 1986' fcb $0D SignonMessLen equ *-SignonMess LoadAddrErrorMess fcc /CAN'T RUN BELOW $8000/ fcb $0D LoadAddrErrorMessLen equ *-LoadAddrErrorMess start equ * lbra Init lbra Read lbra Write lbra GetStat lbra GetStat 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 lda #$01 sta u0006,u lda #$FF sta <u0010,u sta <u0024,u inc >L0013,pcr lbsr L014A leax >SignonMess,pcr * Point to signon message ldy #SignonMessLen * and length lda #$01 os9 I$WritLn * display it leax >Read,pcr * Get address of read routine cmpx #$8000 * are we loaded lower than $8000 ? bcc L00AE * No, exit with no error leax >LoadAddrErrorMess,pcr * Point to error message ldy #LoadAddrErrorMessLen lda #$01 os9 I$WritLn bcs Return * Return error ldb #$01 stb >L0014,pcr bra Return L00AE clrb Return rts * 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 * LSN 0 check pshs cc * Save status of LSN0 on stack lbsr L012A bcs Return puls cc * Retrieve LSN0 check status bne L00D5 * Jump ahead if not LSN0 * Retrieve LSN0 pshs y,x,b,a,cc orcc #$50 * Disable inturrupts sta >$FFE2 * Page in ramdisk memory leay u000F,u * point to LSN buffer ldb #$15 * retrieve first $15 bytes L00C9 lda ,x+ * Transfer them sta ,y+ decb * Decrement counter bne L00C9 * If bytes left, loop again clr >$FFE2 * Page back to normal memory puls y,x,b,a,cc * Restore and return * Come straight here if we are not LSN0 L00D5 ldy PD.BUF,y * Get address to the data into tst >L0014,pcr * Test flag ???? beq L00E2 ldb #E$NotRdy * Return not ready error bra Return L00E2 pshs u,cc leau ,x * Get address of data sector (in the ramdisk) orcc #$50 * disable inturrupts ldb #$80 * Transfer one sector, $80 words ReadSectorLoop sta >$FFE2 * Page in ramdisk memory ldx ,u++ * Get a word from ramdisk clr >$FFE2 * Page in normal dragon memory stx ,y++ * save in normal memory decb * decrement wordcount bne ReadSectorLoop * Loop if all not done puls pc,u,cc * Restore and return Write lbsr L012A bcs Return ldy PD.BUF,y * Get the address of the buffer to write data from exg x,y tst >L0014,pcr * Test flag beq L010D ldb #E$NotRdy * Not ready error bra Return L010D pshs u,cc leau ,x orcc #$50 * Disable inturrupts ldb #$80 * Transfer one sector, $80 words WriteSecLoop ldx ,u++ * get word to write sta >$FFE2 * Page in ramdisk memory stx ,y++ * Write word to ramdisk clr >$FFE2 * Page in normal dragon memory decb * decrement wordcount bne WriteSecLoop * Loop if all not done puls pc,u,cc * restore and return GetStat ldb #E$UnkSvc * Return unknown service error on Get/Set stat rts Term ldb #$F1 * Bad sector number ????? rts * does some calculations based on LSN L012A tstb * LSN > $FFFF ? bne Term * Yes : error cmpx #$00F0 * LSN > $00F0 ? bcc Term * Yes : Error lda #$02 cmpx #$0078 * LSN > $78 ? bcs L013E * no : jump ahead lda #$06 * Yes fixup for upper 32K leax <-$78,x L013E exg d,x clra exg a,b addd #$0200 exg d,x clrb rts L014A pshs a lda #$0D bsr L0152 puls pc,a L0152 pshs y,x,b,a leax ,s ldy #$0001 lda #$01 os9 I$WritLn puls pc,y,x,b,a emod eom equ * end \ No newline at end of file
--- a/3rdparty/drivers/compusense/VInit.asm Sun Jul 05 23:12:42 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -******************************************************************* * VInit - DragonPlus virtual (ram) disk initialiser * * $Id$ * * Edt/Rev YYYY/MM/DD Modified by * Comment * ------------------------------------------------------------------ * - 1986/??/?? * Original Compusense distribution version * * 2005-09-01, P.Harvey-Smith. * Disassembled and cleaned up. * nam VINIT ttl program module * Disassembled 2005/05/31 16:27:58 by Disasm v1.5 (C) 1988 by RML ifp1 use /dd/defs/defsfile use dplusdef endc tylg set Prgrm+Objct atrv set ReEnt+rev rev set $01 mod eom,name,tylg,atrv,start,size u0000 rmb 1 u0001 rmb 102 size equ . name equ * fcs /VINIT/ fcb $01 SignonMess fcc 'VINIT (C) COPYRIGHT COMPUSENSE LIMITED 1985' fcb $0D SignonMessLen equ *-SignonMess L003F fcc 'VINIT - RAM disk formatted - 236 sectors free' fcb $0D fcb $56 V fcb $B0 0 L006F fcc 'VINIT - already formatted - continue (Y/N)? ' L009C fcc 'VINIT - format canceled' fcb $0D L00B5 fcb $00 fcb $00 fcb $F0 p fcb $00 fcb $00 fcb $1E fcb $00 fcb $01 fcb $00 fcb $00 fcb $02 fcb $00 fcb $00 fcb $FF fcb $52 R fcb $44 D fcb $00 fcb $00 fcb $1E fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 TimeBuff1 fcb $00 * year fcb $00 * Month fcb $00 * Day fcb $00 * Hour fcb $00 * minute, second over-writes first byte of message L00D4 fcc 'RAM DISK (C)COMPUSENSE LTD 1985' L00F3 fcb $F0 p fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 L0111 fcb $BF ? fcb $00 fcb $00 TimeBuff2 fcb $00 * Year fcb $00 * Month fcb $00 * Day fcb $00 * hour fcb $00 * minute L0119 fcb $00 * second (saved and restored in code). fcb $00 fcb $00 fcb $00 fcb $40 @ fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $03 fcb $00 fcb $01 L0126 fcb $2E . fcb $AE . fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $02 fcb $AE . fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $00 fcb $02 start equ * stx u0001,u lbsr L02A7 leax >SignonMess,pcr ldy #SignonMessLen lda #$01 os9 I$WritLn lbcs L020F lda >L00D4,pcr * Save last byte leax >TimeBuff1,pcr * Point to buffer os9 F$Time * Get time/date sta >L00D4,pcr * restore last byte, ignore seconds lda >L0119,pcr * Save last byte leax >TimeBuff2,pcr * Point to buffer os9 F$Time * Get time/date sta >L0119,pcr * restore last byte, ignore seconds lda #Page1 ldx #$0200 lbsr L0223 pshs x,cc * save regs orcc #$50 * disable inturrupts sta >MemoryPage * switch pages lbsr L0212 ldx #$0200 leay >L00B5,pcr ldb #$3E L01B5 lda ,y+ sta ,x+ decb bne L01B5 ldx #$0300 leay >L00F3,pcr ldb #$1E lbsr L021D L01C8 lda ,y+ sta ,x+ decb bne L01C8 ldx #$0400 leay >L0111,pcr ldb #$15 lbsr L0212 L01DB lda ,y+ sta ,x+ decb bne L01DB ldx #$0500 leay >L0126,pcr ldb #$40 lbsr L0212 L01EE lda ,y+ sta ,x+ decb bne L01EE clr >MemoryPage puls x,cc leax >L003F,pcr ldy #$002E lda #$01 os9 I$WritLn lbcs L020F lbsr L02A7 clrb L020F os9 F$Exit L0212 pshs u,y,x,b,a clrb L0215 clra L0216 stb ,x+ deca bne L0216 puls pc,u,y,x,b,a L021D pshs u,y,x,b,a ldb #$FF bra L0215 L0223 pshs u,y,x,a,cc orcc #$50 sta >MemoryPage leau >L00D4,pcr ldb #$1F leax <$1F,x L0233 lda ,x+ cmpa ,u+ bne L02A2 decb bne L0233 clr >MemoryPage L023F puls u,y,x,a,cc pshs u,y,x,a,cc lbsr L02A7 leax >L006F,pcr ldy #$002C lda #$01 os9 I$Write lbcs L020F ldx u0001,u lda ,x+ cmpa #$0D beq L0274 sta ,u stx u0001,u leax -$01,x ldy #$0001 lda #$01 os9 I$Write lbcs L020F bra L0280 L0274 leax ,u ldy #$0001 clra os9 I$Read bcs L020F L0280 lda ,u ora #$20 cmpa #$79 beq L029F cmpa #$6E bne L023F lbsr L02A7 leax >L009C,pcr ldy #$0019 lda #$01 os9 I$WritLn lbra L020F L029F lbsr L02A7 L02A2 clr >MemoryPage puls pc,u,y,x,a,cc L02A7 pshs a lda #$0D bsr L02AF puls pc,a L02AF pshs y,x,b,a leax ,s ldy #$0001 lda #$01 os9 I$WritLn puls pc,y,x,b,a emod eom equ * end \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/drivers/compusense/defsfile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,4 @@ + use os9.d + use scf.d + use rbf.d + use coco.d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/drivers/compusense/dplusdef Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,4 @@ + +MemoryPage equ $FFE2 +Page1 equ $02 +Page2 equ $06 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/drivers/compusense/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,28 @@ +include ../../../rules.mak + +vpath %.asm $(LEVEL1)/modules + +DEPENDS = ./makefile +DRVRS = vinit.dr vdisk.dr +RAMDISKDESCS = v0.dd +DESCS = $(RAMDISKDESCS) +ALLOBJS = $(DRVRS) $(DESCS) + +all: $(ALLOBJS) $(DEPENDS) + +vinit.dr: VInit.asm + $(AS) $(ASOUT)$@ $< $(AFLAGS) + +vdisk.dr: VDisk.asm + $(AS) $(ASOUT)$@ $< $(AFLAGS) + +v0.dd: v0.asm + $(AS) $(ASOUT)$@ $< $(AFLAGS) + +clean: + $(RM) $(ALLOBJS) + +dsk: +dskcopy: +dskclean: +
--- a/3rdparty/drivers/compusense/v0.asm Sun Jul 05 23:12:42 2020 +0200 +++ b/3rdparty/drivers/compusense/v0.asm Mon Apr 12 10:47:50 2021 -0700 @@ -1,1 +1,59 @@ -******************************************************************* * V0 - DragonPlus virtual (ram) disk descriptor * * $Id$ * * Edt/Rev YYYY/MM/DD Modified by * Comment * ------------------------------------------------------------------ * - 1986/??/?? * Original Compusense distribution version * * 2005-09-01, P.Harvey-Smith. * Disassembled and cleaned up. * nam V0 ttl os9 device descriptor * Disassembled 2005/05/31 16:27:46 by Disasm v1.5 (C) 1988 by RML ifp1 use /dd/defs/defsfile endc tylg set Devic+Objct atrv set ReEnt+rev rev set $01 mod eom,name,tylg,atrv,mgrnam,drvnam fcb $FF mode byte fcb $FF extended controller address fdb $FFFF physical controller address fcb initsize-*-1 initilization table size fcb $01 device type:0=scf,1=rbf,2=pipe,3=scf fcb $00 drive number fcb $00 step rate fcb $80 drive device type fcb $00 media density:0=single,1=double fdb $0001 number of cylinders (tracks) fcb $01 number of sides fcb $01 verify disk writes:0=on fdb $001E # of sectors per track fdb $001E # of sectors per track (track 0) fcb $02 sector interleave factor fcb $08 minimum size of sector allocation initsize equ * name equ * fcs /V0/ mgrnam equ * fcs /RBF/ drvnam equ * fcs /VDISK/ emod eom equ * end \ No newline at end of file +******************************************************************* +* V0 - DragonPlus virtual (ram) disk descriptor +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ +* - 1986/??/?? +* Original Compusense distribution version +* +* 2005-09-01, P.Harvey-Smith. +* Disassembled and cleaned up. +* + + nam V0 + ttl os9 device descriptor + +* Disassembled 2005/05/31 16:27:46 by Disasm v1.5 (C) 1988 by RML + + ifp1 + use defsfile + endc + +tylg set Devic+Objct +atrv set ReEnt+rev +rev set $01 + mod eom,name,tylg,atrv,mgrnam,drvnam + + fcb $FF mode byte + fcb $FF extended controller address + fdb $FFFF physical controller address + fcb initsize-*-1 initilization table size + fcb $01 device type:0=scf,1=rbf,2=pipe,3=scf + fcb $00 drive number + fcb $00 step rate + fcb $80 drive device type + fcb $00 media density:0=single,1=double + fdb $0001 number of cylinders (tracks) + fcb $01 number of sides + fcb $01 verify disk writes:0=on + fdb $001E # of sectors per track + fdb $001E # of sectors per track (track 0) + fcb $02 sector interleave factor + fcb $08 minimum size of sector allocation +initsize equ * + +name equ * + fcs /V0/ + +mgrnam equ * + fcs /RBF/ + +drvnam equ * + fcs /VDISK/ + + emod +eom equ * + end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/drivers/compusense/vdisk.asm Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,221 @@ +******************************************************************** +* VDisk - DragonPlus virtual (ram) disk driver +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ +* - 1986/??/?? +* Original Compusense distribution version +* +* 2005-09-01, P.Harvey-Smith. +* Disassembled and cleaned up. +* + + nam VDisk + ttl Virtual disk device driver for Dragon Plus. + +* Disassembled 2005/05/31 16:27:51 by Disasm v1.5 (C) 1988 by RML + + ifp1 + use defsfile + endc +tylg set Drivr+Objct +atrv set ReEnt+rev +rev set $02 + mod eom,name,tylg,atrv,start,size +u0000 rmb 6 +u0006 rmb 9 +u000F rmb 1 +u0010 rmb 20 +u0024 rmb 219 +size equ . + fcb $FF +name equ * + fcs /VDisk/ + +L0013 fcb $00 +L0014 fcb $00 + +SignonMess + fcc 'VDISK (C) COPYRIGHT COMPUSENSE LIMITED 1985 1986' + fcb $0D +SignonMessLen equ *-SignonMess + +LoadAddrErrorMess + fcc /CAN'T RUN BELOW $8000/ + fcb $0D +LoadAddrErrorMessLen equ *-LoadAddrErrorMess + +start + lbra Init + lbra Read + lbra Write + lbra GetStat + lbra GetStat + 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 lda #$01 + sta u0006,u + lda #$FF + sta <u0010,u + sta <u0024,u + inc >L0013,pcr + lbsr L014A + + leax >SignonMess,pcr * Point to signon message + ldy #SignonMessLen * and length + lda #$01 + os9 I$WritLn * display it + + leax >Read,pcr * Get address of read routine + cmpx #$8000 * are we loaded lower than $8000 ? + bcc L00AE * No, exit with no error + + leax >LoadAddrErrorMess,pcr * Point to error message + ldy #LoadAddrErrorMessLen + lda #$01 + os9 I$WritLn + bcs Return * Return error + ldb #$01 + stb >L0014,pcr + bra Return +L00AE clrb +Return rts + + +* 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 * LSN 0 check + pshs cc * Save status of LSN0 on stack + lbsr L012A + bcs Return + puls cc * Retrieve LSN0 check status + bne L00D5 * Jump ahead if not LSN0 + +* Retrieve LSN0 + + pshs y,x,b,a,cc + orcc #$50 * Disable inturrupts + sta >$FFE2 * Page in ramdisk memory + leay u000F,u * point to LSN buffer + ldb #$15 * retrieve first $15 bytes +L00C9 lda ,x+ * Transfer them + sta ,y+ + decb * Decrement counter + bne L00C9 * If bytes left, loop again + clr >$FFE2 * Page back to normal memory + puls y,x,b,a,cc * Restore and return + +* Come straight here if we are not LSN0 + +L00D5 ldy PD.BUF,y * Get address to the data into + tst >L0014,pcr * Test flag ???? + beq L00E2 + + ldb #E$NotRdy * Return not ready error + bra Return + +L00E2 pshs u,cc + leau ,x * Get address of data sector (in the ramdisk) + orcc #$50 * disable inturrupts + ldb #$80 * Transfer one sector, $80 words +ReadSectorLoop + sta >$FFE2 * Page in ramdisk memory + ldx ,u++ * Get a word from ramdisk + clr >$FFE2 * Page in normal dragon memory + stx ,y++ * save in normal memory + decb * decrement wordcount + bne ReadSectorLoop * Loop if all not done + puls pc,u,cc * Restore and return + +Write lbsr L012A + bcs Return + + ldy PD.BUF,y * Get the address of the buffer to write data from + exg x,y + tst >L0014,pcr * Test flag + beq L010D + + ldb #E$NotRdy * Not ready error + bra Return + +L010D pshs u,cc + leau ,x + orcc #$50 * Disable inturrupts + ldb #$80 * Transfer one sector, $80 words +WriteSecLoop + ldx ,u++ * get word to write + sta >$FFE2 * Page in ramdisk memory + stx ,y++ * Write word to ramdisk + clr >$FFE2 * Page in normal dragon memory + decb * decrement wordcount + bne WriteSecLoop * Loop if all not done + puls pc,u,cc * restore and return + +GetStat ldb #E$UnkSvc * Return unknown service error on Get/Set stat + rts + +Term ldb #$F1 * Bad sector number ????? + rts + +* does some calculations based on LSN + +L012A tstb * LSN > $FFFF ? + bne Term * Yes : error + + cmpx #$00F0 * LSN > $00F0 ? + bcc Term * Yes : Error + + lda #$02 + cmpx #$0078 * LSN > $78 ? + bcs L013E * no : jump ahead + lda #$06 * Yes fixup for upper 32K + leax <-$78,x + +L013E exg d,x + clra + exg a,b + addd #$0200 + exg d,x + clrb + rts + +L014A pshs a + lda #$0D + bsr L0152 + puls pc,a + +L0152 pshs y,x,b,a + leax ,s + ldy #$0001 + lda #$01 + os9 I$WritLn + puls pc,y,x,b,a + + emod +eom equ * + end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/3rdparty/drivers/compusense/vinit.asm Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,366 @@ +******************************************************************* +* VInit - DragonPlus virtual (ram) disk initialiser +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ +* - 1986/??/?? +* Original Compusense distribution version +* +* 2005-09-01, P.Harvey-Smith. +* Disassembled and cleaned up. +* + nam VINIT + ttl program module + +* Disassembled 2005/05/31 16:27:58 by Disasm v1.5 (C) 1988 by RML + + ifp1 + use defsfile + use dplusdef + endc + +tylg set Prgrm+Objct +atrv set ReEnt+rev +rev set $01 + mod eom,name,tylg,atrv,start,size +u0000 rmb 1 +u0001 rmb 102 +size equ . + +name equ * + fcs /VINIT/ + fcb $01 + +SignonMess + fcc 'VINIT (C) COPYRIGHT COMPUSENSE LIMITED 1985' + fcb $0D +SignonMessLen equ *-SignonMess + +L003F + fcc 'VINIT - RAM disk formatted - 236 sectors free' + fcb $0D + + fcb $56 V + fcb $B0 0 + +L006F + fcc 'VINIT - already formatted - continue (Y/N)? ' + +L009C + fcc 'VINIT - format canceled' + fcb $0D + +L00B5 fcb $00 + fcb $00 + fcb $F0 p + fcb $00 + fcb $00 + fcb $1E + fcb $00 + fcb $01 + fcb $00 + fcb $00 + fcb $02 + fcb $00 + fcb $00 + fcb $FF + fcb $52 R + fcb $44 D + fcb $00 + fcb $00 + fcb $1E + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + +TimeBuff1 + fcb $00 * year + fcb $00 * Month + fcb $00 * Day + fcb $00 * Hour + fcb $00 * minute, second over-writes first byte of message + +L00D4 fcc 'RAM DISK (C)COMPUSENSE LTD 1985' + +L00F3 fcb $F0 p + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + +L0111 fcb $BF ? + fcb $00 + fcb $00 + +TimeBuff2 + fcb $00 * Year + fcb $00 * Month + fcb $00 * Day + fcb $00 * hour + fcb $00 * minute +L0119 fcb $00 * second (saved and restored in code). + fcb $00 + fcb $00 + fcb $00 + fcb $40 @ + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $03 + fcb $00 + fcb $01 +L0126 fcb $2E . + fcb $AE . + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $02 + fcb $AE . + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $02 + +start equ * + + stx u0001,u + lbsr L02A7 + leax >SignonMess,pcr + ldy #SignonMessLen + lda #$01 + os9 I$WritLn + lbcs L020F + + lda >L00D4,pcr * Save last byte + leax >TimeBuff1,pcr * Point to buffer + os9 F$Time * Get time/date + sta >L00D4,pcr * restore last byte, ignore seconds + + lda >L0119,pcr * Save last byte + leax >TimeBuff2,pcr * Point to buffer + os9 F$Time * Get time/date + sta >L0119,pcr * restore last byte, ignore seconds + + lda #Page1 + ldx #$0200 + lbsr L0223 + + pshs x,cc * save regs + orcc #$50 * disable inturrupts + sta >MemoryPage * switch pages + lbsr L0212 + ldx #$0200 + leay >L00B5,pcr + ldb #$3E +L01B5 lda ,y+ + sta ,x+ + decb + bne L01B5 + ldx #$0300 + leay >L00F3,pcr + ldb #$1E + lbsr L021D +L01C8 lda ,y+ + sta ,x+ + decb + bne L01C8 + ldx #$0400 + leay >L0111,pcr + ldb #$15 + lbsr L0212 + +L01DB lda ,y+ + sta ,x+ + decb + bne L01DB + ldx #$0500 + leay >L0126,pcr + ldb #$40 + lbsr L0212 +L01EE lda ,y+ + sta ,x+ + decb + bne L01EE + clr >MemoryPage + puls x,cc + leax >L003F,pcr + ldy #$002E + lda #$01 + os9 I$WritLn + + lbcs L020F + lbsr L02A7 + clrb +L020F os9 F$Exit + +L0212 pshs u,y,x,b,a + clrb +L0215 clra +L0216 stb ,x+ + deca + bne L0216 + puls pc,u,y,x,b,a + +L021D pshs u,y,x,b,a + ldb #$FF + bra L0215 + +L0223 pshs u,y,x,a,cc + orcc #$50 + sta >MemoryPage + leau >L00D4,pcr + ldb #$1F + leax <$1F,x +L0233 lda ,x+ + cmpa ,u+ + bne L02A2 + decb + bne L0233 + clr >MemoryPage +L023F puls u,y,x,a,cc + pshs u,y,x,a,cc + lbsr L02A7 + leax >L006F,pcr + ldy #$002C + lda #$01 + os9 I$Write + + lbcs L020F + ldx u0001,u + lda ,x+ + cmpa #$0D + beq L0274 + sta ,u + stx u0001,u + leax -$01,x + ldy #$0001 + lda #$01 + os9 I$Write + + lbcs L020F + bra L0280 +L0274 leax ,u + ldy #$0001 + clra + os9 I$Read + + bcs L020F +L0280 lda ,u + ora #$20 + cmpa #$79 + beq L029F + cmpa #$6E + bne L023F + lbsr L02A7 + leax >L009C,pcr + ldy #$0019 + lda #$01 + os9 I$WritLn + + lbra L020F +L029F lbsr L02A7 +L02A2 clr >MemoryPage + puls pc,u,y,x,a,cc + +L02A7 pshs a + lda #$0D + bsr L02AF + puls pc,a + +L02AF pshs y,x,b,a + leax ,s + ldy #$0001 + lda #$01 + os9 I$WritLn + puls pc,y,x,b,a + + emod +eom equ * + end
--- a/3rdparty/drivers/makefile Sun Jul 05 23:12:42 2020 +0200 +++ b/3rdparty/drivers/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -1,6 +1,6 @@ include ../../rules.mak -dirs = burke disto emudsk ide mmc s16550 sdisk sdisk3 tccc nocan +dirs = burke disto emudsk ide mmc s16550 sdisk sdisk3 tccc nocan compusense # Make all components all:
--- a/defs/cocovtio.d Sun Jul 05 23:12:42 2020 +0200 +++ b/defs/cocovtio.d Mon Apr 12 10:47:50 2021 -0700 @@ -111,6 +111,7 @@ V.Co42E RMB 2 Co42 entry point V.CoVGAE RMB 2 CoVGA entry point V.Co80E RMB 2 Co80 entry point +V.CoDPlusE RMB 2 CoDPlus entry point V.Flash RMB 2 Cursor flash routine address. v.FlashTime RMB 1 Cursor flash time v.FlashCount RMB 1 Cursor flash count @@ -170,6 +171,7 @@ ModCo42 EQU %00010000 Co42, PMODE 4 42x25 text ModCoVGA EQU %00100000 CoVGA, 64x32 text ModCo80 EQU %01000000 Co80, CRT9128 WordPak, 80x25 +ModCoDPlus EQU %10000000 Dragon Plus, 6545, 80x24 * * Defs for cursor flash counter
--- a/level1/d64/cmds/makefile Sun Jul 05 23:12:42 2020 +0200 +++ b/level1/d64/cmds/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -15,7 +15,7 @@ free grfdrv help ident iniz irqs link list load login makdir \ megaread mdir merge mfree mpi os9gen padrom park printerr procs prompt pwd pxd \ rename runb save setime shellplus shell_21 sleep \ - tee tmode touch tsmon tuneport unlink verify xmode + tee tmode touch tsmon tuneport unlink verify xmode minted DRAGONCMDS = asm attr backup binex build cmp cobbler_dragon copy cputype \ date dcheck debug ded deiniz del deldir devs dir dirsort disasm \
--- a/level1/d64/modules/makefile Sun Jul 05 23:12:42 2020 +0200 +++ b/level1/d64/modules/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -63,7 +63,11 @@ RBF += ddd0_40d.dd d0_40d.dd d1_40d.dd d2_40d.dd d3_40d.dd \ ddd0_40s.dd d0_40s.dd d1_40s.dd d2_40s.dd d3_40s.dd endif - + +ifeq ($(PORT),dplus) +RBF += vinit.dr vdisk.dr v0.dd +endif + SCF = scf.mn \ vrn.dr scdpp.dr sspak.dr vtio.dr \ covdg.io cohr.io co42.io\ @@ -71,6 +75,10 @@ term_sc6551.dt t2_sc6551.dt t3_sc6551.dt \ term_vdg.dt term_hr.dt term_42.dt term_80.dt p1_sc6551dragon.dd +ifeq ($(PORT),dplus) +SCF += codplus.io term_dplus.dt +endif + PIPE = pipeman.mn \ piper.dr \ pipe.dd @@ -192,6 +200,17 @@ $(AS) $(AFLAGS) $(ASOUT)$@ -DUPGRADED32=$(UPGRADED32) $< +# compusense drivers +vinit.dr: $(3RDPARTY)/drivers/compusense/vinit.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) + +vdisk.dr: $(3RDPARTY)/drivers/compusense/vdisk.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) + +v0.dd: $(3RDPARTY)/drivers/compusense/v0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) + + clean: $(CD) kernel; make $@ $(RM) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/bootfiles/defsfile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,2 @@ + use ../defsfile + use scfdefs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/bootfiles/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,101 @@ +# +#bootfiles/makefile +# +# 2005-04-24, P.Harvey-Smith. +# Added kernels for both DS40 and DS80 disks for Dragon 64 +# Added kernels for both SS80 and DS80 disks for Dragon Alpha +# +# +# 2005-12-31, P.Harvey-Smith, +# Fixed up for renamed video drivers. +# +# 2006-01-08, P.Harvey-Smith, +# Added bootrack for original Dargon Data SS40 drives. +# +# 2006-01-18, P.Harvey-Smith, +# Added ability to build for the Tano Dragon 64, using an RS-DOS +# disk controler and a 60Hz clock. +# + +ifeq ($(PORT),) + PORT=dplus +endif +include $(NITROS9DIR)/rules.mak + +# Module directory +MD = ../modules + +DEPENDS = ./makefile + +KERNEL = $(MD)/rel $(MD)/krn $(MD)/krnp2 $(MD)/init \ + $(MD)/boot_d64 + + + +BOOTFILE_CODPLUS_DS40 = $(MD)/ioman \ + $(MD)/rbf.mn $(MD)/ddisk.dr \ + $(MD)/ddd0_40d.dd \ + $(MD)/d0_40d.dd $(MD)/d1_40d.dd \ + $(MD)/d2_40d.dd $(MD)/d3_40d.dd\ + $(MD)/vinit.dr $(MD)/vdisk.dr $(MD)/v0.dd\ + $(MD)/scf.mn \ + $(MD)/vtio.dr $(MD)/codplus.io $(MD)/term_dplus.dt \ + $(MD)/scdpp.dr $(MD)/p_dpp.dd \ + $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd \ + $(MD)/clock_60hz $(MD)/clock2_soft \ + $(MD)/sysgo_dd + +BOOTFILE_CODPLUS_DS80 = $(MD)/ioman \ + $(MD)/rbf.mn $(MD)/ddisk.dr \ + $(MD)/ddd0_80d.dd \ + $(MD)/d0_80d.dd $(MD)/d1_80d.dd \ + $(MD)/d2_80d.dd $(MD)/d3_80d.dd\ + $(MD)/vinit.dr $(MD)/vdisk.dr $(MD)/v0.dd\ + $(MD)/scf.mn \ + $(MD)/vtio.dr $(MD)/codplus.io $(MD)/term_dplus.dt \ + $(MD)/scdpp.dr $(MD)/p_dpp.dd \ + $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd \ + $(MD)/clock_60hz $(MD)/clock2_soft \ + $(MD)/sysgo_dd + +BOOTFILE_CODPLUS_SS40 = $(MD)/ioman \ + $(MD)/rbf.mn $(MD)/ddisk.dr \ + $(MD)/ddd0_40d.dd \ + $(MD)/d0_40s.dd $(MD)/d1_40s.dd \ + $(MD)/d2_40s.dd $(MD)/d3_40s.dd\ + $(MD)/vinit.dr $(MD)/vdisk.dr $(MD)/v0.dd\ + $(MD)/scf.mn \ + $(MD)/vtio.dr $(MD)/codplus.io $(MD)/term_dplus.dt \ + $(MD)/scdpp.dr $(MD)/p_dpp.dd \ + $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd \ + $(MD)/clock_60hz $(MD)/clock2_soft \ + $(MD)/sysgo_dd + + +BOOTFILES = bootfile_codplus_ds40 bootfile_codplus_ds80 bootfile_codplus_ss40 + +KERNELS = kernel + +ALLOBJS = $(BOOTFILES) $(KERNELS) + +all: $(ALLOBJS) + +echo: + @$(ECHO) $(BOOTFILE_CODPLUS_DS40) + +bootfile_codplus_ds40: $(BOOTFILE_CODPLUS_DS40) $(DEPENDS) + $(MERGE) $(BOOTFILE_CODPLUS_DS40) > $@ + +bootfile_codplus_ds80: $(BOOTFILE_CODPLUS_DS80) $(DEPENDS) + $(MERGE) $(BOOTFILE_CODPLUS_DS80) > $@ + +bootfile_codplus_ss40: $(BOOTFILE_CODPLUS_SS40) $(DEPENDS) + $(MERGE) $(BOOTFILE_CODPLUS_SS40) > $@ + +kernel: $(KERNEL) $(DEPENDS) + $(MERGE) $(KERNEL)>$@ + $(PADROM) 4096 $@ + +clean: + $(RM) $(ALLOBJS) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/bootlists/standard.bl Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,168 @@ +*************************************** +* NitrOS-9 Level 1 Bootlist +* +* $Id$ +* +* This bootlist is presented as an example for creating custom bootfiles. +* A module may be excluded from the bootfile if an asterisk (*) is the +* first character of the line. +* +*************************************** +* Kernel/System Section +* +* These modules are mandatory. +../MODULES/SYSMODS/ioman +* +*************************************** +* CDF Section (HawkSoft) +* +*../MODULES/CDF/cdf.mn +* +* CDF descriptors - select as needed +* SCSI descriptors (IDs 0-6) +*../MODULES/CDF/sc0.dd +*../MODULES/CDF/sc1.dd +*../MODULES/CDF/sc2.dd +*../MODULES/CDF/sc3.dd +*../MODULES/CDF/sc4.dd +*../MODULES/CDF/sc5.dd +*../MODULES/CDF/sc6.dd +* IDE descriptors (master/slave) +*../MODULES/CDF/ic0.dd +*../MODULES/CDF/ic1.dd +* +*************************************** +* RBF Section +* +../MODULES/RBF/rbf.mn +* +* DriveWire driver (Cloud-9 product) +*../MODULES/RBF/drivewire.dr +* DriveWire descriptors - select as needed +*../MODULES/RBF/ddx0.dd +*../MODULES/RBF/x0.dd +*../MODULES/RBF/x1.dd +*../MODULES/RBF/x2.dd +*../MODULES/RBF/x3.dd +* +* SuperDriver Package (Cloud-9 product) +*../MODULES/RBF/rbsuper.dr +* Select Low level SCSI and/or IDE driver +*../MODULES/RBF/lltc3.dr +*../MODULES/RBF/llide.dr +* SuperDriver descriptors - select as needed +* SCSI descriptors (IDs 0-7) +*../MODULES/RBF/s0_tc3.dd +*../MODULES/RBF/s1_tc3.dd +*../MODULES/RBF/s2_tc3.dd +*../MODULES/RBF/s3_tc3.dd +*../MODULES/RBF/s4_tc3.dd +*../MODULES/RBF/s5_tc3.dd +*../MODULES/RBF/s6_tc3.dd +* SCSI HDB-DOS descriptor +*../MODULES/RBF/sh_ide.dd +* IDE descriptors (master/slave) +*../MODULES/RBF/i0_ide.dd +*../MODULES/RBF/i1_ide.dd +* IDE HDB-DOS descriptor +*../MODULES/RBF/ih_ide.dd +* +* WD1773 floppy support for Tandy and compatible disk controllers +../MODULES/RBF/rb1773.dr +* WD1773 floppy support for Disto Super Controller II +*../MODULES/RBF/rb1773_scii_ff74.dr +*../MODULES/RBF/rb1773_scii_ff58.dr +* Floppy device descriptors +* DD - default device - choose one if needed +*../MODULES/RBF/ddd0_35s.dd +../MODULES/RBF/ddd0_40d.dd +*../MODULES/RBF/ddd0_80d.dd +* D0 - drive 0 - choose one if needed +*../MODULES/RBF/d0_35s.dd +../MODULES/RBF/d0_40d.dd +*../MODULES/RBF/d0_80d.dd +* D1 - drive 1 - choose one if needed +*../MODULES/RBF/d1_35s.dd +../MODULES/RBF/d1_40d.dd +*../MODULES/RBF/d1_80d.dd +* D2 - drive 2 - choose one if needed +*../MODULES/RBF/d2_35s.dd +../MODULES/RBF/d2_40d.dd +*../MODULES/RBF/d2_80d.dd +* D3 - drive 3 - choose if needed +*../MODULES/RBF/d3_35s.dd +* Dragon Plus VRAM disk +../MODULES/RBF/vinit.dr +../MODULES/RBF/vdisk.dr +../MODULES/RBF/v0.dd +*************************************** +* SCF Section +* +../MODULES/SCF/scf.mn +* +* Video Terminal I/O driver and subroutine modules +../MODULES/SCF/vtio.dr +* Choose from CoVDG (32x16 VDG) or CoHR (Hi-Res 51x24 graphics screen) +../MODULES/SCF/codplus.io +*../MODULES/SCF/covdg.io +*../MODULES/SCF/cohr.io +* +* Select only one term descriptor +../MODULES/SCF/term_dplus.dt +*../MODULES/SCF/term_vdg.dt +*../MODULES/SCF/term_hr.dt +*../MODULES/SCF/term_bbt.dt +*../MODULES/SCF/term_sc6551.dt +* +* Serial port drivers +* CoCo Bit-Banger terminal port +*../MODULES/SCF/scbbt.dr +*../MODULES/SCF/t1.dd +* 6551 ACIA +*../MODULES/SCF/sc6551.dr +*../MODULES/SCF/t2_sc6551.dd +*../MODULES/SCF/t3_sc6551.dd +* +* Printer drivers +* ../MODULES/SCF/scbbp.dr +* ../MODULES/SCF/p.dd +* +*************************************** +* Pipe Section +* +* Pipes are a useful but optional part of a system. +../MODULES/PIPE/pipeman.mn +../MODULES/PIPE/piper.dr +../MODULES/PIPE/pipe.dd +* +*************************************** +* Clock Section +* +* Select one clock module depending upon your power line frequency +* (60Hz = USA/Canada; 50Hz = Europe, Australia) +../MODULES/CLOCKS/clock_60hz +*../MODULES/CLOCKS/clock_50hz +* Select one clock2 module that supports your real-time clock, if any. +* Besides support for the internal software clock, the following +* hardware clocks are supported: Burke & Burke, Disto 2-N-1, Disto 4-N-1, +* Eliminator, Harris, SmartWatch, Cloud-9, the MESS emulator, Jeff +* Vavasour's CoCo emulator, and DriveWire. +../MODULES/CLOCKS/clock2_soft +*../MODULES/CLOCKS/clock2_bnb +*../MODULES/CLOCKS/clock2_disto2 +*../MODULES/CLOCKS/clock2_disto4 +*../MODULES/CLOCKS/clock2_elim +*../MODULES/CLOCKS/clock2_harris +*../MODULES/CLOCKS/clock2_smart +*../MODULES/CLOCKS/clock2_jvemu +*../MODULES/CLOCKS/clock2_messemu +*../MODULES/CLOCKS/clock2_cloud9 +*../MODULES/CLOCKS/clock2_dw +* +*************************************** +* System Kick-Start Module +* +* Choose which startup module you wish to use. (sysgo_dd is recommended +* for most configurations.) +../MODULES/SYSMODS/sysgo_dd +*../MODULES/SYSMODS/sysgo_h0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/cmds/defsfile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,1 @@ + use ../defsfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/cmds/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,2 @@ +PORT = dplus +include ../../d64/cmds/makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/defs/defsfile.asm Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,8 @@ +Level equ 1 + + ifp1 + use /dd/defs/os9.d + use /dd/defs/rbf.d + use /dd/defs/scf.d + use /dd/defs/dragon.d + endc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/defs/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,36 @@ +PORT=dplus + +include $(NITROS9DIR)/rules.mak + +DEPENDS = ./makefile + +DEFOPTS = --preprocess -DLevel=1 +DEFSDIR = ../../../defs +DEFS = defsfile os9.d rbf.d scf.d dragon.d dragonvtio.d +ALLOBJS = $(DEFS) + +all: $(ALLOBJS) + +defsfile: defsfile.asm + $(AS) $(DEFOPTS) $< > $@ + +os9.d: $(DEFSDIR)/os9.d + $(AS) $(DEFOPTS) -DOS9.D=0 $< > $@ + +rbf.d: $(DEFSDIR)/rbf.d + $(AS) $(DEFOPTS) -DRBF.D=0 $< > $@ + +scf.d: $(DEFSDIR)/scf.d + $(AS) $(DEFOPTS) -DSCF.D=0 $< > $@ + +dragon.d: $(DEFSDIR)/dragon.d + $(AS) $(DEFOPTS) -DDRAGON.D=0 $< > $@ + +dragonvtio.d: $(DEFSDIR)/cocovtio.d + $(AS) $(DEFOPTS) -DDRAGONVTIO.D=0 $< > $@ + +clean: + $(RM) $(DEFS) + +showobjs: + @$(ECHO) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/defsfile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,6 @@ +Level equ 1 + + use os9.d + use scf.d + use rbf.d + use dragon.d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,262 @@ +# +#level1/dplus/makefile +# +# 2005-04-24, P.Harvey-Smith. +# Brought into line with CoCo makefile, for generating disk +# names baded on CPU/Level/Release number. +# +# +# 2005-05-31, P.Harvey-Smith. +# Added options to specify the step rate of the created +# floppy devices. +# +# 2006-01-08, P.Harvey-Smith. +# Added option to compile for a Dragon 32 that has been upgraded +# to 64K, this is almost the same as the 64, except that it lacks +# a serial port. +# +# 2006-01-08, P.Harvey-Smith. +# Determined experementally the correct step rate for Dragon Data +# 5.25" drives, which is 12ms, this is over half the time of the +# value determined by using dmode under Dragon OS9. It seems that +# the Dragon OS9 dis driver ignored the value set for stp, and always +# used 12ms !!!! +# +# 2006-01-18, P.Harvey-Smith. +# Updates to support Tano Dragon 64, using RS-DOS controler. +# +# 2006-07-06, P.Harvey-Smith. +# Updated to use new build system, for multiple supported platforms. +# + +include port.mak + +# TERMWIDTH can be either VDG or HR, for 32x16 or 51x24 respectivly +#NOTE must be lower case. +TERMWIDTH = dplus + + +#Default step rate for floppy drives +#Step can be one of : 0=30ms, 1=20ms, 2=12ms, 3=6ms +#Note old drives often require 30ms +#After experimenting with a real Dragon Data 5.25" drive I +#have determined that the drive will cope with 12ms step. +#Therefore setting this as the default for 32/64 also. +STEP = 2 + +#Is this machine a real 64, or a 32, upgraded to 64K. +#Set to 1 for upgraded machine. +UPGRADED32 = 0 + +# Level 1 - Specify which shell should be used +#WHICHSHELL = shellplus +WHICHSHELL = shell_21 + +DISTRO = $(CPU)L$(LEVEL) +DISTRONAME = NOS9_$(CPU)_L$(LEVEL) +DISTROVER = $(DISTRONAME)_$(NITROS9VER)_$(PORT) + +BOOTFILE_CODPLUS_DS40 = bootfiles/bootfile_codplus_ds40 +BOOTFILE_CODPLUS_DS80 = bootfiles/bootfile_codplus_ds80 +BOOTFILE_CODPLUS_SS40 = bootfiles/bootfile_codplus_ss40 + +BOOTFILE_DS40 = bootfiles/bootfile_co$(TERMWIDTH)_ds40 +BOOTFILE_DS80 = bootfiles/bootfile_co$(TERMWIDTH)_ds80 +BOOTFILE_SS40 = bootfiles/bootfile_co$(TERMWIDTH)_ss40 + +KERNELFILE = bootfiles/kernel +DIRS = cmds modules defs sys bootfiles + +#DIRS = cmds sys +#modules bootfiles +#DDIRS = modules bootfiles defs + +CMDS = $(shell $(CD) cmds; make --no-print-directory showdragonobjs) +CMDS525 = $(shell $(CD) cmds; make --no-print-directory showdragon525objs) +CMDS525_2 = $(shell $(CD) cmds; make --no-print-directory showdragon525objs2) +BOOTTRACK = $(shell $(CD) modules; make --no-print-directory showboottrack) +KERNEL = $(shell $(CD) modules; make --no-print-directory showkernel) +SYSMODS = $(shell $(CD) modules; make --no-print-directory showsysmods) +CLOCKS = $(shell $(CD) modules; make --no-print-directory showclocks) +RBF = $(shell $(CD) modules; make --no-print-directory showrbf) +SCF = $(shell $(CD) modules; make --no-print-directory showscf) +PIPE = $(shell $(CD) modules; make --no-print-directory showpipe) +MODULECMDS = $(WHICHSHELL) del echo format makdir merge os9gen prompt tmode + +SYS = $(shell $(CD) sys; make --no-print-directory showobjs) +DEFS = $(shell $(CD) defs; make --no-print-directory showobjs) +ROOTFILES = startup + +DSK360K_1 = $(DISTROVER)_40d_1.dsk +LDSK360K_1 = $(DISTRONAME)_40d_1.dsk +DSK360K_2 = $(DISTROVER)_40d_2.dsk +LDSK360K_2 = $(DISTRONAME)_40d_2.dsk +DSK720K = $(DISTROVER)_80d.dsk +LDSK720K = $(DISTRONAME)_80d.dsk +#These are for the original SS40 Dragon drives, which still seem to be the most comon :( +DSK180K_1 = $(DISTROVER)_40s_1.dsk +DSK180K_2 = $(DISTROVER)_40s_2.dsk + +DSKS = $(DSK360K_1) $(DSK360K_2) $(DSK720K) $(DSK180K_1) $(DSK180K_2) +LDSKS = $(LDSK360K_1) $(LDSK360K_2) $(LDSK720K) $(LDSK180K_1) $(LDSK180K_2) + +# Make all components +all: + @$(ECHO) "************************************************************" + @$(ECHO) "*" + @$(ECHO) "* NitrOS-9/$(CPU) Level $(LEVEL) $(MACHINE) ($(PORT))" + @$(ECHO) "*" + @$(ECHO) "************************************************************" + $(foreach dir,$(DIRS),$(MAKE) -C $(dir) STEP=$(STEP) UPGRADED32=$(UPGRADED32) &&) : + +# Clean all components +clean: dskclean + $(foreach dir,$(DIRS),$(MAKE) -C $(dir) clean &&) : + +dskclean: + $(RM) $(DSKS) $(LDSKS) + +dsk: all $(DSKS) + +dskcopy: $(DSKS) + $(CP) $(DSKS) $(DSKDIR) + +#Dragon 64/32+ + +$(DSK360K_1): + $(RM) $@ + $(OS9FORMAT_DS40) -q -dr $@ -n"NitrOS-9/$(CPU) $(MACHINE) #1" + $(OS9GEN) $@ -d -b=$(BOOTFILE_DS40) -t=$(KERNELFILE) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(CD) cmds; $(OS9COPY) $(CMDS) ../$@,CMDS + $(OS9ATTR_EXEC) $(foreach file,$(CMDS),$@,CMDS/$(file)) + $(OS9RENAME) $@,CMDS/$(WHICHSHELL) shell + $(CD) sys; $(CPL) $(SYS) ../$@,SYS + $(OS9ATTR_TEXT) $(foreach file,$(SYS),$@,SYS/$(file)) + $(MAKDIR) $@,DEFS + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(OS9ATTR_TEXT) $(foreach file,$(DEFS),$@,DEFS/$(file)) + $(CPL) $(ROOTFILES) $@,. + $(OS9ATTR_TEXT) $(foreach file,$(ROOTFILES),$@,$(file)) + $(RM) $(LDSK360K_1) + $(SOFTLINK) $@ $(LDSK360K_1) + +$(DSK360K_2): + $(RM) $@ + $(OS9FORMAT_DS40) -q -dr $@ -n"NitrOS-9/$(CPU) $(MACHINE) #2" + $(MAKDIR) $@,NITROS9 + $(MAKDIR) $@,NITROS9/6809L1 + $(MAKDIR) $@,NITROS9/6809L1/CMDS + $(CD) cmds; $(OS9COPY) $(MODULECMDS) ../$@,NITROS9/6809L1/CMDS + $(OS9ATTR_EXEC) $(foreach file,$(MODULECMDS),$@,NITROS9/6809L1/CMDS/$(file)) + $(OS9RENAME) $@,NITROS9/6809L1/CMDS//$(WHICHSHELL) shell + $(MAKDIR) $@,NITROS9/6809L1/MODULES + $(MAKDIR) $@,NITROS9/6809L1/MODULES/BOOTTRACK + $(CD) modules; $(OS9COPY) $(BOOTTRACK) ../$@,NITROS9/6809L1/MODULES/BOOTTRACK + $(OS9ATTR_EXEC) $(foreach file,$(BOOTTRACK),$@,NITROS9/6809L1/MODULES/BOOTTRACK/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/KERNEL + $(CD) modules; $(OS9COPY) $(KERNEL) ../$@,NITROS9/6809L1/MODULES/KERNEL + $(OS9ATTR_EXEC) $(foreach file,$(KERNEL),$@,NITROS9/6809L1/MODULES/KERNEL/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/SYSMODS + $(CD) modules; $(OS9COPY) $(SYSMODS) ../$@,NITROS9/6809L1/MODULES/SYSMODS + $(OS9ATTR_EXEC) $(foreach file,$(SYSMODS),$@,NITROS9/6809L1/MODULES/SYSMODS/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/CLOCKS + $(CD) modules; $(OS9COPY) $(CLOCKS) ../$@,NITROS9/6809L1/MODULES/CLOCKS + $(OS9ATTR_EXEC) $(foreach file,$(CLOCKS),$@,NITROS9/6809L1/MODULES/CLOCKS/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/RBF + $(CD) modules; $(OS9COPY) $(RBF) ../$@,NITROS9/6809L1/MODULES/RBF + $(OS9ATTR_EXEC) $(foreach file,$(RBF),$@,NITROS9/6809L1/MODULES/RBF/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/SCF + $(CD) modules; $(OS9COPY) $(SCF) ../$@,NITROS9/6809L1/MODULES/SCF + $(OS9ATTR_EXEC) $(foreach file,$(SCF),$@,NITROS9/6809L1/MODULES/SCF/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/PIPE + $(CD) modules; $(OS9COPY) $(PIPE) ../$@,NITROS9/6809L1/MODULES/PIPE + $(OS9ATTR_EXEC) $(foreach file,$(PIPE),$@,NITROS9/6809L1/MODULES/PIPE/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/BOOTLISTS + $(CD) bootlists; $(CPL) *.bl ../$@,NITROS9/6809L1/BOOTLISTS + $(MAKDIR) $@,NITROS9/6809L1/SCRIPTS + $(CD) scripts; $(CPL) mb* ../$@,NITROS9/6809L1/SCRIPTS + $(RM) $(LDSK360K_2) + $(SOFTLINK) $@ $(LDSK360K_2) + +$(DSK720K): + $(RM) $@ + $(OS9FORMAT_DS80) -q -dr -c2 $@ -n"NitrOS-9/$(CPU) $(MACHINE)" + $(OS9GEN) $@ -d -b=$(BOOTFILE_DS80) -t=$(KERNELFILE) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(MAKDIR) $@,DEFS + $(CD) cmds; $(OS9COPY) $(CMDS) ../$@,CMDS + $(OS9ATTR_EXEC) $(foreach file,$(CMDS),$@,CMDS/$(file)) + $(OS9RENAME) $@,CMDS/$(WHICHSHELL) shell + $(CD) sys; $(CPL) $(SYS) ../$@,SYS + $(OS9ATTR_TEXT) $(foreach file,$(SYS),$@,SYS/$(file)) + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(OS9ATTR_TEXT) $(foreach file,$(DEFS),$@,DEFS/$(file)) + $(CPL) $(ROOTFILES) $@,. + $(OS9ATTR_TEXT) $(foreach file,$(ROOTFILES),$@,$(file)) + $(MAKDIR) $@,NITROS9 + $(MAKDIR) $@,NITROS9/6809L1 + $(MAKDIR) $@,NITROS9/6809L1/CMDS + $(CD) cmds; $(OS9COPY) $(MODULECMDS) ../$@,NITROS9/6809L1/CMDS + $(OS9ATTR_EXEC) $(foreach file,$(MODULECMDS),$@,NITROS9/6809L1/CMDS/$(file)) + $(OS9RENAME) $@,NITROS9/6809L1/CMDS/$(WHICHSHELL) shell + $(MAKDIR) $@,NITROS9/6809L1/MODULES + $(MAKDIR) $@,NITROS9/6809L1/MODULES/BOOTTRACK + $(CD) modules; $(OS9COPY) $(BOOTTRACK) ../$@,NITROS9/6809L1/MODULES/BOOTTRACK + $(OS9ATTR_EXEC) $(foreach file,$(BOOTTRACK),$@,NITROS9/6809L1/MODULES/BOOTTRACK/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/KERNEL + $(CD) modules; $(OS9COPY) $(KERNEL) ../$@,NITROS9/6809L1/MODULES/KERNEL + $(OS9ATTR_EXEC) $(foreach file,$(KERNEL),$@,NITROS9/6809L1/MODULES/KERNEL/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/SYSMODS + $(CD) modules; $(OS9COPY) $(SYSMODS) ../$@,NITROS9/6809L1/MODULES/SYSMODS + $(OS9ATTR_EXEC) $(foreach file,$(SYSMODS),$@,NITROS9/6809L1/MODULES/SYSMODS/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/CLOCKS + $(CD) modules; $(OS9COPY) $(CLOCKS) ../$@,NITROS9/6809L1/MODULES/CLOCKS + $(OS9ATTR_EXEC) $(foreach file,$(CLOCKS),$@,NITROS9/6809L1/MODULES/CLOCKS/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/RBF + $(CD) modules; $(OS9COPY) $(RBF) ../$@,NITROS9/6809L1/MODULES/RBF + $(OS9ATTR_EXEC) $(foreach file,$(RBF),$@,NITROS9/6809L1/MODULES/RBF/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/SCF + $(CD) modules; $(OS9COPY) $(SCF) ../$@,NITROS9/6809L1/MODULES/SCF + $(OS9ATTR_EXEC) $(foreach file,$(SCF),$@,NITROS9/6809L1/MODULES/SCF/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/MODULES/PIPE + $(CD) modules; $(OS9COPY) $(PIPE) ../$@,NITROS9/6809L1/MODULES/PIPE + $(OS9ATTR_EXEC) $(foreach file,$(PIPE),$@,NITROS9/6809L1/MODULES/PIPE/$(file)) + $(MAKDIR) $@,NITROS9/6809L1/BOOTLISTS + $(CD) bootlists; $(CPL) *.bl ../$@,NITROS9/6809L1/BOOTLISTS + $(MAKDIR) $@,NITROS9/6809L1/SCRIPTS + $(CD) scripts; $(CPL) mb* ../$@,NITROS9/6809L1/SCRIPTS + $(RM) $(LDSK720K) + $(SOFTLINK) $@ $(LDSK720K) + + +$(DSK180K_1): + $(RM) $@ + $(OS9FORMAT_SS40) -e -dr -q $@ -n"NitrOS-9/$(CPU) $(MACHINE) #1" + $(OS9GEN) $@ -d -b=$(BOOTFILE_SS40) -t=$(KERNELFILE) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(CD) cmds; $(OS9COPY) $(CMDS525) ../$@,CMDS + $(OS9ATTR_EXEC) $(foreach file,$(CMDS525),$@,CMDS/$(file)) + # put all commands on the first disk because we can + $(CD) cmds; $(OS9COPY) $(CMDS525_2) ../$@,CMDS + $(OS9ATTR_EXEC) $(foreach file,$(CMDS525_2),$@,CMDS/$(file)) + $(OS9RENAME) $@,CMDS/$(WHICHSHELL) shell + $(CD) sys; $(CPL) $(SYS) ../$@,SYS + $(OS9ATTR_TEXT) $(foreach file,$(SYS),$@,SYS/$(file)) + $(CPL) $(ROOTFILES) $@,. + $(OS9ATTR_TEXT) $(foreach file,$(ROOTFILES),$@,$(file)) + +$(DSK180K_2): + $(RM) $@ + $(OS9FORMAT_SS40) -e -dr -q $@ -n"NitrOS-9/$(CPU) $(MACHINE) #2" + # for space reasons, put the DEFS folder on the second disk + $(MAKDIR) $@,DEFS + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(OS9ATTR_TEXT) $(foreach file,$(DEFS),$@,DEFS/$(file)) + +info: + @$(ECHO) "*** NitrOS-9/$(CPU) Level $(LEVEL) for the $(MACHINE) ***" + @$(foreach dsk, $(DSKS), $(ECHO) $(dsk);)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/modules/defsfile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,1 @@ + use ../defsfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/modules/kernel/defsfile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,1 @@ + use ../../defsfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/modules/kernel/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,2 @@ +PORT = dplus +include ../../../coco1/modules/kernel/makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/modules/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,2 @@ +PORT=dplus +include ../../d64/modules/makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/port.mak Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,8 @@ +PORT = dplus +MACHINE = Dragon Plus +CPU = 6809 +LEVEL = 1 +TELNET_PORT = 6805 +HTTPD_PORT = 8805 + +include $(NITROS9DIR)/rules.mak
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/scripts/mb.ddisk Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,32 @@ +-t +-x +tmode .1 pau=0 +echo * NitrOS-9 Level 1 Boot Creation Script +echo * +echo * This script creates a bootable floppy disk +echo * using the ddisk_40d.bl bootlist file. +echo * +echo * The resulting disk will boot NitrOS-9 from drive 0. +echo * +*prompt Insert a blank disk in /d1 and press a key: +echo * Step 1: +echo Insert a Dragon formatted disk in /d1 +prompt (formatted using options fd 2 '40) and press a key: +*echo * +*echo * Step 1: Format disk in /d1 +*format /d1 "NitrOS-9 Level 1 Boot Disk" r fd 2 '40 +echo * +echo * Step 2: Create a custom boot track +*del bttemp +merge ../MODULES/BOOTTRACK/rel ../MODULES/KERNEL/krn ../MODULES/KERNEL/krnp2 ../MODULES/SYSMODS/init ../MODULES/BOOTTRACK/boot_d64>bttemp +echo * +echo * Step 3: Create the bootfile and boot track +os9gen /d1 -t=bttemp<../BOOTLISTS/ddisk_40d.bl +del bttemp +echo * +echo * Step 4: Populate the disk with essential files +copy ../MODULES/SYSMODS/sysgo_dd /d1/sysgo +makdir /d1/CMDS +copy -w=/d1/CMDS ../CMDS/shell +echo * +echo * We're done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/scripts/mb.rb1773 Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,29 @@ +-t +-x +tmode .1 pau=0 +echo * NitrOS-9 Level 1 Boot Creation Script +echo * +echo * This script creates a bootable floppy disk +echo * using the standard.bl bootlist file. +echo * +echo * The resulting disk will boot NitrOS-9 from drive 0. +echo * +prompt Insert a blank disk in /d0 and press a key: +echo * +echo * Step 1: Format disk in /d0 +format /d0 "NitrOS-9 Level 1 Boot Disk" r +echo * +echo * Step 2: Create a custom boot track +del bttemp +merge ../MODULES/BOOTTRACK/rel ../MODULES/KERNEL/krn ../MODULES/KERNEL/krnp2 ../MODULES/SYSMODS/init ../MODULES/BOOTTRACK/boot_1773_6ms>bttemp +echo * +echo * Step 3: Create the bootfile and boot track +os9gen /d0 -t=bttemp<../BOOTLISTS/standard.bl +del bttemp +echo * +echo * Step 4: Populate the disk with essential files +copy ../MODULES/SYSMODS/sysgo_dd /d0/sysgo +makdir /d0/CMDS +copy -w=/d0/CMDS ../CMDS/shell +echo * +echo * We're done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/startup Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,9 @@ +vinit +* Echo welcome message +echo * Welcome to NitrOS-9 Level 1 * +echo * on the Dragon Plus * +* Start system time from keyboard +setime </term +date -t + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/dplus/sys/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,36 @@ +include ../port.mak + +vpath %.hp $(LEVEL1)/sys + +DEPENDS = ./makefile + +SYSFILES = ../../sys/errmsg ../../sys/motd ../../sys/password inetd.conf +HELPFILES = asm.hp attr.hp backup.hp binex.hp build.hp chd.hp \ + chx.hp cmp.hp cobbler.hp config.hp copy.hp cputype.hp date.hp \ + dcheck.hp debug.hp ded.hp deiniz.hp del.hp deldir.hp devs.hp \ + dir.hp dirsort.hp disasm.hp display.hp dmode.hp dsave.hp dump.hp echo.hp \ + edit.hp error.hp ex.hp exbin.hp format.hp free.hp gfx.hp \ + help.hp ident.hp iniz.hp inkey.hp irqs.hp kill.hp link.hp \ + list.hp load.hp login.hp makdir.hp \ + mdir.hp megaread.hp merge.hp mpi.hp mfree.hp os9gen.hp \ + padrom.hp park.hp procs.hp prompt.hp pwd.hp pxd.hp \ + rename.hp save.hp setime.hp \ + setpr.hp shell.hp sleep.hp tee.hp tmode.hp touch.hp tsmon.hp \ + tuneport.hp unlink.hp verify.hp xmode.hp +HELPMSG = helpmsg +ALLOBJS = $(SYSFILES) $(HELPMSG) + + +all: $(ALLOBJS) $(DEPENDS) + +inetd.conf: $(LEVEL1)/sys/inetd.conf + @sed -e 's/%TELNET_PORT%/$(TELNET_PORT)/' -e 's/%HTTPD_PORT%/$(HTTPD_PORT)/' $^ > $@ + +helpmsg: $(HELPFILES) + $(MERGE) $^ > $@ + +clean: + $(RM) $(HELPMSG) inetd.conf + +showobjs: + @$(ECHO) $(ALLOBJS)
--- a/level1/makefile Sun Jul 05 23:12:42 2020 +0200 +++ b/level1/makefile Mon Apr 12 10:47:50 2021 -0700 @@ -1,6 +1,6 @@ include $(NITROS9DIR)/rules.mak -dirs = coco1 coco1_6309 deluxe coco2 coco2_6309 coco2b tano d64 dalpha atari mc09 corsham +dirs = coco1 coco1_6309 deluxe coco2 coco2_6309 coco2b tano d64 dalpha dplus atari mc09 corsham ifdef PORTS dirs = $(PORTS) endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/modules/codplus.asm Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,591 @@ +******************************************************************** +* CO80 - Dragon Plus 80 columns support for VTIO +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* 2021/04/10 - Initial driver implementation from CoWPRS - lfantoniosi +* ------------------------------------------------------------------ + + nam CODPLUS + ttl Dragon Plus Co-Driver for VTIO + +BASEADDR equ $FFE0 +CURSPTR equ V.ColPtr cursor address (wrap at $4000) +DISPPTR equ V.Co80X display start address (wrap at $800) +VRAM equ $01 + + ifp1 + use defsfile + use cocovtio.d + endc + +tylg set Systm+Objct +atrv set ReEnt+rev +rev set $01 +edition set 2 + + mod eom,name,tylg,atrv,start,size + +u0000 rmb 0 +size equ . + fcb $06 + +name fcs /CoDPlus/ + fcb edition + +* WordPak Initialization Values (6845 registers) +RegTbl fcb $71 R0 Horizontal Total + fcb $50 R1 Horizontal Displayed + fcb $5D R2 Horizontal Sync Position + fcb $37 R3 Horz/Vert Sync Widths + fcb $19 R4 Vertical Total + fcb $1E R5 Vertical Total Adjust + fcb $18 R6 Vertical Displayed + fcb $19 R7 Vertical Sync Position + fcb $A2 R8 Mode Control + fcb $0A R9 Scan Lines/Row +L0034 fcb $60 R10 Cursor Start/Blink Rate + fcb $0A R11 Cursor End Scan Line + fcb $00 R12 Display Start (MSB) + fcb $00 R13 Display End (LSB) + fcb $00 R14 Cursor Position (MSB) + fcb $00 R15 Cursor Position (LSB) + fcb $00 R16 Light Pen Position (MSB) + fcb $00 R17 Light Pen Position (LSB) + fcb $00 R18 Update Address (MSB) + fcb $00 R19 Update Address (LSB) + fcb $10 R20 + +start equ * + lbra Init + lbra Write + lbra GetStat + lbra SetStat + lbra Term + +* Init +Init pshs x,y + + ldd #0 + std <DISPPTR,u + std <CURSPTR,u + ldx #BASEADDR + lbsr ClrScrn + + clra + leax <RegTbl,pcr point to initialization values +L0097 ldb ,x+ + std BASEADDR write to 6545 hardware + inca + cmpa #20 + bcs L0097 + + ldb <V.COLoad,u + orb #ModCoDPlus + stb <V.COLoad,u + clrb + puls x,y,pc + +Term ldb <V.COLoad,u + andb #~ModCoDPlus +L004F stb <V.COLoad,u + clrb + rts + +* GetStat +GetStat ldx PD.RGS,y get caller's regs + cmpa #SS.Cursr Cursr? + beq Rt.Cursr branch if so + cmpa #131 get O-PAK max ASCII code + bne ScrSz + lda #$7e chargen goes up to 126 + sta R$A,x +NoErr clrb + rts +ScrSz cmpa #132 O-PAK Screen Size + bne CurType + lda #$50 + sta R$A,x save in A + lda #$19 + sta R$B,x save in B + bra NoErr +CurType cmpa #134 O-PAK Cursor Type + bne SetStat + ldd #$0101 block cursor / slow blinking rate + std R$A,x + bra NoErr +* SetStat +SetStat comb + ldb #E$UnkSvc + rts + +* SS.Cursr getstat +Rt.Cursr + clra + ldb <V.C80Y,u + addb #$20 + std R$Y,x + ldb <V.C80X,u + addb #$20 + std R$X,x + lda <V.CChar,u + sta R$A,x +* no operation entry point +NoOp clrb + rts + +* Write +Write + ldx #BASEADDR get HW addr in X + cmpa #$0E $0E? + bcs L00B6 branch if less than + cmpa #$1A $1A? + bcs NoOp branch if less than + cmpa #C$SPAC space? + lbcs Check1B branch if less than + cmpa #$7e $7e? + bcs ChrOut ASCII char, branch if less than + cmpa #$C0 $C0? + bls L00A6 branch if lower or same + anda #$1F + suba #$01 + cmpa #$19 + bhi L00B2 + bra ChrOut +L00A6 cmpa #$AA $AA? + bcs L00B2 branch if less than + ora #$10 + anda #$1F + cmpa #$1A + bcc ChrOut +L00B2 lda #$A0 + bra ChrOut + +L00B6 leax >FuncTbl,pcr + lsla + ldd a,x + leax d,x + pshs x + ldx #BASEADDR + rts + +* display functions dispatch table +FuncTbl fdb NoOp-FuncTbl $00:no-op (null) + fdb CurHome-FuncTbl $01:HOME cursor + fdb CurXY-FuncTbl $02:CURSOR XY + fdb ErLine-FuncTbl $03:ERASE LINE + fdb ErEOL-FuncTbl $04:ERASE TO EOL + fdb CurOnOff-FuncTbl $05:CURSOR ON/OFF + fdb CurRgt-FuncTbl $06:CURSOR RIGHT + fdb NoOp-FuncTbl $07:no-op (bel:handled in VTIO) + fdb CurLft-FuncTbl $08:CURSOR LEFT + fdb CurUp-FuncTbl $09:CURSOR UP + fdb CurDown-FuncTbl $0A:CURSOR DOWN + fdb ErEOS-FuncTbl $0B:ERASE TO EOS + fdb ClrScrn-FuncTbl $0C:CLEAR SCREEN + fdb CrRtn-FuncTbl $0D:RETURN + +* $08 - cursor left +CurLft ldd <V.C80X,u get CO80 X/Y + bne L00E8 branch if not at start + clrb + rts +L00E8 deca + bge L00EE + lda #79 + decb +L00EE std <V.C80X,u + lbra L01CC + +* $09 - cursor up +CurUp ldb <V.C80Y,u + beq L00FF + decb + stb <V.C80Y,u + lbra L01CC +L00FF clrb + rts + +* $0D - move cursor to start of line (carriage return) +CrRtn clr <V.C80X,u + bra L014C + +* ChrOut - output a readable character +* Entry: A = ASCII value of character to output +ChrOut ora <V.Invers,u add inverse video flag + pshs a + ldd <CURSPTR,u + anda #$07 + tfr d,x + puls a + bsr VRAMWrite + ldx #BASEADDR + +* $06 - cursor right +CurRgt inc <V.C80X,u + lda <V.C80X,u + cmpa #79 + ble L014C + bsr CrRtn + +* $0A - cursor down (line feed) +CurDown + ldb <V.C80Y,u + cmpb #23 + bge L012E + incb + stb <V.C80Y,u + bra L014F + +L012E + ldd <DISPPTR,u + addd #80 + anda #$07 + std <DISPPTR,u + addd #80*23 + anda #$07 + tfr d,x + ldy #80 + bsr L0159 clear last line + lda #12 + sta ,x + ldd <DISPPTR,u + sta $01,x + lda #13 + std ,x update display start +L014C ldb <V.C80Y,u +L014F lbra L01CC + +VRAMWrite + pshs cc,b + ldb #VRAM + orcc #$50 disable interrupt + stb BASEADDR+2 + sta ,x+ + clr BASEADDR+2 + puls cc,b,pc + +VRAMRead + pshs cc,b + ldb #VRAM + orcc #$50 disable interrupt + stb BASEADDR+2 + lda ,x+ + clr BASEADDR+2 + puls cc,b,pc + +* $01 - home cursor +CurHome clr <V.C80X,u + clr <V.C80Y,u + ldd <DISPPTR,u + std <CURSPTR,u + lbra L01DC + +* $03 - erase line +ErLine lbsr CrRtn do a CR +ErEOL + + ldb #80 + subb <V.C80X,u + clra + tfr d,y + bsr L0157 + rts + +* $0C - clear screen +ClrScrn bsr CurHome do home cursor, then erase to EOS + +* $0B - erase to end of screen +ErEOS ldb <V.C80Y,u + lda #80 + mul + addb <V.C80X,u + adca #$00 + pshs a,b save relative address + ldd #80*24 + subd ,s++ subtract relative address + tfr d,y +L0157 + ldd <CURSPTR,u + anda #$07 + tfr d,x + +L0159 + lda #32 + ora <V.Invers,u +ErOUT + pshs a + lbsr VRAMWrite + tfr x,d + anda #$07 + tfr d,x + puls a + leay -1,y + bne ErOUT + ldx #BASEADDR +L0189 +L018E +L01A0 clrb + rts + +* $02 XX YY - move cursor to col XX-32, row YY-32 +CurXY leax >L01B0,pcr + ldb #$02 +L01A8 stx <V.RTAdd,u + stb <V.NGChr,u + clrb + rts +L01B0 ldx #BASEADDR get HW address + ldb <V.NChr2,u get char2 in A + lda <V.NChar,u and char1 in B + suba #32 subtract 32 from B + blt L01A0 if less than 0, we're done + cmpa #79 compare against greatest column + bgt L01A0 branch if >79 + subb #32 else subtract 32 from A + blt L01A0 if less than 0, we're done + cmpb #24 compare against greatest row + bgt L01A0 branch if >24 + std <V.C80X,u else store A/B in new col/row position +L01CC lda #80 multiply B*80 to find new row + mul + addb <V.C80X,u + adca #$00 + addd <DISPPTR,u + anda #$3F + std <CURSPTR,u +L01DC pshs b,a + lda #14 Cursor Position (MSB) + sta ,x + lda ,s+ + sta $01,x + lda #15 Cursor Position (LSB) + sta ,x + lda ,s+ + sta $01,x + clrb + rts + +Check1F cmpa #$1F + bne Done1B sould it be WritErr ? + lda <V.NChr2,u + cmpa #$20 + beq InvOn + cmpa #$21 + beq InvOff +WritErr comb + ldb #E$Write + rts + +InvOn lda #$80 + sta <V.Invers,u + clrb + rts + +InvOff clr <V.Invers,u +L020F clrb + rts + +* $05 XX - set cursor off/on/color per XX-32 +CurOnOff leax >L0219,pcr + ldb #$01 + bra L01A8 +L0219 ldx #BASEADDR + lda <V.NChr2,u get next character + cmpa #$20 cursor code valid? + blt WritErr no, error + beq L022D + cmpa #$2A color code in range? + bgt L020F no, ignore +CurOn lda #$60 cursor on (all colors=on) + bra L022F +L022D lda #$20 cursor off +L022F ldb #10 + stb ,x + sta $01,x + clrb + rts +* FHL O-PAK compatibility. Needed to run DynaStar 3.0 +Check1B cmpa #$1B + bne Check1F + ldb #$01 + stb <V.NGChr,u + leax <Do1B,pcr + stx <V.RTAdd,u +Done1B clrb + rts + +Do1B ldx #BASEADDR get HW addr in X + lda <V.NChr2,u + cmpa #$41 + lbeq ErEOL + cmpa #$42 + lbeq ErEOS + cmpa #$45 + beq InsLine + cmpa #$46 + beq DelLine + cmpa #$47 + lbeq MoveRight + cmpa #$48 + lbeq MoveLeft + clrb + rts + +InsLine + ldb #22 +L3000 pshs b + lda #80 + mul + addd <DISPPTR,u + anda #$07 + tfr d,x + + ldb #80 +L3001 lbsr VRAMRead + bsr L3003 + sta ,-s + decb + bne L3001 + + ldb #79 +L3002 + lda b,s + lbsr VRAMWrite + bsr L3003 + decb + bpl L3002 + + leas 80,s + puls b + decb + cmpb <V.C80Y,u + bpl L3000 + + leax -160,x + ldy #80 + lbra L0159 clear cursor line + +L3003 + pshs a,b + tfr x,d + anda #$07 + tfr d,x + puls a,b,pc + +DelLine + ldb <V.C80Y,u + incb +L4000 pshs b + lda #80 + mul + addd <DISPPTR,u + anda #$07 + tfr d,x + ldb #80 + +L4001 lbsr VRAMRead + lbsr L3003 + sta ,-s + decb + bne L4001 + + leax -160,x + ldb #79 + +L4002 + lda b,s + lbsr VRAMWrite + bsr L3003 + decb + bpl L4002 + + leas 80,s + puls b + incb + cmpb #24 + bne L4000 + + ldy #80 + lbra L0159 clear last line + +MoveRight + ldb <V.C80Y,u + lda #80 + mul + addd <DISPPTR,u + anda #$07 + tfr d,x + ldb #72 + +L5001 lbsr VRAMRead + lbsr L3003 + sta ,-s + decb + bne L5001 + + leax -72,x + ldb #8 + lda #32 + ora <V.Invers,u +L5002 lbsr VRAMWrite + lbsr L3003 + decb + bne L5002 + + ldb #71 +L5003 + lda b,s + lbsr VRAMWrite + lbsr L3003 + decb + bpl L5003 + + leas 72,s + clrb + rts + + +MoveLeft + ldb <V.C80Y,u + lda #80 + mul + addd <DISPPTR,u + addd #8 + anda #$07 + tfr d,x + ldb #72 + +L6001 lbsr VRAMRead + lbsr L3003 + sta ,-s + decb + bne L6001 + + leax -80,x + + ldb #71 +L6003 + lda b,s + lbsr VRAMWrite + lbsr L3003 + decb + bpl L6003 + + leas 72,s + + ldb #8 + lda #32 + ora <V.Invers,u +L6002 lbsr VRAMWrite + lbsr L3003 + decb + bne L6002 + clrb + rts + + emod +eom equ * + end
--- a/level1/modules/init.asm Sun Jul 05 23:12:42 2020 +0200 +++ b/level1/modules/init.asm Mon Apr 12 10:47:50 2021 -0700 @@ -147,6 +147,9 @@ IFNE dalpha fcc "Dragon Alpha" ELSE + IFNE dplus + fcc "Dragon Plus" + ELSE IFNE atari fcc "Atari XL/XE" ELSE @@ -167,6 +170,7 @@ ENDC match IFNE coco3fpga ENDC match IFNE mc09 ENDC match IFNE atari + ENDC match IFNE dplus ENDC match IFNE dalpha ENDC match IFNE d64 ENDC match IFNE tano
--- a/level1/modules/rel.asm Sun Jul 05 23:12:42 2020 +0200 +++ b/level1/modules/rel.asm Mon Apr 12 10:47:50 2021 -0700 @@ -583,7 +583,7 @@ clr PIA0Base+3 - IFNE (tano+d64+dalpha) + IFNE (tano+d64+dalpha+dplus) clr PIA0Base+1 added for Dragon, works on CoCo ENDC IFNE H6309 @@ -626,7 +626,7 @@ decb bne L2649 - IFNE (tano+d64+dalpha) + IFNE (tano+d64+dalpha+dplus) tst <$72 ELSE ldd #$1212
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/modules/term_dplus.asm Mon Apr 12 10:47:50 2021 -0700 @@ -0,0 +1,74 @@ +******************************************************************** +* Term - VTIO VDG Device Descriptor +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ + + nam Term + ttl VTIO VDG Device Descriptor + + ifp1 + use defsfile + use cocovtio.d + endc + +tylg set Devic+Objct +atrv set ReEnt+rev +rev set $00 + +* Window descriptor definitions +szx set 80 number of columns for display +szy set 24 number for rows for display + IFGT Level-1 +wnum set 0 window number +sty set 1 window type +cpx set 0 x cursor position +cpy set 0 y cursor position + ENDC + + mod eom,name,tylg,atrv,mgrnam,drvnam + + fcb UPDAT. mode byte + fcb HW.Page extended controller address + fdb $FFE0 physical controller address + fcb initsize-*-1 initilization table size + fcb DT.SCF device type:0=scf,1=rbf,2=pipe,3=scf + fcb $00 case:0=up&lower,1=upper only + fcb $01 backspace:0=bsp,1=bsp then sp & bsp + fcb $00 delete:0=bsp over line,1=return + fcb $01 echo:0=no echo + fcb $01 auto line feed:0=off + fcb $00 end of line null count + fcb $01 pause:0=no end of page pause + fcb szy lines per page + fcb C$BSP backspace character + fcb C$DEL delete line character + fcb C$CR end of record character + fcb C$EOF end of file character + fcb C$RARR reprint line character + fcb C$SHRARR duplicate last line character + fcb C$PAUS pause character + fcb C$INTR interrupt character + fcb C$QUIT quit character + fcb C$BSP backspace echo character + fcb C$BELL line overflow character (bell) + fcb ModCoDPlus init value for dev ctl reg + fcb $00 baud rate + fdb name copy of descriptor name address + fcb $00 acia xon char + fcb $00 acia xoff char + fcb szx (szx) number of columns for display + fcb szy (szy) number of rows for display +initsize equ * + +name fcs /Term/ +mgrnam fcs /SCF/ +drvnam fcs /VTIO/ + + emod +eom equ * + end +
--- a/level1/modules/vtio.asm Sun Jul 05 23:12:42 2020 +0200 +++ b/level1/modules/vtio.asm Mon Apr 12 10:47:50 2021 -0700 @@ -305,7 +305,7 @@ sta 2,x write column strobe L016F lda ,x read row from PIA0Base - ifne (tano+d64+dalpha) + ifne (tano+d64+dalpha+dplus) lbsr DragonToCoCo Translate Dragon keyboard layout to CoCo endc @@ -558,7 +558,7 @@ ; Entry a=Dragon formatted keyboard input from PIA ; Exit a=CoCo formatted keyboard input from PIA ; - ifne (tano+d64+dalpha) + ifne (tano+d64+dalpha+dplus) DragonToCoCo pshs b Save B sta ,-s Save Dragon formatted keyboard on stack @@ -1049,31 +1049,46 @@ bne NoError lbra SetDsply + +* 6809/6309 - Try embedding LoadCoModule since short and only called from here. +* Entry: X=ptr to co-module name +SetupCoModule + lbsr LoadCoModule Load Co-module if not already loaded + puls u,y,x,a + bcs L0600 Couldn't load/link co-module, return with error + stx <V.Col,u save screen size + sta <V.CurCo,u current module in use? ($02=CoVDG, $04=C080, etc.) +L0600 rts + * All co-modules except grfdrv CoVDG fcs /CoVDG/ CoWP fcs /CoWP/ +CoDPlus fcs /CoDPlus/ CoHR fcs /CoHR/ Co42 fcs /Co42/ CoVGA fcs /CoVGA/ GoCoWP bita #ModCoWP CoWP needed ? - beq GOCoVGA No, try next co-module + beq GoCoDPlus No, try next co-module stb <V.CFlag,u allow lowercase clr <V.Caps,u set caps off lda #ModCoWP 'CoWP is loaded' bit ldx #$5019 80x25 WordPark RS supports 25 lines pshs u,y,x,a leax <CoWP,pcr -* 6809/6309 - Try embedding LoadCoModule since short and only called from here. -* Entry: X=ptr to co-module name -SetupCoModule - bsr LoadCoModule Load Co-module if not already loaded - puls u,y,x,a - bcs L0600 Couldn't load/link co-module, return with error - stx <V.Col,u save screen size - sta <V.CurCo,u current module in use? ($02=CoVDG, $04=C080, etc.) -L0600 rts + bra SetupCoModule + +GoCoDPlus + bita #ModCoDPlus Dragon Plus 80 column + beq GOCoVGA + stb <V.CFlag,u allow lowercase + clr <V.Caps,u set caps off + lda #ModCoDPlus CoDPlus is loaded bit + ldx #$5018 80x24 + pshs u,y,x,a + leax <CoDPlus,pcr + bra SetupCoModule GoCoVGA bita #ModCoVGA 64x32 CoVGA? beq GoCo42 No, then try next co-module @@ -1093,7 +1108,7 @@ ldx #$2A18 42x24 pshs u,y,x,a leax <Co42,pcr - bra SetupCoModule + lbra SetupCoModule GOCoHR ldb #$10 stb <V.CFlag,u @@ -1102,7 +1117,7 @@ ldx #$3318 51x24 pshs u,y,x,a leax <CoHR,pcr - bra SetupCoModule + lbra SetupCoModule LoadCoModule bita <V.COLoad,u Module loaded?