home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / atari / 8bit / 3796 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  4.6 KB

  1. Path: sparky!uunet!caen!mtu.edu!mtus5!jjmcwill
  2. Organization: Computing Technology Services, Michigan Technological Univ.
  3. Date: Wednesday, 22 Jul 1992 18:54:17 EST
  4. From: Jeff McWilliams <JJMCWILL@MTUS5.BITNET>
  5. Message-ID: <92204.185417JJMCWILL@MTUS5.BITNET>
  6. Newsgroups: comp.sys.atari.8bit
  7. Subject: 6502<-> 68881 Math Cop.
  8. Lines: 91
  9.  
  10.  
  11. Well I got some Motorola databooks today.  One was for the
  12. 68000 family.  Included in there was some specs on the 68881
  13. math coprocessor.  Very interesting.  The 68881 can act in either of
  14. two ways, as a coprocessor, or as a peripheral processor.
  15. The first way would apply to the 68881 being wired up with a 68020,
  16. where the integration of the two is almost seamless, and the pair
  17. can be thought of as one CPU, with floating point operands and
  18. registers.
  19.  
  20. The second method, called peripheral processor, is so that the
  21. 68881 can interface to earlier 68xxx models, like the 68000 or 68008.
  22. In this mode, communication between the 68881 and CPU takes place
  23. by reading and writing to the 68881's registers, called Coprocessor
  24. Interface Registers (CIRS)  These are basically registers that you map
  25. into the CPU's address space, much like you map a PIA (6520) registers
  26. into the 6502's address space.
  27.  
  28. Another interesting feature of the 68881 is that it can be configured
  29. to work with an 8 bit data bus, with some decrease in performance
  30. as compared to its default 32 bit data bus configuration-- of course.
  31.  
  32. Additionally, the 68881 can have a separate clock attached to it,
  33. running at either a faster or slower speed than the rest of the
  34. system, due to the asynchronous nature of the chip.
  35.  
  36. The 68881 can also handle floating point numbers in either IEEE format
  37. or a BCD format, much like the format used in the Atari 8 bit FP
  38. OS routines.
  39.  
  40. What does this mean for us Atari classic users?  That it is probably
  41. technically quite possible to interface a math coprocessor such as
  42. the 68881 to the 6502, even directly, without too much hassle.
  43. The 68881 could be running at anywhere from 16.6 to 50 mHz and not
  44. interfere with the 6502's required clock speed of 1.79mHz in the
  45. Atari.
  46.  
  47. All that would need to be done is wire it in, and rewrite the OS
  48. routines to communicate with the 68881 instead of doing all the
  49. math at slooowww 1.79mHz through software approximations.
  50.  
  51. I don't have all the specifics on the 68881. The exact method of
  52. using the CIR locations on the 68881 to get the job done wasn't
  53. described in this manual, only 68020 floating point opcodes were
  54. mentioned.
  55.  
  56. If a coprocessor card were designed on the Parallel Bus, as was
  57. mentioned earlier, comprised of a 8mHz 65802 or 65816, then
  58. the 68881 could be implemented in there as well.  In fact, the
  59. 65802 and 65881 have a new OPCODE, called COP, for doing this.
  60. COP causes the CPU to look to an interrupt called the coprocessor
  61. interrupt, which is handled much like a IRQ interrupt, or NMI interrupt.
  62. An operand  byte following the COP instruction would indicate
  63. what type of operation were to be executed.  The COP interrupt handler
  64. would look at the operand byte and then call the appropriate
  65. function.  The 68881 has a pin called SENSE' on it.  Basically
  66. it is attached to ground.  By using a pull-up resistor on the
  67. PC board, the sense line would be high if the 68881 were not present,
  68. and low if it were.  The COP interrupt handler could examine this
  69. line, and either call the standard Atari OS floating point routines
  70. and execute them at the CPU's speed of 8mHz, or it could
  71. talk to the 68881 and have it do the high speed, accurate floating
  72. point operation.  Either way, the COP interrupt routine would
  73. return with the result.
  74.  
  75. This would make for, in my opinion, an elegant and flexible design.
  76. For those not wanting to churn out the bucks for the 68881, they
  77. could have a coprocessor card that does floating point, and whatever
  78. else, out there on the parallel bus, doing instructions at 8mHz instead
  79. of 1.79mHz.  If they choose to, they could later purchase and plug
  80. in the 68881, and realize an additional increase in floating point
  81. speed, making maybe even programs like ChromaCAD really fly.
  82.  
  83.  
  84. Of course, there is no reason why the 68881 can't be hooked up to
  85. the parallel bus directly, and then redo the OS ROM with the OS FP.
  86. routines calling the 68881.  The 68881 can still run at whatever speed
  87. desirable, as mentioned above, due to its asynchronous nature.
  88.  
  89.  
  90. I will be attempting to get further databooks on the 68881, to further
  91. research this far-out idea.  I don't have the capital to
  92. actually start building one of these babies tomorrow, but at least
  93. I can study the feasibility of such a grand project, and perhaps
  94. see others further develop and implement the idea.
  95.  
  96.  
  97. Comments and ideas encouraged.
  98.  
  99. Jeff McWilliams
  100.  
  101.