COCO-3 L-II vr 2.00.01 patches/bugs/etc as of 8 Jul 87 : K Darling, K Meyers Much of this is excerpted from the book "Inside OS9 Level II" from FHL. Note: There might also be bugs in this file , so ask if something doesn't seem right to you. Thanks! Don't forget to reverify the CRC's. ============================================================================ SOFTWARE ============================================================================ PROBLEM: Bad F$Call error code return. MODULE: Clock Somebody left the '#' sign off of a LDB #E$Illegal Argument Offset Old New 0191 D6 C6 ============================================================================ PROBLEM: Queues sorted wrong. MODULE: IOMan Change first made in L-I 2.0 to insert processes in I/O queues according to priority. Used wrong register. Not crucial. Offset Old New 09A6 10 12 09A7 A3 E1 ============================================================================ PROBLEM: Non-efficient use of screen memory. MODULE: GrfDrv Opening a 40 column screen should use the last 2K of an 8K screen block if it's free for use. However, apparently a bad Def was used in MW's source code and GrfDrv cannot match an internal code as a 40 column screen. Offset Old New 033A 84 86 ============================================================================ PROBLEM: Cannot have more than one VIRQ device at a time. MODULE: IOMan While Clock gets the size of the VIRQ table from the Init module (as it should), IOMan has a different size hard-coded in. Clock inserts the first entry at the front of the VIRQ table, but the next call starts searching at the end of the table...which turns out to usually be the header of the first module in your bootfile. Symptoms: if your disk drive is still going (waiting for motor time-out), you cannot Iniz a ModPak device. Or, if you Iniz a ModPak device, your drives will never shut off. IOMan really should be fixed, but easiest patch is to the INIT Module, to change the number of IRQ/VIRQ devices down from 15 to say, 12. Offset Old New 000C 0F 0C ============================================================================ PROBLEM: SS.Montr GetStt possibly bad. MODULE: CC3IO Although the manual doesn't mention it, CC3IO also supports getting the current monitor type set by Montype. The value (0,1,2) is returned in the X register. The code in CC3IO should have been a STD R$X instead of STB R$X though. Offset Old New 07D2 E7 ED ============================================================================ PROBLEM: SS.ScTyp returns wrong value. MODULE: GrfInt This GetStt call should return a screen type of 1 for 40 column text screens. Instead, it will wrongly return a type of 2. Internal comparison made using wrong register. Offset Old New 0A5B 81 C1 ============================================================================ PROBLEM: CLEAR to End of Screen code ignored. MODULE: GrfDrv L-II windows have a bug where the Clear to End of Screen code doesn't work on the next to last line. They do some calcs to see (after they've done a Clear-to-End-of-Line) if there's a need to clear more lines. The bug is that they used the wrong comparison operator, a BLE (branch if less or equal). Kent really hates it when they use these . Anyway a quick patch is to change it to a BMI. Offset Old New 1417 2F 2B ============================================================================ Fun Patches: You can disable the CRC checking if you wish module loads to go much faster. The module header check is still active. Patch is to OS9P1. Use at own risk. Offset Old New 05B7 CC 4F 05B8 00 5F 05B9 02 39 ----------------------------------------------------------- You can also patch the BOOT module to run at 6ms step rate. Combined with the no-CRC patch above, boots really fly. Offset Old New 00C0 03 00 017C 13 10 ============================================================================ PROBLEM: Command line crash possible. Shell scans memory past input line if a second quote mark (") is missing, as: format /d0 r "Boot Disk (instead of: format /d0 r "Boot Disk") echo "hi (instead of: echo "hi") Can be fixed if also looks for . Will post my patch later. In the meantime, be careful to match up quote marks. ============================================================================ PROBLEM: At times, modules aren't unlinked by the Shell. Shell won't unload a module if the name it was called in by doesn't match module name. Module then must be manually unlinked. Shell should read true name of module to be forked in, as otherwise the F$UnLoad call might use the wrong name. No patch yet. Examples: /d0/cmds/bob (tries to unlink "/d0/cmds/bob") ../shellfile (same bug as above) commandfilename (where it's real name in the module might be "command". So it can't find it.) ============================================================================ MANUAL ============================================================================ SUBJECT: Creating GFX Windows SECTION: BASIC09 Reference PAGE: 9-37 Here they tell you how to create a graphics window, but show the "merge sys/stdfonts >/w1" AFTER the wcreate. Nope. All you get is dots on the screen. You must merge stdfonts BEFORE opening any gfx windows, unless you care to do a FONT command to that window after merging. They had it correctly on the page before (9-35) about merging so that you can type later. ============================================================================ SUBJECT: F$FORK, F$LINK, F$LOAD, I$CREATE, I$MAKDIR, I$OPEN SECTION: OS9 Tech Reference PAGE: 8-16, 8-23, 8-26, 8-49, 8-56, 8-58 On all of these, after the call X should be pointing to the $0D (carriage return) at the end of the string. ============================================================================ SUBJECT: F$FORK SECTION: OS9 Tech Reference PAGE: 8-15 The Y register contains the parameter area size in BYTES, not in pages. ============================================================================ SUBJECT: F$TIME SECTION: OS9 Tech Reference PAGE: 8-40 To be exact, on exit X points to the time packet returned to the area at (X) that you had originally passed for the call. ============================================================================ SUBJECT: I$DELETE SECTION: OS9 Tech Reference PAGE: 8-50 On return, X should be pointing to the beginning of "MEMO". ============================================================================ SUBJECT: F$ALARM SECTION: OS9 Tech Reference PAGE: 8-66 F$Alarm is a user call, too. And they left out how to use it. This call has several variations, which have to do with setting time variables that the Clock module will try to match once a second. You may clear the alarm setting, read it, or set it for one of two exclusive actions. It depends upon the A:B (D) register as to what action F$Alarm takes: ----------------------------------------------------- CLEAR D = 0000 : clear the alarm setting ----------------------------------------------------- SET BELL ALARM X = ptr to 5-byte time packet (YYMMDDHHMM) D = 0001 : cause the CC3IO "beep" for 16 seconds after the time packet sent matches system time. ----------------------------------------------------- IN-USE CHECK X = ptr to spot for time packet return D = 0002 X < current alarm setting packet returned at (X) D < current proc id and signal pending in A:B ----------------------------------------------------- SET SIGNAL ALARM X = ptr to 5-byte time packet (YYMMDDHHMM) A = proc id to signal on time match B = signal to send on time match ============================================================================ SUBJECT: F$DATLOG SECTION: OS9 Tech Reference PAGE: 8-78 Actually, not a bad example, but only if you're running on a machine with 4K blocks. On the CoCo-3, Ouput X = $4329. The actual code just multiplies B*$2000 and adds it to X. ============================================================================ SUBJECT: SS.RDY SECTION: OS9 Tech Reference PAGE: 8-113 On devices that support it, the B register will return the number of characters that are ready to be read. Both CC3IO and ACIAPAK support this feature. ============================================================================ SUBJECT: SS.MOUSE SECTION: OS9 Tech Reference PAGE: 8-125 on Somebody forgot the two reserved bytes between Pt.ToTm and Pt.TTTo. As printed, offsets after ToTm are off by two. So insert a "rmb 2 - reserved" after Pt.ToTm. Ignore the system use note at the end after Pt.Siz. ============================================================================ SUBJECT: SS.DSCRN SECTION: OS9 Tech Reference PAGE: 8-143 Also, if you specify screen number zero (Y=0000), then you will return to the normal VDG (32x16) screen. This should be done before a SS.FScrn if you wish to return to a text screen. ============================================================================ SUBJECT: Example Program SECTION: Basic09 PAGE: 9-40 OPEN call to new window should have UPDATE, not WRITE mode. Otherwise, the GET call at the end never sees your key. GET call should use #path, not #1 to get key from new window. ============================================================================ Some L-II Patch Files available on CompuServe OS9 Forum: TOOLS PATCH.AR - Santy's Create/do any-module patch util; as important as AR CRC.AR - Turn on/off CRC check cmd COPY34.AR - Copy Kernal track WMODE.AR - XMode for window defaults MODPAT.TXT - How to use the RS Modpatch utility JOYKEY.B09 - Change joystick/keybd repeat APPLICATIONS TSEDIT.PCH - TSEdit in L-II windows patchfile PASCAL.TXT - Pascal compiler DMHELP.AR - DeskMate-3 patches DIRCOP.PAT - Dircopy SPOOL.TXT - Patch to spooler BOOT80.TXT - For 80 col boot SSPAK.AR - Hack & driver for SSC pak XCODES.AR - XED/XWORD DEBUG.PAT - Usable L-I debugger mod RGBFIX.SCR - Boot into RGB mode patch to CC3IO KRWIN.AR - Win at Koronis Rift! ROGUEP.BAS - Enable Rogue hidden cmds IOBEEP.SCR - Bell on error SCFED2.AR - Enhanced cmd line editor LOGIN2.PAT - Convert L-I login STYLO.TXT - Help with Stylograph PAKMOD.SCR - Increase ACIAPAK buffer sizes DBMV2.PTC - Databank v2.00.16 CC3DSK.PAT - Motor delay, back sides of disks PROFIL.PTC - Profile MODDRV.SCR - Drive descriptor chgs PCPAK.AR - Hardware hack for PC-PAK VDGINT.IPC - Patchfile for blip-free VDGInt * Files with .SCR extension are Modpatch script files. ============================================================================ -eof-