Mercurial > hg > Members > kono > nitros9-code
changeset 2730:6bd6e348665d
Working on cloned default branch, pulled 2012/11/03
user: gheskett@wdtv.com
branch 'default'
changed ChangeLog
changed ReadMe
changed defs/rbf.d
changed defs/rbsuper.d
changed defs/scsi.d
changed level1/atari/cmds/fuji.asm
changed level1/coco/modules/makefile
changed level1/modules/boot_scsi.asm
changed level1/modules/superdesc.asm
changed level2/coco3/bootfiles/makefile
changed level2/coco3/modules/makefile
changed level2/coco3_6309/bootfiles/makefile
changed level2/modules/joydrv_6551L.asm
changed rules.mak
author | gheskett@wdtv.com |
---|---|
date | Sat, 10 Nov 2012 11:55:48 -0500 |
parents | f3b7ca8083fd |
children | baa835d68db2 ebf319736e9c |
files | ChangeLog ReadMe defs/rbf.d defs/rbsuper.d defs/scsi.d level1/atari/cmds/fuji.asm level1/coco/modules/makefile level1/modules/boot_scsi.asm level1/modules/superdesc.asm level2/coco3/bootfiles/makefile level2/coco3/modules/makefile level2/coco3_6309/bootfiles/makefile level2/modules/joydrv_6551L.asm rules.mak |
diffstat | 14 files changed, 309 insertions(+), 179 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Jul 15 11:10:20 2012 -0500 +++ b/ChangeLog Sat Nov 10 11:55:48 2012 -0500 @@ -1,5 +1,43 @@ NitrOS-9 V3.2.9: +---------------------------------------------------------- +2012/11/09 Gene Heskett +Boisy; +List of files changed since hg clone on 2012/11/03 +M ChangeLog +M ReadMe +M defs/rbf.d +M defs/rbsuper.d +M defs/scsi.d +M level1/atari/cmds/fuji.asm +M level1/coco/modules/makefile +M level1/modules/boot_scsi.asm +M level1/modules/superdesc.asm +M level2/coco3/bootfiles/makefile +M level2/coco3/modules/makefile +M level2/coco3_6309/bootfiles/makefile +M level2/modules/joydrv_6551L.asm +M rules.mak + +AFAICT it will now build bootable .dsk's for all coco's +Running fine on my coco3, and on Roberts Coco3 + +----------------------------------------------------- +With switch to mercurial (Gene Heskett notes, 2012/11/03) + +Level 2 builld, run tested +- joydrv_6551L broken, boot failed, no clue why, code didn't change + Fixed now, works, 2012/11/07 GH + +- All tc^3 drive descriptors broken, over write them in the .dsk's with known + good versions before doing a mb! + +Level 1 atari build +- fuji stuff build failed, assembler syntax error + Fixed, builds but not run tested, I don't have a 6502 or Liber8 fitted atari + +----------------------------------------------------- + Level 2 Only: - joydrv_6551L, joydrv_6551M and joydrv_6552L now have their MPI slot select bytes properly represented and should work.
--- a/ReadMe Sun Jul 15 11:10:20 2012 -0500 +++ b/ReadMe Sat Nov 10 11:55:48 2012 -0500 @@ -70,3 +70,64 @@ Repeat steps 3-5 for each additional disk. +Addendum by Gene Heskett + +Unfortunately, many of the fdc chipsets shipping on motherboards for +the last 5 years or so, do NOT understand, and will probably crash your +pc when a 256 byte/sector disk read or write is attempted. This rather +high priced Asus M2n-SLI Deluxe board is one such board, so using floppies +for the 'sneakernet' to get this stuff onto my coco3 cannot be done. +email to gheskett AT wdtv DOT com. + +1. This repo is newer than the sourceforge repo, and a lot more of it +Just Works(TM). If you find something that doesn't, use the above +email address. + +2. This repo's work will be transfered back to sourceforge when I can +figure out how to do a commit in mercurial. Tutorials on this are welcome. +There are, since I did the hg clone about the 27th of October 2012, +probably at least 50 files needing committed, changed in getting this +back to buildable and bootable. + +3. Since we now have drivewire, the appropriate for your machine .dsk +files can be downloaded and mounted directly as a fully read/write +virtual disk. Drivewire is the cats meow, many thanks to Aaron Wolfe. +Make yourself a cable and join in on the dance floor, its amazing. + +4. I am still using mamou as the assembler, no attempt has been made +to convert it to using William Astles lwtools just yet as I wanted +this to be as close to 100% usable as possible before attempting the +conversion so that only the conversion generated errors remain. There +will be some teething problems while that is going on in a separate +tree that won't be visible until it Just Works(TM). + +5. One thing that was recently done by Boisy was to convert the +boot_scsi.asm file from, because of code size constraints, the use of +the former drive addressing scheme of a single marching set bit across +the scsi bus drive address field, into a base zero decimal scheme, so the +drive address contained in the 4th byte from the end can now be looked +at as a decimal value where $00 is now a legal address for drive 0 on +the bus. A MAJOR change, and one in the right direction IMO, that was +not even mentioned in the comments of the boot_scsi.asm header till I +discovered it yesterday while reading the code trying to figure out why +with that byte set to $01 like it had been for years, the boot was +failing because it was trying to find OS9Boot on my drive 1, s1, and +fixed the makefiles accordingly. + +6. I am not trying to keep this a secret but it probably will not get +any ink on the coco list until such time as I have committed to source- +forge and that repo is again useable, so bear with me. I have cable +dsl so my 'intertube' at 3 megabits isn't that fast. A lot of traffic +will probably result in my isp blocking the port address I do use to +get past the port 80 block just like they do without admitting to it +because if they did admit it, the FCC would probably discuss their +common carrier status with the ISP's legal dept. As that status has +huge tax and licensing advantages to the ISP, they will not give that +status up without a prolonged court fight. I have even considered +putting this page on port 6809, but when and if that happens, you'll +see it in my email sig. + +Thats all for now folks, keep the old girl running till the rapture +or whatever. + +Cheers, Gene
--- a/defs/rbf.d Sun Jul 15 11:10:20 2012 -0500 +++ b/defs/rbf.d Sat Nov 10 11:55:48 2012 -0500 @@ -273,6 +273,12 @@ DD.NAM RMB 32 Volume name DD.OPT RMB 32 Option area +************************* +* 2012/11/09 Gene Heskett - Some additions for bootlink etc use. + ORG $60 More options from device descriptor +DD.STP RMB 1 This is for the /sh and /ih virtual disks in HDBDOS +DD.OFS RMB 3 This is DT.WPC and DT.OSF combined, might be more + * DD.FMT Bit Definitions - valid only if device is a floppy disk FMT.SIDE EQU %00000001 Single Sided=0, Double Sided=1 FMT.DNS EQU %00000010 Single Density=0, Double Density=1
--- a/defs/rbsuper.d Sun Jul 15 11:10:20 2012 -0500 +++ b/defs/rbsuper.d Sat Nov 10 11:55:48 2012 -0500 @@ -76,7 +76,7 @@ V.LLMem EQU . start of low level driver memory RMB llreserve reserved area... low level driver uses this as it wants V.LLMemSz EQU .-V.LLMem -* Note: we trick rbsuper to so that it thinks its static storage starts at +* Note: we trick rbsuper too so that it thinks its static storage starts at * zero when it really starts beyond DRVBEG+(DRVMEM*DrvCount). RMB UOFFSET V.RBSuper EQU . end of RBSuper's (and ll driver's) memory requirements
--- a/defs/scsi.d Sun Jul 15 11:10:20 2012 -0500 +++ b/defs/scsi.d Sat Nov 10 11:55:48 2012 -0500 @@ -38,6 +38,7 @@ **** Cloud-9 TC^3 Controller Definitions IFNE TC3+SB +SDMPI EQU $02 Added 2012\11\05 GH SCSIDATA EQU 0 SCSISTAT EQU 1 SCSISEL EQU 1
--- a/level1/atari/cmds/fuji.asm Sun Jul 15 11:10:20 2012 -0500 +++ b/level1/atari/cmds/fuji.asm Sat Nov 10 11:55:48 2012 -0500 @@ -62,17 +62,17 @@ * - 2 mode lines of ANTIC mode $2 (text) DList fcb AEMPTY8,AEMPTY8,AEMPTY8 fcb ALMS+AMODE2 -DListT1 fdbs FujiTxt1 +DListT1 fcs /FujiTxt1/ fcb AMODE2 fcb ALMS+ADLI+AMODED -DListM fdbs FujiMem +DListM fcs /FujiMem/ fill ADLI+AMODED,$4e fcb AMODED fcb ALMS+AMODE2 -DListT2 fdbs FujiTxt2 +DListT2 fcs /FujiTxt2/ fcb AMODE2 fcb AVB+AJMP -DListPtr fdbs DList +DListPtr fcs /DList/ **************************************** * Main entry point
--- a/level1/coco/modules/makefile Sun Jul 15 11:10:20 2012 -0500 +++ b/level1/coco/modules/makefile Sat Nov 10 11:55:48 2012 -0500 @@ -76,7 +76,7 @@ # Special cases # TC^3 SCSI Booter boot_tc3: boot_scsi.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) -aMPI=1 -aDnum=0 -aITDRV=0 -aITDNS=0 # SuperIDE/Glenside IDE Booter boot_ide: boot_ide.asm @@ -247,44 +247,44 @@ # TC^3 SCSI Descriptors dds0_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID0) -aDD=1 + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID0) -aDD=1 -aDnum=0 -aITDRV=0 s0_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID0) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID0) $(SCSI_HD) -aDnum=0 -aITDRV=0 s1_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID1) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID1) $(SCSI_HD) -aDnum=1 -aITDRV=1 s2_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID2) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID2) $(SCSI_HD) -aDnum=2 -aITDRV=2 s3_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID3) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID3) $(SCSI_HD) -aDnum=3 -aITDRV=3 s4_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID4) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID4) $(SCSI_HD) -aDnum=4 -aITDRV=4 s5_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID5) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID5) $(SCSI_HD) -aDnum=5 -aITDRV=5 s6_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID6) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID6) $(SCSI_HD) -aDnum=6 -aITDRV=6 sh_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(HDBDOS) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(SSDD35) -aHDBDOS=1 -aHD=1 -a Dnum=7 -aITDRV=0 # IDE Descriptors ddi0_ide.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(MASTER) -aDD=1 + $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(MASTER) -aDD=1 -aDnum=0 -aITDRV=0 i0_ide.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(MASTER) + $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(MASTER) -aDnum=0 -aITDRV=0 i1_ide.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(SLAVE) + $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(SLAVE) -aDnum=1 -aITDRV=1 ih_ide.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(HDBDOS) + $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(SSDD35) -aHD=1 -aHDBDOS=1 -aDnum=0 -aITDRV=0 # RFM descriptors ddy0.dd: rfmdesc.asm
--- a/level1/modules/boot_scsi.asm Sun Jul 15 11:10:20 2012 -0500 +++ b/level1/modules/boot_scsi.asm Sat Nov 10 11:55:48 2012 -0500 @@ -1,3 +1,4 @@ + opt w132 wide listing ******************************************************************** * Boot - SCSI Boot Module * @@ -40,7 +41,12 @@ * * 4 2008/02/17 Boisy G. Pitre * Message phase code was broken, now fixed and the booter now works. - +* +* 5 2012/11/05-06 Gene Heskett +* SDMPI from defs/scsi.d is being ignored, so boot failed is the message. +* Ded the object to fix that AND the NULL bus address and this code broken. +* WhichDrv is now a zero based decimal value passed in by the makefile via ITDNS +* Thanks Boisy... NAM Boot TTL SCSI Boot Module @@ -52,7 +58,7 @@ tylg SET Systm+Objct atrv SET ReEnt+rev -rev SET 0 +rev SET 1 edition SET 4 MOD eom,name,tylg,atrv,start,size @@ -108,18 +114,19 @@ * B = error (Carry Set) HWInit clr >$FF40 stop the disk motors - IFNE D4N1+HDII - leax CntlSlot,pcr - lda ,x - sta MPI.Slct - ENDC - ldd #S$SEEK*256 - ldx #0 - bsr setup - IFEQ SCSIEX - clr v$blks,u - ENDC - bra command +* IFNE D4N1+HDII ?????? + IFNE MPI + leax CntlSlot,pcr point at byte with MPI slot in it + lda ,x get it + sta MPI.Slct and set the MPI to us. + ENDC But this was NOT being done. + ldd #S$SEEK*256 + ldx #0 + bsr setup + IFEQ SCSIEX + clr v$blks,u + ENDC + bra command * Sets up the SCSI packet to send * Destroys B @@ -143,6 +150,10 @@ ENDC rts + * Sooooo, at end of module, the FF64XX, the XX is not a marching bit +* pattern any more. Cool but a huge gotcha needing makefile changes +* all over. And theres too many of them. + scsival FCB $80+1,$80+2,$80+4,$80+8,$80+16,$80+32,$80+64,$80 * SCSI Wake-Up Routine @@ -155,6 +166,10 @@ leax -1,x else count down bne wake and try again if not timed out bra wake4 else branch to timeout +* Aha! New code! so ITDRV goes down one count +* Nice we get a notice. ChangeLog's would be nice +* But are a pain in the ass to maintain. + * Step 2: Put our SCSI ID on the bus wake1 bsr wake3 small delay lda WhichDrv,pcr get SCSI ID @@ -273,12 +288,17 @@ * Fillers to get to $1D0 Pad FILL $39,$1D0-3-1-2-1-* ENDC - -* The default SCSI ID is here -CntlSlot FCB SDMPI -Address FDB SDAddr -WhichDrv FCB 0 - +* rev1, add selections for MPI slot and bus address of drive +* 2012\11\05 Gene Heskett +* The default SCSI ID is here, but first do MPI slot + IFEQ MPI-1 +CntlSlot FCB SDMPI + ELSE +CntrSlot FCB #$FF + ENDC +Address FDB SDAddr +* So now, this can be a base zero decimal value! +WhichDrv FCB ITDNS EMOD eom EQU * END
--- a/level1/modules/superdesc.asm Sun Jul 15 11:10:20 2012 -0500 +++ b/level1/modules/superdesc.asm Sat Nov 10 11:55:48 2012 -0500 @@ -1,3 +1,4 @@ + opt w132 wide listing ******************************************************************** * SuperDesc - Super Driver Device Descriptor Template * @@ -47,17 +48,20 @@ * * 0 2005/12/08 Boisy G. Pitre * Reserved two bits in IT.TYP for llscsi. - +* +* 1 2012/11/06 Gene Heskett +* passing config opts from makefile NAM SuperDesc TTL Super Driver Device Descriptor Template * Super Driver specific fields -ITDRV SET $00 -ITSTP SET $00 -ITTYP SET $81 -ITDNS SET $00 +*ITDRV SET $00 GH - conflicting? Set in makefile GH +ITSTP SET $00 GH - HDBDOS drive num in $hex +ITTYP SET $81 GH - default=Hard drive, 512 byte sectors -ITSOFS1 SET $00 +*ITDNS SET $00 GH - conflicting? Set in makefile +ITDNS SET ITDRV +ITSOFS1 SET $00 GH - partition offsets ITSOFS2 SET $00 ITSOFS3 SET $00 @@ -67,7 +71,8 @@ SectTrk SET $0020 SectTrk0 SET $0020 Interlv SET $01 -SAS SET $08 +* GH - conditionalize this eventually to reduce disk fragmentation +SAS SET $08 GH - S/B reset to $20 if not floppy IFP1 USE defsfile @@ -81,7 +86,7 @@ tylg SET Devic+Objct atrv SET ReEnt+rev -rev SET $09 +rev SET $0A MOD eom,name,tylg,atrv,mgrnam,drvnam @@ -94,10 +99,14 @@ FDB SDAddr physical controller address FCB initsize-*-1 initilization table size FCB DT.RBF device type:0=scf,1=rbf,2=pipe,3=scf - FCB ITDRV drive number - FCB ITSTP step rate + FCB Dnum drive number + IFNE HDBDOS + FCB $80 + ELSE + FCB ITSTP step rate or HDBDOS # + ENDC FCB ITTYP drive device type - FCB ITDNS media density + FCB ITDNS media density or bus addr SEE DEFS ABOVE! FDB Cyls number of cylinders (tracks) FCB Sides number of sides FCB $01 verify disk writes:0=on @@ -122,7 +131,7 @@ IFNE NULL name FCC /NULL/ - FCB ITDRV+$B0 + FCB Dnum+$B0 ELSE IFNE DD name FCS /DD/ @@ -132,15 +141,15 @@ IFNE HB FCS /H/ ELSE - FCB ITDRV+$B0 + FCB Dnum+$B0 ENDC ELSE IFNE IDE name FCC /I/ - IFNE HB + IFNE HDBDOS FCS /H/ ELSE - FCB ITDRV+$B0 + FCB Dnum+$B0 ENDC ELSE IFNE SD @@ -148,14 +157,14 @@ IFNE HB FCS /H/ ELSE - FCB ITDRV+$B0 + FCB Dnum+$B0 ENDC ELSE name FCC /S/ - IFNE HB + IFNE HDBDOS FCS /H/ ELSE - FCB ITDRV+$B0 + FCB Dnum+$B0 ENDC ENDC ENDC
--- a/level2/coco3/bootfiles/makefile Sun Jul 15 11:10:20 2012 -0500 +++ b/level2/coco3/bootfiles/makefile Sat Nov 10 11:55:48 2012 -0500 @@ -44,6 +44,7 @@ $(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_80d.dd \ $(MD)/scf.mn $(MD)/vtio.dr \ $(MD)/keydrv_cc3.sb $(MD)/joydrv_joy.sb $(MD)/snddrv_cc3.sb \ $(MD)/cowin.io \
--- a/level2/coco3/modules/makefile Sun Jul 15 11:10:20 2012 -0500 +++ b/level2/coco3/modules/makefile Sat Nov 10 11:55:48 2012 -0500 @@ -96,8 +96,16 @@ # Special cases # TC^3 SCSI Booter +# Here, ITDNS sets the scsi bus address of the boot drive, where +# ITDNS = 1 = %00000001 +# ITDNS = 2 = %00000010 +# ITDNS = 3 = %00000100 etc +# This is 4th byte from end of module +# Controller hardware addr is usually $FF74 6th-5th byte from end of module +# MPI = 1 = set MPI slot # from SDMPI in CtrlSlot if 1, Set $FF if zero + boot_tc3: boot_scsi.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) -aITDNS=0 -aMPI=1 -aITDRV=1 # SuperIDE/Glenside IDE Booter boot_ide: boot_ide.asm @@ -335,44 +343,44 @@ # TC^3 SCSI Descriptors dds0_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID0) -aDD=1 + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID0) -aDD=1 -aDnum=0 -aITDRV=0 s0_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID0) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID0) $(SCSI_HD) -aDnum=0 -aITDRV=0 s1_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID1) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID1) $(SCSI_HD) -aDnum=1 -aITDRV=1 s2_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID2) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID2) $(SCSI_HD) -aDnum=2 -aITDRV=2 s3_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID3) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID3) $(SCSI_HD) -aDnum=3 -aITDRV=3 s4_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID4) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID4) $(SCSI_HD) -aDnum=4 -aITDRV=4 s5_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID5) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID5) $(SCSI_HD) -aDnum=5 -aITDRV=5 s6_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID6) $(SCSI_HD) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(ID6) $(SCSI_HD) -aDnum=6 -aITDRV=6 sh_tc3.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(HDBDOS) + $(AS) $(ASOUT)$@ $< $(TC3FLAGS) $(HDBDOS) $(SSDD35) -aHDBDOS=1 -aHB=1 -aDnum=7 -aITDRV=0 # IDE Descriptors ddi0_ide.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(MASTER) -aDD=1 + $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(MASTER) -aDnum=0 -aDD=1 -aITDRV=0 i0_ide.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(MASTER) + $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(MASTER) -aDnum=0 -aITDRV=0 i1_ide.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(SLAVE) + $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(SLAVE) -aDnum=1 -aITDRV=1 ih_ide.dd: superdesc.asm - $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(HDBDOS) + $(AS) $(ASOUT)$@ $< $(IDEFLAGS) $(SSDD35) -aHDBDOS=1 -aHD=1 -aDnum=0 -aITDRV=0 # RFM descriptors ddy0.dd: rfmdesc.asm
--- a/level2/coco3_6309/bootfiles/makefile Sun Jul 15 11:10:20 2012 -0500 +++ b/level2/coco3_6309/bootfiles/makefile Sat Nov 10 11:55:48 2012 -0500 @@ -41,6 +41,7 @@ $(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)/scf.mn $(MD)/vtio.dr \ $(MD)/keydrv_cc3.sb $(MD)/joydrv_joy.sb $(MD)/snddrv_cc3.sb \ $(MD)/cowin.io \
--- a/level2/modules/joydrv_6551L.asm Sun Jul 15 11:10:20 2012 -0500 +++ b/level2/modules/joydrv_6551L.asm Sat Nov 10 11:55:48 2012 -0500 @@ -47,10 +47,20 @@ * but detects 4th byte from a Logitek mouse & switches modes * till next reboot. * Also no 6309 optimizations yet. Version A maybe? Not yet. + +* damn this editor, it lets me open a file, do an hours worth of +* hacking on a file I don't own, but the sumbitch doesn't tell +* me until I go to save an hours work! So I have to re-invent +* this wheel every damned time. + +* Now we start on version 13 +* GH 2012/11/01 trying to make this work again, it died with +* the conversion to a mercurial repo on srcfrg. + * one problem has been the narrow list format, Boisy advises: opt w132 nam JoyDrv - ttl Joystick Driver for 6551/Logitech Mouse + ttl Joystick Driver for 6551/Logitech or M$ Mouse * Disassembled 98/09/09 09:22:44 by Disasm v1.6 (C) 1988 by RML @@ -60,15 +70,15 @@ endc * l51.defs - something else to check against google et all * l51.defs has been modified, this needs the new version -* set this to get some debugging in the boot trace -DEBUG = 1 +* set this to get some debugging and a lockup in the boot trace +DEBUG = 0 tylg set Systm+Objct atrv set ReEnt+rev -rev set $02 -edition set 11 +rev set $01 +edition set 13 * set this to where your rs-232 pack is plugged in MPISlot set $00 front slot for mine - +* the $FF6C is the mouses port address, change to suit your system. mod eom,name,tylg,atrv,start,$FF6C name fcs /JoyDrv/ @@ -82,10 +92,9 @@ lbra SSMsXY lbra SSJoyBtn -* This code is not being -* used, but save it so I -* don't have to reinvent -* this wheel later +* This code is not being used as we have SSMsXY, but save it so I +* don't have to reinvent this wheel later but no clue why +* so it will die in next Edition 14 if not sooner. GH. *SSJoyXY pshs x,b,a * ldx #PIA0Base * lda <$23,x @@ -140,7 +149,7 @@ IRQPckt equ * Pkt.Flip fcb Stat.Flp D.Poll flip byte=$00 Pkt.Mask fcb Stat.RxF is correct - fcb $01 priority=low + fcb $01 priority=low, mouse is pretty slow *** * JoyDrv Initialization. @@ -153,53 +162,54 @@ * ERROR OUTPUT: CC = Carry set * B = error code * first, suspend all interrupts -Init pshs cc save regs we alter +Init pshs cc save regs we alter, stack -1 orcc #IntMasks mask IRQs while disabling ACIA - bsr InitPIAs - bsr InitGIME - bsr ClrACIA reset, gobble up trash data in ACIA - bcc ClrBuf which will also install IRQSvs - puls cc else error - lbsr Term - comb - ldb #E$PrcAbt - rts and return error + bsr InitPIAs stack still -1 + bsr InitGIME stack still -1 +* we should see a bunch of stuff here, ending in 'D' + lbsr ClrACIA reset, clear trash data in ACIA, stack -1 on rtn + bcc SetBuf which will also install IRQSvs stack -1 yet + bcc Alldone, else stack still -1 + lbra Term it won't come back! +Alldone puls cc,pc and return clean -************************************* +*****SetBuf************************** * Btn.Cntr,u offset 0 has room for 3 bits of incoming * byte counter, 3 bits of button status. * Buffer, offset 2-3 is the combined first 3 bytes * of the incoming XY data * CrntXpos, offset 4-5 is current (0-HResMaxX) xpos * CrntYpos, offset 6-7 is current (0 to HResMaxY*2) ypos - -ClrBuf ldd #$0007 clear the buffer -ClrBuf1 sta b,u A=$00 - decb decr counter - bne ClrBuf1 was a bpl, so 1st byte wasn't cleared -* Now init the buffer to real data - clrb reset to $00, s/b $00 here anyway. - sta Btn.Cntr,u set up Rx data sync, no button(s) pressed - std CrntXPos,u set up X position at left screen edge - ldd #HResMaxY*2 =$017E, 382 decimal? Odd value, check - std CrntYPos,u set up Y position at top screen edge - lda #'M preset M$ mouse - sta Buffer,u - +SetBuf lda #$00 + ldb #'M set Buffer,u to M$ mode + std Btn.Cntr,u set up Rx data sync, no button(s) pressed + clrb + std CrntXPos,u set up X position at left screen edge + ldd #HResMaxY*2 =$017E, 382 decimal? Odd value, check + std CrntYPos,u set up Y position at top screen edge * Now we should be ready for live IRQ's InstIRQ ldd M$Mem,pcr get base hardware address addd #StatReg status register address + pshs x,y leax IRQPckt,pcr leay IRQSvc,pcr os9 F$IRQ install the IRQSvs routine + puls x,y lbcs InitErr go with cc on stack! - puls cc get rid of the push - rts +* Now, enable rx Rx IRQ's + ldx M$Mem,pcr but first clean out any instant IRQ's + lda DataReg,x dump it to the bitbucket + lda StatReg,x likewise, clear any irq's pending +* Now, enable the IRQ's + ldd #(TIC.RTS!Cmd.DTR!)*256+(DB.7!Ctl.RClk!BR.01200) enable rx IRQs + std CmdReg,x and enable Rx IRQ's + puls cc Fix the stack! + rts so stack = 0 now * BUG FIX: InitExit is now here... was TermExit... InitExit puls pc,cc recover original regs, return... -* clear the PIA's for this +* clear the PIA's for this, stack is -3 on entry InitPIAs lda >PIA1Base+3 get PIA CART* input control register anda #$FC clear PIA CART* control bits sta >PIA1Base+3 disable PIA CART* FIRQs @@ -210,14 +220,14 @@ jsr <D.BtBug puls a,b,x,u,y,cc,dp endc - rts + rts stack still -1 InitGIME lda #$01 GIME CART* IRQ enable ora <D.IRQER mask in current GIME IRQ enables sta <D.IRQER save GIME CART* IRQ enable shadow register sta >IrqEnR enable GIME CART* IRQs lda SlotSlct,pcr mpi slot of mouse - bmi ClrACIA + bmi ClrACIA if no mpi sta >MPI.Slct ifeq DEBUG-1 pshs a,b,x,u,y,cc,dp @@ -225,77 +235,51 @@ jsr <D.BtBug puls a,b,x,u,y,cc,dp endc - rts + rts And stack still -1 ClrACIA ldx M$Mem,pcr get base hardware address again lda #$10 sta StatReg,x reset again -* major foobar. These mice are 7n2 mice, not 8n1 -* Fixed 25/06/2008 GH - ldd #(TIC.RTS!Cmd.DTR)*256+(DB.7!Ctl.RClk!BR.01200) [D]=command:control +* start it up with rx IRQs disabled + ldd #(TIC.RTS!Cmd.DTR!Cmd.RxIE)*256+(DB.7!Ctl.RClk!BR.01200) [D]=command:control std CmdReg,x set command and control registers * do instant reads for trash collection * and clear status of Stat.RxF bits -* read it 16 times so its settled! - ldb #$10 -flshinit lda DataReg,x - lda StatReg,x +* read it 32 times so its settled! +* and get rid of this headache + ldb #$02 +flshinit lda StatReg,x +* look at everything + ifeq DEBUG-1 + pshs a,b,x,u,y,cc,dp + jsr <D.BtBug lets see what its doing + puls a,b,x,u,y,cc,dp + endc + lda DataReg,x + ifeq DEBUG-1 + pshs a,b,x,u,y,cc,dp + jsr <D.BtBug lets see what its doing + puls a,b,x,u,y,cc,dp + endc decb bne flshinit - -* that kills some of the 14 milliseconds -* to the mouses first response byte -* now, lets see what mouse we have -* my mouse does a $7F as it powers up as first byte - bsr GetByte GetByte shows _ char - bsr GetByte GetByte shows M char, but its a logitek - bsr GetByte GetByte shows 3 char, ?number of buttons? -* it will either get the first 3 bytes, or timeout -* and ATM, a timeout will lock the boot to display it -GotByte rts - -********************************* -* Entry : x pointing at hardware -* Mangles: a,b -* Returns: char in A -* Error : cc set, err code in B -* scans acia for a byte of data -* Switch this out also +* looks like 2x is enough to clear things, its P3P3P3 till end. +* Fall thru to KilTim -GetByte pshs y - ldy #$01A0 set timeout to fail -GetByte1 leay -1,y - beq GByteFai - clra kill some time -Dly1 deca - bne Dly1 - lda StatReg,x look for byte - anda Pkt.Mask,pcr - tsta Stat.RxF - beq GetByte1 - lda DataReg,x -* show byte on boot screen - pshs a,b,x,u,y,cc,dp - jsr <D.BtBug - puls a,b,x,u,y,cc,dp - puls y - clrb in case cc set - rts +* this should allow the acia to overflow etc as the power/signin bytes come in +* but the Rx irq is disabled. +* We need at least 14 milliseconds plus 3 bytes at 1200 baud, +* which is 25 ms or about 40 milliseconds total. +KilTim pshs y stack -3 + ldb #$03 a small time delay +rloadlp ldy #$1FFF ditto, +dodelay leay -1,y + bne dodelay + decb + clra + puls y stack -1 + rts Return success regardless, stack -1 -GByteFai puls y - clrb clear carry - ifeq DEBUG-1 -* show failure on boot screen a 't' - pshs a,b,x,u,y,cc,dp - lda #'T indicate timeout - jsr <D.BtBug - puls a,b,x,u,y,cc,dp - endc -GBytFail comb set carry - ldb #E$PrcAbt -* lock up boot to show failure -lettgsho bra lettgsho -* rts *** Only used by failed Init routine! * JoyDrv Termination. @@ -318,18 +302,18 @@ leay IRQSvc,pcr os9 F$IRQ - ifeq DEBUG-1 +* ifeq DEBUG-1 pshs a,b,x,y,u,cc,dp lda #'j failed jsr <D.BtBug puls a,b,x,y,u,cc,dp - endc +* endc TermExit puls cc clear stack letssee bra letssee lock it with failed data on screen -* comb -* ldb #E$PrcAbt -* rts + comb + ldb #E$PrcAbt + rts ************************* * This code only good for tandy * Joysticks. Why here? @@ -365,7 +349,7 @@ * A, X, and U registers may be altered * * ERROR OUTPUT: none -* AND HERE IS WHERE THE BUTTON DATA IS LOST! + SSMsBtn pshs cc orcc #IntMasks mask interrupts lda Btn.Cntr,u
--- a/rules.mak Sun Jul 15 11:10:20 2012 -0500 +++ b/rules.mak Sat Nov 10 11:55:48 2012 -0500 @@ -44,8 +44,9 @@ # Use the cross assembler AS = mamou -i=$(DEFSDIR) #AS = os9asm -i=$(DEFSDIR) +#AS = lwasm --6309 --format=os9 --pragma=pcaspcr,nosymbolcase,condundefzero --includedir=. --includedir=$(DEFSDIR) ASOUT = -o -AFLAGS = -q -aNOS9VER=$(NOS9VER) -aNOS9MAJ=$(NOS9MAJ) -aNOS9MIN=$(NOS9MIN) -aNOS9DBG=$(NOS9DBG) +AFLAGS = -q -aNOS9VER=$(NOS9VER) -aNOS9MAJ=$(NOS9MAJ) -aNOS9MIN=$(NOS9MIN) -aNOS9DBG=$(NOS9DBG) -l ifdef PORT AFLAGS += -a$(PORT)=1 endif