home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / disk / misc / hackdisk / hackdisk.doc < prev    next >
Text File  |  1995-02-27  |  6KB  |  179 lines

  1. Hackdisk V1.12
  2.  
  3. By Dan Babcock
  4. Copyright (C) 1992 by Dan Babcock
  5.  
  6. ------------
  7. Distribution
  8. ------------
  9.  
  10. Hackdisk may be freely copied for non-commercial purposes (only).
  11.  
  12. -----------------
  13. What is hackdisk?
  14. -----------------
  15.  
  16. Hackdisk is a complete trackdisk.device replacement, minus
  17. support for 5.25 inch and 150RPM drives. It works with any
  18. version of Kickstart (tested with 1.3 and 2.04).
  19.  
  20. ----------------------------
  21. What's wrong with trackdisk?
  22. ----------------------------
  23.  
  24. The standard trackdisk module works well, but it isn't perfect.
  25. My major gripe is that it doesn't offer a verify option. I used
  26. TrackSalve (a brilliant program by Dirk Reisig) before KS2.0 and
  27. received enough "verify error" messages to realize that this
  28. feature is very valuable. Hackdisk has a verify option that may
  29. be turned on or off at any time for any drive. The verify is very
  30. efficient and compares the raw MFM data bit-for-bit.
  31.  
  32. Hackdisk is faster than trackdisk 2.0. A DiskCopy to RAD: is 5
  33. seconds faster. A DiskCopy from RAD: with verify is only 1.6
  34. times slower than trackdisk, not 2 times slower like you might
  35. expect! Please note that this performance increase is gained by
  36. better programming, NOT by pushing the drive beyond its
  37. specifications.
  38.  
  39. Hackdisk requires more chip RAM for its verify buffer, but
  40. conserves memory by using one track buffer for all drives, rather
  41. than a track buffer for each drive. Experience shows that this
  42. does not hurt performance.
  43.  
  44. For programmers, Hackdisk eliminates the restrictions on
  45. read/write parameters. You can specify a read or write at any
  46. byte offset, any byte length, to/from any byte address.
  47.  
  48. -------------------
  49. Installing Hackdisk
  50. -------------------
  51.  
  52. This is where I'll probably lose most of my audience. :-)
  53.  
  54. Hackdisk is a true replacement for trackdisk.device (and is
  55. called trackdisk.device as well), not some kind of patch.
  56. (Contrary to its name, it isn't a hack at all!). This presents
  57. some difficulties, since you can't just run it from the CLI. Two
  58. major alternatives are available for installing Hackdisk:
  59.  
  60.  
  61. 1) Use the 'RamKick' utility. RamKick is a Commodore-written
  62. program to kick in an alternative OS module. It was distributed
  63. and used with V35 of the OS, which was designed to support the
  64. hires monochrome display (Hedley/Moniterm). Unfortunately, I
  65. can't distribute it with Hackdisk due to the unknown copyright
  66. status. (No copyright or author message is included in the code).
  67. Anyway, here are some hints for using RamKick:
  68.  
  69. Type "ramkick ?" to see the options. If you don't know what
  70. everything does, don't worry, because I don't either! Use the
  71. "Kick" script as an example. (Note: It doesn't matter where you
  72. put hackdisk.device, but DEVS: is a good place). The Kick script
  73. uses a tiny program called "HackDiskTest" to test whether
  74. Hackdisk is installed. It will also print out the version number
  75. and copyright. Therefore you can put this at the start of your
  76. startup-sequence to have Hackdisk loaded whenever needed. If you
  77. have an autobooting hard drive, it won't slow down booting much.
  78.  
  79. Sometimes after booting a game or demo the machine will enter a
  80. infinite reboot cycle. This is caused by RamKick or Hackdisk
  81. being partially (but not fully) corrupted. RamKick should perform
  82. more extensive checksums...
  83.  
  84. 68040 users: RamKick must be patched to call _LVOColdReboot
  85. rather than using its own (rather crude) reset method. This is
  86. quite simple to do. If you need help, email me.
  87.  
  88.  
  89. 2) Replace trackdisk.device directly in the ROM. There are many
  90. variations to this. The brute force method is to burn a new
  91. kickstart EPROM. A more viable option for those with 030/040
  92. cards is to use special software to boot up with an alternative
  93. kickstart ROM image (soft-kicked A3000s have this ability built-
  94. in). For '030 users, I believe SetCPU by Dave Haynie has such an
  95. option. I use SetFF, which is the all-purpose control utility
  96. supplied with the Fusion 40 (68040) card. OK, assuming you have
  97. the magic utility in hand that is compatible with your hardware,
  98. how does one modify the kickstart image appropriately?
  99. Unfortunately, this is going to take quite a bit of technical
  100. knowledge. I'll blithely assume you can handle it and continue:
  101.  
  102. a) Locate the starting address of trackdisk.device in the ROM.
  103. You should see "trackdisk" and some kind of date/version string.
  104. Look backwards from that for a $4AFC. That address in the very
  105. beginning of the trackdisk module.
  106.  
  107. b) Either reassemble (use Macro68) Hackdisk at this absolute
  108. address or use the 'HunkWiz' utility by Christian A. Weber (you
  109. can find this utility in the BeerMon distribution) to generate
  110. the absolute-address version.
  111.  
  112. c) Insert the absolute-address Hackdisk at the proper place in
  113. the kickstart image (use the monitor of your choice...I like
  114. AmigaMon by Timo Rossi).
  115.  
  116. d) Calculate the new ROM checksum. Sadly, I don't have a nice
  117. program prepared to do this. Here is roughly the code required
  118. (for 512K ROMs):
  119.  
  120.     MOVE.L    #$300000,A0    ;starting address of ROM image
  121. ;    MOVE.L    #$300008,A1    ;if you want to preserve old value
  122.     MOVE.L    #$37FFE8,A1    ;address of magic checksum longword
  123.     CLR.L     (A1)
  124.     MOVE.L    #$1ffff,D1
  125.     MOVEQ     #0,D0
  126. 1$:    ADD.L     (A0)+,D0
  127.     BCC.S     2$
  128.     ADDQ.L    #1,D0
  129. 2$:    DBRA        D1,1$
  130.     SUB.L    #$10000,D1
  131.     BPL.S    1$
  132.     NOT.L    D0
  133.     MOVE.L    D0,(A1)
  134.     RTS
  135.  
  136. e) If you've made it this far, congratulations. You're ready to
  137. boot with the custom kickstart.
  138.  
  139. -------------------------
  140. Turning Verify Off and On
  141. -------------------------
  142.  
  143. By default, verify is ON for all drives. You can use the tiny
  144. program (2.0-only!) ToggleVerify to invert the verify state.
  145.  
  146. Programmers: The verify bit is bit 1 of TDU_PUBFLAGS.
  147.  
  148.  
  149. -----
  150. Bugs?
  151. -----
  152.  
  153. Hackdisk is 3,000 lines of assembly and a fairly intricate piece
  154. of code (see hackdisk.s) and pushes the hardware to the limit.
  155. Although I've tried my best, I only have two drives and one Amiga
  156. to test with. I can just hope it works as well for you as it does
  157. for me.
  158.  
  159. -------
  160. Credits
  161. -------
  162.  
  163. Special thanks go to the following genuine Amiga wizards:
  164.  
  165. Dirk Reisig        - for TrackSalve
  166. Sebastiano Vigna    - for SuperDuper
  167. Mike Schwartz        - for sharing his game kernel etc.
  168.  
  169. ----------
  170. My Address
  171. ----------
  172.  
  173. 6453 Sigler Road
  174. South Rockwood, MI  48179
  175. U.S.A.
  176.  
  177. I am reachable via Usenet as Dan_E_Babcock@cup.portal.com.
  178.  
  179.