home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
disk
/
misc
/
hackdisk
/
hackdisk.doc
< prev
next >
Wrap
Text File
|
1995-02-27
|
6KB
|
179 lines
Hackdisk V1.12
By Dan Babcock
Copyright (C) 1992 by Dan Babcock
------------
Distribution
------------
Hackdisk may be freely copied for non-commercial purposes (only).
-----------------
What is hackdisk?
-----------------
Hackdisk is a complete trackdisk.device replacement, minus
support for 5.25 inch and 150RPM drives. It works with any
version of Kickstart (tested with 1.3 and 2.04).
----------------------------
What's wrong with trackdisk?
----------------------------
The standard trackdisk module works well, but it isn't perfect.
My major gripe is that it doesn't offer a verify option. I used
TrackSalve (a brilliant program by Dirk Reisig) before KS2.0 and
received enough "verify error" messages to realize that this
feature is very valuable. Hackdisk has a verify option that may
be turned on or off at any time for any drive. The verify is very
efficient and compares the raw MFM data bit-for-bit.
Hackdisk is faster than trackdisk 2.0. A DiskCopy to RAD: is 5
seconds faster. A DiskCopy from RAD: with verify is only 1.6
times slower than trackdisk, not 2 times slower like you might
expect! Please note that this performance increase is gained by
better programming, NOT by pushing the drive beyond its
specifications.
Hackdisk requires more chip RAM for its verify buffer, but
conserves memory by using one track buffer for all drives, rather
than a track buffer for each drive. Experience shows that this
does not hurt performance.
For programmers, Hackdisk eliminates the restrictions on
read/write parameters. You can specify a read or write at any
byte offset, any byte length, to/from any byte address.
-------------------
Installing Hackdisk
-------------------
This is where I'll probably lose most of my audience. :-)
Hackdisk is a true replacement for trackdisk.device (and is
called trackdisk.device as well), not some kind of patch.
(Contrary to its name, it isn't a hack at all!). This presents
some difficulties, since you can't just run it from the CLI. Two
major alternatives are available for installing Hackdisk:
1) Use the 'RamKick' utility. RamKick is a Commodore-written
program to kick in an alternative OS module. It was distributed
and used with V35 of the OS, which was designed to support the
hires monochrome display (Hedley/Moniterm). Unfortunately, I
can't distribute it with Hackdisk due to the unknown copyright
status. (No copyright or author message is included in the code).
Anyway, here are some hints for using RamKick:
Type "ramkick ?" to see the options. If you don't know what
everything does, don't worry, because I don't either! Use the
"Kick" script as an example. (Note: It doesn't matter where you
put hackdisk.device, but DEVS: is a good place). The Kick script
uses a tiny program called "HackDiskTest" to test whether
Hackdisk is installed. It will also print out the version number
and copyright. Therefore you can put this at the start of your
startup-sequence to have Hackdisk loaded whenever needed. If you
have an autobooting hard drive, it won't slow down booting much.
Sometimes after booting a game or demo the machine will enter a
infinite reboot cycle. This is caused by RamKick or Hackdisk
being partially (but not fully) corrupted. RamKick should perform
more extensive checksums...
68040 users: RamKick must be patched to call _LVOColdReboot
rather than using its own (rather crude) reset method. This is
quite simple to do. If you need help, email me.
2) Replace trackdisk.device directly in the ROM. There are many
variations to this. The brute force method is to burn a new
kickstart EPROM. A more viable option for those with 030/040
cards is to use special software to boot up with an alternative
kickstart ROM image (soft-kicked A3000s have this ability built-
in). For '030 users, I believe SetCPU by Dave Haynie has such an
option. I use SetFF, which is the all-purpose control utility
supplied with the Fusion 40 (68040) card. OK, assuming you have
the magic utility in hand that is compatible with your hardware,
how does one modify the kickstart image appropriately?
Unfortunately, this is going to take quite a bit of technical
knowledge. I'll blithely assume you can handle it and continue:
a) Locate the starting address of trackdisk.device in the ROM.
You should see "trackdisk" and some kind of date/version string.
Look backwards from that for a $4AFC. That address in the very
beginning of the trackdisk module.
b) Either reassemble (use Macro68) Hackdisk at this absolute
address or use the 'HunkWiz' utility by Christian A. Weber (you
can find this utility in the BeerMon distribution) to generate
the absolute-address version.
c) Insert the absolute-address Hackdisk at the proper place in
the kickstart image (use the monitor of your choice...I like
AmigaMon by Timo Rossi).
d) Calculate the new ROM checksum. Sadly, I don't have a nice
program prepared to do this. Here is roughly the code required
(for 512K ROMs):
MOVE.L #$300000,A0 ;starting address of ROM image
; MOVE.L #$300008,A1 ;if you want to preserve old value
MOVE.L #$37FFE8,A1 ;address of magic checksum longword
CLR.L (A1)
MOVE.L #$1ffff,D1
MOVEQ #0,D0
1$: ADD.L (A0)+,D0
BCC.S 2$
ADDQ.L #1,D0
2$: DBRA D1,1$
SUB.L #$10000,D1
BPL.S 1$
NOT.L D0
MOVE.L D0,(A1)
RTS
e) If you've made it this far, congratulations. You're ready to
boot with the custom kickstart.
-------------------------
Turning Verify Off and On
-------------------------
By default, verify is ON for all drives. You can use the tiny
program (2.0-only!) ToggleVerify to invert the verify state.
Programmers: The verify bit is bit 1 of TDU_PUBFLAGS.
-----
Bugs?
-----
Hackdisk is 3,000 lines of assembly and a fairly intricate piece
of code (see hackdisk.s) and pushes the hardware to the limit.
Although I've tried my best, I only have two drives and one Amiga
to test with. I can just hope it works as well for you as it does
for me.
-------
Credits
-------
Special thanks go to the following genuine Amiga wizards:
Dirk Reisig - for TrackSalve
Sebastiano Vigna - for SuperDuper
Mike Schwartz - for sharing his game kernel etc.
----------
My Address
----------
6453 Sigler Road
South Rockwood, MI 48179
U.S.A.
I am reachable via Usenet as Dan_E_Babcock@cup.portal.com.