home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / system / speedramsey / speedramsey.doc < prev    next >
Text File  |  1995-02-27  |  9KB  |  210 lines

  1.  
  2. - SpeedRamsey.asm - A fifteen minutes hack - © 1993 by Holger Lubitz -
  3.  
  4.             *** Sets the skip bit in the Rev G Ramsey ***
  5.  
  6. Intro
  7.  
  8. Well, I had played around with the skip bit earlier - but it took some
  9. posts to comp.sys.amiga.hardware by people eagerly waiting for this to
  10. convince me to release it.  Isn't Usenet great ?  :)
  11.  
  12. The  reason  I didn't release it immediately is that the fastest RAM I
  13. could get had only 70 ns.  The skip mode needs 60 ns or faster RAM for
  14. proper  function.   I have only been able to test this by removing all
  15. banks but one from my Amiga.  If I have all four banks installed, this
  16. doesn't  work.   Probably  the additional capacitive load is enough to
  17. slow down a signal by 1 ns, causing this to break.  I don't know.
  18.  
  19. However,  if you got 60 ns DRAM, you should be fine even with all four
  20. banks  populated.  In my Amiga, running SpeedRamsey reduces the memory
  21. latency  as measured by AIBB 6.1 from 8.1 to 7.1, for a speed increase
  22. of roughly 10%.
  23.  
  24.  
  25. How to use it
  26.  
  27. Just start it.  From Version 1.2 upwards, you can either start it from
  28. WB  or from the CLI (no interesting icon yet, sorry).  You get version
  29. information,  an  author  notice  and a short message telling you what
  30. SpeedRamsey  did,  if  anything.  If you don't have a Rev G ramsey, it
  31. will complain about that and do nothing.
  32.  
  33.  
  34. How it works
  35.  
  36. This  tiny  little  program  is  a  very  simple  tiny little program.
  37. However,  you  need  to  know about Ramsey to understand what it does.
  38. Ramsey  appears  only  in  the  supervisor  data  space.   It  has two
  39. byte-wide registers, one at $DE0003 and one at $DE0043.  The first one
  40. is read-write, and this is where you configure Ramsey.  The second one
  41. is read-only, it offers version information.
  42.  
  43. Currently  there  are  only two versions of Ramsey.  The Rev G Ramsey,
  44. which  is  the  revision  you  find  in all Amiga 4000s, allows you to
  45. select a mode called skip mode.  More on this later.
  46.  
  47. The older Rev D Ramsey used in the A3000 doesn't support the skip mode
  48. this  program  is setting.  It uses the very same bit to select memory
  49. width.   But  because  nobody  ever  used  1Mx1 DRAM in the A3000, and
  50. probably  also  because  bits  in  the only configuration register are
  51. somewhat  precious, the bit got reassigned for the skip mode in Rev G.
  52. This makes it important to check for the right Rev of Ramsey.  I don't
  53. even  want to think about the crash you'd get by setting this bit on a
  54. Rev D Ramsey.  Trying it out is certainly not recommended.
  55.  
  56. So,  after  we  checked  for Rev G by comparing with $0F (a $0D in the
  57. version  register  signals a Rev D Ramsey, by the way), we fiddle with
  58. the  bit and return from the supervisor mode, having set a return code
  59. for  the  rest  of  the program, which puts out an appropriate message
  60. and,  if started from the CLI, sets the return code (to 0 for bit set,
  61. 5 for bit reset, 15 for no Rev G Ramsey found).
  62.  
  63.  
  64. Why it works and what skip mode really means
  65.  
  66. The  skip  mode  speeds  up  RAM  access from five clocks each to four
  67. clocks  each  by  skipping  the  last  cycle.   Some  people call this
  68. 60-ns-mode  because  you need 60 ns DRAM or faster to ensure that this
  69. works and doesn't crash your Amiga. 
  70.  
  71.  
  72. My own experience
  73.  
  74. You  might  succeed in running this with slower DRAM, depending on how
  75. many  banks  you've  populated  and  who manufactured the SIMMs you're
  76. using.   Some  seem  to have higher safety margins than others.  In my
  77. machine, setting the skip bit with only one bank populated (I am using
  78. Micron 1Mx32 SIMMs with 70 ns access time) works.  Setting it with all
  79. four banks populated crashes my machine (see Intro).
  80.  
  81. You  can't  damage your Amiga, but be prepared for a cold reboot if it
  82. doesn't  work.  Just try it - but don't have anything important in the
  83. background when you do so.  You have been warned.
  84.  
  85.  
  86. Frequently asked questions
  87.  
  88. * Is the Ramsey setting permanent ?
  89.  
  90. (here was a slightly incorrect answer in earlier doc revisions because
  91. it wasn't really thought out. Sorry for that)
  92.  
  93. No,  the  setting  survives  a reset, but has to be set manually after
  94. each  power  on.   You  might want to put it in your User-Startup once
  95. you're  sure  that  your memory is fast enough.  Since SpeedRamsey was
  96. designed  to  toggle  the bit and doesn't support parameters to set or
  97. reset it (yet), you have to trick around a bit.  Here's how:
  98.  
  99. speedramsey >nil: ; toggles the bit, sets warn if reset
  100. if warn
  101.   speedramsey >nil: ; if reset, toggles it again
  102. endif
  103.  
  104. I agree that this is not nice, but it works for now. 
  105.  
  106. It  isn't  really  possible  to  make  the setting permanent (in other
  107. words,   survive  a  cold  reboot).   However,  the  functionality  of
  108. SpeedRamsey  might  get included in the OS one day, who knows (I could
  109. imagine setting the bit, testing if the RAM still works, and resetting
  110. it  if  it  doesn't,  but  you  can  probably only do that from ROM or
  111. Chipram - ah, wait, now THEREs an idea - maybe for a future version of
  112. SpeedRamsey, right now I'm very busy updating the docs :)
  113.  
  114. * Can I damage my machine by using SpeedRamsey ?
  115.  
  116. No.  At least not as far as I know.  If it crashes, just switch it off
  117. and on again.
  118.  
  119. * Does this work on my (insert specific A4000 model) ?
  120.  
  121. This  should  work on any A4000 with 60 ns DRAM.  It doesn't matter if
  122. you  have  a 030 or 040 model.  Only one person with 4 banks and 60 ns
  123. DRAM reported a crash.  I'd really like to find out why.
  124.  
  125. * I have only slower DRAM - should I try it anyway ?
  126.  
  127. See  question  2.   Just  try it out, you can't damage your machine by
  128. doing so.  If it works, fine (use a RAM test program just to be sure),
  129. if it doesn't switch it off and archive SpeedRamsey for later use when
  130. you've gotten faster DRAM.
  131.  
  132.  
  133. Distribution
  134.  
  135. Permission  for  non-commercial distribution of the unmodified archive
  136. is  hereby  granted.   It  must contain SpeedRamsey itself, its source
  137. code   SpeedRamsey.asm,   this  doc  file  SpeedRamsey.doc,  the  icon
  138. SpeedRamsey.info  and the questionnaire SpeedRamsey.survey, and _only_
  139. those  (_no_  stupid  .displaymes  in archives with my software!) Fred
  140. Fish is explicitly allowed to include this in his library.
  141.  
  142. If you release anything based on this source, please give credit.
  143.  
  144.  
  145. Bugs, Suggestions, etc.
  146.  
  147. You   can   contact   me  electronically  by  using  my  eMail-Address
  148. hal@caty.north.de.   If  you don't have eMail yet, get access to it or
  149. lose.  After all, we are in the nineties now, aren't we ?
  150.  
  151.  
  152. History
  153.  
  154. 1.0  (12-Aug-1993) First Usenet release
  155.  
  156. The original SpeedRamsey.  Size of program:  72 bytes.
  157.  
  158. 1.1  (13-Aug-1993) Second Usenet release
  159.  
  160. Mainly updated docs because of questions I got by eMail.
  161.  
  162. Also  made  program slightly shorter, SpeedRamsey now checks for Rev G
  163. and  only  sets  the  bit on Rev G.  It used to do so on any Non-Rev-D
  164. Ramsey, but who knows what this bit will do in the future ?  Optimised
  165. code slightly when changing this.
  166.  
  167. The  bit  is  now  flipped  instead of set.  Running SpeedRamsey again
  168. resets  the  system  to  the  old  state.   However, you still have no
  169. indication  what  happened  other  than  checking  by  running AIBB or
  170. similar.  I really need to put in messages soon :)
  171.  
  172. Size of program:  68 bytes.  (Isn't assembler great ?)
  173.  
  174.      (14-Aug-1993) Not released
  175.  
  176. Well, I just _had_ to include the messages.  Now SpeedRamsey tells you
  177. what  it  did.   It  even tells you if you haven't got a Rev G Ramsey.
  178. Also added WB startup code that opens an own window to write into.
  179.  
  180. Size  of  program  with text and startup stuff:  Still only 396 bytes,
  181. but pretty large compared to 1.1 - additional comfort has its price :)
  182.  
  183.      (15-Aug-1993) Not released
  184.  
  185. Slight changes to the documentation
  186.  
  187. 1.2  (16-Aug-1993) Third (and last) Usenet Release
  188.  
  189. Updated FAQ list.  Some more doc changes.  Added questionnaire because
  190. one  person  reported a crash with 60 ns DRAM.  Please fill it out and
  191. return  it,  regardless  if SpeedRamsey worked for you or not.  I need
  192. that  information  to  find  out under which conditions SpeedRamsey is
  193. safe and under which it is not.
  194.  
  195. 1.2a (17-Aug-1993) First Aminet Release
  196.  
  197. Corrected  FAQ  list.   The  first  answer was not totally correct and
  198. could  be  misunderstood,  too.   Also offers a workaround for putting
  199. SpeedRamsey into the User-Startup now.
  200.  
  201. SpeedRamsey now contains version information, which increased its size
  202. slightly.  Size of program: 408 bytes.
  203.  
  204.  
  205. To do list
  206.  
  207. Parameters for explicit setting/resetting of the skip mode bit 
  208. function  check  if  possible  (I'll  have  to  look into this) 
  209. maybe setting/resetting the other Ramsey bits.
  210.