[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch for Bag of Tricks 2.1 ZAP
- Subject: Patch for Bag of Tricks 2.1 ZAP
- From: dempson@actrix.gen.nz (David Empson)
- Date: Sun, 21 Aug 1994 13:56:53 GMT
- Newsgroups: comp.sys.apple2
- Organization: Actrix Information Exchange
Anyone out there using the ZAP utility in Bag of Tricks 2.1 (from
Quality Software) might find the following patch useful.
The patch allows ZAP to support remapped ProDOS volumes. The standard
version will report an error if you try to select a slot which doesn't
contain a recognised disk controller (with one exception: slot 2 is
supported, provided slot 5 contains a SmartPort controller).
With my patch, ZAP will first check for recognised disk controllers
(Sider, Disk ][, Universal Disk Controller, SmartPort). If none of
these are found, ZAP will check if ProDOS has a driver for that
slot/drive pair. If so, the ProDOS driver will be used.
This patch is useful for those of us with SmartPorts that have a lot
of devices (e.g. several hard disk partitions) and ProDOS-8 2.0 or
later, which remaps SmartPort devices to arbitrary unused unit
numbers. It should also work with the RamFast's remapping scheme, and
with third-party utilities which patch ProDOS's device table to
implement remapping.
The patch is as follows. Start by getting into BASIC.SYSTEM, and set
the prefix to the directory containing BOT.SYSTEM and the other files
from Bag of Tricks 2.
As usual, only apply this patch to a copy of ZAP. Never modify the
original. The patch works for me, but use it at your own risk.
]BLOAD ZAP
]CALL-151
First, check that the code matches.
*8FA.900
08FA- A9 00 F0 03 20 14
0900- 0A
If the displayed bytes do not match the above, do not apply the patch,
because you have a different version of ZAP. Contact David Empson for
further advice.
[The display will be slightly different on the IIgs, but the series of
numbers should match.]
If the displayed bytes do match, patch as follows:
*8FA:EA EA EA EA
*<press control-C to return to BASIC>
]UNLOCK ZAP
]BSAVE ZAP
]LOCK ZAP
ZAP should now accept a slot/drive which is in the ProDOS device
table, but doesn't contain a disk controller.
Further information, for those who are interested:
The patched out code (LDA #$00, BEQ $0901) is entered for an
unrecognised disk drive. The JSR $0A14 instruction at $08FE is
entered for a SmartPort device (the subroutine looks up the ProDOS
device table to see if there is a driver for this slot, checking the
drive 1 and drive 2 positions in the table).
By patching out the LDA and BEQ with NOP (no operation) instructions,
the "no recognised disk drive" case collapses into the "SmartPort"
case, and ZAP will check for a ProDOS block device.
Although a single byte patch could be made in this case, using several
NOP instructions makes the patch more obvious.
--
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand