Patch Printer Drivers easily according to instructions provided by a programmer.
GEOS Printer Driver Patcher
^${P?
LV H
LV $z
${0`
LV ${0
Incomplete list of patches.
JJJJ B
GEOS Printer Driver Patcher
Please select the old (original) printer driver:
(First-time users should click YES for info.)
Iand click
dfor info
& options
to deskTop
Please select the new (previously patched)
printer driver. Use the old one if you are
just starting to patch:
Xand click
to deskTop
Old Driver Name:
Old CRC code:
New Driver Name:
Enter an UN-used filename for the
New Driver and hit RETURN or:
sto quit to deskTop
Before CBM PRoGram file can be
written to disk, please enter an
UN-used filename and hit RETURN.
End Address:
cwrite attempt
rto print pro-
{gramming info
This application provides an easy way for any
GEOS user to make minor changes in an existing
Printer Driver according to instructions provided
by a programmer. It is intended for customizing
such things as page length, NLQ or other printer
codes, or removing extra line-feeds. Before
proceeding, you should print the user informa-
tion (one page) and retain for future reference.
pto print user
yinformation
pfor program-
ymers only
to return
to patching
to deskTop
Old Driver Name:
Old CRC Code:
Old End Address:
New Driver Name:
New CRC Code:
New End Address:
Number of Patches:
sto print
|patches
swrite
|file to
for more
patches
exit to
deskTop
Before file can be written to
disk, please enter an UN-used
filename and hit RETURN.
End Address:
uwrite attempt
Hit mouse button to halt printing....
Form Feed Printer?
The Active Printer Driver is
not on the disk.
There has been a disk error.
Make sure original disk is in
the same drive and that it
is not write-protected.
No disk transfer has been made.
uto return to patching
Hit mouse button to halt printing....
Return to patching?
The file has been successfully
written to disk.
ato deskTop
uto return to patching
The active printer driver:
appears to be an early version
that will not print ASCII text.
Select another from the deskTop.
uto return to patching
Cannot find printer driver:
Make sure a copy of it is on
this disk or select a different
driver from the deskTop.
uto return to patching
Form Feed Printer?
Hthen return
to patching
fthen exit
to deskTop
File:
has not yet been written to
disk. Are you sure you want
to discard this patched file?
bto discard patched file
vto return to patching
There has been a printer error.
Make sure printer is plugged in
and on-line and is not out
of paper.
uto return to patching
User Information for GEOS Printer Driver Patcher
Use this program when you have a programmer's list of instructions to patch a printer driver to solve a problem with your printer. You might get such a list from a BBS, a magazine or user group newsletter, or even privately. Example:
These patches delete all the special printer codes for TEXT so you can manually select an NLQ font built into your printer without the New Driver over-riding it. It also works with daisy wheel printers and all non-Commodore printers that use ASCII and support form-feed. It modifies only NLQ and DRAFT, not other geo- Write fonts or geoPaint graphics. The Old Driver came with GEOS 1.3 products.
Due to risk in patching, always use a separate work disk with copies of this program, the Old Driver to be patched, and your active printer driver if you decide to print your patches to verify against the list.
In the first two Dialog Boxes, select the same Old Driver Name (the one to be patched). The third Dialog Box gives you the CRC Code for the Old Driver. A CRC Code is like a checksum which is calculated when the driver is loaded from disk. If the Old CRC Code in the Dialog Box does NOT exactly match the Old CRC Code in the list, go back to the deskTop to search for the correct driver on another disk. Matching CRC Codes is your only guarantee that you have the correct driver since there can be more than one version with the same name. If you find another candidate, copy it to your work disk and rerun the program. When the CRC Codes DO match, type a UNIQUE New Driver Name and hit <RETURN>.
The next Dialog Box shows a four-digit hexidecimal address, followed by its two-digit hex data, and Verify and Done icons. In the example, the first address that needs to be patched is (7915). Go to it by DELeting back over the data and current address. Type in (7915) and <RETURN>. You should see (7915) and its current data (4c). At the cursor enter the patching (new) data (60) and <RETURN>. This is VERY important: <RETURN> makes the program replace the old data (4c) with the new data (60) and display the next address (7916) with its data (f6). Now make the next patch from the example, DELeting (7916 f6) and typing (7ac1) <RETURN>, then after (0d), type (fa) <RETURN>. Continue if more are listed. Disregard dashes: the program replaces them with (60) if required.
When you have made the patches, click on the Verify icon. The Dialog Box displays the first patch; clicking again shows the second, etc. A patch at an incorrect address may be removed by entering <DEL> <DEL> <RETURN>. If all patches match those in the instructions, click on the Done icon.
The next Dialog Box shows seven lines of information. The New CRC Code and New End Address on the screen MUST MATCH those in the list. If NOT, DELete and type the correct New End Address and <RETURN>. The program will recalculate the New CRC Code. If either or both still do not match, print the patches to proof-read against the list and/or click OK to re-enter patching mode to correct them.
When everything matches, write the file to Disk and exit to the deskTop. Click geos in the command bar to select your new printer driver. Until you are sure it does what you want, work only with copies of documents.
Information on GEOS Printer Driver Patcher
Notes for Programmers
You can convert any GEOS printer driver to a standard CBM machine language program to be disassembled and printed out with a monitor. Select the desired printer driver in the first Dialog Box and click the YES icon for options. In the second Dialog Box, click the Disk icon: "for programmers only". The third Dialog Box requests a new name (do not use lower-case characters) for the CBM version of the driver. It also tells you the end address of the driver for you to know how far to disassemble. (All printer drivers start at $7900.) NOTE: since the CBM version is not a valid GEOS printer driver, it will not appear in the file selection menus. Do not try to use the CBM version within GEOS, except to delete it. Make notes of your desired patches and use this program to create a new patched driver. If you need more room than the original (Old) driver, the extra space will be pre-loaded with RTS's ($60), whether you change the New End Address directly or just patch beyond the Old End Address.
Assuming that it takes several versions to get a patched driver to do what you want, print out the list(s) of instructions by selecting the Old Driver Name in the first Dialog Box, the New Driver Name in the second Dialog Box, and clicking YES: "to print patches" in the third Dialog Box. To help keep track of the versions, you can use the deskTop to put a brief note in the file's info box. This is especially important for any patched drivers you plan to share with others.
Most of the Dialog Boxes are self-instructing; the small fourth Patching Dialog Box needs more explanation:
Each time the box is presented, it displays an address in the range ($7900-7f40), followed optionally by the old and new data. If this Current Address is at or beyond the New End Address, two hyphens, equivalent to RTS's ($60), are displayed instead of the Old Data. Following that is the New Data if it is different from the Old Data.
At this point you can do one of three things:
1. Clicking Done leaves the patching mode;
2. Clicking Verify makes the program search the old and new drivers for the next patch;
3. And <RETURN> causes the currently displayed line of characters, which you may have modified, to be interpreted according to the following rules:
Only hexidecimal characters are significant. These are the numerals (0-9) and the letters (a-f and A-F). Any other characters are ignored. The first four hex digits are interpreted as an address and become the Current Address if in the range ($7900-$7f3f). The last two hex digits (beyond the four address digits) will be patched into the new file at that address. For example: (79Ea5f) <RETURN> will put ($5f) at address ($79ea). (So will T7Q9eAB5-F.) Then the Current Address is incremented to the next address for the next Dialog Box. If only an address is input, it will become the current address for the next Dialog Box.
The New End Address automatically is adjusted any time a patch is made at or beyond its current location. (Note: the end address is one digit greater than the last used address of a file.) Both the old and new drivers are padded with data of RTS's ($60) from their initial end addresses to ($7f3f), the last possible file address.
This program was written by George H. Wells, Jr. and is released to the public domain. If you find this program useful, please share it and your patches with others. Special thanks go to Terry Mills and Marte Brengle for their help in testing this program.