!lm12
!rm76
Improving the Epson Controller.........Peter G. Bartlett, Jr.

[ I recently bought an NEC PC-8023 dot matrix printer, which has fabulous features.  The store sold me an Epson controller to run it, assuring me it was all I needed.  Naturally, they were wrong.  To get all features, just as with the Epson printer, you need to be able to send 8-bit characters.  I figured out how, and was just about to write an article about it, when the following one came from Peter Bartlett of Chicago, Illinois.  (Bob Sander-Cederlof) ]

As you may know, the Epson MX-80 printer is somewhat hamstrung by the Epson Controller.  Certain features, such as the "TRS-80" graphics character set, are not available.  You can buy the Graftrax kit to enable dot graphics, but these built-in character graphics are still inaccessible.

The problem is in the card Epson makes to interface its line of printers with the Apple.  (The problem is not present if you use a non-Epson card.)  Hardware on the Epson controller card masks out the high-order bit, eliminating the ability to access the standard graphics characters and some of the dot graphics capabilities.

Epson's reasoning is that the Apple only sends characters with the high-bit set, so Epson has hardware on the card to mask out that bit.  That way the normal characters print as they should.

If Epson had masked out the high bit in their printer driver routine instead, then machine language programmers like us could have accessed all the features of the printer.  We could bypass the printer driver and work directly with the printer I/O port.

Fortunately, the card has jumpers that can be changed and the printer driver is on an EPROM that can be changed.

So you will need a soldering iron, an EPROM blaster, and an erased 2708 EPROM.  [ The EPROM Blaster from Apparat can blow 2708's.  I don't believe the Mountain Hardware ROMWRITER can. ]

On the Epson interface card, the jumper marked "P4" should be removed and installed on "M4" instead.  This jumper are directly underneath the EPROM and are labelled.  [ Ignore the three jumpers on the right side of the EPROM. ]  This fix is not documented, although you can see it in the Schematic Drawing of the card.  I called Epson on the phone, and they told me about it.  With the jumper moved to M4, the high-bit is transmitted correctly.

BUT!!!  Now normal characters do not print normally!  Instead, you get the graphics characters!  Okay, we need to modify the program inside the EPROM.  At location $C120 (assuming the card is in slot 1) you will find an instruction "AND #$7F".  This clears the high-bit for processing control codes only.  We need to move this instruction to $C112, so that the hihg-bit is cleared for transmitted codes also.  Here is a listing of the BEFORE and AFTER programs, with the moved instruction starred.  (Note that the hex values for the BCC and BPL instructions changes too.)

<program here>

That fix in the program will clear the high-bit off every character sent via the printer driver to the printer.  We are back where we started.  Except that now the clever programmer can send characters directly to the printer, bypassing the EPROM resident driver.  Here is how to send one character directly to the printer:
!lm17
OUTPUT STA $C090   Assuming slot 1
.1     BIT #C1C1   Character picked up by printer?
       BMI .1      No, keep testing
!lm12
I have tried everything above, and it all works perfectly.  I hope it proves useful to lots of you AAL readers.
