These patches have been used to run Minix vs. 1.0 on Tandy's not so compatible 1000. They are relative to 1.0 and some of the line numbers are changed in 1.2!!! When implementing I placed them in #ifdef T1K - #endif blocks so that the original code would still be there... I later paid for that act when using fix to apply the 1.2 diffs!!! I have since given up on Minix... at least on the 1000... the compiler if FAR to slow and buggy... after recompiling Minix, which is necessary for the 1000 not only is the code 20% larger but the system is considerably slower as a result of the inefficiencies of the compiler... I have asked AST to incorporate the T1K #ifdef's into future versions and offer a precompiled Tandy version BUT don't hold your breathe! Joe Applegate - M.O.M. BBS (303) 273-3389 -------------------------------------------------------------------------------- Patches to kernel for Tandy 1000 -------------------------------------------------------------------------------- From: johnc@mia.UUCP Date: 12 May 87 18:18:00 GMT Due to the large number of requests I received for the Tandy 1000 MINIX fixes, I am posting them to the net. Other clone users might be able to apply some of these fixes if MINIX won't work on their computers also. I will list the fixes as I found them with an explination of why the fix was made. 1) main.c line 141 must be deleted. The INT2_MASK is used to determin which memory page the video memory will reside. The Tandy 1000 has no deticated video ram, so the system uses a chunk of main ram by mapping the video address (0XB8000) to the highest avalible memory page via a PAL. The BIOS initialy sets this register on power up, so it is not necessary for MINIX to touch this port. 2) main.c line 140 change from: port_out(INT_CTLMASK,0); to: port_out(INT_CTLMASK,0X20); The interupt structure on the Tandy 1000 is not like that of the XT but it is closer to that of the PCjr. The following chart shows the comparison. INIT XT Tandy 1000 ---------------------------------------------------------- 0 timer timer 1 keyboard keyboard 2 I/O chan Hard drive 3 COM1 COM1 4 COM2 COM2 5 Hard Drive 60hz (Ram refresh if no DMA) 6 floppy floppy 7 LPT1 LPT1. As you can see the Hard drive must be changed and the 60hz masked out. The 60hz is used for memory refresh when the DMA option is not installed. Changing the mask to 0X20 masks out interupt #5. 3) const.h line 25 change from: #define XT_WINI_VECTOR 13 to: #define XT_WINI_VECTOR 10 This changes the hard drive vector to interupt slot #2 from #5 4) floppy.c line 367 change from: port_out(DOR, motor_goal); to: port_out(DOR, motor_goal | 0X0F); The Tandy 1000 does not use the drive selects from the FDC chip, but from a latch in the DOR. Bits 0 and 1 are the drive selects A-not and B-not. The drives will never de-select unless these bits are brought hi when the motor stop. Here is what the 1000 DOR looks like. BIT Function ----------------------------------- 0 Drive sel A-not 1 Drive sel B-not 2 0 = FDC reset 3 1 = enable DMA 4 1 = Drive A motor on 5 1 = Drive B motor on 6 1 = FDC terminal count 7 not defined Misc notes ---------- Since MINIX won't boot from the distribution disks, you will have to find a computer that will run it so you can make the changes. After making a new boot disk, everything seems to work fine. I have been testing the fixes for abut a month and have had no problems. If you get real desperate you could mail me a SASE disk and I will make you a 1000 boot disk. As mentioned in fix #1 the tandy 1000 uses the main memory for video. This reduces the MINIX memory by 128k, you could go into mm and fudge the high memory figure if necessary, but I have not found this to be a problem. I have made my hard drive the root device ahd removed the RAM DISK. This gives you around 400k of user memory, which is more than what a 640k MINIX with a RAM DISK gives you. I have also found that the Tandy hard drive controlers ( which are western digital) don't quite agree with the xt_wini.c . My next note will explain how to change the hard drive driver to work with the WD hard drives I am posting this seperatly as it might help others with their hard drive controlers. I have not redone the keyboard scan codes for the mod 1000 keyboard, but it is a fairly trivial task. The scan codes are in the basic manual that comes with the computer. I will post the new keyboard tables whan I get enough time to do them, if some one dosent beat me to it.... John Clark ======================================================================== I am posting this fix seperatly from the tandy 1000 fixes. It allows minix to operate with the tandy 1000 hard drives ( Western Digital & Xebec ). It took quite some time to find this (bug?), by reading betweed the lines of the WD manuals. The errors that are seen are: Can't reset WINCHES..... Unable to read block.... To fix wini.c delete lines 550 thru 554. The wd controlers don't seem to drop the REQ flag after all 6 bytes of the command have been sent. Western Digital seems to say it will only be droped when a byte is needed, not when it dosent want any more data. I have been using this fix for a months and have had no problems at all. Please try this fix and let me know if it solves the hard drive problems on other computers. John Clark ==================