Mercurial > hg > Members > kono > nitros9-code
changeset 2351:87b07a1be8a0
Updated and added coco3_6309
author | boisy |
---|---|
date | Sun, 17 Jan 2010 21:42:26 +0000 |
parents | 12d835665f89 |
children | fdff845a078e |
files | level3/cmds/sfree.asm level3/coco3/cmds/sfree.asm level3/coco3/modules/nitro.asm level3/coco3_6309/bootfiles/makefile level3/coco3_6309/cmds/defsfile level3/coco3_6309/cmds/makefile level3/coco3_6309/defs/Defsfile level3/coco3_6309/defs/makefile level3/coco3_6309/defsfile level3/coco3_6309/makefile level3/coco3_6309/modules/defsfile level3/coco3_6309/modules/kernel/defsfile level3/coco3_6309/modules/kernel/makefile level3/coco3_6309/modules/makefile level3/coco3_6309/startup level3/coco3_6309/sys/makefile level3/coco3_6309/sys/motd level3/modules/end.asm level3/modules/nitro.asm |
diffstat | 19 files changed, 1680 insertions(+), 216 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/cmds/sfree.asm Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,216 @@ +******************************************************************** +* SFree - Show free memory for NitrOS-9 Level 3 +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ +* 1 ????/??/?? Alan DeKok +* Written from scratch. + + nam SFree + ttl program module + + + ifp1 + use defsfile + endc + +tylg set Prgrm+Objct +atrv set ReEnt+rev +rev set $01 +edition set 1 + + mod eom,name,tylg,atrv,start,size + +Cnt rmb 1 number of free blocks found +MaxCnt rmb 1 size of maximum free block + +u000F rmb 256 + rmb 200 for the stack +size equ . + +name fcs /SFree/ + fcb edition + +L005A fcb $00 temporary DAT image + fcb $00 + +Global fcb C$LF + fcc /----- Level III System Memory -----/ + fcb C$LF + fcc /System memory:/ + fcb C$CR + +SCF fcb C$LF + fcc /SCF local memory:/ + fcb C$CR + +RBF fcb C$LF + fcc /RBF local memory:/ + fcb C$CR + +skip leax 1,x +start lda ,x + cmpa #C$SPAC + beq skip + cmpa #C$CR CR? (no parameters) + lbne Help no, print out help + + leax >L005A,pcr + tfr x,d + ldx #D.SysMem ptr to system global memory map + ldy #$0002 2 bytes + ldu #u000F to a buffer + os9 F$CpyMem copy the memory + lbcs Exit exit on error + ldx ,u grab the offset to the buffer + leax $40,x ignore the first 2 8k blocks + ldy #$00C0 grab the rest of the page + os9 F$CpyMem copy the buffer + lbcs Exit exit on error + + leax >Global,pc + lbsr Print + lda #$C0 maximum number of pages to check + bsr Dump + + leax >L005A,pc + tfr x,d + ldx #$0660 Level III blocks + leas -2,s reserve 2 bytes on-stack + leau ,s point to the bytes + ldy #2 copy 2 bytes over + OS9 F$CpyMem + + lda ,s get SCF block number + ora 1,s and RBF block number + beq Level.2 if none, we're on a Level II system + + clr ,-s make a temporary DAT image + leax SCF,pc + bsr Local + + leas 1,s + clr ,s + leax RBF,pc + bsr Local + +Level.2 leas 2,s + +ClnExit clrb +Exit OS9 F$Exit + +Local lbsr Print print out the header + leax 2,s + tfr x,d + ldu #u000F + ldx #$0000 from the start of the block + ldy #$0040 64 bytes only + OS9 F$CpyMem + lda #$40 64 pages, and fall through to DUMP + +Dump clr <MaxCnt no maximum count of free blocks yet + clr <Cnt total count is zero, too. + ldx #u000F point to the buffer where the blocks are + pshs a save number of pages to check + clra we haven't found a free block yet + +d.skip ldb ,x+ grab a page flag + beq d.loop this page is free, go check it +d.skip1 dec ,s done one more byte + bne d.skip if we're not done them all yet, continue + bra d.done go to the 'done' routine + +d.loop inca found a maximum series of free page + inc <Cnt another total free page + dec ,s count down by one byte + beq d.done exit if we're done everything + + ldb ,x+ grab a page flag + beq d.loop if it's free, increment counters, etc. + cmpa <MaxCnt is this block larger than the previous free block? + bls d.skip1 if not, exit + sta <MaxCnt it's larger, so save it. + clra reset the count to zero + bra d.skip1 decrement counters, and find another free block + +d.done leas 1,s kill counter off of the stack + cmpa <MaxCnt A=maximum series of free pages + bls d.done1 + sta <MaxCnt + +d.done1 ldb <Cnt get total count of free pages + bsr PNum print out a decimal number in B + leax MSize,pc + ldy #MLen + lda #$01 STDOUT + OS9 I$Write dump it out + + ldb <MaxCnt get maximum size of the free area + bsr PNum print out the number + + leax ZSize,pc to maximum free size message + bsr Print go print it out + + ldb <Cnt get size again + lsrb + lsrb get number of K free + bsr PNum print it out + leax KFree,pc + bra Print + +PNum pshs a save a junk byte + ldx #$2F3A other data + pshs x +do.100 inc ,s + subb #100 + bcc do.100 +do.10 dec 1,s + addb #10 + bcc do.10 + addb #$30 + stb 2,s + + leax ,s point to the numbers + ldy #3 number of bytes to print out + ldd ,s + cmpa #'0 leading 0? + bne pn.ok no, go print + leax 1,x skip this byte + leay -1,y one less to print + cmpb #'0 another leading 0? + bne pn.ok no, go print + leax 1,x skip this byte + leay -1,y one less to print. + +pn.ok lda #1 + OS9 I$Write dump it out + puls a,x,pc dump 3 bytes off of the stack, and return + +MSize fcc / free pages, largest block / +Mlen equ *-MSize +ZSize fcc / pages./ + fcb C$CR +KFree fcc /K of free RAM./ + fcb C$CR + +Print ldy #$0200 + lda #$01 to STDOUT + OS9 I$WritLn + rts + +Help leax HMsg,pc point to the message + bsr Print dump it out + lbra ClnExit and exit + +HMsg fcc /SFree: Level III utility to show free system memory./ + fcb C$LF + fcc / Beta version 0.9/ + fcb C$CR + + emod +eom equ * + end +
--- a/level3/coco3/cmds/sfree.asm Sun Jan 17 21:38:06 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ -******************************************************************** -* SFree - Show free memory for NitrOS-9 Level 3 -* -* $Id$ -* -* Edt/Rev YYYY/MM/DD Modified by -* Comment -* ------------------------------------------------------------------ -* 1 ????/??/?? Alan DeKok -* Written from scratch. - - nam SFree - ttl program module - - - ifp1 - use defsfile - endc - -tylg set Prgrm+Objct -atrv set ReEnt+rev -rev set $01 -edition set 1 - - mod eom,name,tylg,atrv,start,size - -Cnt rmb 1 number of free blocks found -MaxCnt rmb 1 size of maximum free block - -u000F rmb 256 - rmb 200 for the stack -size equ . - -name fcs /SFree/ - fcb edition - -L005A fcb $00 temporary DAT image - fcb $00 - -Global fcb C$LF - fcc /----- Level III System Memory -----/ - fcb C$LF - fcc /System memory:/ - fcb C$CR - -SCF fcb C$LF - fcc /SCF local memory:/ - fcb C$CR - -RBF fcb C$LF - fcc /RBF local memory:/ - fcb C$CR - -skip leax 1,x -start lda ,x - cmpa #C$SPAC - beq skip - cmpa #C$CR CR? (no parameters) - lbne Help no, print out help - - leax >L005A,pcr - tfr x,d - ldx #D.SysMem ptr to system global memory map - ldy #$0002 2 bytes - ldu #u000F to a buffer - os9 F$CpyMem copy the memory - lbcs Exit exit on error - ldx ,u grab the offset to the buffer - leax $40,x ignore the first 2 8k blocks - ldy #$00C0 grab the rest of the page - os9 F$CpyMem copy the buffer - lbcs Exit exit on error - - leax >Global,pc - lbsr Print - lda #$C0 maximum number of pages to check - bsr Dump - - leax >L005A,pc - tfr x,d - ldx #$0660 Level III blocks - leas -2,s reserve 2 bytes on-stack - leau ,s point to the bytes - ldy #2 copy 2 bytes over - OS9 F$CpyMem - - lda ,s get SCF block number - ora 1,s and RBF block number - beq Level.2 if none, we're on a Level II system - - clr ,-s make a temporary DAT image - leax SCF,pc - bsr Local - - leas 1,s - clr ,s - leax RBF,pc - bsr Local - -Level.2 leas 2,s - -ClnExit clrb -Exit OS9 F$Exit - -Local lbsr Print print out the header - leax 2,s - tfr x,d - ldu #u000F - ldx #$0000 from the start of the block - ldy #$0040 64 bytes only - OS9 F$CpyMem - lda #$40 64 pages, and fall through to DUMP - -Dump clr <MaxCnt no maximum count of free blocks yet - clr <Cnt total count is zero, too. - ldx #u000F point to the buffer where the blocks are - pshs a save number of pages to check - clra we haven't found a free block yet - -d.skip ldb ,x+ grab a page flag - beq d.loop this page is free, go check it -d.skip1 dec ,s done one more byte - bne d.skip if we're not done them all yet, continue - bra d.done go to the 'done' routine - -d.loop inca found a maximum series of free page - inc <Cnt another total free page - dec ,s count down by one byte - beq d.done exit if we're done everything - - ldb ,x+ grab a page flag - beq d.loop if it's free, increment counters, etc. - cmpa <MaxCnt is this block larger than the previous free block? - bls d.skip1 if not, exit - sta <MaxCnt it's larger, so save it. - clra reset the count to zero - bra d.skip1 decrement counters, and find another free block - -d.done leas 1,s kill counter off of the stack - cmpa <MaxCnt A=maximum series of free pages - bls d.done1 - sta <MaxCnt - -d.done1 ldb <Cnt get total count of free pages - bsr PNum print out a decimal number in B - leax MSize,pc - ldy #MLen - lda #$01 STDOUT - OS9 I$Write dump it out - - ldb <MaxCnt get maximum size of the free area - bsr PNum print out the number - - leax ZSize,pc to maximum free size message - bsr Print go print it out - - ldb <Cnt get size again - lsrb - lsrb get number of K free - bsr PNum print it out - leax KFree,pc - bra Print - -PNum pshs a save a junk byte - ldx #$2F3A other data - pshs x -do.100 inc ,s - subb #100 - bcc do.100 -do.10 dec 1,s - addb #10 - bcc do.10 - addb #$30 - stb 2,s - - leax ,s point to the numbers - ldy #3 number of bytes to print out - ldd ,s - cmpa #'0 leading 0? - bne pn.ok no, go print - leax 1,x skip this byte - leay -1,y one less to print - cmpb #'0 another leading 0? - bne pn.ok no, go print - leax 1,x skip this byte - leay -1,y one less to print. - -pn.ok lda #1 - OS9 I$Write dump it out - puls a,x,pc dump 3 bytes off of the stack, and return - -MSize fcc / free pages, largest block / -Mlen equ *-MSize -ZSize fcc / pages./ - fcb C$CR -KFree fcc /K of free RAM./ - fcb C$CR - -Print ldy #$0200 - lda #$01 to STDOUT - OS9 I$WritLn - rts - -Help leax HMsg,pc point to the message - bsr Print dump it out - lbra ClnExit and exit - -HMsg fcc /SFree: Level III utility to show free system memory./ - fcb C$LF - fcc / Beta version 0.9/ - fcb C$CR - - emod -eom equ * - end -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3/modules/nitro.asm Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,219 @@ +******************************************************************** +* NitrOS9 - Sets up NitrOS-9 Level 3 +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ +* ????/??/?? Alan DeKok +* Created. + + nam NitrOS9 + ttl Sets up NitrOS-9 Level 3 + + ifp1 + use defsfile + endc + +tylg set Systm+Obj6309 +atrv set ReEnt+rev +rev set $04 + mod eom,name,tylg,atrv,Start,size +u0000 rmb 0 +size equ . +name equ * + fcs /NitrOS9/ + fcb $01 + +Start ldd #$10ff illegal instruction, /0 trap + std >0 + ldd #$0008 + std >2 + ldd #$20FE + std >4 + +* allocate a block of RAM for SCF drivers + ldu #eom get the size of this module + leax eom,pc point to the next module + ldy #L3.SCF + +all.ram bsr f.modul move some modules over + tstb did we, in fact, move any? + beq all.done if not, we're done + stb ,y+ save the starting RAM block number + bra all.ram and go get another block of RAM + +* Verify the rest of the boot: start of old OS9p1 code +all.done ldd <D.BtSz get the size of the boot + subr u,d take out the size of the modules we're skipping +* F$VBlock has NO exit conditions, and doesn't change any registers + OS9 F$VBlock go verify the rest of the OS9Boot file +* do NOT use U after this! + +* set the DAT image of the allocate blocks to be RAMInUse, rather than +* Module In block + ldx <D.SysDAT point to the system DAT image + ldb $0D,x grab the block# of the last allocated block + incb account for block 0: leave SCF & RBF as ModInBlk + lda #RAMInUse set the RAM to be in use... + ldx <D.BlkMap point to system block allocation map + +set.lp sta ,x+ allocate the RAM + decb count down + bne set.lp continue until done + + ldx <D.BlkMap grab the block map again + sta <$3F,x mark the boot track block as used, too. + +* mark block 1 ($2000-$3FFF) in the system memory map as allocated + ldx <D.SysMem ptr to low system memory + ldd #$0100+L3.Size RAMInUse, N times + leax $20,x to the start of block 1 in the block map +blk.lp sta ,x+ set it to be in use + decb + bne blk.lp + +* U = total size of the crap we've removed + ldd <D.BtSz size of the bootfile + subr u,d take out size of code we've removed + std <D.BtSz + ldd <D.BtPtr + addr u,d point to new start of the OS9Booto file + pshs d and save for later + tfr u,d size of code we've taken out + subd #$00FF round _down_ a page + + ldx <D.SysMem pt to system memory map + ldb <D.BtPtr point to start of OS9Boot in memory + abx go to it + +* remove the memory from the system memory map +m.lp clr ,x+ set the RAM to be not in use + deca count down the number of pages we've moved + bne m.lp continue + bra x.done + + leax -1,x point to last unused byte + tfr x,d move into an address register + lsra + lsra + lsra + lsra + lsra now A=block number of highest block + ldb <D.BtPtr + lsrb + lsrb + lsrb + lsrb + lsrb + subr b,a same block? (now A=number of blocks to delete) + beq x.done yes, don't do anything + + ldu <D.BlkMap point to system-wide block map + ldx <D.SysDAT pointer to system DAT image + lslb convert to DAT image offset + incb point to block number, not flag + abx point to the offset + +x.loop ldb ,x++ grab a block number + clr b,u mark the block as unused + deca + bne x.loop continue until done + +x.done puls d restore ptr to new start of the OS9Boot file + std <D.BtPtr and save it again + clrb + rts + +*============================================================================ +* +* Copy the modules into local memory. +* Copied from [X] to a module called _end +* Entry: X = ptr to start at +* U = size of stuff deleted so far +* Exit : X = ptr to module after _end module +* U = total size of stuff deleted + +f.modul pshs b,x,y,u save start of area to move, size moved before +* grab the name: is it _end? +is.end ldd ,x + cmpd #$87Cd is it a module? + bne f.exit no, exit + ldd M$Name,x get the name pointer + ldd d,x get 2 bytes of the name + cmpd #$5F65 '_e'? + beq fnd.end yes, found it + +* skip this module if not at the end yet + ldd M$Size,x grab the module size + leax d,x go to the next module + leau d,u add in the size of it + bra is.end and continue looking for end + +f.exit clrb we're done everything + puls a,x,y,u,pc + +* copy modules over, and verify +fnd.end ldy 1,s restore ptr to start of area to move + tfr u,w new size + subw 5,s take out old size: W = total size + cmpw #L3.Size*$FF greater than the room available? + bhs f.exit yes, exit without allocating RAM + +* skip _end module + ldd M$Size,x get size of the _end module + leax d,x skip it + leau d,u + stx 1,s save new start ptr + stu 5,s and new size + +* we've found blocks to move, so let's allocate some RAM + ldb #L3.Blks 1 block to allocate + OS9 F$AllRAM allocate some RAM + + std >$0642 map it into system DAT image + stb >$FFA1 map into physical RAM + stb ,s save starting block number + + ifeq L3.Blks-2 more than 1 block? + incb yes, go up by a block + std >$0644 map it into the system DAT image + stb >$FFA2 and into the hardware + endc + +* move the modules to local RAM + pshsw save size of the block to move + ldx #L3.Start+L3.Size where to move the stuff to + tfm y+,x+ move it from the OS9Boot file to IOMan local memory + +* verify the modules + puls d grab the size of the block + ldx #L3.Start+L3.Size start ptr again + OS9 F$VBlock verify the block + +* get A = total size (in pages) of stuff moved over + addd #L3.Size+$FF round up to the nearest block, adding in $20 + +* start with all local RAM deallocated + ldx #L3.Start to the start of the block + ldb #L3.Size-1 number of pages to mark as free +clr.lp clr b,x set them to be all clear. + decb + bpl clr.lp count down until B=-1 + +* allocate local RAM to the size of the modules we've moved over + ldb #RAMInUse RAM in use +all.lp stb ,x+ make the page allocated + deca count down a page + bne all.lp and continue + + lda #'- a hyphen + jsr <D.BtBug print it out + +* restore start, size pointers and exit + puls b,x,y,u,pc + + emod +eom equ * + end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/bootfiles/makefile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,119 @@ +include $(NITROS9DIR)/rules.mak + +# Module directory +MD = ../modules +# Commands directory +CD = ../cmds + +DEPENDS = ./makefile + +KERNEL_1773 = $(MD)/rel_80 $(MD)/boot_1773_6ms $(MD)/krn +KERNEL_1773_50HZ = $(MD)/rel_80_50hz $(MD)/boot_1773_6ms $(MD)/krn +KERNEL_DW3 = $(MD)/rel_80 $(MD)/boot_dw3 $(MD)/krn + +# NitrOS-9 disk bootfile to allow booting from DriveWire 3 server +BOOTFILE_DW3 = $(MD)/krnp2 $(MD)/ioman $(MD)/init \ + $(MD)/rbf.mn \ + $(MD)/rbdw3.dr $(MD)/dw3.sb \ + $(MD)/ddx0.dd $(MD)/x1.dd $(MD)/x2.dd $(MD)/x3.dd \ + $(MD)/rb1773.dr $(MD)/d0_40d.dd $(MD)/d1_40d.dd \ + $(MD)/d2_40d.dd $(MD)/ddd0_40d.dd \ + $(MD)/scf.mn $(MD)/vtio.dr \ + $(MD)/keydrv_cc3.sb $(MD)/joydrv_joy.sb $(MD)/snddrv_cc3.sb \ + $(MD)/cowin.io $(MD)/covdg.io \ + $(MD)/term_win80.dt \ + $(MD)/w.dw $(MD)/w1.dw $(MD)/w2.dw $(MD)/w3.dw $(MD)/w4.dw \ + $(MD)/w5.dw $(MD)/w6.dw $(MD)/w7.dw \ + $(MD)/scdwp.dr $(MD)/p_scdwp.dd \ + $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd \ + $(MD)/clock_60hz $(MD)/clock2_dw3 + +# NitrOS-9 disk bootfile to allow booting from WD1773 disk controller +BOOTFILE_40D = $(MD)/krnp2 $(MD)/ioman $(MD)/init \ + $(MD)/rbf.mn \ + $(MD)/rb1773.dr $(MD)/d0_40d.dd $(MD)/d1_40d.dd \ + $(MD)/d2_40d.dd $(MD)/ddd0_40d.dd \ + $(MD)/scf.mn $(MD)/vtio.dr \ + $(MD)/keydrv_cc3.sb $(MD)/joydrv_joy.sb $(MD)/snddrv_cc3.sb \ + $(MD)/cowin.io $(MD)/covdg.io \ + $(MD)/term_win80.dt \ + $(MD)/w.dw $(MD)/w1.dw $(MD)/w2.dw $(MD)/w3.dw $(MD)/w4.dw \ + $(MD)/w5.dw $(MD)/w6.dw $(MD)/w7.dw \ + $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd \ + $(MD)/clock_60hz $(MD)/clock2_soft + +BOOTFILE_80D = $(MD)/krnp2 $(MD)/ioman $(MD)/init \ + $(MD)/rbf.mn \ + $(MD)/rb1773.dr $(MD)/d0_80d.dd $(MD)/d1_40d.dd \ + $(MD)/d2_40d.dd $(MD)/ddd0_80d.dd \ + $(MD)/scf.mn $(MD)/vtio.dr \ + $(MD)/keydrv_cc3.sb $(MD)/joydrv_joy.sb $(MD)/snddrv_cc3.sb \ + $(MD)/cowin.io $(MD)/covdg.io \ + $(MD)/term_win80.dt \ + $(MD)/w.dw $(MD)/w1.dw $(MD)/w2.dw $(MD)/w3.dw $(MD)/w4.dw \ + $(MD)/w5.dw $(MD)/w6.dw $(MD)/w7.dw \ + $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd \ + $(MD)/clock_60hz $(MD)/clock2_soft + +BOOTFILE_40D_50HZ = $(MD)/krnp2 $(MD)/ioman $(MD)/init \ + $(MD)/rbf.mn \ + $(MD)/rb1773.dr $(MD)/d0_40d.dd $(MD)/d1_40d.dd \ + $(MD)/d2_40d.dd $(MD)/ddd0_40d.dd \ + $(MD)/scf.mn $(MD)/vtio.dr \ + $(MD)/keydrv_cc3.sb $(MD)/joydrv_joy.sb $(MD)/snddrv_cc3.sb \ + $(MD)/cowin.io $(MD)/covdg.io \ + $(MD)/term_win80.dt \ + $(MD)/w.dw $(MD)/w1.dw $(MD)/w2.dw $(MD)/w3.dw $(MD)/w4.dw \ + $(MD)/w5.dw $(MD)/w6.dw $(MD)/w7.dw \ + $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd \ + $(MD)/clock_50hz $(MD)/clock2_soft + +BOOTFILE_80D_50HZ = $(MD)/krnp2 $(MD)/ioman $(MD)/init \ + $(MD)/rbf.mn \ + $(MD)/rb1773.dr $(MD)/d0_80d.dd $(MD)/d1_40d.dd \ + $(MD)/d2_40d.dd $(MD)/ddd0_80d.dd \ + $(MD)/scf.mn $(MD)/vtio.dr \ + $(MD)/keydrv_cc3.sb $(MD)/joydrv_joy.sb $(MD)/snddrv_cc3.sb \ + $(MD)/cowin.io $(MD)/covdg.io \ + $(MD)/term_win80.dt \ + $(MD)/w.dw $(MD)/w1.dw $(MD)/w2.dw $(MD)/w3.dw $(MD)/w4.dw \ + $(MD)/w5.dw $(MD)/w6.dw $(MD)/w7.dw \ + $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd \ + $(MD)/clock_50hz $(MD)/clock2_soft + +BOOTFILES = bootfile_40d bootfile_40d_50hz bootfile_80d bootfile_80d_50hz bootfile_dw3 +KERNELS = kernel_1773 kernel_1773_50hz kernel_dw3 + +ALLOBJS = $(BOOTFILES) $(KERNELS) + +all: $(ALLOBJS) + +# Bootfiles +bootfile_40d: $(BOOTFILE_40D) $(DEPENDS) + $(MERGE) $(BOOTFILE_40D)>$@ + +bootfile_40d_50hz: $(BOOTFILE_40D_50HZ) $(DEPENDS) + $(MERGE) $(BOOTFILE_40D_50HZ)>$@ + +bootfile_80d: $(BOOTFILE_80D) $(DEPENDS) + $(MERGE) $(BOOTFILE_80D)>$@ + +bootfile_80d_50hz: $(BOOTFILE_80D_50HZ) $(DEPENDS) + $(MERGE) $(BOOTFILE_80D_50HZ)>$@ + +bootfile_dw3: $(BOOTFILE_DW3) $(DEPENDS) + $(MERGE) $(BOOTFILE_DW3)>$@ + +# Kernels +kernel_1773: $(KERNEL_1773) $(DEPENDS) + $(MERGE) $(KERNEL_1773)>$@ + +kernel_1773_50hz: $(KERNEL_1773_50HZ) $(DEPENDS) + $(MERGE) $(KERNEL_1773_50HZ)>$@ + +kernel_dw3: $(KERNEL_DW3) $(DEPENDS) + $(MERGE) $(KERNEL_DW3)>$@ + +clean: + $(RM) $(ALLOBJS) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/cmds/defsfile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,2 @@ + use ../defsfile + use scfdefs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/cmds/makefile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,68 @@ +PORT = coco3 +include $(NITROS9DIR)/rules.mak + +vpath %.asm $(LEVEL3)/cmds:$(LEVEL2)/cmds:$(LEVEL1)/cmds:$(NITROS9DIR)/3rdparty/packages/basic09 + +DEPENDS = ./makefile +AFLAGS += -e -aH6309=1 -i=$(NITROS9DIR)/3rdparty/packages/basic09 + +CMDS = asm attr backup binex build cmp cobbler copy cputype \ + date dcheck debug ded deiniz del deldir devs dir dirsort disasm \ + display dmem dmode dsave dump echo edit error exbin \ + format free grfdrv help ident iniz irqs link list load login \ + makdir mdir megaread merge mfree mmap modpatch montype mpi os9gen padrom park \ + pmap proc procs prompt pwd pxd reboot rename save setime \ + shell_21 sleep smap sfree tee tmode touch tsmon tuneport unlink verify wcreate xmode + +CMDS_D2 = basic09 runb gfx2 gfx inkey syscall copy del echo format \ + merge os9gen prompt tmode + +SHELLMODS = shellplus date deiniz echo iniz link load save unlink +UTILPAK1 = attr build copy del deldir dir display list makdir mdir \ + merge mfree procs rename tmode + +# Files not compilable by os9asm: config +all: $(CMDS) $(CMDS_D2) shell utilpak1 $(DEPENDS) + +runb: runb.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -aPWD=1 + $(MERGE) $@ $(SUBS)>$@.tmp + $(RM) $@ + $(MOVE) $@.tmp $@ + +tmode: xmode.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -aTMODE=1 + +xmode: xmode.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -aXMODE=1 + +pwd: pd.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -aPWD=1 + +pxd: pd.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -aPXD=1 + +shell: $(SHELLMODS) $(DEPENDS) + $(MERGE) $(SHELLMODS)>$@ + @$(ECHO) "*** Be sure the size of this file is less than 7681 bytes! ***" + @ls -l $@ + @$(ECHO) "" + +utilpak1: $(UTILPAK1) $(DEPENDS) + $(MERGE) $(UTILPAK1)>$@ + @$(ECHO) "*** Be sure the size of this file is less than 7681 bytes! ***" + @ls -l $@ + @$(ECHO) "" + +clean: + $(RM) shell utilpak1 $(SUBS) $(SHELLMODS) $(CMDS) $(CMDS_D2) + +# Only $(CMDS) are shown here +showobjs: + @$(ECHO) shell utilpak1 $(CMDS) + +showobjs_d2: + @$(ECHO) $(CMDS_D2) + +identify: + $(IDENT_SHORT) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/defs/Defsfile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,8 @@ +Level equ 3 + + ifp1 + use /dd/defs/os9defs + use /dd/defs/rbfdefs + use /dd/defs/scfdefs + use /dd/defs/systype + endc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/defs/makefile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,32 @@ +PORT = coco3 +include $(NITROS9DIR)/rules.mak + +DEPENDS = ./makefile + +DEFOPTS = -ls -x -z -aLevel=3 +PERMDEFS = Defsfile +DEFS = OS9Defs RBFDefs SCFDefs SysType VTIODefs +ALLOBJS = $(DEFS) $(PERMDEFS) + +all: $(ALLOBJS) + +OS9Defs: $(DEFSDIR)/os9defs + $(AS) $(AFLAGS) $(DEFOPTS) -aOS9DEFS=0 $< > $@ + +RBFDefs: $(DEFSDIR)/rbfdefs + $(AS) $(AFLAGS) $(DEFOPTS) -aRBFDEFS=0 $< > $@ + +SCFDefs: $(DEFSDIR)/scfdefs + $(AS) $(AFLAGS) $(DEFOPTS) -aSCFDEFS=0 $< > $@ + +SysType: $(DEFSDIR)/systype + $(AS) $(AFLAGS) $(DEFOPTS) -aSYSTYPE=0 $< > $@ + +VTIODefs: $(DEFSDIR)/vtiodefs_cc3 + $(AS) $(AFLAGS) $(DEFOPTS) -aVTIODEFS=0 $< > $@ + +clean: + $(RM) $(DEFS) + +showobjs: + @$(ECHO) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/defsfile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,7 @@ +Level equ 3 + + use os9defs + use scfdefs + use rbfdefs + use systype + use vtiodefs_cc3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/makefile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,331 @@ +PORT = coco3 +include $(NITROS9DIR)/rules.mak + +CPU = 6809 +LEVEL = 3 + +DISTRO = $(CPU)L$(LEVEL) +DISTRONAME = nos9$(CPU)l$(LEVEL) +DISTROVER = $(DISTRONAME)$(NITROS9VER)$(PORT) +BOOTFILE_DW3 = bootfiles/bootfile_dw3 +BOOTFILE_40D = bootfiles/bootfile_40d +BOOTFILE_80D = bootfiles/bootfile_80d +BOOTFILE_40D_50HZ = bootfiles/bootfile_40d_50hz +BOOTFILE_80D_50HZ = bootfiles/bootfile_80d_50hz +KERNELFILE = bootfiles/kernel_1773 +KERNELFILE_50HZ = bootfiles/kernel_1773_50hz +KERNELFILE_DW3 = bootfiles/kernel_dw3 +DIRS = cmds modules defs sys bootfiles + +CMDS = $(shell $(CD) cmds; make showobjs) +CMDS_D2 = $(shell $(CD) cmds; make showobjs_d2) +BOOTTRACK = $(shell $(CD) modules; make showboottrack) +KERNEL = $(shell $(CD) modules; make showkernel) +SYSMODS = $(shell $(CD) modules; make showsysmods) +CLOCKS = $(shell $(CD) modules; make showclocks) +RBF = $(shell $(CD) modules; make showrbf) +SCF = $(shell $(CD) modules; make showscf) +PIPE = $(shell $(CD) modules; make showpipe) +MODULECMDS = shell grfdrv del echo format makdir merge os9gen prompt tmode + +DEFS = $(shell $(CD) defs; make showobjs) +SYSBIN = $(shell $(CD) sys; make showbinobjs) +SYSTEXT = $(shell $(CD) sys; make showtextobjs) +STARTUP = startup +SYSGO = sysgo_dd + +PACKAGENAME = $(DISTROVER).zip +DSKDW3 = $(DISTROVER)_dw3.dsk +LDSKDW3 = $(DISTRONAME)_dw3.dsk +DSK360K_1 = $(DISTROVER)_40d_1.dsk +LDSK360K_1 = $(DISTRONAME)_40d_1.dsk +DSK360K_1_50HZ = $(DISTROVER)_40d_1_50hz.dsk +LDSK360K_1_50HZ = $(DISTRONAME)_40d_1_50hz.dsk +DSK360K_2 = $(DISTROVER)_40d_2.dsk +LDSK360K_2 = $(DISTRONAME)_40d_2.dsk +DSK720K = $(DISTROVER)_80d.dsk +LDSK720K = $(DISTRONAME)_80d.dsk +DSK720K_50HZ = $(DISTROVER)_80d_50hz.dsk +LDSK720K_50HZ = $(DISTRONAME)_80d_50hz.dsk +TESTDSK = test.dsk + +DSKS = $(DSKDW3) $(DSK360K_1) $(DSK360K_1_50HZ) $(DSK360K_2) $(DSK720K) $(DSK720K_50HZ) +LDSKS = $(LDSKDW3) $(LDSK360K_1) $(LDSK360K_1_50HZ) $(LDSK360K_2) $(LDSK720K) $(LDSK720K_50HZ) + +# Make all components +all: + @$(ECHO) "**************************************************" + @$(ECHO) "* *" + @$(ECHO) "* NitrOS-9/$(CPU) Level 2 Distribution *" + @$(ECHO) "* *" + @$(ECHO) "**************************************************" + $(foreach dir, $(DIRS), ($(CD) $(dir); make);) + +# Clean all components +clean: dskclean + $(foreach dir, $(DIRS), ($(CD) $(dir); make clean);) + +dskclean: + -$(RM) $(PACKAGENAME) $(DSKS) $(LDSKS) + +dsk: all $(PACKAGENAME) + +dskcopy: dsk + $(CP) $(DSKS) $(DSKDIR) + +scp: dsk + scp $(PACKAGENAME) boisy@cvs.nitros9.org:/home/nitros9/public_html + +$(PACKAGENAME): $(DSKS) ../../ReadMe ../../ChangeLog + $(ARCHIVE) $@ $^ + +$(DSKDW3): + -$(RM) $@ + $(OS9FORMAT_DW3) -q $@ -n"NitrOS-9/$(CPU) Level 2" + $(OS9GEN) $@ -b=$(BOOTFILE_DW3) -t=$(KERNELFILE_DW3) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(MAKDIR) $@,DEFS + $(CP) modules/$(SYSGO) $@,sysgo + $(OS9ATTR_EXEC) $@,sysgo + $(CD) cmds; $(CP) $(CMDS) ../$@,CMDS + $(foreach file, $(CMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);) + $(CD) sys; $(CP) $(SYSBIN) ../$@,SYS + $(foreach file, $(SYSBIN), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) sys; $(CPL) $(SYSTEXT) ../$@,SYS + $(foreach file, $(SYSTEXT), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(foreach file, $(DEFS), $(OS9ATTR_TEXT) $@,DEFS/$(file);) + $(CPL) $(STARTUP) $@,. + $(foreach file, $(STARTUP), $(OS9ATTR_TEXT) $@,$(file);) + $(MAKDIR) $@,NITROS9 + $(MAKDIR) $@,NITROS9/$(DISTRO) + $(MAKDIR) $@,NITROS9/$(DISTRO)/CMDS + $(CD) cmds; $(CP) $(MODULECMDS) ../$@,NITROS9/$(DISTRO)/CMDS + $(foreach file, $(MODULECMDS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/CMDS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(CD) modules; $(CP) $(BOOTTRACK) ../$@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(foreach file, $(BOOTTRACK), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(CD) modules; $(CP) $(KERNEL) ../$@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(foreach file, $(KERNEL), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/KERNEL/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(CD) modules; $(CP) $(SYSMODS) ../$@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(foreach file, $(SYSMODS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(CD) modules; $(CP) $(CLOCKS) ../$@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(foreach file, $(CLOCKS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/RBF + $(CD) modules; $(CP) $(RBF) ../$@,NITROS9/$(DISTRO)/MODULES/RBF + $(foreach file, $(RBF), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/RBF/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SCF + $(CD) modules; $(CP) $(SCF) ../$@,NITROS9/$(DISTRO)/MODULES/SCF + $(foreach file, $(SCF), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/SCF/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/PIPE + $(CD) modules; $(CP) $(PIPE) ../$@,NITROS9/$(DISTRO)/MODULES/PIPE + $(foreach file, $(PIPE), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/PIPE/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/BOOTLISTS + $(CD) bootlists; $(CPL) *.bl ../$@,NITROS9/$(DISTRO)/BOOTLISTS + $(MAKDIR) $@,NITROS9/$(DISTRO)/SCRIPTS + $(CD) scripts; $(CPL) mb* ../$@,NITROS9/$(DISTRO)/SCRIPTS + $(RM) $(LDSKDW3) + $(SOFTLINK) $@ $(LDSKDW3) + +$(DSK360K_1): + -$(RM) $@ + $(OS9FORMAT_DS40) -q $@ -n"NitrOS-9/$(CPU) Level 2 Disk 1" + $(OS9GEN) $@ -b=$(BOOTFILE_40D) -t=$(KERNELFILE) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(MAKDIR) $@,DEFS + $(CP) modules/$(SYSGO) $@,sysgo + $(OS9ATTR_EXEC) $@,sysgo + $(CD) cmds; $(CP) $(CMDS) ../$@,CMDS + $(foreach file, $(CMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);) + $(CD) sys; $(CP) $(SYSBIN) ../$@,SYS + $(foreach file, $(SYSBIN), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) sys; $(CPL) $(SYSTEXT) ../$@,SYS + $(foreach file, $(SYSTEXT), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(foreach file, $(DEFS), $(OS9ATTR_TEXT) $@,DEFS/$(file);) + $(CPL) $(STARTUP) $@,. + $(foreach file, $(STARTUP), $(OS9ATTR_TEXT) $@,$(file);) + $(RM) $(LDSK360K_1) + $(SOFTLINK) $@ $(LDSK360K_1) + +$(DSK360K_1_50HZ): + -$(RM) $@ + $(OS9FORMAT_DS40) -q $@ -n"NitrOS-9/$(CPU) Level 2 Disk 1" + $(OS9GEN) $@ -b=$(BOOTFILE_40D_50HZ) -t=$(KERNELFILE_50HZ) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(MAKDIR) $@,DEFS + $(CP) modules/$(SYSGO) $@,sysgo + $(OS9ATTR_EXEC) $@,sysgo + $(CD) cmds; $(CP) $(CMDS) ../$@,CMDS + $(foreach file, $(CMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);) + $(CD) sys; $(CP) $(SYSBIN) ../$@,SYS + $(foreach file, $(SYSBIN), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) sys; $(CPL) $(SYSTEXT) ../$@,SYS + $(foreach file, $(SYSTEXT), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(foreach file, $(DEFS), $(OS9ATTR_TEXT) $@,DEFS/$(file);) + $(CPL) $(STARTUP) $@,. + $(foreach file, $(STARTUP), $(OS9ATTR_TEXT) $@,$(file);) + $(RM) $(LDSK360K_1_50HZ) + $(SOFTLINK) $@ $(LDSK360K_1_50HZ) + +$(DSK360K_2): + -$(RM) $@ + $(OS9FORMAT_DS40) -q $@ -n"NitrOS-9/$(CPU) Level 2 Disk 2" + $(MAKDIR) $@,CMDS + $(CD) cmds; $(CP) $(CMDS_D2) ../$@,CMDS + $(foreach file, $(CMDS_D2), $(OS9ATTR_EXEC) $@,CMDS/$(file);) + $(MAKDIR) $@,NITROS9 + $(MAKDIR) $@,NITROS9/$(DISTRO) + $(MAKDIR) $@,NITROS9/$(DISTRO)/CMDS + $(CD) cmds; $(CP) $(MODULECMDS) ../$@,NITROS9/$(DISTRO)/CMDS + $(foreach file, $(MODULECMDS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/CMDS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(CD) modules; $(CP) $(BOOTTRACK) ../$@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(foreach file, $(BOOTTRACK), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(CD) modules; $(CP) $(KERNEL) ../$@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(foreach file, $(KERNEL), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/KERNEL/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(CD) modules; $(CP) $(SYSMODS) ../$@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(foreach file, $(SYSMODS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(CD) modules; $(CP) $(CLOCKS) ../$@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(foreach file, $(CLOCKS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/RBF + $(CD) modules; $(CP) $(RBF) ../$@,NITROS9/$(DISTRO)/MODULES/RBF + $(foreach file, $(RBF), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/RBF/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SCF + $(CD) modules; $(CP) $(SCF) ../$@,NITROS9/$(DISTRO)/MODULES/SCF + $(foreach file, $(SCF), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/SCF/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/PIPE + $(CD) modules; $(CP) $(PIPE) ../$@,NITROS9/$(DISTRO)/MODULES/PIPE + $(foreach file, $(PIPE), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/PIPE/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/BOOTLISTS + $(CD) bootlists; $(CPL) *.bl ../$@,NITROS9/$(DISTRO)/BOOTLISTS + $(MAKDIR) $@,NITROS9/$(DISTRO)/SCRIPTS + $(CD) scripts; $(CPL) mb* ../$@,NITROS9/$(DISTRO)/SCRIPTS + $(RM) $(LDSK360K_2) + $(SOFTLINK) $@ $(LDSK360K_2) + +$(DSK720K): + -$(RM) $@ + $(OS9FORMAT_DS80) -q $@ -n"NitrOS-9/$(CPU) Level 2" + $(OS9GEN) $@ -b=$(BOOTFILE_80D) -t=$(KERNELFILE) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(MAKDIR) $@,DEFS + $(CP) modules/$(SYSGO) $@,sysgo + $(OS9ATTR_EXEC) $@,sysgo + $(CD) cmds; $(CP) $(CMDS) ../$@,CMDS + $(foreach file, $(CMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);) + $(CD) cmds; $(CP) $(CMDS_D2) ../$@,CMDS + $(foreach file, $(CMDS_D2), $(OS9ATTR_EXEC) $@,CMDS/$(file);) + $(CD) sys; $(CP) $(SYSBIN) ../$@,SYS + $(foreach file, $(SYSBIN), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) sys; $(CPL) $(SYSTEXT) ../$@,SYS + $(foreach file, $(SYSTEXT), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(foreach file, $(DEFS), $(OS9ATTR_TEXT) $@,DEFS/$(file);) + $(CPL) $(STARTUP) $@,. + $(foreach file, $(STARTUP), $(OS9ATTR_TEXT) $@,$(file);) + $(MAKDIR) $@,NITROS9 + $(MAKDIR) $@,NITROS9/$(DISTRO) + $(MAKDIR) $@,NITROS9/$(DISTRO)/CMDS + $(CD) cmds; $(CP) $(MODULECMDS) ../$@,NITROS9/$(DISTRO)/CMDS + $(foreach file, $(MODULECMDS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/CMDS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(CD) modules; $(CP) $(BOOTTRACK) ../$@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(foreach file, $(BOOTTRACK), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(CD) modules; $(CP) $(KERNEL) ../$@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(foreach file, $(KERNEL), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/KERNEL/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(CD) modules; $(CP) $(SYSMODS) ../$@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(foreach file, $(SYSMODS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(CD) modules; $(CP) $(CLOCKS) ../$@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(foreach file, $(CLOCKS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/RBF + $(CD) modules; $(CP) $(RBF) ../$@,NITROS9/$(DISTRO)/MODULES/RBF + $(foreach file, $(RBF), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/RBF/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SCF + $(CD) modules; $(CP) $(SCF) ../$@,NITROS9/$(DISTRO)/MODULES/SCF + $(foreach file, $(SCF), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/SCF/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/PIPE + $(CD) modules; $(CP) $(PIPE) ../$@,NITROS9/$(DISTRO)/MODULES/PIPE + $(foreach file, $(PIPE), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/PIPE/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/BOOTLISTS + $(CD) bootlists; $(CPL) *.bl ../$@,NITROS9/$(DISTRO)/BOOTLISTS + $(MAKDIR) $@,NITROS9/$(DISTRO)/SCRIPTS + $(CD) scripts; $(CPL) mb* ../$@,NITROS9/$(DISTRO)/SCRIPTS + $(RM) $(LDSK720K) + $(SOFTLINK) $@ $(LDSK720K) + +$(DSK720K_50HZ): + -$(RM) $@ + $(OS9FORMAT_DS80) -q $@ -n"NitrOS-9/$(CPU) Level 2" + $(OS9GEN) $@ -b=$(BOOTFILE_80D_50HZ) -t=$(KERNELFILE_50HZ) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(MAKDIR) $@,DEFS + $(CP) modules/$(SYSGO) $@,sysgo + $(OS9ATTR_EXEC) $@,sysgo + $(CD) cmds; $(CP) $(CMDS) ../$@,CMDS + $(foreach file, $(CMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);) + $(CD) cmds; $(CP) $(CMDS_D2) ../$@,CMDS + $(foreach file, $(CMDS_D2), $(OS9ATTR_EXEC) $@,CMDS/$(file);) + $(CD) sys; $(CP) $(SYSBIN) ../$@,SYS + $(foreach file, $(SYSBIN), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) sys; $(CPL) $(SYSTEXT) ../$@,SYS + $(foreach file, $(SYSTEXT), $(OS9ATTR_TEXT) $@,SYS/$(file);) + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(foreach file, $(DEFS), $(OS9ATTR_TEXT) $@,DEFS/$(file);) + $(CPL) $(STARTUP) $@,. + $(foreach file, $(STARTUP), $(OS9ATTR_TEXT) $@,$(file);) + $(MAKDIR) $@,NITROS9 + $(MAKDIR) $@,NITROS9/$(DISTRO) + $(MAKDIR) $@,NITROS9/$(DISTRO)/CMDS + $(CD) cmds; $(CP) $(MODULECMDS) ../$@,NITROS9/$(DISTRO)/CMDS + $(foreach file, $(MODULECMDS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/CMDS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(CD) modules; $(CP) $(BOOTTRACK) ../$@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(foreach file, $(BOOTTRACK), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(CD) modules; $(CP) $(KERNEL) ../$@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(foreach file, $(KERNEL), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/KERNEL/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(CD) modules; $(CP) $(SYSMODS) ../$@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(foreach file, $(SYSMODS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(CD) modules; $(CP) $(CLOCKS) ../$@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(foreach file, $(CLOCKS), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/RBF + $(CD) modules; $(CP) $(RBF) ../$@,NITROS9/$(DISTRO)/MODULES/RBF + $(foreach file, $(RBF), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/RBF/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SCF + $(CD) modules; $(CP) $(SCF) ../$@,NITROS9/$(DISTRO)/MODULES/SCF + $(foreach file, $(SCF), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/SCF/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/PIPE + $(CD) modules; $(CP) $(PIPE) ../$@,NITROS9/$(DISTRO)/MODULES/PIPE + $(foreach file, $(PIPE), $(OS9ATTR_EXEC) $@,NITROS9/$(DISTRO)/MODULES/PIPE/$(file);) + $(MAKDIR) $@,NITROS9/$(DISTRO)/BOOTLISTS + $(CD) bootlists; $(CPL) *.bl ../$@,NITROS9/$(DISTRO)/BOOTLISTS + $(MAKDIR) $@,NITROS9/$(DISTRO)/SCRIPTS + $(CD) scripts; $(CPL) mb* ../$@,NITROS9/$(DISTRO)/SCRIPTS + $(RM) $(LDSK720K_50HZ) + $(SOFTLINK) $@ $(LDSK720K_50HZ) + +info: + @$(ECHO) "*** NitrOS-9/6809 Level 2 for the Tandy Color Computer 3 ***" + @$(foreach dsk, $(DSKS), $(ECHO) $(dsk);)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/modules/defsfile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,1 @@ + use ../defsfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/modules/kernel/defsfile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,1 @@ + use ../../defsfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/modules/kernel/makefile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,39 @@ +PORT = coco3 +include $(NITROS9DIR)/rules.mak + +vpath %.asm $(LEVEL3)/modules/kernel:$(LEVEL2)/modules/kernel:$(LEVEL1)/modules/kernel + +DEPENDS = ./makefile +AFLAGS += -e -aH6309=1 -I$(LEVEL2)/modules/kernel -I$(LEVEL1)/modules/kernel + +KERNEL = krn +KERNELP2 = krnp2 +SYSCALLS = fallimg.asm fallram.asm falltsk.asm faproc.asm fcmpnam.asm \ + fcpymem.asm fdatlog.asm fdelram.asm ffmodul.asm ffreehb.asm \ + fld.asm fldabx.asm flink.asm fmove.asm fnproc.asm fprsnam.asm \ + freboot.asm fsrqmem.asm fssvc.asm fvmodul.asm \ + fallbit.asm fallprc.asm fchain.asm fclrblk.asm fcrcmod.asm \ + fdelimg.asm fexit.asm ffind64.asm ffork.asm fgblkmp.asm \ + fgcmdir.asm fgmoddr.asm fgprdsc.asm fgprocp.asm ficpt.asm \ + fid.asm fmapblk.asm fmem.asm fsend.asm fsleep.asm fsprior.asm \ + fsswi.asm fstime.asm fsuser.asm funlink.asm funload.asm + +ALLOBJS = $(KERNEL) $(KERNELP2) + +all: $(ALLOBJS) + +$(KERNEL): krn.asm $(SYSCALLS) + +$(KERNELP2): krnp2.asm $(SYSCALLS) + +clean: + $(RM) $(ALLOBJS) + +showobjs: + @$(ECHO) $(ALLOBJS) + +showcopyobjs: + @$(ECHO) $(COPYOBJS) + +identify: + $(IDENT_SHORT) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/modules/makefile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,311 @@ +PORT = coco3 +include $(NITROS9DIR)/rules.mak + +vpath %.asm kernel:$(LEVEL2)/modules/kernel:$(LEVEL2)/modules:$(LEVEL1)/modules + +AFLAGS += -e -aH6309=1 -I$(LEVEL1)/modules + +CLOCKELIM = -aRTCElim=1 +CLOCKDISTO2 = -aRTCDsto2=1 +CLOCKDISTO4 = -aRTCDsto4=1 +CLOCKBNB = -aRTCBB=1 +CLOCKSMART = -aRTCSmart=1 -aMPIFlag=1 +CLOCKHARRIS = -aRTCHarrs=1 +CLOCKCLOUD9 = -aRTCCloud9=1 +CLOCKSOFT = -aRTCSoft=1 +CLOCKMESSEMU = -aRTCMessEmu=1 +CLOCKJVEMU = -aRTCJVEmu=1 + +DEPENDS = ./makefile +TPB = ../../3rdparty/booters + +BOOTERS = boot_1773_6ms boot_1773_30ms \ + boot_burke boot_rampak boot_wd1002 boot_dw3 +BOOTTRACK = rel_32 rel_40 rel_80 rel_32_50hz rel_40_50hz rel_80_50hz $(BOOTERS) krn +KERNEL = krnp2 krnp3_perr krnp4_regdump +SYSMODS = ioman init sysgo_h0 sysgo_dd +CLOCKS = clock_60hz clock_50hz \ + clock2_elim clock2_disto2 clock2_disto4 clock2_bnb \ + clock2_smart clock2_harris clock2_cloud9 clock2_soft \ + clock2_jvemu clock2_messemu clock2_dw3 + +RBF = rbf.mn \ + rbdw3.dr dw3.sb \ + rb1773.dr rb1773_scii_ff74.dr rb1773_scii_ff58.dr \ + d0_35s.dd d1_35s.dd d2_35s.dd d3_35s.dd \ + d0_40d.dd d1_40d.dd d2_40d.dd d0_80d.dd \ + d1_80d.dd d2_80d.dd \ + ddd0_35s.dd ddd0_40d.dd ddd0_80d.dd \ + rammer.dr r0_8k.dd r0_96k.dd r0_128k.dd r0_192k.dd \ + ddr0_8k.dd ddr0_96k.dd ddr0_128k.dd ddr0_192k.dd md.dd \ + ddx0.dd x0.dd x1.dd x2.dd x3.dd + + +SCF = scf.mn \ + vtio.dr vrn.dr scbbp.dr scbbt.dr scdwp.dr sspak.dr sc6551.dr \ + cowin.io cogrf.io covdg.io covdg_small.io \ + keydrv_cc3.sb snddrv_cc3.sb \ + joydrv_joy.sb joydrv_6551L.sb joydrv_6552L.sb \ + joydrv_6551M.sb joydrv_6552M.sb \ + nil.dd p_scbbp.dd p_scdwp.dd \ + t1_scbbt.dd t2_sc6551.dd t3_sc6551.dd \ + ftdd.dd vi.dd ssp.dd term_scbbt.dt term_sc6551.dt \ + term_vdg.dt term_win40.dt term_win80.dt w.dw w1.dw w2.dw \ + w3.dw w4.dw w5.dw w6.dw w7.dw \ + w8.dw w9.dw w10.dw w11.dw w12.dw w13.dw w14.dw w15.dw \ + v1.dw v2.dw v3.dw v4.dw v5.dw \ + v6.dw v7.dw \ + scdwn.dr term_scdwn.dt n0_scdwn.dd n1_scdwn.dd n2_scdwn.dd n3_scdwn.dd \ + n4_scdwn.dd n5_scdwn.dd n6_scdwn.dd n7_scdwn.dd \ + n8_scdwn.dd n9_scdwn.dd n10_scdwn.dd n11_scdwn.dd \ + n12_scdwn.dd n13_scdwn.dd n14_scdwn.dd + +PIPE = pipeman.mn pipeman_named.mn \ + piper.dr \ + pipe.dd + +# +# The following macros represent a collection of modules for various +# kernel tracks and bootfile configurations. +# +KERNEL_1773 = rel_32 boot_1773 krn +KERNEL_RAMPAK = rel_32 $(TPB)/boot_rampak krn +KERNEL_KENTON = rel_32 $(TPB)/boot_kenton krn +KERNEL_IDE = rel_32 $(TPB)/boot_ide krn + +ALLOBJS = $(BOOTTRACK) $(KERNEL) $(SYSMODS) $(CLOCKS) $(RBF) $(SCF) $(PIPE) + +all: $(ALLOBJS) + +# Kernel +krn krnp2: + $(CD) kernel; make $@ + $(CP) kernel/$@ . + +# Special cases +cogrf.io: cowin.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aCoGrf=1 + +rb1773_scii_ff74.dr: rb1773.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aSCII=1 + +rb1773_scii_ff58.dr: rb1773.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aSCII=1 -aSCIIALT=1 + +rel_32: rel.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aWidth=32 + +rel_40: rel.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aWidth=40 + +rel_80: rel.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aWidth=80 + +rel_32_50hz: rel.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aWidth=32 -aTkPerSec=50 + +rel_40_50hz: rel.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aWidth=40 -aTkPerSec=50 + +rel_80_50hz: rel.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aWidth=80 -aTkPerSec=50 + +boot_1773_6ms: boot_1773.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aSTEP=0 + +boot_1773_30ms: boot_1773.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aSTEP=3 + +sysgo_dd: sysgo.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aDD=1 + +sysgo_h0: sysgo.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) + +# Floppy descriptors +SSDD35 = -aCyls=35 -aSides=1 -aSectTrk=18 -aSectTrk0=18 \ + -aInterlv=3 -aSAS=8 -aDensity=1 +DSDD40 = -aCyls=40 -aSides=2 -aSectTrk=18 -aSectTrk0=18 \ + -aInterlv=3 -aSAS=8 -aDensity=1 +DSDD80 = -aCyls=80 -aSides=2 -aSectTrk=18 -aSectTrk0=18 \ + -aInterlv=3 -aSAS=8 -aDensity=1 -aD35 + +ddd0_35s.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(SSDD35) -aDNum=0 -aDD=1 + +d0_35s.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(SSDD35) -aDNum=0 + +d1_35s.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(SSDD35) -aDNum=1 + +d2_35s.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(SSDD35) -aDNum=2 + +d3_35s.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(SSDD35) -aDNum=3 + +ddd0_40d.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD40) -aDNum=0 -aDD=1 + +d0_40d.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD40) -aDNum=0 + +d1_40d.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD40) -aDNum=1 + +d2_40d.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD40) -aDNum=2 + +ddd0_80d.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -aDNum=0 -aDD=1 + +d0_80d.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -aDNum=0 + +d1_80d.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -aDNum=1 + +d2_80d.dd: rb1773desc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -aDNum=2 + +# RAM Disk descriptors +r0_8k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aRAMSize=8 + +ddr0_8k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aRAMSize=8 -aDD=1 + +r0_96k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aRAMSize=96 + +ddr0_96k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aRAMSize=96 -aDD=1 + +r0_128k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aRAMSize=128 + +ddr0_128k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aRAMSize=128 -aDD=1 + +r0_192k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aRAMSize=192 + +ddr0_192k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aRAMSize=192 -aDD=1 + +# DriveWire 3 SCF descriptors +term_scdwn.dt: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aTERM=1 -aAddr=0 + +n0_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=0 + +n1_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=1 + +n2_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=2 + +n3_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=3 + +n4_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=4 + +n5_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=5 + +n6_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=6 + +n7_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=7 + +n8_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=8 + +n9_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=9 + +n10_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=10 + +n11_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=11 + +n12_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=12 + +n13_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=13 + +n14_scdwn.dd: scdwndesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aAddr=14 + +# DriveWire 3 RBF descriptors +ddx0.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aDD=1 -aDNum=0 + +x0.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aDNum=0 + +x1.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aDNum=1 + +x2.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aDNum=2 + +x3.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aDNum=3 + +# VDGInt Modules +covdg.io: covdg.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aCOCO2=1 + +covdg_small.io: covdg.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< + +# Clocks +clock_60hz: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aPwrLnFrq=60 + +clock_50hz: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aPwrLnFrq=50 + +clock2_cloud9: clock2_ds1315.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aCLOUD9=1 + +clock2_bnb: clock2_ds1315.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aBNB=1 + +clean: + $(CD) kernel; make $@ + $(RM) $(ALLOBJS) + +showobjs: + @$(ECHO) $(ALLOBJS) + +showboottrack: + @$(ECHO) $(BOOTTRACK) + +showkernel: + @$(ECHO) $(KERNEL) + +showsysmods: + @$(ECHO) $(SYSMODS) + +showclocks: + @$(ECHO) $(CLOCKS) + +showrbf: + @$(ECHO) $(RBF) + +showscf: + @$(ECHO) $(SCF) + +showpipe: + @$(ECHO) $(PIPE) + +identify: + $(IDENT_SHORT) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/startup Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,10 @@ +* Echo welcome message +echo * Welcome to NitrOS-9 Level 3 * +echo * on the Color Computer 3 * +* Lock shell and std utils into memory +link shell +load utilpak1 +* Start system time from keyboard +setime </1 +date -t +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/sys/makefile Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,61 @@ +PORT = coco3 +include $(NITROS9DIR)/rules.mak + +vpath %.hp $(LEVEL2)/sys:$(LEVEL1)/sys +vpath %.asm $(LEVEL2)/sys + +DEPENDS = ./makefile + +L1TXTFILES = errmsg password +L2TXTFILES = motd +BINFILES = stdfonts stdpats_2 stdpats_4 stdpats_16 stdptrs \ + ibmedcfont isolatin1font +HELPFILES = asm.hp attr.hp \ + backup.hp basic09.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 dmem.hp dmode.hp dsave.hp dump.hp \ + echo.hp edit.hp error.hp ex.hp exbin.hp \ + format.hp free.hp \ + gfx.hp gfx2.hp grfdrv.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 mfree.hp mmap.hp modpatch.hp \ + montype.hp mpi.hp os9gen.hp \ + padrom.hp park.hp pmap.hp proc.hp procs.hp prompt.hp pwd.hp pxd.hp \ + reboot.hp rename.hp runb.hp \ + save.hp setime.hp setpr.hp shell.hp sleep.hp smap.hp \ + tee.hp tmode.hp touch.hp tsmon.hp tuneport.hp \ + unlink.hp \ + verify.hp \ + wcreate.hp \ + xmode.hp + +#HELPFILES = make.hp maketerm.hp rdump.hp rlink.hp rma.hp scred.hp + +HELPMSG = helpmsg + +TEXTFILES = $(L2TXTFILES) $(HELPMSG) $(L1TXTFILES) +ALLOBJS = $(TEXTFILES) $(BINFILES) + +all: $(ALLOBJS) $(DEPENDS) + +$(HELPMSG): $(HELPFILES) + $(MERGE) $^ > $@ + +$(L1TXTFILES): $(LEVEL1)/sys/$@ + -$(SOFTLINK) $(LEVEL1)/sys/$@ + +clean: + $(RM) $(HELPMSG) $(L1TXTFILES) $(BINFILES) + +showbinobjs: + @$(ECHO) $(BINFILES) + +showtextobjs: + @$(ECHO) $(TEXTFILES) + +showobjs: + @$(ECHO) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/coco3_6309/sys/motd Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,3 @@ + +Welcome to NitrOS-9 Level 3! +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/modules/end.asm Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,33 @@ +******************************************************************** +* End - OS-9 Level 3 End Marker +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ +* 1 ????/??/?? Alan DeKok +* Created. + + nam End + ttl OS-9 Level 3 End Marker + + IFP1 + use defsfile + ENDC + +tylg set Systm+Obj6309 +attrev set ReEnt+rev +rev set 4 +edition set 1 + + mod eom,name,tylg,attrev,start,0 + +name fcs /_end/ + fcb Edition + +start rts + + emod +eom equ * + end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level3/modules/nitro.asm Sun Jan 17 21:42:26 2010 +0000 @@ -0,0 +1,219 @@ +******************************************************************** +* NitrOS9 - Sets up NitrOS-9 Level 3 +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ +* ????/??/?? Alan DeKok +* Created. + + nam NitrOS9 + ttl Sets up NitrOS-9 Level 3 + + ifp1 + use defsfile + endc + +tylg set Systm+Obj6309 +atrv set ReEnt+rev +rev set $04 + mod eom,name,tylg,atrv,Start,size +u0000 rmb 0 +size equ . +name equ * + fcs /NitrOS9/ + fcb $01 + +Start ldd #$10ff illegal instruction, /0 trap + std >0 + ldd #$0008 + std >2 + ldd #$20FE + std >4 + +* allocate a block of RAM for SCF drivers + ldu #eom get the size of this module + leax eom,pc point to the next module + ldy #L3.SCF + +all.ram bsr f.modul move some modules over + tstb did we, in fact, move any? + beq all.done if not, we're done + stb ,y+ save the starting RAM block number + bra all.ram and go get another block of RAM + +* Verify the rest of the boot: start of old OS9p1 code +all.done ldd <D.BtSz get the size of the boot + subr u,d take out the size of the modules we're skipping +* F$VBlock has NO exit conditions, and doesn't change any registers + OS9 F$VBlock go verify the rest of the OS9Boot file +* do NOT use U after this! + +* set the DAT image of the allocate blocks to be RAMInUse, rather than +* Module In block + ldx <D.SysDAT point to the system DAT image + ldb $0D,x grab the block# of the last allocated block + incb account for block 0: leave SCF & RBF as ModInBlk + lda #RAMInUse set the RAM to be in use... + ldx <D.BlkMap point to system block allocation map + +set.lp sta ,x+ allocate the RAM + decb count down + bne set.lp continue until done + + ldx <D.BlkMap grab the block map again + sta <$3F,x mark the boot track block as used, too. + +* mark block 1 ($2000-$3FFF) in the system memory map as allocated + ldx <D.SysMem ptr to low system memory + ldd #$0100+L3.Size RAMInUse, N times + leax $20,x to the start of block 1 in the block map +blk.lp sta ,x+ set it to be in use + decb + bne blk.lp + +* U = total size of the crap we've removed + ldd <D.BtSz size of the bootfile + subr u,d take out size of code we've removed + std <D.BtSz + ldd <D.BtPtr + addr u,d point to new start of the OS9Booto file + pshs d and save for later + tfr u,d size of code we've taken out + subd #$00FF round _down_ a page + + ldx <D.SysMem pt to system memory map + ldb <D.BtPtr point to start of OS9Boot in memory + abx go to it + +* remove the memory from the system memory map +m.lp clr ,x+ set the RAM to be not in use + deca count down the number of pages we've moved + bne m.lp continue + bra x.done + + leax -1,x point to last unused byte + tfr x,d move into an address register + lsra + lsra + lsra + lsra + lsra now A=block number of highest block + ldb <D.BtPtr + lsrb + lsrb + lsrb + lsrb + lsrb + subr b,a same block? (now A=number of blocks to delete) + beq x.done yes, don't do anything + + ldu <D.BlkMap point to system-wide block map + ldx <D.SysDAT pointer to system DAT image + lslb convert to DAT image offset + incb point to block number, not flag + abx point to the offset + +x.loop ldb ,x++ grab a block number + clr b,u mark the block as unused + deca + bne x.loop continue until done + +x.done puls d restore ptr to new start of the OS9Boot file + std <D.BtPtr and save it again + clrb + rts + +*============================================================================ +* +* Copy the modules into local memory. +* Copied from [X] to a module called _end +* Entry: X = ptr to start at +* U = size of stuff deleted so far +* Exit : X = ptr to module after _end module +* U = total size of stuff deleted + +f.modul pshs b,x,y,u save start of area to move, size moved before +* grab the name: is it _end? +is.end ldd ,x + cmpd #$87Cd is it a module? + bne f.exit no, exit + ldd M$Name,x get the name pointer + ldd d,x get 2 bytes of the name + cmpd #$5F65 '_e'? + beq fnd.end yes, found it + +* skip this module if not at the end yet + ldd M$Size,x grab the module size + leax d,x go to the next module + leau d,u add in the size of it + bra is.end and continue looking for end + +f.exit clrb we're done everything + puls a,x,y,u,pc + +* copy modules over, and verify +fnd.end ldy 1,s restore ptr to start of area to move + tfr u,w new size + subw 5,s take out old size: W = total size + cmpw #L3.Size*$FF greater than the room available? + bhs f.exit yes, exit without allocating RAM + +* skip _end module + ldd M$Size,x get size of the _end module + leax d,x skip it + leau d,u + stx 1,s save new start ptr + stu 5,s and new size + +* we've found blocks to move, so let's allocate some RAM + ldb #L3.Blks 1 block to allocate + OS9 F$AllRAM allocate some RAM + + std >$0642 map it into system DAT image + stb >$FFA1 map into physical RAM + stb ,s save starting block number + + ifeq L3.Blks-2 more than 1 block? + incb yes, go up by a block + std >$0644 map it into the system DAT image + stb >$FFA2 and into the hardware + endc + +* move the modules to local RAM + pshsw save size of the block to move + ldx #L3.Start+L3.Size where to move the stuff to + tfm y+,x+ move it from the OS9Boot file to IOMan local memory + +* verify the modules + puls d grab the size of the block + ldx #L3.Start+L3.Size start ptr again + OS9 F$VBlock verify the block + +* get A = total size (in pages) of stuff moved over + addd #L3.Size+$FF round up to the nearest block, adding in $20 + +* start with all local RAM deallocated + ldx #L3.Start to the start of the block + ldb #L3.Size-1 number of pages to mark as free +clr.lp clr b,x set them to be all clear. + decb + bpl clr.lp count down until B=-1 + +* allocate local RAM to the size of the modules we've moved over + ldb #RAMInUse RAM in use +all.lp stb ,x+ make the page allocated + deca count down a page + bne all.lp and continue + + lda #'- a hyphen + jsr <D.BtBug print it out + +* restore start, size pointers and exit + puls b,x,y,u,pc + + emod +eom equ * + end