Turbo232 Programming.txt
From ReplayResources
Revision as of 21:22, 15 June 2010 by Count Zero (talk | contribs) (Created page with ''''Turbo232 Programming''' Text included from [http://ftp.giga.or.at/pub/c64/library/turboprg.txt turboprg.txt] at http://ftp.giga.or.at Category:RS-232_Interfaces ---- …')
Turbo232 Programming
Text included from turboprg.txt at http://ftp.giga.or.at
Turbo232 Programming Revision T v1.0.0 This document outlines the differences between SwiftLink and the Turbo232 cartridges. It assumes that the programming has knowledge of or separate information concerning programming SwiftLink. GENERAL The Tubro232 cartridge is functionally compatible with the operation of the original SwiftLink models designed by Dr. Evil Labs. However, the new version shares only the 6551 ACIA in common with the original designs, and has been completely redesigned to meet the goals of extending the capabilities of this product while maintaining functional compatibility. Three new speeds have been added (57.6Kbps, 115.2Kbps and 230.4Kbps) via an additional register which controls a programmable clock. In addition, the external IRQ/NMI switch has been discontinued, though this functionality is still available via an internal jumper block, which also allows for changes to the DSR configuration and default I/O address. Finally, the effect of 'mirroring' of registers throughout the I/O page has been reduced to 32 bytes, so that the product can be used without interference with GEORAM and similar devices. CMD can also provide custom programmed versions of the decoding chip used in the new product to change the base address to any 32-byte boundry within the selected I/O page; this latter provision is targeted at programmers who wish to create applications which use multiple Turbo232 cartridges within the same I/O page, as well as to users of such applications if and when they exist. DETAILS It is first important to note the different memory 'footprint' of the Turbo232. While SwiftLink contained only 4 registers whose contents were mirrored at every 4 memory locations throughout the I/O page occupied by the device, Turbo232 maps 8 register locations which are mirrored for only for 32 bytes from the base address. Of the four new register locations, only one is actually implemented: the ES (Enhanced Speed) register, located at an offset of $07 from the base address. For baud rates up to and including 38.4Kbps, Turbo232 is programmed just like a SwiftLink. The only possible cause for incompatibility that may be noted is the difference in mirroring of registers which might be used by some programs to detect the presence of a SwiftLink. It is this very difference, however, that will allow the programmer to determine whether a SwiftLink or a Turbo232 is installed (see "DETECTION ROUTINE"). To obtain the new high-speed baud rates, you must first set the lowest four bits of the register located at offset $03 to zero (the upper 4 bits are insignificant). [Note: Setting these bits to zero will result in a value of 1 in the mode bit (bit 2) of the ES register.] You may then set the specific high-speed baud rate using bits 0 and 1 of the ES register. Since bit 2 of the ES register (mode bit) is read-only, and bits 3 through 7 are insignificant, you can safely program the rate by storing in that location a value of $00 for 230.4Kbps, $01 for 115.2Kbps, or $02 for 57.6Kbps. [Note: Storing a value of $03 to the DS register isn't recommended, though it isn't harmful; it provides no clock output, but remains reserved for future expansion.] REGISTER INFO $Dx00 DATA REGISTER Same as original SwiftLink $Dx01 STATUS REGISTER Same as original SwiftLink $Dx02 COMMAND REGISTER Same as original SwiftLink $Dx03 CONTROL REGISTER Same as original SwiftLink, plus xxxx0000 sets enhanced-speed mode $Dx04 UNDEFINED $Dx05 UNDEFINED $Dx06 UNDEFINED $Dx07 ES REGISTER 7 6 5 4 3 2 1 0 x x x x x M S1 S0 M (bit 2) Mode (read-only) 0 = Normal SL mode 1 = Enhanced Speed mode S1, S0 (bit 1 and bit 0) Speed (read-only if M=0) 00 = 230,400 bps 01 = 115,200 bps 10 = 57,600 bps 11 = undefined, no clock output reserved for future expansion DETECTION ROUTINE The following can be used to determine if an installed SwiftLink is the standard or Enhanced Speed type: LDA #$00 STA $Dx03 LDA $Dx07 After executing this code, the A register will contain a zero if a standard SwiftLink is installed, but will be non-zero if a Turbo232 is installed.