Mercurial > hg > Members > kono > nitros9-code
changeset 3131:e1aadba01e81
Add new Level 2 port for Multicomp09 "mc09l2"
Add infrastructure (directories, makefiles etc).
Target name is mc09l2 to distinguish it from the Level 1
port (target name mc09).
In the code, the name mc09 is used for platform-dependent
code, whether for Level 1 or Level 2.
author | Neal Crook <foofoobedoo@gmail.com> |
---|---|
date | Mon, 05 Dec 2016 17:39:03 +0000 |
parents | e0614e08fa5e |
children | 9bb0c42d9fc6 |
files | level2/makefile level2/mc09l2/bootfiles/makefile level2/mc09l2/bootlists/dw.bl level2/mc09l2/bootlists/standard.bl level2/mc09l2/cmds/defsfile level2/mc09l2/cmds/makefile level2/mc09l2/defs/Defsfile level2/mc09l2/defs/makefile level2/mc09l2/defsfile level2/mc09l2/makefile level2/mc09l2/modules/defsfile level2/mc09l2/modules/kernel/defsfile level2/mc09l2/modules/kernel/makefile level2/mc09l2/modules/makefile level2/mc09l2/port.mak level2/mc09l2/scripts/mb.dw level2/mc09l2/scripts/mb.floppy level2/mc09l2/startup level2/mc09l2/startup.dw level2/mc09l2/sys/makefile level2/mc09l2/wwwroot/Makefile level2/modules/mc09clock.asm makefile |
diffstat | 23 files changed, 1841 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/level2/makefile Sun Dec 04 21:01:42 2016 +0000 +++ b/level2/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -1,6 +1,6 @@ include $(NITROS9DIR)/rules.mak -dirs = coco3 coco3_6309 +dirs = coco3 coco3_6309 mc09l2 ifdef PORTS dirs = $(PORTS) endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/bootfiles/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,52 @@ +include $(NITROS9DIR)/rules.mak + +# Module directory +MD = ../modules + +DEPENDS = ./makefile + +# The _80 in rel_80 refers to 80-column screen +KERNEL_MC09SD = $(MD)/rel_80 $(MD)/boot_sdc $(MD)/krn + +MC09SDC_80D = $(MD)/mc09sdc.dr $(MD)/dds0_80d.dd $(MD)/s0_80d.dd $(MD)/s1_80d.dd $(MD)/s2_80d.dd $(MD)/s3_80d.dd + +TERM_MC09 = $(MD)/mc6850.dr $(MD)/term_mc6850.dt $(MD)/term_mc6850_t0.dt $(MD)/term_mc6850_t1.dt + +CLOCK50HZMC09 = $(MD)/mc09clock_50hz $(MD)/clock2_soft + +# [NAC HACK 2016Nov30] find out what's actually needed for DW support. +# [NAC HACK 2016Nov30] currently I'm pulling in DW but not using SCDWV_NET or SCDWP or CLOCK50HZDW +DW = $(MD)/rbdw.dr $(MD)/dwio.sb \ + $(MD)/x1.dd $(MD)/x2.dd $(MD)/x3.dd +SCDWV_NET = $(MD)/n_scdwv.dd $(MD)/n1_scdwv.dd $(MD)/n2_scdwv.dd \ + $(MD)/n3_scdwv.dd $(MD)/n4_scdwv.dd $(MD)/n5_scdwv.dd \ + $(MD)/n6_scdwv.dd $(MD)/n7_scdwv.dd $(MD)/n8_scdwv.dd \ + $(MD)/n9_scdwv.dd $(MD)/n10_scdwv.dd $(MD)/n11_scdwv.dd \ + $(MD)/n12_scdwv.dd $(MD)/n13_scdwv.dd $(MD)/midi_scdwv.dd +SCDWP = $(MD)/scdwp.dr $(MD)/p_scdwp.dd +PIPE = $(MD)/pipeman.mn $(MD)/piper.dr $(MD)/pipe.dd +CLOCK50HZMC09DW = $(MD)/mc09clock_50hz $(MD)/clock2_dw + +BOOTFILE_MC09SD = $(MD)/krnp2 $(MD)/ioman $(MD)/init \ + $(MD)/rbf.mn \ + $(MC09SDC_80D) \ + $(MD)/scf.mn \ + $(TERM_MC09) \ + $(PIPE) \ + $(CLOCK50HZMC09) + +BOOTFILES = bootfile_mc09sd +KERNELS = kernel_mc09sd + +ALLOBJS = $(BOOTFILES) $(KERNELS) + +all: $(ALLOBJS) + +bootfile_mc09sd: $(BOOTFILE_MC09SD) $(DEPENDS) + $(MERGE) $(BOOTFILE_MC09SD)>$@ + +kernel_mc09sd: $(KERNEL_MC09SD) $(DEPENDS) + $(MERGE) $(KERNEL_MC09SD)>$@ + +clean: + $(RM) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/bootlists/dw.bl Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,277 @@ +*************************************** +* NitrOS-9 Level 2 CoCo 3 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/KERNEL/krnp2 +*../MODULES/KERNEL/krnp3_perr +*../MODULES/KERNEL/krnp4_regdump +../MODULES/SYSMODS/ioman +../MODULES/SYSMODS/init +* +*************************************** +* 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 +../MODULES/RBF/rbdw.dr +../MODULES/RBF/dwio.sb +* 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 +* TC^3 SCSI DD descriptor (ID 0) +*../MODULES/RBF/dds0_tc3.dd +* TC^3 SCSI descriptors (IDs 0-6) +*../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 +* TC^3 SCSI HDB-DOS descriptor +*../MODULES/RBF/sh_tc3.dd +* IDE DD descriptor (Master) +*../MODULES/RBF/ddi0_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 +* +* RAMDisk driver +*../MODULES/RBF/rammer.dr +* RAMDisk descriptors - select as needed +*../MODULES/RBF/ddr0_8k.dd +*../MODULES/RBF/ddr0_96k.dd +*../MODULES/RBF/ddr0_128k.dd +*../MODULES/RBF/ddr0_192k.dd +*../MODULES/RBF/r0_8k.dd +*../MODULES/RBF/r0_96k.dd +*../MODULES/RBF/r0_128k.dd +*../MODULES/RBF/r0_192k.dd +* Memory device descriptor +*../MODULES/RBF/md.dd +*************************************** +* SCF Section +* +../MODULES/SCF/scf.mn +* +* CoCo 3 I/O sub-drivers +../MODULES/SCF/vtio.dr +../MODULES/SCF/keydrv_cc3.sb +* Sound module: CoCo 3 built-in sound generator +../MODULES/SCF/snddrv_cc3.sb +* Joystick modules: choose joy for hi-res joystick adapter or +* (M)icrosoft or (L)ogitech mouse using 6551 or 6552 ACIA +../MODULES/SCF/joydrv_joy.sb +*../MODULES/SCF/joydrv_6551M.sb +*../MODULES/SCF/joydrv_6552M.sb +*../MODULES/SCF/joydrv_6551L.sb +*../MODULES/SCF/joydrv_6552L.sb +* +* CoGrf/CoWin subroutine module +* Use CoWin with Multi-Vue; use CoGrf +* for basic text and graphic window support.. +* Select only one. +*../MODULES/SCF/cogrf.io +../MODULES/SCF/cowin.io +* +* CoVDG I/O subroutine module +* Select one or both +*../MODULES/SCF/covdg.io +*../MODULES/SCF/covdg_small.io +* +* Select only one term descriptor +*../MODULES/SCF/term_vdg.dt +*../MODULES/SCF/term_win40.dt +../MODULES/SCF/term_win80.dt +*../MODULES/SCF/term_scbbt.dt +*../MODULES/SCF/term_sc6551.dt +* +* Select as many window descriptors as needed +../MODULES/SCF/w.dw +../MODULES/SCF/w1.dw +../MODULES/SCF/w2.dw +../MODULES/SCF/w3.dw +../MODULES/SCF/w4.dw +../MODULES/SCF/w5.dw +../MODULES/SCF/w6.dw +../MODULES/SCF/w7.dw +../MODULES/SCF/w8.dw +../MODULES/SCF/w9.dw +../MODULES/SCF/w10.dw +../MODULES/SCF/w11.dw +../MODULES/SCF/w12.dw +../MODULES/SCF/w13.dw +../MODULES/SCF/w14.dw +../MODULES/SCF/w15.dw +* +* Select as many VDG window descriptors as needed +*../MODULES/SCF/v1.dw +*../MODULES/SCF/v2.dw +*../MODULES/SCF/v3.dw +*../MODULES/SCF/v4.dw +*../MODULES/SCF/v5.dw +*../MODULES/SCF/v6.dw +*../MODULES/SCF/v7.dw +* +* Serial port drivers +* CoCo Bit-Banger terminal port +*../MODULES/SCF/scbbt.dr +*../MODULES/SCF/t1_scbbt.dd +* 6551 ACIA +*../MODULES/SCF/sc6551.dr +*../MODULES/SCF/t2_sc6551.dd +*../MODULES/SCF/t3_sc6551.dd +* Tandy Modem Pak +*../MODULES/SCF/modpak.dr +*../MODULES/SCF/m1.dd +*../MODULES/SCF/m2.dd +* +* Printer drivers +* ../MODULES/SCF/scbbp.dr +* ../MODULES/SCF/p_scbbp.dd +* +* DriveWire 3 Printer drivers +* ../MODULES/SCF/scdwp.dr +* ../MODULES/SCF/p_scdwp.dd +* +* DriveWire Virtual Channel Driver +*../MODULES/SCF/scdwv.dr +*../MODULES/SCF/term_scdwv.dt +*../MODULES/SCF/n_scdwv.dd +*../MODULES/SCF/n1_scdwv.dd +*../MODULES/SCF/n2_scdwv.dd +*../MODULES/SCF/n3_scdwv.dd +*../MODULES/SCF/n4_scdwv.dd +*../MODULES/SCF/n5_scdwv.dd +*../MODULES/SCF/n6_scdwv.dd +*../MODULES/SCF/n7_scdwv.dd +*../MODULES/SCF/n8_scdwv.dd +*../MODULES/SCF/n9_scdwv.dd +*../MODULES/SCF/n10_scdwv.dd +*../MODULES/SCF/n11_scdwv.dd +*../MODULES/SCF/n12_scdwv.dd +*../MODULES/SCF/n13_scdwv.dd +*../MODULES/SCF/n14_scdwv.dd +*../MODULES/SCF/term_z_scdwv.dt +*../MODULES/SCF/z1_scdwv.dd +*../MODULES/SCF/z2_scdwv.dd +*../MODULES/SCF/z3_scdwv.dd +*../MODULES/SCF/z4_scdwv.dd +*../MODULES/SCF/z5_scdwv.dd +*../MODULES/SCF/z6_scdwv.dd +*../MODULES/SCF/z7_scdwv.dd +* +* VRN is a driver module used by certain games, including King's Quest III, +* Leisure Suit Larry and Flight Simulator II. A /nil descriptor is also +* supported. +../MODULES/SCF/vrn.dr +../MODULES/SCF/vi.dd +../MODULES/SCF/ftdd.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 (SuperIDE), 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.) +* +* Alternatively, this module can reside in the root directory of the +* boot device, saving precious system RAM. +../MODULES/SYSMODS/sysgo_dd +*../MODULES/SYSMODS/sysgo_h0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/bootlists/standard.bl Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,278 @@ +*************************************** +* NitrOS-9 Level 2 CoCo 3 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/KERNEL/krnp2 +*../MODULES/KERNEL/krnp3_perr +*../MODULES/KERNEL/krnp4_regdump +../MODULES/SYSMODS/ioman +../MODULES/SYSMODS/init +* +*************************************** +* 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 +*../MODULES/RBF/rbdw.dr +*../MODULES/RBF/dwio.sb +* 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 +* TC^3 SCSI DD descriptor (ID 0) +*../MODULES/RBF/dds0_tc3.dd +* TC^3 SCSI descriptors (IDs 0-6) +*../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 +* TC^3 SCSI HDB-DOS descriptor +*../MODULES/RBF/sh_tc3.dd +* IDE DD descriptor (Master) +*../MODULES/RBF/ddi0_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 +* +* RAMDisk driver +*../MODULES/RBF/rammer.dr +* RAMDisk descriptors - select as needed +*../MODULES/RBF/ddr0_8k.dd +*../MODULES/RBF/ddr0_96k.dd +*../MODULES/RBF/ddr0_128k.dd +*../MODULES/RBF/ddr0_192k.dd +*../MODULES/RBF/r0_8k.dd +*../MODULES/RBF/r0_96k.dd +*../MODULES/RBF/r0_128k.dd +*../MODULES/RBF/r0_192k.dd +* Memory device descriptor +*../MODULES/RBF/md.dd +*************************************** +* SCF Section +* +../MODULES/SCF/scf.mn +* +* CoCo 3 I/O sub-drivers +* Keyboard modules: choose cc3 for CoCo 3 keyboard +../MODULES/SCF/vtio.dr +../MODULES/SCF/keydrv_cc3.sb +* Sound module: CoCo 3 built-in sound generator +../MODULES/SCF/snddrv_cc3.sb +* Joystick modules: choose joy for hi-res joystick adapter or +* (M)icrosoft or (L)ogitech mouse using 6551 or 6552 ACIA +../MODULES/SCF/joydrv_joy.sb +*../MODULES/SCF/joydrv_6551M.sb +*../MODULES/SCF/joydrv_6552M.sb +*../MODULES/SCF/joydrv_6551L.sb +*../MODULES/SCF/joydrv_6552L.sb +* +* CoGrf/CoWin subroutine module +* Use CoWin with Multi-Vue; use CoGrf +* for basic text and graphic window support.. +* Select only one. +*../MODULES/SCF/cogrf.io +../MODULES/SCF/cowin.io +* +* CoVDG I/O subroutine module +* Select one or both +*../MODULES/SCF/covdg.io +*../MODULES/SCF/covdg_small.io +* +* Select only one term descriptor +*../MODULES/SCF/term_vdg.dt +*../MODULES/SCF/term_win40.dt +../MODULES/SCF/term_win80.dt +*../MODULES/SCF/term_scbbt.dt +*../MODULES/SCF/term_sc6551.dt +* +* Select as many window descriptors as needed +../MODULES/SCF/w.dw +../MODULES/SCF/w1.dw +../MODULES/SCF/w2.dw +../MODULES/SCF/w3.dw +../MODULES/SCF/w4.dw +../MODULES/SCF/w5.dw +../MODULES/SCF/w6.dw +../MODULES/SCF/w7.dw +../MODULES/SCF/w8.dw +../MODULES/SCF/w9.dw +../MODULES/SCF/w10.dw +../MODULES/SCF/w11.dw +../MODULES/SCF/w12.dw +../MODULES/SCF/w13.dw +../MODULES/SCF/w14.dw +../MODULES/SCF/w15.dw +* +* Select as many VDG window descriptors as needed +*../MODULES/SCF/v1.dw +*../MODULES/SCF/v2.dw +*../MODULES/SCF/v3.dw +*../MODULES/SCF/v4.dw +*../MODULES/SCF/v5.dw +*../MODULES/SCF/v6.dw +*../MODULES/SCF/v7.dw +* +* Serial port drivers +* CoCo Bit-Banger terminal port +*../MODULES/SCF/scbbt.dr +*../MODULES/SCF/t1_scbbt.dd +* 6551 ACIA +*../MODULES/SCF/sc6551.dr +*../MODULES/SCF/t2_sc6551.dd +*../MODULES/SCF/t3_sc6551.dd +* Tandy Modem Pak +*../MODULES/SCF/modpak.dr +*../MODULES/SCF/m1.dd +*../MODULES/SCF/m2.dd +* +* Printer drivers +* ../MODULES/SCF/scbbp.dr +* ../MODULES/SCF/p_scbbp.dd +* +* DriveWire 3 Printer drivers +* ../MODULES/SCF/scdwp.dr +* ../MODULES/SCF/p_scdwp.dd +* +* DriveWire Virtual Channel Driver +*../MODULES/SCF/scdwv.dr +*../MODULES/SCF/term_scdwv.dt +*../MODULES/SCF/n_scdwv.dd +*../MODULES/SCF/n1_scdwv.dd +*../MODULES/SCF/n2_scdwv.dd +*../MODULES/SCF/n3_scdwv.dd +*../MODULES/SCF/n4_scdwv.dd +*../MODULES/SCF/n5_scdwv.dd +*../MODULES/SCF/n6_scdwv.dd +*../MODULES/SCF/n7_scdwv.dd +*../MODULES/SCF/n8_scdwv.dd +*../MODULES/SCF/n9_scdwv.dd +*../MODULES/SCF/n10_scdwv.dd +*../MODULES/SCF/n11_scdwv.dd +*../MODULES/SCF/n12_scdwv.dd +*../MODULES/SCF/n13_scdwv.dd +*../MODULES/SCF/n14_scdwv.dd +*../MODULES/SCF/term_z_scdwv.dt +*../MODULES/SCF/z1_scdwv.dd +*../MODULES/SCF/z2_scdwv.dd +*../MODULES/SCF/z3_scdwv.dd +*../MODULES/SCF/z4_scdwv.dd +*../MODULES/SCF/z5_scdwv.dd +*../MODULES/SCF/z6_scdwv.dd +*../MODULES/SCF/z7_scdwv.dd +* +* VRN is a driver module used by certain games, including King's Quest III, +* Leisure Suit Larry and Flight Simulator II. A /nil descriptor is also +* supported. +../MODULES/SCF/vrn.dr +../MODULES/SCF/vi.dd +../MODULES/SCF/ftdd.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 (SuperIDE), 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.) +* +* Alternatively, this module can reside in the root directory of the +* boot device, saving precious system RAM. +../MODULES/SYSMODS/sysgo_dd +*../MODULES/SYSMODS/sysgo_h0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/cmds/defsfile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,1 @@ + use ../defsfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/cmds/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,78 @@ +PORT = mc09 +include $(NITROS9DIR)/rules.mak + +vpath %.as $(LEVEL2)/cmds:$(LEVEL1)/cmds +vpath %.asm $(LEVEL2)/cmds:$(LEVEL1)/cmds:$(3RDPARTY)/packages/basic09 + +DEPENDS = ./makefile +AFLAGS += --includedir=$(3RDPARTY)/packages/basic09 +LFLAGS += -L$(NITROS9DIR)/lib +LFLAGS += -lmc09 +LFLAGS += -lnet -lalib + +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 mc09rtc mdir megaread merge mfree minted mmap modpatch montype mpi os9gen padrom park \ + pmap proc procs prompt pwd pxd reboot rename save setime \ + shell_21 sleep smap 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 + +CMDS_DW = inetd dw telnet httpd + +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) $(CMDS_DW) shell utilpak1 $(DEPENDS) + +runb: runb.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ + $(MERGE) $@ $(SUBS)>$@.tmp + $(RM) $@ + $(MOVE) $@.tmp $@ + +tmode: xmode.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -DTMODE=1 + +xmode: xmode.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -DXMODE=1 + +pwd: pd.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -DPWD=1 + +pxd: pd.asm + $(AS) $(AFLAGS) $< $(ASOUT)$@ -DPXD=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) $(CMDS_DW) + +# Only $(CMDS) are shown here +showobjs: + @$(ECHO) shell utilpak1 $(CMDS) + +showobjs_dw: + @$(ECHO) shell utilpak1 $(sort $(CMDS) $(CMDS_D2) $(CMDS_DW)) + +showobjs_d2: + @$(ECHO) $(CMDS_D2) + +identify: + $(IDENT_SHORT) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/defs/Defsfile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,8 @@ +Level equ 2 + + ifp1 + use /dd/defs/os9.d + use /dd/defs/rbf.d + use /dd/defs/scf.d + use /dd/defs/mc09.d + endc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/defs/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,29 @@ +PORT = mc09 +include $(NITROS9DIR)/rules.mak + +DEPENDS = ./makefile + +DEFOPTS = --preprocess -DLevel=2 +PERMDEFS = Defsfile +DEFS = os9.d rbf.d scf.d mc09.d +ALLOBJS = $(DEFS) $(PERMDEFS) + +all: $(ALLOBJS) + +os9.d: $(DEFSDIR)/os9.d + $(AS) $(AFLAGS) $(DEFOPTS) -DOS9.D=0 $< > $@ + +rbf.d: $(DEFSDIR)/rbf.d + $(AS) $(AFLAGS) $(DEFOPTS) -DRBF.D=0 $< > $@ + +scf.d: $(DEFSDIR)/scf.d + $(AS) $(AFLAGS) $(DEFOPTS) -DSCF.D=0 $< > $@ + +mc09.d: $(DEFSDIR)/mc09.d + $(AS) $(AFLAGS) $(DEFOPTS) -DMC09.D=0 $< > $@ + +clean: + $(RM) $(DEFS) + +showobjs: + @$(ECHO) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/defsfile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,6 @@ +Level equ 2 + + use os9.d + use scf.d + use rbf.d + use mc09.d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,128 @@ +ifeq ($(CPU),) + CPU = 6809 +endif + +include port.mak +include $(NITROS9DIR)/rules.mak + +DISTRO = $(CPU)L$(LEVEL) +DISTRONAME = nos9$(CPU)l$(LEVEL) +DISTROVER = $(DISTRONAME)$(NITROS9VER)$(PORT) +# The BOOTFILE is for 80D (720K) virtual drive on SD, 50Hz timer interrupt +BOOTFILE_MC09SD = bootfiles/bootfile_mc09sd +KERNELFILE = bootfiles/kernel_mc09sd +DIRS = cmds modules defs sys bootfiles wwwroot + +CMDS = $(shell $(CD) cmds; make --no-print-directory showobjs) +CMDS_D2 = $(shell $(CD) cmds; make --no-print-directory showobjs_d2) +CMDS_DW = $(shell $(CD) cmds; make --no-print-directory showobjs_dw) +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 = shell grfdrv del echo format makdir merge os9gen prompt tmode + +DEFS = $(shell $(CD) defs; make --no-print-directory showobjs) +SYSBIN = $(shell $(CD) sys; make --no-print-directory showbinobjs) +SYSTEXT = $(shell $(CD) sys; make --no-print-directory showtextobjs) +STARTUP = startup +STARTUP_DW = startup.dw +SYSGO = sysgo_dd +CCBKRN = ccbkrn + +PACKAGENAME = $(DISTROVER).zip +DSK720K = $(DISTROVER)_80d.dsk +LDSK720K = $(DISTRONAME)_80d.dsk +TESTDSK = test.dsk + +DSKS = $(DSK720K) +LDSKS = $(LDSK720K) + +# Make all components +all: + @$(ECHO) "************************************************************" + @$(ECHO) "*" + @$(ECHO) "* NitrOS-9/$(CPU) Level $(LEVEL) $(MACHINE) ($(PORT))" + @$(ECHO) "*" + @$(ECHO) "************************************************************" + $(MAKE) -C $(NITROS9DIR)/lib + $(foreach dir,$(DIRS),$(MAKE) -C $(dir) &&) : + +# 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) $@ $^ + +$(DSK720K): + $(RM) $@ + $(OS9FORMAT_DS80) -q $@ -n"NitrOS-9/$(CPU) Level $(LEVEL)" + $(OS9GEN) $@ -b=$(BOOTFILE_MC09SD) -t=$(KERNELFILE) + $(MAKDIR) $@,CMDS + $(MAKDIR) $@,SYS + $(MAKDIR) $@,DEFS + $(OS9COPY) modules/$(CCBKRN) $@,$(CCBKRN) + $(OS9COPY) modules/$(SYSGO) $@,sysgo + $(OS9ATTR_EXEC) $@,sysgo + $(CD) cmds; $(OS9COPY) $(sort $(CMDS) $(CMDS_D2)) ../$@,CMDS + $(OS9ATTR_EXEC) $(foreach file,$(sort $(CMDS) $(CMDS_D2)),$@,CMDS/$(file)) + $(CD) sys; $(OS9COPY) $(SYSBIN) ../$@,SYS + $(OS9ATTR_TEXT) $(foreach file,$(SYSBIN),$@,SYS/$(file)) + $(CD) sys; $(CPL) $(SYSTEXT) ../$@,SYS + $(OS9ATTR_TEXT) $(foreach file,$(notdir $(SYSTEXT)),$@,SYS/$(file)) + $(CD) defs; $(CPL) $(DEFS) ../$@,DEFS + $(OS9ATTR_TEXT) $(foreach file,$(DEFS),$@,DEFS/$(file)) + $(CPL) $(STARTUP) $@,startup + $(OS9ATTR_TEXT) $@,startup + $(MAKDIR) $@,NITROS9 + $(MAKDIR) $@,NITROS9/$(DISTRO) + $(MAKDIR) $@,NITROS9/$(DISTRO)/CMDS + $(CD) cmds; $(OS9COPY) $(MODULECMDS) ../$@,NITROS9/$(DISTRO)/CMDS + $(OS9ATTR_EXEC) $(foreach file,$(MODULECMDS),$@,NITROS9/$(DISTRO)/CMDS/$(file)) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(CD) modules; $(OS9COPY) $(BOOTTRACK) ../$@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK + $(OS9ATTR_EXEC) $(foreach file,$(BOOTTRACK),$@,NITROS9/$(DISTRO)/MODULES/BOOTTRACK/$(file)) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(CD) modules; $(OS9COPY) $(KERNEL) ../$@,NITROS9/$(DISTRO)/MODULES/KERNEL + $(OS9ATTR_EXEC) $(foreach file,$(KERNEL),$@,NITROS9/$(DISTRO)/MODULES/KERNEL/$(file)) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(CD) modules; $(OS9COPY) $(SYSMODS) ../$@,NITROS9/$(DISTRO)/MODULES/SYSMODS + $(OS9ATTR_EXEC) $(foreach file,$(SYSMODS),$@,NITROS9/$(DISTRO)/MODULES/SYSMODS/$(file)) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(CD) modules; $(OS9COPY) $(CLOCKS) ../$@,NITROS9/$(DISTRO)/MODULES/CLOCKS + $(OS9ATTR_EXEC) $(foreach file,$(CLOCKS),$@,NITROS9/$(DISTRO)/MODULES/CLOCKS/$(file)) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/RBF + $(CD) modules; $(OS9COPY) $(RBF) ../$@,NITROS9/$(DISTRO)/MODULES/RBF + $(OS9ATTR_EXEC) $(foreach file,$(RBF),$@,NITROS9/$(DISTRO)/MODULES/RBF/$(file)) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/SCF + $(CD) modules; $(OS9COPY) $(SCF) ../$@,NITROS9/$(DISTRO)/MODULES/SCF + $(OS9ATTR_EXEC) $(foreach file,$(SCF),$@,NITROS9/$(DISTRO)/MODULES/SCF/$(file)) + $(MAKDIR) $@,NITROS9/$(DISTRO)/MODULES/PIPE + $(CD) modules; $(OS9COPY) $(PIPE) ../$@,NITROS9/$(DISTRO)/MODULES/PIPE + $(OS9ATTR_EXEC) $(foreach file,$(PIPE),$@,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) + +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/level2/mc09l2/modules/defsfile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,1 @@ + use ../defsfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/modules/kernel/defsfile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,1 @@ + use ../../defsfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/modules/kernel/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,46 @@ +PORT = mc09 +include $(NITROS9DIR)/rules.mak + +vpath %.asm $(LEVEL2)/modules/kernel:$(LEVEL1)/modules/kernel + +DEPENDS = ./makefile +AFLAGS += -I$(LEVEL2)/modules/kernel -I$(LEVEL1)/modules/kernel + +KERNEL = krn +KERNEL_CCB = ccbkrn +KERNEL_MC09 = krnmc09 +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 \ + fdebug.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) $(KERNEL_CCB) $(KERNELP2) $(KERNEL_MC09) +#ALLOBJS = $(KERNEL) $(KERNELP2) + +all: $(ALLOBJS) + +$(KERNEL): krn.asm $(SYSCALLS) fsrqmem.asm + +$(KERNEL_MC09): krnmc09.asm $(SYSCALLS) fsrqmem.asm + +$(KERNEL_CCB): ccbkrn.asm $(SYSCALLS) ccbfsrqmem.asm + +$(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/level2/mc09l2/modules/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,279 @@ +PORT = mc09 +include $(NITROS9DIR)/rules.mak + +vpath %.asm kernel:$(LEVEL2)/modules:$(LEVEL1)/modules + +AFLAGS += -I$(LEVEL1)/modules + +CLOCKELIM = -DRTCElim=1 +CLOCKDISTO2 = -DRTCDsto2=1 +CLOCKDISTO4 = -DRTCDsto4=1 +CLOCKBNB = -DRTCBB=1 +CLOCKSMART = -DRTCSmart=1 -DMPIFlag=1 +CLOCKHARRIS = -DRTCHarrs=1 +CLOCKCLOUD9 = -DRTCCloud9=1 +CLOCKSOFT = -DRTCSoft=1 +CLOCKMESSEMU = -DRTCMessEmu=1 +CLOCKJVEMU = -DRTCJVEmu=1 +TC3FLAGS = $(AFLAGS) -DTC3=1 $(FLAGS) +IDEFLAGS = $(AFLAGS) -DIDE=1 $(FLAGS) +SDFLAGS = $(AFLAGS) -DCOCOSDC=1 -DITTYP=128 $(FLAGS) + +DEPENDS = ./makefile +TPB = $(3RDPARTY)/booters + +BOOTERS = boot_sdc +BOOTTRACK = rel_80 $(BOOTERS) krn +KERNEL = krnp2 krnp3_perr krnp4_regdump ccbkrn +SYSMODS = ioman init sysgo_dd rominfo vectors +CLOCKS = clock_50hz clock2_soft clock2_dw mc09clock_50hz + +RBF = rbf.mn \ + rbdw.dr dwio.sb \ + mc09sdc.dr \ + rammer.dr r0_8k.dd r0_96k.dd r0_128k.dd r0_192k.dd \ + dds0_80d.dd s0_80d.dd s1_80d.dd s2_80d.dd s3_80d.dd \ + myram.dr mr0.dd \ + ddx0.dd x0.dd x1.dd x2.dd x3.dd + +SCF = scf.mn \ + mc6850.dr \ + term_mc6850.dt term_mc6850_t0.dt term_mc6850_t1.dt \ + nil.dd \ + scdwv.dr term_scdwv.dt n_scdwv.dd \ + n1_scdwv.dd n2_scdwv.dd n3_scdwv.dd \ + n4_scdwv.dd n5_scdwv.dd n6_scdwv.dd n7_scdwv.dd \ + n8_scdwv.dd n9_scdwv.dd n10_scdwv.dd n11_scdwv.dd \ + n12_scdwv.dd n13_scdwv.dd midi_scdwv.dd \ + term_z_scdwv.dt z1_scdwv.dd z2_scdwv.dd z3_scdwv.dd \ + z4_scdwv.dd z5_scdwv.dd z6_scdwv.dd z7_scdwv.dd \ + +PIPE = pipeman.mn pipeman_named.mn \ + piper.dr \ + pipe.dd + +RFM = rfm.mn rfmdrv.dr ddy0.dd y0.dd y1.dd y2.dd y3.dd + +# The following macros represent a collection of modules for various +# kernel tracks and bootfile configurations. +# +KERNEL_MC09SD = rel_80 boot_sdc krn + +ALLOBJS = $(BOOTTRACK) $(KERNEL) $(SYSMODS) $(CLOCKS) $(RBF) $(SCF) $(PIPE) $(RFM) + +all: $(ALLOBJS) + +# Kernel +ccbkrn krn krnp2: + $(CD) kernel; make $@ + $(OS9COPY) kernel/$@ . + +# Special cases + +# CoCo/MC09 SDC Booter +boot_sdc: boot_sdc.asm + $(AS) $(ASOUT)$@ $< $(SDFLAGS) + +# REL Modules +rel_80: rel.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DWidth=80 + +# SysGo Modules +sysgo_dd: sysgo.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDD=1 + +# Serial ports for mc09 +term_mc6850_t0.dt: term_mc6850.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DTNum=0 -DHwBASE=0xFFD2 + +term_mc6850_t1.dt: term_mc6850.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DTNum=1 -DHwBASE=0xFFD4 + +# SDOFFSET is the high 16 bits of the 24-bit block address at +# which the disk image starts on the SDcard. It must match +# the value used in the create_sd_image script. +dds0_80d.dd: mc09sdcdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=0 -DSDOFFSET=0x0280 -DDD=1 + +s0_80d.dd: mc09sdcdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=0 -DSDOFFSET=0x0280 + +s1_80d.dd: mc09sdcdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=1 -DSDOFFSET=0x0290 + +s2_80d.dd: mc09sdcdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=2 -DSDOFFSET=0x02A0 + +s3_80d.dd: mc09sdcdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=3 -DSDOFFSET=0x02B0 + +# RAM Disk descriptors +r0_8k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=8 + +ddr0_8k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=8 -DDD=1 + +r0_96k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=96 + +ddr0_96k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=96 -DDD=1 + +r0_128k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=128 + +ddr0_128k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=128 -DDD=1 + +r0_192k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=192 + +ddr0_192k.dd: r0.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=192 -DDD=1 + +# DriveWire SCF descriptors +term_scdwv.dt: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=0 + +n_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=255 + +n1_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=1 + +n2_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=2 + +n3_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=3 + +n4_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=4 + +n5_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=5 + +n6_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=6 + +n7_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=7 + +n8_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=8 + +n9_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=9 + +n10_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=10 + +n11_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=11 + +n12_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=12 + +n13_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=13 + +midi_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=14 + +term_z_scdwv.dt: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=16 + +z1_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=17 + +z2_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=18 + +z3_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=19 + +z4_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=20 + +z5_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=21 + +z6_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=22 + +z7_scdwv.dd: scdwvdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=23 + +# DriveWire RBF descriptors +ddx0.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDD=1 -DDNum=0 + +x0.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=0 + +x1.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=1 + +x2.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=2 + +x3.dd: dwdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=3 + +# RFM descriptors +ddy0.dd: rfmdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDD=1 -DDNum=0 + +y0.dd: rfmdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=0 + +y1.dd: rfmdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=1 + +y2.dd: rfmdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=2 + +y3.dd: rfmdesc.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=3 + +# Clocks +clock_60hz: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -DPwrLnFrq=60 + +clock_50hz: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -DPwrLnFrq=50 + +mc09clock_50hz: mc09clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -DPwrLnFrq=50 + +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/level2/mc09l2/port.mak Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,9 @@ +PORT = mc09 +MACHINE = Multicomp09 FPGA-based Computer +CPU = 6809 +LEVEL = 2 +TELNET_PORT = 6809 +HTTPD_PORT = 8809 + +include $(NITROS9DIR)/rules.mak +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/scripts/mb.dw Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,31 @@ +-t +-x +tmode .1 pau=0 +echo * NitrOS-9 Level 2 Boot Creation Script +echo * +echo * This script creates a bootable DriveWire 3 disk image +echo * using the dw.bl bootlist file. +echo * +echo * The resulting disk will boot NitrOS-9 from DriveWire disk 0. +echo * +echo "Please type the destination device (e.g. /x0, /x1)" +var.1 +prompt Insert a blank disk in %1 and press a key: +echo * +echo * Step 1: Format disk in %1 +format %1 "NitrOS-9 Level 2 Boot Disk" r +ynn +echo * +echo * Step 2: Create a custom boot track +merge ../MODULES/BOOTTRACK/rel_80 ../MODULES/BOOTTRACK/boot_dw ../MODULES/BOOTTRACK/krn>-bttemp +echo * +echo * Step 3: Create the bootfile and boot track +os9gen %1 -t=bttemp<../BOOTLISTS/dw.bl +del bttemp +echo * +echo * Step 4: Populate the disk with essential files +copy ../MODULES/SYSMODS/sysgo_dd %1/sysgo +makdir %1/CMDS +copy -w=%1/CMDS ../CMDS/shell ../CMDS/grfdrv +echo * +echo * We're done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/scripts/mb.floppy Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,30 @@ +-t +-x +tmode .1 pau=0 +echo * NitrOS-9 Level 2 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 * +echo "Please type the destination device (e.g. /d0, /d1)" +var.1 +prompt Insert a blank disk in %1 and press a key: +echo * +echo * Step 1: Format disk in %1 +format %1 "NitrOS-9 Level 2 Boot Disk" r +echo * +echo * Step 2: Create a custom boot track +merge ../MODULES/BOOTTRACK/rel_80 ../MODULES/BOOTTRACK/boot_sdc ../MODULES/BOOTTRACK/krn>-bttemp +echo * +echo * Step 3: Create the bootfile and boot track +os9gen %1 -t=bttemp<../BOOTLISTS/standard.bl +del bttemp +echo * +echo * Step 4: Populate the disk with essential files +copy ../MODULES/SYSMODS/sysgo_dd %1/sysgo +makdir %1/CMDS +copy -w=%1/CMDS ../CMDS/shell ../CMDS/grfdrv +echo * +echo * We're done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/startup Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,9 @@ +* Echo welcome message +echo * Welcome to NitrOS-9 Level 2 on the Multicomp09 * +* 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/level2/mc09l2/startup.dw Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,8 @@ +* Echo welcome message +echo * Welcome to NitrOS-9 Level 2 with DriveWire 4 on the Multicomp09 * +echo +* Lock shell and std utils into memory +link shell +load utilpak1 +date -t +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/sys/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,64 @@ +include ../port.mak + +vpath %.hp $(LEVEL2)/sys:$(LEVEL1)/sys +vpath %.asm $(LEVEL2)/sys + +DEPENDS = ./makefile + +L1TXTFILES = errmsg password +L2TXTFILES = $(LEVEL2)/sys/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 mc09rtc.hp \ + mdir.hp megaread.hp merge.hp mfree.hp mmap.hp modpatch.hp \ + montype.hp minted.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) inetd.conf + +all: $(ALLOBJS) $(DEPENDS) + +$(HELPMSG): $(HELPFILES) + $(MERGE) $^ > $@ + +$(L1TXTFILES): + $(SOFTLINK) -f $(LEVEL1)/sys/$@ + +inetd.conf: $(LEVEL1)/sys/inetd.conf + @sed -e 's/%TELNET_PORT%/$(TELNET_PORT)/' -e 's/%HTTPD_PORT%/$(HTTPD_PORT)/' $^ > $@ + +clean: + $(RM) $(HELPMSG) $(L1TXTFILES) $(BINFILES) inetd.conf + +showbinobjs: + @$(ECHO) $(BINFILES) + +showtextobjs: + @$(ECHO) $(TEXTFILES) inetd.conf + +showobjs: + @$(ECHO) $(ALLOBJS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/mc09l2/wwwroot/Makefile Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,1 @@ +include ../../../level1/wwwroot/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/modules/mc09clock.asm Mon Dec 05 17:39:03 2016 +0000 @@ -0,0 +1,497 @@ +******************************************************************** +* Clock - Clock for OS-9 Level Two/NitrOS-9 +* +* Clock module for CoCo 3 and TC9 OS9 Level 2 and NitrOS-9 +* +* Includes support for several different RTC chips, GIME Toggle +* IRQ fix, numerous minor changes. +* +* Based on Microware/Tandy Clock Module for CC3/L2 +* +* $Id$ +* +* Edt/Rev YYYY/MM/DD Modified by +* Comment +* ------------------------------------------------------------------ +* ????/??/?? +* NitrOS-9 2.00 distribution. +* +* 9r4 2003/01/01 Boisy G. Pitre +* Back-ported to OS-9 Level Two. +* +* 9r5 2003/08/18 Boisy G. Pitre +* Separated clock into Clock and Clock2 for modularity. + + nam Clock + ttl Clock for OS-9 Level Two/NitrOS-9 + +TkPerTS equ 2 ticks per time slice +GI.Toggl equ %00000001 GIME CART* IRQ enable bit, for CC3 + +* TC9 needs to reset more interrupt sources +*GI.Toggl equ %00000111 GIME SERINT*, KEYINT*, CART* IRQ enable bits + + IFP1 + use defsfile + use cocovtio.d + ENDC + +Edtn equ 9 +Vrsn equ 5 + +*------------------------------------------------------------ +* +* Start of module +* + mod len,name,Systm+Objct,ReEnt+Vrsn,Init,0 + +name fcs "Clock" + fcb Edtn + +* +* Table to set up Service Calls: +* +NewSvc fcb F$Time + fdb F.Time-*-2 + fcb F$VIRQ + fdb F.VIRQ-*-2 + fcb F$Alarm + fdb F.ALARM-*-2 + fcb F$STime + fdb F.STime-*-2 + fcb $80 end of service call installation table + +*--------------------------------------------------------- +* IRQ Handling starts here. +* +* Caveat: There may not be a stack at this point, so avoid using one. +* Stack is set up by the kernel between here and SvcVIRQ. +* +SvcIRQ lda >IRQEnR Get GIME IRQ Status and save it. + ora <D.IRQS + sta <D.IRQS + bita #$08 Check for clock interrupt + beq NoClock + anda #^$08 Drop clock interrupt + sta <D.IRQS + ldx <D.VIRQ Set VIRQ routine to be executed + clr <D.QIRQ ---x IS clock IRQ + bra ContIRQ + +NoClock leax DoPoll,pcr If not clock IRQ, just poll IRQ source + IFNE H6309 + oim #$FF,<D.QIRQ ---x set flag to NOT clock IRQ + ELSE + lda #$FF + sta <D.QIRQ + ENDC +ContIRQ stx <D.SvcIRQ + jmp [D.XIRQ] Chain through Kernel to continue IRQ handling + +*------------------------------------------------------------ +* +* IRQ handling re-enters here on VSYNC IRQ. +* +* - Count down VIRQ timers, mark ones that are done +* - Call DoPoll/DoToggle to service VIRQs and IRQs and reset GIME +* - Call Keyboard scan +* - Update time variables +* - At end of minute, check alarm +* +SvcVIRQ clra Flag if we find any VIRQs to service + pshs a + ldy <D.CLTb Get address of VIRQ table + bra virqent + +virqloop equ * + IFGT Level-2 + ldd 2,y Get Level 3 extended map type + orcc #IntMasks + sta >$0643 + stb >$0645 + std >DAT.Regs+1 + andcc #^IntMasks + ENDC + + ldd Vi.Cnt,x Decrement tick count + IFNE H6309 + decd --- subd #1 + ELSE + subd #$0001 + ENDC + bne notzero Is this one done? + lda Vi.Stat,x Should we reset? + bmi doreset + lbsr DelVIRQ No, delete this entry +doreset ora #$01 Mark this VIRQ as triggered. + sta Vi.Stat,x + lda #$80 Add VIRQ as interrupt source + sta ,s + ldd Vi.Rst,x Reset from Reset count. +notzero std Vi.Cnt,x +virqent ldx ,y++ + bne virqloop + + IFGT Level-2 + puls d + orcc #Carry + stb >$0643 + stb >DAT.Regs+1 + incb + stb >$0645 + stb >DAT.Regs+1 + andcc #^IntMasks + ELSE + puls a Get VIRQ status flag: high bit set if VIRQ + ENDC + + ora <D.IRQS Check to see if other hardware IRQ pending. + bita #%10110111 Any V/IRQ interrupts pending? + beq toggle + IFGT Level-2 + lbsr DoPoll Yes, go service them. + ELSE + bsr DoPoll Yes, go service them. + ENDC + bra KbdCheck +toggle equ * + IFGT Level-2 + lbsr DoToggle No, toggle GIME anyway + ELSE + bsr DoToggle No, toggle GIME anyway + ENDC + +KbdCheck equ * + IFGT Level-2 + lda >$0643 grab current map type + ldb >$0645 + pshs d save it + orcc #IntMasks IRQs off + lda >$0660 SCF local memory ---x + sta >$0643 into DAT image ---x + sta >DAT.Regs+1 and into RAM ---x + inca + sta >$0645 + sta >DAT.Regs+2 map in SCF, CC3IO, WindInt, etc. + ENDC + + jsr [>D.AltIRQ] go update mouse, gfx cursor, keyboard, etc. + + IFGT Level-2 + puls d restore original map type ---x + orcc #IntMasks + sta >$0643 into system DAT image ---x + stb >$0645 + std >DAT.Regs+1 and into RAM ---x + andcc #$AF + ENDC + + dec <D.Tick End of second? + bne VIRQend No, skip time update and alarm check + lda #TkPerSec Reset tick count + sta <D.Tick + +* ATD: Modified to call real time clocks on every minute ONLY. + inc <D.Sec go up one second + lda <D.Sec grab current second + cmpa #60 End of minute? + blo VIRQend No, skip time update and alarm check + clr <D.Sec Reset second count to zero + +* +* Call GetTime entry point in Clock2 +* + ldx <D.Clock2 get entry point to Clock2 + jsr $03,x call GetTime entry point + +NoGet ldd >WGlobal+G.AlPID + ble VIRQend Quit if no Alarm set + ldd >WGlobal+G.AlPckt+3 Does Hour/Minute agree? + cmpd <D.Hour + bne VIRQend + ldd >WGlobal+G.AlPckt+1 Does Month/Day agree? + cmpd <D.Month + bne VIRQend + ldb >WGlobal+G.AlPckt+0 Does Year agree? + cmpb <D.Year + bne VIRQend + ldd >WGlobal+G.AlPID + cmpd #1 + beq checkbel + os9 F$Send + bra endalarm +checkbel ldb <D.Sec Sound bell for 15 seconds + andb #$F0 + beq dobell +endalarm ldd #$FFFF + std >WGlobal+G.AlPID + bra VIRQend +dobell ldx >WGlobal+G.BelVec + beq VIRQend + jsr ,x +VIRQend jmp [>D.Clock] Jump to kernel's timeslice routine + +*------------------------------------------------------------ +* Interrupt polling and GIME reset code +* + +* +* Call [D.Poll] until all interrupts have been handled +* +Dopoll + IFGT Level-2 + lda >$0643 Level 3: get map type + ldb >$0645 + pshs d save for later + ENDC +Dopoll.i + jsr [>D.Poll] Call poll routine + bcc DoPoll.i Until error (error -> no interrupt found) + + IFGT Level-2 + puls d + orcc #IntMasks + sta >$0643 + stb >$0645 + std >DAT.Regs+1 + andcc #^IntMasks + ENDC + +* +* Reset GIME to avoid missed IRQs +* +DoToggle lda #^GI.Toggl Mask off CART* bit + anda <D.IRQS + sta <D.IRQS + lda <D.IRQER Get current enable register status + tfr a,b + anda #^GI.Toggl Mask off CART* bit + orb #GI.Toggl --- ensure that 60Hz IRQ's are always enabled + sta >IRQEnR Disable CART + stb >IRQEnR Enable CART + clrb + rts + + +*------------------------------------------------------------ +* +* Handle F$VIRQ system call +* +F.VIRQ pshs cc + orcc #IntMasks Disable interrupts + ldy <D.CLTb Address of VIRQ table + ldx <D.Init Address of INIT + ldb PollCnt,x Number of polling table entries from INIT + ldx R$X,u Zero means delete entry + beq RemVIRQ + IFGT Level-2 + bra FindVIRQ ---x + +v.loop leay 4,y ---x + ENDC +FindVIRQ ldx ,y++ Is VIRQ entry null? + beq AddVIRQ If yes, add entry here + decb + bne FindVIRQ + puls cc + comb + ldb #E$Poll + rts + +AddVIRQ + IFGT Level-2 + ldx R$Y,u + stx ,y + lda >$0643 + ldb >$0645 + std 2,y + ELSE + leay -2,y point to first null VIRQ entry + ldx R$Y,u + stx ,y + ENDC + ldy R$D,u + sty ,x + bra virqexit + + IFGT Level-2 +v.chk leay 4,y +RemVIRQ ldx ,y + ELSE +RemVIRQ ldx ,y++ + ENDC + beq virqexit + cmpx R$Y,u + bne RemVIRQ + bsr DelVIRQ +virqexit puls cc + clrb + rts + +DelVIRQ pshs x,y +DelVLup + IFGT Level-2 + ldq ,y++ move entries up in table + leay 2,y + stq -8,y + bne DelVLup + puls x,y,pc + ELSE + ldx ,y++ move entries up in table + stx -4,y + bne DelVLup + puls x,y + leay -2,y + rts + ENDC + +*------------------------------------------------------------ +* +* Handle F$Alarm call +* +F.Alarm ldx #WGlobal+G.AlPckt + ldd R$D,u + bne DoAlarm + std G.AlPID-G.AlPckt,x Erase F$Alarm PID, Signal. + rts + +DoAlarm tsta If PID != 0, set alarm for this process + bne SetAlarm + cmpd #1 1 -> Set system-wide alarm + bne GetAlarm +SetAlarm std G.AlPID-G.AlPckt,x + ldy <D.Proc + lda P$Task,y Move from process task + ldb <D.SysTsk To system task + ldx R$X,u From address given in X + ldu #WGlobal+G.AlPckt + ldy #5 Move 5 bytes + bra FMove + +GetAlarm cmpd #2 + bne AlarmErr + ldd G.AlPID-G.AlPckt,x + std R$D,u + bra RetTime +AlarmErr comb + ldb #E$IllArg + rts + +*------------------------------------------------------------ +* +* Handle F$Time System call +* +F.Time equ * + ldx #D.Time Address of system time packet +RetTime ldy <D.Proc Get pointer to current proc descriptor + ldb P$Task,y Process Task number + lda <D.SysTsk From System Task + ldu R$X,u +STime.Mv ldy #6 Move 6 bytes +FMove os9 F$Move + rts + +*------------------------------------------------------------ +* +* Handle F$STime system call +* +* First, copy time packet from user address space to system time +* variables, then fall through to code to update RTC. +* +F.STime equ * + ldx <D.Proc Caller's process descriptor + lda P$Task,x Source is in user map + ldx R$X,u Address of caller's time packet + ldu #D.Time Destination address + ldb <D.SysTsk Destination is in system map + bsr STime.Mv Get time packet (ignore errors) + lda #TkPerSec Reset to start of second + sta <D.Tick + +* +* Call SetTime entry point in Clock2 + ldx <D.Clock2 get entry point to Clock2 + jsr $06,x else call GetTime entry point + +NoSet rts + +Clock2 fcs "Clock2" + +*-------------------------------------------------- +* +* Clock Initialization +* +* This vector is called by the kernel to service the first F$STime +* call. F$STime is usually called by CC3Go (with a dummy argument) +* in order to initialize the clock. F$STime is re-vectored to the +* service code above to handle future F$STime calls. +* +* +Init ldx <D.Proc save user proc + pshs x + ldx <D.SysPrc make sys for link + stx <D.Proc + + leax <Clock2,pcr + lda #Sbrtn+Objct + os9 F$Link + +* And here, we restore the original D.Proc value + puls x + stx <D.Proc restore user proc + + bcc LinkOk + lda #E$MNF + jmp <D.Crash +LinkOk sty <D.Clock2 save entry point +InitCont ldx #PIA0Base point to PIA0 + clra no error for return... + pshs cc save IRQ enable status (and Carry clear) + orcc #IntMasks stop interrupts + +* Note: this code can go away once we have a rel_50hz + IFEQ TkPerSec-50 + ldb <D.VIDMD get video mode register copy + orb #$08 set 50 Hz VSYNC bit + stb <D.VIDMD save video mode register copy + stb >$FF98 set 50 Hz VSYNC + ENDC + + sta 1,x enable DDRA + sta ,x set port A all inputs + sta 3,x enable DDRB + coma + sta 2,x set port B all outputs + ldd #$343C [A]=PIA0 CRA contents, [B]=PIA0 CRB contents + sta 1,x CA2 (MUX0) out low, port A, disable HBORD high-to-low IRQs + stb 3,x CB2 (MUX1) out low, port B, disable VBORD low-to-high IRQs + sta $23,x disable CART +RG Mar 14, 2012 + lda ,x clear possible pending PIA0 HBORD IRQ + lda 2,x clear possible pending PIA0 VBORD IRQ + +* Don't need to explicitly read RTC during initialization + ldd #59*256+TkPerTS last second and time slice in minute + std <D.Sec Will prompt RTC read at next time slice + + stb <D.TSlice set ticks per time slice + stb <D.Slice set first time slice + leax SvcIRQ,pcr set IRQ handler + stx <D.IRQ + leax SvcVIRQ,pcr set VIRQ handler + stx <D.VIRQ + leay NewSvc,pcr insert syscalls + os9 F$SSvc +* H6309 optimization opportunity here using oim + lda <D.IRQER get shadow GIME IRQ enable register + ora #$08 set VBORD bit + sta <D.IRQER save shadow register + sta >IRQEnR enable GIME VBORD IRQs + +* Call Clock2 init routine + ldy <D.Clock2 get entry point to Clock2 + jsr ,y call init entry point of Clock2 +InitRts puls cc,pc recover IRQ enable status and return + + emod +len equ * + end
--- a/makefile Sun Dec 04 21:01:42 2016 +0000 +++ b/makefile Mon Dec 05 17:39:03 2016 +0000 @@ -15,10 +15,14 @@ ifneq (,$(findstring coco3,$(PORTS))) dirs += $(LEVEL2) else -dirs += $(LEVEL1) +ifneq (,$(findstring mc09l2,$(PORTS))) +dirs += $(LEVEL2) +else +dirs += $(LEVEL1) endif endif - +endif + # Make all components all: @$(ECHO) "**************************************************" @@ -51,7 +55,7 @@ info: @$(foreach dir,$(dirs), $(MAKE) --no-print-directory -C $(dir) info &&) : - + # This section is to do the nightly build and upload # to sourceforge.net you must set the environment # variable SOURCEUSER to the userid you have for sourceforge.net