Mercurial > hg > Members > kono > nitros9-code
changeset 1213:4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
author | boisy |
---|---|
date | Sat, 28 Jun 2003 18:41:05 +0000 |
parents | c2f6949523f6 |
children | 701f6a80163f |
files | level1/ChangeLog level1/cmds/deldir.asm level1/cmds/makefile level1/cmds/os9gen.asm level1/cmds/prompt.asm level1/cmds/rename.asm level1/makefile level1/modules/aciapak.asm level1/modules/boot_1773.asm level1/modules/ccio.asm level1/modules/clock.asm level1/modules/makefile level1/modules/oscode.asm level1/modules/piper.asm level1/modules/printer.asm level1/modules/rs232.asm level1/modules/sscpak.asm level1/modules/sysgo.asm level1/sys/os9gen.hp |
diffstat | 19 files changed, 422 insertions(+), 208 deletions(-) [+] |
line wrap: on
line diff
--- a/level1/ChangeLog Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/ChangeLog Sat Jun 28 18:41:05 2003 +0000 @@ -1,4 +1,17 @@ OS-9 Level One V03.01.03: +- A pause command has been added to the standard command set. +- os9gen now supports the -t= option which allows one to specify an + alternate boot track file. +- Two new directories have been added: BOOTLISTS and BOOTSCRIPTS. + The former contains bootlist files for building boot disks, while + the latter contains scripts to build boot disks. +- Clock modules for Eliminator, Disto 2-N-1, Disto 4-N-1, Harris, and + SmartWatch have been added (these are all UNTESTED.) Also, the + clock_bb clock module has been renamed to clock_bnb, and clock.60hz + and clock.50hz have been renamed to clock_soft and clock_soft_50hz. +- There are now two booters for booting from a WD1773 based + floppy controller: boot_1773_6ms and boot_1773_30ms for + 6 and 30 millisecond step rates. - The help utility has been enhanced to show help subjects if forked without any command line parameters.
--- a/level1/cmds/deldir.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/cmds/deldir.asm Sat Jun 28 18:41:05 2003 +0000 @@ -7,6 +7,7 @@ * ------------------------------------------------------------------ * 3 From Tandy OS-9 Level Two VR 02.00.01 * 4 Updated to add -e instead of e to dir BGP 03/01/14 +* Optimized for size. BGP 03/06/21 nam Deldir ttl Delete a directory @@ -15,6 +16,7 @@ ifp1 use defsfile + use rbfdefs endc tylg set Prgrm+Objct @@ -57,21 +59,21 @@ bcs OpenErr L002B lda <fpath os9 I$Close - bcs L004D + bcs Exit ldx <parmptr os9 I$Delete - bcs L004D + bcs Exit lda ,x cmpa #C$CR bne start clrb - bra L004D + bra Exit OpenErr pshs b lda <fpath os9 I$Close puls b orcc #Carry -L004D os9 F$Exit +Exit os9 F$Exit OpenPath stx <parmptr save parameter pointer @@ -112,8 +114,8 @@ os9 I$GetStt bcs L00AB ldx <u0044 - lda <$33,x - anda #$80 + lda <PD.ATT,x + anda #DIR. beq L00AA clrb orcc #Carry @@ -126,6 +128,7 @@ fcb C$LF fcc "List directory, delete directory, or quit ? (l/d/q) " PromptL equ *-Prompt + Cont fcb C$LF fcc "Continue? (y/n) " ContL equ *-Cont @@ -191,16 +194,12 @@ L0187 lda ,x+ cmpa #C$SPAC eat spaces beq L0187 - eora #'Y anda #$DF - beq L01AD branch if Y - lda ,-x - eora #'L branch if L - anda #$DF + cmpa #'Y branch if Y + beq L01AD + cmpa #'L branch if L beq L01A9 - lda ,x - eora #'D branch if D - anda #$DF + cmpa #'D branch if D beq L01A5 bra L01B4 L01A5 ldb #$01 @@ -210,20 +209,24 @@ L01AD ldb #$04 L01AF stb <what2do clrb - bra L01B8 +* bra L01B8 + rts L01B4 ldb #$01 orcc #Carry L01B8 rts + DelDir fcc "DELDIR" fcb C$CR + DotDot fcc ".." fcb C$CR + L01C3 ldb <what2do bitb #$05 beq L0210 lda <fpath pshs u - ldu #64 + ldu #DIR.SZ*2 L01D0 ldx #$0000 os9 I$Seek puls u @@ -234,7 +237,7 @@ os9 I$ChgDir bcs L0214 ldy <u0048 - clrb + clrb lda #Prgrm+Objct pshs u leau <u0024,u @@ -251,13 +254,14 @@ L0209 cmpb #E$EOF bne L0214 clrb - bra L0214 + rts +* bra L0214 L0210 ldb #$01 orcc #Carry L0214 rts L0215 lda <fpath leax <u0024,u - ldy #$0020 + ldy #DIR.SZ os9 I$Read bcs L0238 lda ,x @@ -268,15 +272,18 @@ sta -$01,y lda #C$CR sta ,y - clra - incb + clra + incb std <u0048 L0238 rts + ATTR fcc "ATTR" fcb C$CR + ATTROPTS fcc " -d" fcb C$CR ATTROPTL equ *-ATTROPTS + L0242 pshs u leau <buffer,u pshs u
--- a/level1/cmds/makefile Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/cmds/makefile Sat Jun 28 18:41:05 2003 +0000 @@ -7,15 +7,16 @@ DEPENDS = ./Makefile BASIC09FILES = runb.asm gfx.asm inkey.asm syscall.asm -COCOCMDS = asm attr backup binex build cmp cobbler config copy cputype date \ - dcheck debug ded deiniz del deldir devs dir disasm display \ - dmode dsave dump echo edit error exbin exmode format free grfo \ - help ident iniz irqs link list load login makdir mdir merge \ - mfree os9gen park printerr procs pwd pxd \ +COCOCMDS = asm attr backup binex build cmp cobbler config copy cputype \ + date dcheck debug ded deiniz del deldir devs dir disasm \ + display dmode dsave dump echo edit error exbin exmode format \ + free grfo help ident iniz irqs link list load login makdir \ + mdir merge mfree os9gen park prompt printerr procs pwd pxd \ rename runb save setime shell sleep tee tmode touch tsmon \ - tuneport unlink verify xmode gfx inkey syscall + tuneport unlink verify xmode +SUBS = gfx inkey syscall DRAGONCMDS = cobbler_d64 format_d64 os9gen_d64 go51 -ALLOBJS = $(COCOCMDS) $(DRAGONCMDS) +ALLOBJS = $(COCOCMDS) $(DRAGONCMDS) $(SUBS) all: $(ALLOBJS) @@ -35,7 +36,7 @@ @$(ECHO) $(ALLOBJS) showcocoobjs: - @$(ECHO) $(COCOCMDS) + @$(ECHO) $(COCOCMDS) $(SUBS) showdragonobjs: @$(ECHO) $(CMDS) $(DRAGONCMDS)
--- a/level1/cmds/os9gen.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/cmds/os9gen.asm Sat Jun 28 18:41:05 2003 +0000 @@ -18,6 +18,7 @@ ENDC DOHELP set 0 +DOHD set 1 allow bootfile creation on HD BTrack set 34 tylg set Prgrm+Objct @@ -31,6 +32,8 @@ mod eom,name,tylg,atrv,start,size org 0 +btfname rmb 2 +btflag rmb 1 statptr rmb 2 bfpath rmb 1 devpath rmb 1 @@ -51,9 +54,8 @@ u0034 rmb 10 u003E rmb 2 sngldrv rmb 1 -u0041 rmb 32 -lsn0 rmb 16 -u0071 rmb 10 +bootdev rmb 32 +lsn0 rmb 26 u007B rmb 2 u007D rmb 1 sectbuff rmb 1024 @@ -81,9 +83,11 @@ ErrWrit fcb C$LF fcc "Error writing kernel track" fcb C$CR + IFEQ DOHD HDGen fcb C$LF fcc "Error - cannot gen to hard disk" fcb C$CR + ENDC IFGT Level-1 CantRel fcb C$LF fcc "Error - can't link to Rel module" @@ -107,6 +111,9 @@ BootFrag fcb C$LF fcc "Error - OS9boot file fragmented" fcb C$CR +BadTkMsg fcc "Error - Boot track file must be 4608 bytes" + fcb C$CR +BadTkMsgL equ *-BadTkMsg Source fcc "Ready SOURCE, hit C to continue: " SourceL equ *-Source Destin fcc "Ready DESTINATION, hit C to continue: " @@ -123,14 +130,15 @@ ENDC start clrb + stb <btflag assume no -t specified stb <u0005 stb <sngldrv assume multi-drive - stu <statptr + stu <statptr save statics pointer leas >u047E,u pshs u tfr y,d subd ,s++ - subd #$047E + subd #u047E clrb std <u0011 lda #PDELIM @@ -149,38 +157,60 @@ beq L0234 bra L0216 L0222 ldd ,y+ - eora #'S + cmpa #C$CR + beq L0234 + cmpa #C$SPAC + beq L0216 anda #$DF + cmpa #'S + beq L0232 + cmpd #84*256+61 does D = 'T=' lbne SoftExit - cmpb #$30 - lbcc SoftExit - inc <sngldrv set single drive flag + leay 1,y point past = + sty <btfname save pointer to boottrack filename + sta <btflag +* Skip over non-spaces and non-CRs +SkipNon lda ,y+ + cmpa #C$CR + beq L0234 + cmpa #C$SPAC + bne SkipNon + bra L0216 +L0232 inc <sngldrv set single drive flag + bra L0222 L0234 puls b,a - leay <u0041,u + leay <bootdev,u L0239 sta ,y+ lda ,x+ decb bpl L0239 sty <u003E - lda #PENTIR - ldb #C$SPAC + ldd #PENTIR*256+C$SPAC std ,y++ lbsr GetDest - leax <u0041,u + leax <bootdev,u lda #UPDAT. os9 I$Open sta <devpath lbcs ShowHelp leax <devopts,u - ldb #SS.Opt + clrb +* ldb #SS.Opt os9 I$GetStt lbcs Bye - leax <devopts,u + + IFEQ DOHD + +* If destination drive is hard disk, don't allow + leax devopts,u lda <(PD.TYP-PD.OPT)+devopts,u get type byte bpl L0276 branch if not hard drive clrb leax >HDGen,pcr else tell user can't do hard drive lbra WritExit + + ENDC + L0276 ldx <u003E leay >TempBoot,pcr lda #PDELIM @@ -193,24 +223,25 @@ sta ,x+ bpl L0288 tfr x,d - leax <u0041,u + leax <bootdev,u pshs x subd ,s++ std <u000D - lda #WRITE. - ldb #READ.+WRITE. + ldd #WRITE.*256+(READ.+WRITE.) +* lda #WRITE. +* ldb #READ.+WRITE. os9 I$Create sta <bfpath lbcs Bye - ldx #$0000 + ldx #$0000 upper 16 bits are zero stx <u0006 ldu #$3000 ldb #SS.Size - os9 I$SetStt - lbcs Bye - ldu <statptr + os9 I$SetStt set size of newly created file + lbcs Bye branch if error + ldu <statptr retrieve static pointer bsr L032F -L02BB leax <sectbuff,u +L02BB leax sectbuff,u ldy #256 clra standard input os9 I$ReadLn read line @@ -254,7 +285,7 @@ bsr L033D bra L0377 L031A pshs b - leax <sectbuff,u + leax sectbuff,u ldy #256 lda #$02 standard error os9 I$WritLn write @@ -279,7 +310,7 @@ os9 I$Seek seek to LSN0 ldu <statptr +BGP+ added bcs L033C - leax <sectbuff,u + leax sectbuff,u ldy #256 os9 I$Read read LSN0 bcs L033C @@ -294,7 +325,8 @@ clrb rts L0377 leax <devopts,u - ldb #SS.Opt + clrb +* ldb #SS.Opt lda <bfpath os9 I$GetStt lbcs Bye @@ -339,7 +371,7 @@ L03F3 sta ,x+ lda ,y+ bpl L03F3 - leax <u0041,u + leax <bootdev,u os9 I$Delete ldx <u003E leay >TempBoot,pcr @@ -364,7 +396,7 @@ clrb leax >Rename,pcr ldy <u000D - leau <u0041,u + leau <bootdev,u os9 F$Fork lbcs Bye os9 F$Wait @@ -412,7 +444,7 @@ lda #$00 ldb #$01 lbsr Seek2LSN - leax <sectbuff,u + leax sectbuff,u ldy <lsn0+DD.MAP,u get number of bytes in device's bitmap lda <devpath os9 I$Read @@ -422,8 +454,9 @@ ldy #$0004 four bits lbsr ABMClear bcc L0520 - lda #BTrack boot track - ldb #$00 sector 1 + ldd #BTrack*256 boot track +* lda #BTrack boot track +* ldb #$00 sector 1 lbsr Seek2LSN seek to it leax <u0017,u ldy #$0007 @@ -432,42 +465,96 @@ lbcs Bye leax <u0017,u ldd ,x - cmpa #'O + cmpd #79*256+83 OS ?? lbne WarnUser - cmpb #'S - lbne WarnUser +* cmpb #'O +* lbne WarnUser +* cmpb #'S +* lbne WarnUser lda $04,x cmpa #$12 beq L0512 - lda #BTrack boot track - ldb #15 sector 16 + ldd #BTrack*256+15 boot track, sector 16 +* lda #BTrack boot track +* ldb #15 sector 16 ldy #$0003 sectors 16-18 lbsr ABMClear lbcs WarnUser L0512 clra ldb <lsn0+DD.TKS,u get number of tracks in D tfr d,y - lda #BTrack boot track - clrb sector 1 + ldd #BTrack*256 boot track +* lda #BTrack boot track +* clrb sector 1 lbsr ABMSet bra L0531 -L0520 lda #BTrack boot track - ldb #$04 sector 5 +L0520 ldd #BTrack*256+4 boot track +* lda #BTrack boot track +* ldb #$04 sector 5 ldy #$000E sectors 5-18 lbsr ABMClear lbcs WarnUser bra L0512 -L0531 clra - ldb #$01 +L0531 + ldd #$0001 +* clra +* ldb #$01 lbsr Seek2LSN - leax <sectbuff,u + leax sectbuff,u ldy <lsn0+DD.MAP,u get number of bytes in device's bitmap lda <devpath os9 I$Write write out the bitmap lbcs Bye +* Code added to write alternate boottrack file +* BGP - 2003/06/26 + tst <btflag + beq BTMem get boot track from memory + lbsr GetSrc + ldx btfname,u + lda #READ. + os9 I$Open + lbcs Bye + +* Determine if the size of the file is 4608 bytes +* Note, this assumes 18 sectors per track and 256 +* bytes per sector. + ldb #SS.Size + os9 I$GetStt get size + tfr u,y put lower 16 bytes of file size in Y + ldu <statptr + lbcs Bye branch if error + cmpx #$0000 correct size? + bne BadBTrak branch if not + cmpy #$1200 correct size? + beq ReadBTrk branch if not + +BadBTrak leax BadTkMsg,pcr + ldy #BadTkMsgL + lda #$02 + os9 I$WritLn + lbra Bye + + +* Read in boot track file +* Y = proper boottrack size +ReadBTrk leax u0496,u point to sector buffer + os9 I$Read read sector buffer + lbcs Bye + os9 I$Close close path to boot track + lbsr GetDest + ldd #BTrack*256 boot track +* lda #BTrack boot track +* ldb #$00 sector 1 + lbsr Seek2LSN + bra WrBTrack + + + +BTMem IFGT Level-1 + * OS-9 Level Two: Link to Rel, which brings in boot code pshs u lda #Systm+Objct @@ -485,24 +572,26 @@ subd <u007B,u addd #$0001 tfr d,y - lda #BTrack boot track - ldb #$00 sector 1 + ldd #BTrack*256 boot track +* lda #BTrack boot track +* ldb #$00 sector 1 lbsr Seek2LSN - lda <devpath ldx <u007B,u ELSE * OS-9 Level One: Write out boot track data - lda #BTrack boot track - ldb #$00 sector 1 + ldd #BTrack*256 +* lda #BTrack boot track +* ldb #$00 sector 1 lbsr Seek2LSN - lda <devpath ldx #os9l1start ldy #os9l1size ENDC +WrBTrack + lda <devpath os9 I$Write lbcs WriteErr os9 I$Close @@ -516,16 +605,18 @@ AbsLSN pshs b ldb <lsn0+DD.FMT,u get format byte andb #FMT.SIDE test sides bit - beq L059C branch if 1 + beq AbsLSN1 branch if 1 ldb #$02 else 2 sides - bra L059E -L059C ldb #$01 1 side -L059E mul multiply sides times track + fcb $86 skip next two bytes +* bra AbsLSN2 +AbsLSN1 ldb #$01 1 side +AbsLSN2 mul multiply sides times track lda <lsn0+DD.TKS,u get device tracks mul multiply by (sides * track) - addb ,s add in sector + addb ,s+ add in sector +* addb ,s add in sector adca #$00 - leas $01,s +* leas $01,s rts * Bitmap conversion from bit to byte @@ -553,17 +644,17 @@ * Entry: A = Track, B = Sector, Y = number of bits to clear ABMClear pshs x,y,b,a bsr AbsLSN convert A:B to LSN - leax <sectbuff,u + leax sectbuff,u bsr L05AA sta ,-s bmi L05EA L05D3 lda ,x get byte in bitmap - sta <u007D,u + sta u007D,u L05D9 anda ,s and with byte on stack bne L0616 leay -1,y beq L0612 - lda <u007D,u + lda u007D,u lsr ,s bcc L05D9 leax $01,x @@ -597,7 +688,7 @@ * Entry: A = Track, B = Sector, Y = number of bits to set ABMSet pshs y,x,b,a lbsr AbsLSN - leax <sectbuff,u + leax sectbuff,u bsr L05AA sta ,-s bmi L063A @@ -682,7 +773,7 @@ TstSingl tst <sngldrv beq L06FD AskUser pshs a - tsta +AskUser2 tsta bne Ask4Dst Ask4Src leax >Source,pcr ldy #SourceL @@ -702,8 +793,10 @@ ldy #$0001 bsr DoWrite else ring the error bell bsr WriteCR - puls a - bne AskUser + lda ,s +* puls a + bra AskUser2 +* bne AskUser L06F9 bsr WriteCR puls a L06FD puls pc,u,y,x,b,a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/cmds/prompt.asm Sat Jun 28 18:41:05 2003 +0000 @@ -0,0 +1,61 @@ +******************************************************************** +* Prompt - Echo text and wait for a key +* +* $Id$ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* 1 Created BGP 03/06/28 + + nam Prompt + ttl Echo text and wait for a key + + ifp1 + use defsfile + endc + +tylg set Prgrm+Objct +atrv set ReEnt+rev +rev set $00 +edition set 1 + + mod eom,name,tylg,atrv,start,size + + org 0 +devopts rmb 32 + rmb 450 +size equ . + +name fcs /Prompt/ + fcb edition + +cr fcb C$CR + +start decb subtract CR from param length + beq readkey if zero, don't print anything + clra clear upper 8 bits + tfr d,y transfer length to Y + lda #$01 stdout + os9 I$Write + bcs exit +readkey ldd #$02*256 stderr +* ldb #SS.Opt get options + leax devopts,u + os9 I$GetStt get 'em + bcs exit + clr (PD.EKO-PD.OPT),x + os9 I$SetStt set 'em + ldy #$0001 one character + os9 I$Read read one char from stderr + clrb + inc (PD.EKO-PD.OPT),x turn on echo + os9 I$SetStt set 'em + leax cr,pcr + lda #$01 to stdout + os9 I$WritLn write it out +exit os9 F$Exit + + emod +eom equ * + end +
--- a/level1/cmds/rename.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/cmds/rename.asm Sat Jun 28 18:41:05 2003 +0000 @@ -24,53 +24,55 @@ mod eom,name,tylg,atrv,start,size org 0 -u0000 rmb 1 +parmptr rmb 1 u0001 rmb 1 u0002 rmb 2 u0004 rmb 1 -u0005 rmb 2 +nextparm rmb 2 u0007 rmb 1 u0008 rmb 24 -u0020 rmb 26 +pathopts rmb 26 u003A rmb 2 -u003C rmb 405 +u003C rmb 2 + rmb 2 + rmb 401 size equ . name fcs /Rename/ fcb edition -start cmpd #$0004 - lbcs L00A8 - stx <u0000 - lda #WRITE. - os9 I$Open - bcc L0032 - cmpb #E$FNA - bne L00A5 - ldx <u0000 - lda #DIR.+WRITE. - os9 I$Open - bcs L00A5 -L0032 stx <u0005 +start cmpd #$0004 at least 3 chars + CR on cmd line? + lbcs bpnam branch if less than + stx <parmptr save parameter pointer + lda #WRITE. write mode + os9 I$Open open file to rename in write mode + bcc L0032 branch if ok + cmpb #E$FNA file not accessible? + bne Exit branch if any other error + ldx <parmptr else get pointer to file + lda #DIR.+WRITE. and try open as directory + os9 I$Open try opening again + bcs Exit branch if error +L0032 stx <nextparm save off updated param pointer ldb #SS.Opt - leax <u0020,u - os9 I$GetStt - bcs L00A5 - os9 I$Close - bcs L00A5 - ldb <u0020 + leax <pathopts,u + os9 I$GetStt get path options + bcs Exit branch if error + os9 I$Close close path to file + bcs Exit branch if error + ldb <pathopts cmpb #$01 - bne L00A8 + bne bpnam bsr L00AE - bcs L00A5 + bcs Exit ldx <u0002 lda #C$CR sta -1,x - ldx <u0000 + ldx <parmptr lda #READ.+WRITE. os9 I$ChgDir - bcs L00A5 - ldx <u0005 + bcs Exit + ldx <nextparm ldb <u0008 decb lda b,x @@ -83,43 +85,45 @@ ldx <u0002 os9 F$CmpNam bcc L0082 -L0075 ldx <u0005 +L0075 ldx <nextparm lda #READ. os9 I$Open - bcc L00A8 + bcc bpnam cmpb #E$PNNF - bne L00A8 -L0082 leax <L00AC,pcr - lda #DIR.!UPDAT. - os9 I$Open - bcs L00A5 - ldx <u003A + bne bpnam +L0082 leax <Dot,pcr point to . + lda #DIR.!UPDAT. open as directory in update mode + os9 I$Open do it! + bcs Exit branch if error + ldx <u003A get file directory entry ptr (PD.DCP) ldu <u003C - os9 I$Seek - bcs L00A5 - ldx <u0005 - ldy <u0007 + os9 I$Seek seek + bcs Exit branch if error + ldx <nextparm get ptr to name to rename + ldy <u0007 os9 I$Write - bcs L00A5 + bcs Exit os9 I$Close - bcs L00A5 + bcs Exit clrb -L00A5 os9 F$Exit -L00A8 ldb #E$BPNam - bra L00A5 -L00AC fcc "." +Exit os9 F$Exit +bpnam ldb #E$BPNam + bra Exit + +Dot fcc "." fcb C$CR -L00AE ldx <u0000 + +L00AE ldx <parmptr bsr L00F6 - ldu <u0000 + ldu <parmptr lda ,u cmpa #PDELIM beq L00C7 lda ,y cmpa #PDELIM beq L00C7 - leau <L00AC,pcr - stu <u0000 + leau <Dot,pcr + stu <parmptr bra L00CD L00C7 leax ,y bsr L00F6 @@ -131,7 +135,7 @@ bcc L00CD ldb <u0004 beq L00F2 - ldx <u0005 + ldx <nextparm os9 F$PrsNam bcs L00F2 lda ,y @@ -139,7 +143,7 @@ beq L00F2 cmpb #$1E bcc L00F2 - stx <u0005 + stx <nextparm clra std <u0007 rts @@ -153,14 +157,14 @@ L00FE lda ,u+ bpl L0107 incb - cmpa #$AE + cmpa #C$PERD!$80 bne L010C L0107 incb cmpa #C$PERD beq L00FE L010C decb beq L0118 - leay -u0001,u + leay -1,u cmpb #$03 bcc L0118 clrb
--- a/level1/makefile Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/makefile Sat Jun 28 18:41:05 2003 +0000 @@ -15,6 +15,7 @@ RBF = $(shell $(CD) MODULES; make showrbf) SCF = $(shell $(CD) MODULES; make showscf) PIPE = $(shell $(CD) MODULES; make showpipe) +MODULECMDS = shell del echo format makdir merge os9gen prompt SYS = $(shell $(CD) SYS; make showobjs) DEFS = $(shell $(CD) DEFS; make showobjs) @@ -68,6 +69,9 @@ $(DSK2): $(RM) $@ $(OS9FORMAT_DS40) $@ -n"OS-9 Level One Modules Disk" + $(MAKDIR) $@,CMDS + $(CD) CMDS; $(CP) $(MODULECMDS) ../$@,CMDS + $(foreach file, $(MODULECMDS), $(OS9ATTR_EXEC) $@,CMDS/$(file);) $(MAKDIR) $@,MODULES $(MAKDIR) $@,MODULES/BOOTTRACK $(CD) MODULES; $(CP) $(BOOTTRACK) ../$@,MODULES/BOOTTRACK @@ -91,7 +95,8 @@ $(CD) MODULES; $(CP) $(PIPE) ../$@,MODULES/PIPE $(foreach file, $(PIPE), $(OS9ATTR_EXEC) $@,MODULES/PIPE/$(file);) $(MAKDIR) $@,BOOTLISTS - $(CD) BOOTLISTS; $(CPL) bootlist* ../$@,BOOTLISTS + $(CD) BOOTLISTS; $(CPL) *.bl ../$@,BOOTLISTS + $(MAKDIR) $@,BOOTSCRIPTS + $(CD) BOOTSCRIPTS; $(CPL) mb* ../$@,BOOTSCRIPTS # $(foreach file, $(PIPE), $(OS9ATTR_EXEC) $@,MODULES/PIPE/$(file);) -
--- a/level1/modules/aciapak.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/aciapak.asm Sat Jun 28 18:41:05 2003 +0000 @@ -102,11 +102,11 @@ std <orgDFIRQ,u save it off locally leax >FIRQRtn,pcr get our D.FIRQ routine stx <D.FIRQ and put it in system global vector - lda >PIA.U8+3 + lda >PIA1Base+3 anda #$FC ora #$01 - sta >PIA.U8+3 - lda >PIA.U8+2 + sta >PIA1Base+3 + lda >PIA1Base+2 puls cc lda #$03 sta >MPI.Slct @@ -118,7 +118,7 @@ lda ,x lda $01,x ldb $01,x - ldb >PIA.U8+2 + ldb >PIA1Base+2 ldb $01,x bmi L00FB lda #$02 @@ -389,7 +389,7 @@ rts * ISR -L024E ldb >PIA.U8+2 +L024E ldb >PIA1Base+2 ldx V.PORT,u sta <u0027,u tfr a,b
--- a/level1/modules/boot_1773.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/boot_1773.asm Sat Jun 28 18:41:05 2003 +0000 @@ -23,7 +23,7 @@ * $01 = * $02 = * $03 = 30ms -STEP equ $00 +STEP set $00 tylg set Systm+Objct atrv set ReEnt+rev @@ -65,9 +65,9 @@ stx <D.NMI lda #$09 ELSE - stx >$010A + stx >D.XNMI+1 lda #$7E - sta >$0109 + sta >D.XNMI lda #$08 ENDC sta >DPort
--- a/level1/modules/ccio.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/ccio.asm Sat Jun 28 18:41:05 2003 +0000 @@ -186,7 +186,7 @@ beq L00B7 lda <u0030,u lbsr L03CC -L00B7 ldx #PIA.U4 +L00B7 ldx #PIA0Base clra clrb std <u006A,u clear @@ -545,13 +545,13 @@ lbra L055F L03CC pshs x,a stb <u002F,u - lda >PIA.U8+2 + lda >PIA1Base+2 anda #$07 ora ,s+ tstb bne L03DE ora <trulocas,u -L03DE sta >PIA.U8+2 +L03DE sta >PIA1Base+2 sta <u0030,u tstb bne L03F5 @@ -633,8 +633,8 @@ SSJOY pshs y,cc orcc #IRQMask mask interrupts lda #$FF - sta >PIA.U4+2 - ldb >PIA.U4 + sta >PIA0Base+2 + ldb >PIA0Base ldy R$X,x get joystick number to poll bne L0481 andb #$01 @@ -644,17 +644,17 @@ beq L0486 L0485 clra L0486 sta R$A,x - lda >PIA.U4+3 + lda >PIA0Base+3 ora #$08 ldy R$X,x bne L0494 anda #$F7 -L0494 sta >PIA.U4+3 - lda >PIA.U4+1 +L0494 sta >PIA0Base+3 + lda >PIA0Base+1 anda #$F7 bsr L04B3 std R$X,x - lda >PIA.U4+1 + lda >PIA0Base+1 ora #$08 bsr L04B3 pshs b,a @@ -664,7 +664,7 @@ clrb puls pc,y,cc -L04B3 sta >PIA.U4+1 +L04B3 sta >PIA0Base+1 lda #$7F ldb #$40 bra L04C7 @@ -677,8 +677,8 @@ clra rts L04C7 pshs b - sta >PIA.U8 - tst >PIA.U4 + sta >PIA1Base + tst >PIA0Base bpl L04D5 adda ,s+ bra L04BC @@ -1034,17 +1034,17 @@ * Ding - tickle CoCo's PIA to emit a sound Ding pshs b,a - lda >PIA.U4+1 - ldb >PIA.U4+3 + lda >PIA0Base+1 + ldb >PIA0Base+3 pshs b,a anda #$F7 andb #$F7 - sta >PIA.U4+1 - stb >PIA.U4+3 - lda >PIA.U8+3 + sta >PIA0Base+1 + stb >PIA0Base+3 + lda >PIA1Base+3 pshs a ora #$08 - sta >PIA.U8+3 + sta >PIA1Base+3 ldb #$0A L07E6 lda #$FE bsr L0800 @@ -1053,13 +1053,13 @@ decb bne L07E6 puls a - sta >PIA.U8+3 + sta >PIA1Base+3 puls b,a - sta >PIA.U4+1 - stb >PIA.U4+3 + sta >PIA0Base+1 + stb >PIA0Base+3 puls pc,b,a -L0800 sta >PIA.U8 +L0800 sta >PIA1Base * some type of settle delay lda #128 L0805 inca
--- a/level1/modules/clock.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/clock.asm Sat Jun 28 18:41:05 2003 +0000 @@ -229,10 +229,10 @@ * ClockIRQ clra tfr a,dp set direct page to zero - lda PIA.U4+3 get hw byte + lda PIA0Base+3 get hw byte bmi L0032 branch if sync flag on jmp [>D.SvcIRQ] -L0032 lda PIA.U4+2 clear interrupt? +L0032 lda PIA0Base+2 clear interrupt? dec <D.Tick decrement tick counter bne L007F go around if not zero ldd <D.Min get minutes/seconds @@ -411,17 +411,17 @@ * install system calls leay >SysTbl,pcr os9 F$SSvc - ldx #PIA.U4 + ldx #PIA0Base clra - sta 1,x change PIA.U4 side A to DDR - sta ,x clear PIA.U4 side A - sta 3,x change PIA.U4 side B to DDR + sta 1,x change PIA0Base side A to DDR + sta ,x clear PIA0Base side A + sta 3,x change PIA0Base side B to DDR coma complement A side A - sta 2,x write all 1's to PIA.U4 side B + sta 2,x write all 1's to PIA0Base side B lda #$34 - sta 1,x PIA.U4 side A to I/O reg + sta 1,x PIA0Base side A to I/O reg lda #$3F - sta 3,x PIA.U4 side B to I/O reg + sta 3,x PIA0Base side B to I/O reg lda 2,x IFEQ SOFT
--- a/level1/modules/makefile Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/makefile Sat Jun 28 18:41:05 2003 +0000 @@ -5,11 +5,14 @@ DEPENDS = ./Makefile TPB = $(3RDPARTY)/booters -BOOTERS = boot_1773 boot_burke boot_idelba boot_rampak boot_wd1002 -BOOTTRACK = oscode $(BOOTERS) os9 os9p2 -KERNEL = +BOOTERS = boot_1773_6ms boot_1773_30ms \ + boot_burke boot_idelba boot_rampak boot_wd1002 +BOOTTRACK = oscode $(BOOTERS) +KERNEL = os9 os9p2 SYSMODS = ioman init sysgo -CLOCKS = clock.60hz clock.50hz clock_tc3 clock_bb +CLOCKS = clock_elim clock_disto2 clock_disto4 clock_bnb \ + clock_smart clock_harris clock_tc3 clock_soft \ + clock_soft_50hz RBF = rbf.mn \ ccdisk.dr cchdisk.dr \ @@ -42,6 +45,12 @@ # Special cases +boot_1773_6ms: boot_1773.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aDNum=0 -aSTEP=0 + +boot_1773_30ms: boot_1773.asm + $(AS) $< $(ASOUT)$@ $(AFLAGS) -aDNum=0 -aSTEP=3 + # Floppy descriptors SSDD35 = -aCyls=35 -aSides=1 -aSectTrk=18 -aSectTrk0=18 \ -aInterlv=3 -aSAS=8 -aDensity=1 @@ -96,11 +105,32 @@ $(AS) $(AFLAGS) $(ASOUT)$@ $< -aDiskGo=1 # Clocks +clock_elim: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aRTCElim=1 -aTPS=60 + +clock_disto2: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aRTCDsto2=1 -aTPS=60 + +clock_disto4: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aRTCDsto4=1 -aTPS=60 + +clock_bnb: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aRTCBB=1 -aTPS=60 + +clock_smart: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aRTCSmart=1 -aTPS=60 + +clock_harris: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aRTCHarrs=1 -aTPS=60 + clock_tc3: clock.asm $(AS) $(AFLAGS) $(ASOUT)$@ $< -aRTCTC3=1 -aTPS=60 -clock_bb: clock.asm - $(AS) $(AFLAGS) $(ASOUT)$@ $< -aRTCBB=1 -aTPS=60 +clock_soft: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aTPS=60 + +clock_soft_50hz: clock.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aTPS=50 clean: $(RM) $(ALLOBJS)
--- a/level1/modules/oscode.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/oscode.asm Sat Jun 28 18:41:05 2003 +0000 @@ -25,10 +25,10 @@ fcc /BOOT/ BootMLen equ *-BootMsg -L2620 clr PIA.U4+3 +L2620 clr PIA0Base+3 ifne Dragon64 - clr PIA.U4+1 added for Dragon, works on CoCo + clr PIA0Base+1 added for Dragon, works on CoCo endc sta $FFDF turn off ROM
--- a/level1/modules/piper.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/piper.asm Sat Jun 28 18:41:05 2003 +0000 @@ -56,3 +56,4 @@ emod eom equ * + end
--- a/level1/modules/printer.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/printer.asm Sat Jun 28 18:41:05 2003 +0000 @@ -75,7 +75,7 @@ * Init pshs cc orcc #IntMasks - ldx #PIA.U8 + ldx #PIA1Base clr $01,x ldd <IT.COL,y get column size std <u0022,u @@ -116,7 +116,7 @@ puls a L007A orcc #Carry rts -L007D stb >PIA.U8 +L007D stb >PIA1Base L0080 pshs b,a ldd <u0024,u L0085 subd #$0001 @@ -194,10 +194,10 @@ ldb #E$NotRdy rts L0104 pshs x,b,a - ldb >PIA.U8+2 + ldb >PIA1Base+2 lda >$FF69 bpl L0126 - lda >PIA.U8+3 + lda >PIA1Base+3 bita #$01 beq L0126 bita #$80
--- a/level1/modules/rs232.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/rs232.asm Sat Jun 28 18:41:05 2003 +0000 @@ -66,7 +66,7 @@ * Init pshs cc orcc #IntMasks - ldx #PIA.U8 + ldx #PIA1Base clr $01,x ldd <IT.COL,y get col/row bytes std <u0024,u @@ -112,12 +112,12 @@ L0066 bra L006E L0068 ldx #$0001 os9 F$Sleep -L006E lda >PIA.U8+2 +L006E lda >PIA1Base+2 lsra pshs x,a lda >$FF69 bpl L0091 - lda >PIA.U8+3 + lda >PIA1Base+3 bita #$01 beq L0091 bita #$80 @@ -133,7 +133,7 @@ clra bsr L00DA L009A bsr L00D3 - ldb >PIA.U8+2 + ldb >PIA1Base+2 lsrb rora dec $01,s @@ -160,7 +160,7 @@ puls a L00CD orcc #Carry rts -L00D0 stb >PIA.U8 +L00D0 stb >PIA1Base L00D3 pshs b,a ldd <BaudCnt,u bra L00E1
--- a/level1/modules/sscpak.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/sscpak.asm Sat Jun 28 18:41:05 2003 +0000 @@ -27,8 +27,6 @@ CRB equ $03 PIA CRB offset MUXBit equ %00001000 COCO sound MUX control/select bit position SpeakBit equ %01000000 SSPak speech status bit (active low) -PIA0Addr equ PIA.U4 base address of COCO sound MUX select PIA -PIA1Addr equ PIA.U8 base address of COCO sound MUX enable PIA SSPData equ $FF7E SSPak data register offset SSPReset equ $FF7D SSPak reset register offset SSPStat equ $FF7E SSPak status register offset @@ -66,8 +64,8 @@ Term rts Write ldy #SSPData - ldx #PIA0Addr - ldu #PIA1Addr + ldx #PIA0Base + ldu #PIA1Base cmpa #C$LF linefeed? beq WritEx ..yep, ignore it cmpa #C$CR carriage return?
--- a/level1/modules/sysgo.asm Fri Jun 27 13:30:22 2003 +0000 +++ b/level1/modules/sysgo.asm Sat Jun 28 18:41:05 2003 +0000 @@ -47,7 +47,7 @@ * For ROM version, cut down on verbage IFNE DiskGo - fcc !Release Date: 06/01/2003! + fcc !Release Date: 07/01/2003! fcb C$CR,C$LF fcc !"A CoCo Community Project"! fcb C$CR,C$LF