ProTERM 3.1 115,200 Baud Apple IIGS SCC Port Patch April 15, 2009 ---------------------------------------------------------------------------- INTRO ---------------------------------------------------------------------------- Greg Schaefer's ProTERM 3.1 is generally acknowledged as the 'best' 8-bit Telecom program for the Apple II series of computers. In addition, as of late 2008, it is also 'Freeware'. ---------------------------------------------------------------------------- THE CHALLENGE - transfer speed maxes out at 57,600 Baud on an Apple IIGS ---------------------------------------------------------------------------- The Zilog 8530 SCC chip present in the IIGS is capable of 115,200 baud (and even 230,400 baud under LocalTalk/AppleTalk), but most programs, and even the built-in IIGS firmware, do not allow implementation of this rate. Although normal serial terminal operations do not benefit significantly from an increase in the baud rate, protocol file transfer operations (e.g. Zmodem) can experience dramatic improvements in transfer rates at higher baud rates, particularly when coupled via a hardware handshaking 'null modem' cable to another computer capable of the higher rates. ---------------------------------------------------------------------------- THE FIX ---------------------------------------------------------------------------- Fortunately, a 10-byte patch to the ProTERM 3.1 'PT3.CODE0' file solves the 'challenge'. In ProTERM, the values to be changed correspond to the values written to the Zilog 8530 SCC Write Registers # WR4, WR11 and WR14. These (3) Write Registers control various operational aspects of the Zilog 8530 SCC chip. Each of the 8 binary (1 or 0) bits contained within a single hexadecimal number control a specific operational item on the Zilog 8530 SCC chip. For example, The 8 bits of WR 4 primarily specify the number of data bits, parity, the number of stop bits and, most importantly for our purposes, the clock mode. The 8 bits of WR 11 include one that specifies the clock source. The 8 bits of WR 14 include one that determines whether to enable or disable the Baud Rate Generator operation. Concerning WR 4, our intent is to 'solve' the equation whereby the fractional numerator is the Zilog 8530 Crystal rate of 3.6864 MHz and the result is the 115,200 b/s rate we desire. Of course, a denominator of '32' will supply the answer, and that is the the value for the clock mode we will provide WR 4. 3.6864 MHz (Clock Frequency) Baud (115,200) = ----------------------------- 32 (Clock Mode) So.............. After first making a copy of your entire PT31 directory/disk and renaming the copy to PT31HIGHSPEED, use your favorite block editor (e.g. ProSel's Zap/Block Warden) and follow the file 'PT3.CODE0' to change the following bytes: BYTE MEMORY FROM TO COMMENT ----- ------ ---- --- --------------------------------- $248F $0954 $01 $00 WR 14 (Channel B - $C038) [Disable Baud Rate Generator] $2499 $095E $50 $00 WR 11 (Channel B - $C038) [Source clock from RTxC Pin] $26D5 $0954 $01 $00 WR 14 (Channel A - $C039) [Disable Baud Rate Generator] $26DF $095E $D0 $80 WR 11 (Channel A - $C039) [Source clock from RTxC Pin] $2751 $09D0 $47 $87 WR 4 - 7E1 (32x multiplier) $2752 $09D1 $45 $85 WR 4 - 7O1 (32x multiplier) $2753 $09D2 $44 $84 WR 4 - 8N1 (32x multiplier) $2754 $09D3 $4C $8C WR 4 - 8N2 (32x multiplier) $2755 $09D4 $4F $8F WR 4 - 7E2 (32x multiplier) $2756 $09D5 $4D $8D WR 4 - 7O2 (32x multiplier) Then write these blocks back to the disk. {PLEASE MAKE SURE YOU HAVE A BACKUP BEFORE YOU DO THIS. If you are capable of using a block editor, you are capable of running a copy program. } ---------------------------------------------------------------------------- USAGE ---------------------------------------------------------------------------- I suggest that a separate copy of ProTERM 3.1 be kept that contains these patches. After these patches are written to the PT3.CODE0 file, the baud rate, assuming either the IIGS Printer Port or IIGS Modem Port is selected as the default 'modem' in the ProTERM install dialog, will be fixed at 115,200 baud, regardless of whatever setting is shown in any ProTERM window. ---------------------------------------------------------------------------- THE HELPERS ---------------------------------------------------------------------------- I appreciate the assistance of comp.sys.apple2 guys David Schmidt, Dave Empson and David Wilson for their invaluable assistance in mastering the Zilog SCC chip and its registers, as used by the Apple IIGS. Of course, the Zilog 8530 SCC Users Manual and Apple IIGS Technote #18 are also helpful in order to gain a better understanding of exactly what is happening. ---------------------------------------------------------------------------- COMMENTS? ---------------------------------------------------------------------------- Please remember, improvements are always welcome. For example, my plans include implementing this patch as a ProTERM Macro, which would first ensure that either the IIGS' printer or modem port is selected, and then patching, in memory, the locations to enable 115,200 baud use by the Zilog 8530 SCC. This macro would employ the ProTERM 3.1 'MEm' macro command. In addition, a more informative screen presentation can be obtained by changing a few values in the 'PT3.CODE1' file to show the increased Baud value in place of the defaults. Also, 'smart' types will realize that by modifying one of the less used protocols (e.g. 7E2) to use a '64' clock mode (rather than '32'), 57,600 baud can be realized using the same modified PT3.CODE0 file. ---------------------------------------------------------------------------- DISTRIBUTION ---------------------------------------------------------------------------- Oh yeah, one more thing. Simple as it may be, this patch procedure documentation is Copyright 2009 by Hugh Hood. As long as this PT31Patch.txt 'manifesto' is present in its entirety, you may copy, upload, download, distribute etc., without charge.