home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OS9_6X09 / SYSMODS / BLOB_Stop.lzh / kdblob.txt < prev    next >
Text File  |  1994-08-20  |  14KB  |  279 lines

  1.  
  2.                      COCO-3 BOOT LIST ORDER BUG (BLOB)
  3.  
  4.                          Facts, fixes and theories
  5.                                     by
  6.                           Kevin Darling & friends
  7.  
  8.  
  9. THE BLOB. Some owners have it, some have never seen it. Ordering of modules in
  10. a bootlist for os9gen seems to affect it. Adding new devices may cause it
  11. to show up. What causes it? It's past time to lay out both what has been
  12. conjectured and what is truly known so far.
  13.  
  14. At first, the OS-9 kernel itself was blamed. We've been pretty sure now for
  15. a long time that it is NOT at fault. All the modules are position-independent,
  16. and have been gone over very closely by several of us, looking for anything
  17. that could cause a problem. We have found no software cause at all (with the
  18. exception of the disk driver - see below).
  19.  
  20. Instead, hardware and timing discrepancies in the CoCo-3 and peripherals
  21. have been found almost always to be at fault. In fact, it's often possible
  22. to pinpoint the exact cause of a particular problem, with enough information.
  23.  
  24. Enough preliminaries. Here are most of the confirmed and unconfirmed
  25. symptoms and possible reasons, including things that act like BLOBs...
  26.  
  27.  
  28.  ----------------------------------------------------------------------------
  29.  FLOPPY FORMATTING HALTS IN FIRST FEW TRACKS; READ/WRITES ARE OFF BY A BYTE:
  30.  
  31. Ken Schunk, myself, and others long ago found that the halt method used by
  32. CC3Disk (and some RSDOS drivers in programs) has a problem with some disk
  33. controllers (apparently mostly pre-1985 1773's). The usual method is to
  34. wait for the FDC (floppy disk controller) to indicate it is ready to exchange
  35. a byte of data, and then have the CoCo go into the halt mode. What will
  36. happen is that the first byte transfer gets lost, and this is returned as
  37. a "Read Error" by the driver.
  38.  
  39. For reasons as yet unknown, this "data lost" sequence sometimes "seems" to be
  40. driver position dependent. I would guess that most boot failures are caused
  41. by this one, especially with older controllers (altho I've seen it happen
  42. on newer ones, too).
  43.  
  44. The drivers can be fixed, and we should be able to post patches later.
  45.  
  46.  ----------------------------------------------------------------------------
  47.  READS/WRITES GO TO WRONG LSN:
  48.  
  49. Actually, they go to the wrong TRACK, which is also always the wrong LSN.
  50.  
  51. Usually caused by using disk drives that are set to turn on their motors only
  52. with drive select, instead of the required method of all motors on with the
  53. motor-on signal. All drivers assume that if one motor is on, ALL are on.
  54.  
  55. Because of this assumption, and especially because the drive READY line isn't
  56. usually available on the CoCo setup, the FDC will send stepping commands
  57. to a drive that is still spinning up again when selected (it takes about 1/2
  58. second to be actually "ready").... and those stepping pulses are totally
  59. ignored by drives not spun up. So while the FDC _thinks_ it's stepped the
  60. head to a new track, in fact either some or all of the step pulses have
  61. been lost.
  62.  
  63. Worse, the 1773 FDC seems to ignore the imbedded track information on the
  64. disk itself (contrary to docs) and so as long as the sector number matches up,
  65. the data is read/written... to whatever track the head happens to be over!
  66.  
  67. So make sure your drive motors all come on at the same time.
  68.  
  69.  ----------------------------------------------------------------------------
  70.  SPEED AND BAD CHIPS
  71.  
  72. Testing and experiences by several people has shown that the American
  73. semiconductor industry has gotten pretty bad over the last few years as far
  74. as quality goes. Or perhaps retailers are selling more reject chips that they
  75. buy on the grey market. In any case, some failures of chips used in add-on
  76. devices have been found to be brand dependent.
  77.  
  78. For example, some of the LS245 data buffers inside CoCo-3's seem to fail
  79. to pass true data at times. Replacing this chip with a Japanese brand will
  80. usually cure this particular problem. Motorola chips seem to be the worst bet.
  81. Symptom is that an instruction loop reading from the MPI sometimes sees bits
  82. set that it shouldn't. Solution is to replace the chip or slow down the loop.
  83.  
  84. Speedwise, many people use hardware designed and built for 1Mhz operation
  85. from the CoCo1/2 days. A common problem is with RS232 paks... they may need
  86. the 6551 replaced with a higher speed version.
  87.  
  88.  ----------------------------------------------------------------------------
  89.  INTERRUPTS
  90.  
  91. Boot problems also sometimes appear when a device's interrupt line isn't
  92. correctly reset. I've had several 6551 ACIAs (used in RS232 paks, etc) that
  93. decided not to clear their interrupt line just by resetting the CoCo. This
  94. leaves an interrupt hanging and can mess up a machine trying to boot OS-9.
  95.  
  96. It's also been found that some RS232 paks were built with the E clock tied
  97. to the IRQ line... this can abort a boot also.
  98.  
  99. Stuck interrupts are covered in the various "IRQ HACK" files available on
  100. most networks, as are files on the RS232 pak.
  101.  
  102.  ----------------------------------------------------------------------------
  103.  MULTIPAK UPGRADE
  104.  
  105. A non-upgraded MPI definitely causes problems. At the least, it can cause
  106. wrong information to be read from the crucial GIME interrupt status port.
  107.  
  108. The most common rumor we see on BBS's is that the MPI upgrade "isn't needed",
  109. because "my machine runs fine without it". DO NOT LISTEN TO THESE PEOPLE.
  110. PLEASE EXPLAIN TO THEM THAT THEY ARE STUPID.  While we can't swear that you
  111. WILL hurt your GIME if you don't upgrade, we can certainly say that it does
  112. make electronic sense to DO the upgrade (plus Tandy sold the upgrades at
  113. first cheaper than their cost, which alone would make one think there's a
  114. good reason for having it, eh?).
  115.  
  116. The electronic reason for the upgrade is this: a READ from $FF80-9F will
  117. turn on BOTH the GIME data bus AND the MPI data bus. (In addition, really
  118. old MPIs ghost their slot select at $FF7F and $FF9F, which causes problems.)
  119. It's never a good idea to have two devices trying to put data on a bus at
  120. the same time... one of them could get hurt (usually the GIME, in reported
  121. experiences).
  122.  
  123. Especially under OS-9, where the interrupt register at $FF92 is read at least
  124. 60 times a second, it makes sense to not have that data be corrupted by
  125. bogus MPI data coming on at the same time. So UPGRADE YOUR MULTIPAK NOW!
  126.  
  127.  ----------------------------------------------------------------------------
  128.  E-CLOCK SYNCHRONIZATION:
  129.  
  130. All accesses to peripherals need to use the 6809 E clock to validate the
  131. transfer of data (especially at 2Mhz!). A few early versions of third-party
  132. devices accidentally were made with registers that didn't do this. All have
  133. been fixed for a year now, as far as I know.
  134.  
  135. The boot-order side of this came about whenever a device register was
  136. accessed at an odd/even address, and then the next cpu instruction fetch
  137. was at the opposite even/odd address... which meant the A0 address line
  138. (or sometimes A1 and maybe A2 also) would change after the E cycle ended
  139. and thus cause wrong device register addressing. This was shown on scopes
  140. as a small (around 10-ns) glitch.
  141.  
  142. So the *position* of the driver I/O access instructions in memory was very
  143. important, and was a true common "boot order" trouble causer (and may still be
  144. with older devices made in the pre-CoCo3 days).
  145.  
  146.  ----------------------------------------------------------------------------
  147.  GIME S0-3 DECODING
  148.  
  149. A variation of E-gating is that the SCS external select line is generated
  150. inside the CoCo-3 without being E-gated. This could possibly mean that while
  151. the GIME is decoding a different I/O selection, the S0-2 GIME lines decoded
  152. by the 74LS138 in the CoCo could easily wobble between outputs, possibly
  153. randomly enabling ROMs, PIAs, etc and placing bogus data on the bus. It also
  154. may be one cause of the video "sparklies".
  155.  
  156. Again, using the E gating on devices should mostly solve this, altho it's
  157. also recommended that if you have problems you should gate the 138 with
  158. the E clock (Roger Krupski came up with the easiest method: inside the CoCo
  159. on the cartridge port, simply tie the E clock to the SLENB line.
  160.  
  161.  ----------------------------------------------------------------------------
  162.  DOUBLE INTERRUPTS
  163.  
  164. This is an oddball one. Sometimes people notice that their boot fails, or
  165. that their software clock runs at double speed while within a VDG screen.
  166. Quite by accident, I stumbled across evidence that certain address bit
  167. combinations in these situations causes double the vertical interrupts to
  168. be generated. No solution except to boot to a real window always, and if
  169. you have this clock problem to change the order in which you start up a game,
  170. so that it's video address can be moved somewhere "safe". This also seems
  171. to be GIME dependent. Non-upgraded MPIs can cause this also, I think.
  172.  
  173.  ----------------------------------------------------------------------------
  174.  OTHER HARDWARE PROBLEMS
  175.  
  176. Bad connections. Bad connections. Bad connections. Clean all your contacts
  177. regularly. The cartridge port, the MPI and slot pins, all rompak devices,
  178. disk drive cables, and even yank your GIME and swab it with alcohol if need
  179. be, altho sometimes just pushing/tapping on it cures many oddball troubles.
  180.  
  181. Make sure your drives don't have something covering the write-protect detect
  182. LEDs. In general, just keep everything clean!
  183.  
  184. It's also about now that many disk drives in use for years, are wearing out
  185. or becoming misaligned. Heads become a lot weaker, and data becomes flaky.
  186.  
  187. We've also seen cases where a new cordless phone, or appliance on the same
  188. circuit breaker, can screw up floppy or hard disk transfers. Even satellite
  189. dish downfeeds running by the computer. If you start to have problems, ask
  190. yourself "did anything change here lately?"
  191.  
  192.  ----------------------------------------------------------------------------
  193.  OTHER SOFTWARE PROBLEMS
  194.  
  195. More and more often, we find that many supposed boot list problems often have
  196. an unrelated simple explanation... such as making a new boot and forgetting
  197. that you patched some modules or used old ones; the common "oops forgot to
  198. put Grfdrv and Shell in the CMDS directory" gotcha; leaving out a module;
  199.  
  200. Very often it can be caused by not having the latest drivers for a device.
  201. It's important to keep updated with the newest software made available.
  202.  
  203. Also, sometimes a module (especially os9p1) will get hit by an errant program,
  204. and then you os9gen a new disk... which gets perpetuated with the bad os9p1
  205. from then on through new os9gens. We also find that people often reverify
  206. a bad module quite by accident using disk editors on their bootfile, thus
  207. hiding future trouble. Keep a log of all changes you make, and CRCs!
  208.  
  209.  ----------------------------------------------------------------------------
  210.  MISC THEORIES
  211.  
  212. Most other problems fall into the mystery section (meaning we don't have
  213. a firm handle on the cause yet).
  214.  
  215. I have two pet ideas that may or may not make sense, but which are bolstered
  216. in part by experiences by myself and others.
  217.  
  218. One is that since interrupts cause the internal BASIC ROM to turn on (to
  219. get the interrupt vectors), the ROM stays on a bit too long and corrupts
  220. the data bus at times. Probably a dumb theory <grin>.
  221.  
  222. The other is that the dead cycles within many instructions have an effect.
  223. During the dead cycle the address bus contains $FFFF (which turns on the ROM!)
  224. and again, perhaps this data sticks around, or the address lines change
  225. too fast enough once in a while from true address to FFFF.
  226.  
  227. This ties in with partial evidence that some 6809s at 2Mhz will start
  228. changing their address lines immediately after the end of an E cycle, perhaps
  229. even before E-gated devices finish up. We do know that oddball reads/writes
  230. occur at times to strange addresses, and this might explain them.
  231.  
  232. A third theory gaining some acceptance (but we just don't know how the GIME
  233. works internally) is that the GIME, like the SAM chip, powers up using either
  234. the up or down side of the main oscillator clock (remember hitting reset on
  235. SAM machines to get the right red/blue fake color phase? like that). Perhaps
  236. one side is better than the other. Certainly powering down sometimes cures a
  237. boot or other problem. So who knows?
  238.  
  239. We also know that changing cpu brands, and sometimes switching GIMEs, will
  240. often cure timing problems and the sparklies. Not always, though.
  241.  
  242.  ----------------------------------------------------------------------------
  243.  CONCLUSIONS
  244.  
  245. We're still gathering data, and occasionally do run across something
  246. unexplained. For the most part though, BLOBs have become fairly rare. This
  247. may be because people have more L-II experience, or newer hardware, or a
  248. combination.
  249.  
  250. OS-9 itself is not at fault, and note that even RSDOS applications can and
  251. do suffer from the same symptoms. The basic answer is that we moved up to a
  252. faster machine, while still using older peripheral equipment.
  253.  
  254. The order of the bootlist CAN affect the symptoms (as we've seen), but this
  255. is simply software showing up hardware bugs, and is NOT the fault of OS-9
  256. itself.
  257.  
  258. So the final word is this: our best evidence is that there really _isn't_ a
  259. boot list order bug. Look to your hardware instead.  - kevin
  260.  
  261. The above information has been gleaned over the past two years from personal
  262. experience, many phone calls and network messages, and the work of Bruce Isted,
  263. Tony DiStefano, Chris Burke, Roger Krupski, DP Johnson, Dave Wiens, Ken Schunk,
  264. and many others.
  265.  
  266. This file may be reposted on BBS's and other electronic networks, but
  267. may not be used in commercial publications without the author's permission.
  268.  
  269. PS: if you have anything to add, please send information to me at:
  270.      76703,4227 - compuserve
  271.      OS9UGPRES  - delphi
  272.      uunet!76703.4227@compuserve.com
  273.  
  274. PPS: LATE UPDATE - Replacing the 7406/7416 chips in older floppy disk
  275. controllers with a different brand can help. Three people have called
  276. lately with info that some of the Fairchild chips have nasty waveforms.
  277.  
  278. -eof-
  279.