Dunfield Development Services TRANZ Development Tools Copyright 2000-2006 Dave Dunfield All rights reserved www.dunfield.com DDS TRANZ TOOLS TABLE OF CONTENTS Page 1. INTRODUCTION 1 2. SUMMARY OF DDS TRANZ TOOLS 2 2.1 TCLP: TCL Preprocessor/compiler 2 2.2 TCLL: TCL Loader 2 2.3 TCLD: TCL Decompiler 2 2.4 SIM330: TRANZ-330 simulator 3 2.5 TPSIM: TRANZ Printer Simulator 3 2.6 TRANZDDS: TRANZ Dial-up Download Server 3 3. FILES IN THIS ARCHIVE 4 4. EXCERCISES 5 4.1 Stand-alone receipt printing application 5 4.2 TCLP sample application 5 4.3 TCLD sample application 6 4.4 Sample Debit/Credit application 6 5. CONTACT INFORMATION 6 DDS TRANZ TOOLS Page: 1 1. INTRODUCTION The TRANZ series from Verifone is a line of compact low-cost point-of-sale financial terminals with the TRANZ-330 being arguably the most popular terminal ever deployed. The terminals are programmable using Verifones unique "Terminal Control Language" (TCL), however the only offical development tool is Verifones TCLOAD, which provides only minimal development and debugging aid. These DDS TRANZ/TCL tools were created for our own in-house use in the development of several large TCL applications, and provide much more comprehensive development and debugging capabilities. These tools are intended for persons familier with TCL development and the use of the Verifone utilities. Without this knowlege, much of the information contained herein will not be very useful to you. Information on the TRANZ-330 terminal, the TCLOAD utility and the complete TCL programming manual can be downloaded from Verifones web site: http://www.verifone.com/services/techsupport/tcl_tranz.html NOTE1: These tools fully support the TRANZ-330/340, and except where noted otherwise, also fully support TRANZ-UDL terminals such as the TRANZ-380 with up to 2000 memory locations. NOTE2: Like the TRANZ-330 itself, these tools are from an era before the widespread use of "Windows" 32-bit systems. These are command line tools. You will need to get to a command prompt in order to use them. The tools using serial ports/modems (SIM330, TRANZDDS, DHSIM) use "real" 82x50 style serial ports and standard hayes-modems. Best results will be achieved under DOS, or Win9X - I've had good results with them under Win2K, and WinXP can usually be made to work (please refer to WINDOWS.TXT). Winmodems, USB serial devices and other windows32-specific hardware will most likely NOT work with these tools. NOTE3: If you install this package without a DDS customer serial number and key, the tools installed are demonstration tools for evaluation purposes only. As such, they have the following limitations: - The size of application memory is limited. - Some functionality is disabled. - Memory location 30 (Idle prompt) is replaced with the string 'WWW.DUNFIELD.COM' which will be visible after the CLEAR key is pressed until your custom application issues its first message. These limitations to not exist in the "full" versions of the tools. If you install this package using a DDS customer serial number and key, the tools installed are unrestricted full version tools. As such they are NOT freeware and are NOT to be redistributed (not even to your customers). If you have need to redistribute some of the tools, please contact DDS. NOTE4: These tools are the results of my own development and testing requirements. If your needs differ, I can enhance/modify the tools for you on a contract basis. DDS TRANZ TOOLS Page: 2 2. SUMMARY OF DDS TRANZ TOOLS 2.1 TCLP: TCL Preprocessor/compiler Provides a completely symbolic implementation of TCL, allowing symbol names to be used for memory locations, constant values and code line labels. All names are resolved to the correct location, value or code offset during compilation. Frees the programmer from having to manually manage the location of items in memory, and makes it very easy to add or remove code/data blocks without reorganizing the entire program. Also provides features to perform conditional compilation, generate embedded time/datestamps, macro commands and much more. TCLP can directly generate a download .UDL file, or a non-symbolic .TCL file suitable for processing with TCLL or the standard Verifone TCLOAD. 2.2 TCLL: TCL Loader TCLL replaces Verifone's TCLOAD and VLOAD utilities and adds more capability. It can download or upload any of the standard TRANZ file formats (.TCL, .UDL and .DTZ) to/from the terminal. It can also convert any of these file formats to any other format. TCLL does not require the Verifone terminal description database - it maintains it's own database, and can build entries for new terminal versions by analyzing an upload from the terminal. When loading, TCLL determines the terminal type from the download request message and reformats the output as required - you don't have to change the source file to load a different terminal version. TCLL can even load a .DTZ file into a TRANZ-UDL terminal (it reformats the .DTZ to UDL records as it loads). 2.3 TCLD: TCL Decompiler TCLD decompiles a .UDL file into a TCLP (symbolic TCL) source file, performing the following operations: - Control strings are separated into the individual TCL commands and output one per line, with a comment describing the TCL operation. - Skip offsets are converted to TCLP line labels. - Memory locations which do not conform to defined TCL command syntax are output as data strings. - An optional SYMBOL file can be provided to pre-define memory locations name, type (code/data), line/skip labels and block/line comments. The combination of TCLL and TCLD allow you to "reverse engineer" an application extracted from a prevously loaded terminal. DDS TRANZ TOOLS Page: 3 2.4 SIM330: TRANZ-330 simulator SIM330 is a PC based simulator for the Verifone TRANZ-330 point of sale terminal, which provides a comprehensive simulation of the terminal keypad/display, cardreader, printer, pinpad, modem/comms as well as the TCL operating system and language interpreter. SIM330 can directly load either a .TCL or a .UDL file, and runs the application exactly as if it were loaded into a physical TRANZ-330 terminal. In addition to the simulation, SIM330 provides extensive debugging and session logging capabilities. (The TRANZ terminal itself, the platform traditionally used by TCL developers has virtually no debugging capabilities). NOTE: SIM330 does not support the extended features of the TRANZ-380, however it can be used to debug TRANZ-380 applications which fit within the TRANZ-330's 1000 memory locations (a fairly large application). It can also be used to debug parts of larger applications. If necessary TCLPs conditional directives and memory allocation features can be used to automatically adjust for differences between the TRANZ-380 and TRANZ-330/SIM330 when building an application for either platform. 2.5 TPSIM: TRANZ Printer Simulator Simulates a printer 200/250 on the screen of a PC connected to the TRANZ via the download cable. This not only saves paper during test sessions, but it avoids having to move cables when switching between downloading and running the application. 2.6 TRANZDDS: TRANZ Dial-up Download Server This program implements a dial-up remote download server, which is simpler and easier to set up than Verifone's ZonTALK server. The terminal connects via a dial-up line using the standard ZonTALK client built into the terminal. TRANZDDS answers the call and performs a ZonTALK download session with the terminal, delivering the requested application (UDL file) as either a Full or Partial download. DDS TRANZ TOOLS Page: 4 3. FILES IN THIS ARCHIVE REGISTER.TXT = DDS Product registration form CATALOG.TXT = DDS Product catalog notice TECHSUPP.TXT = DDS Technical support information WINDOWS.TXT = Notes on running the tools under windows. TRANZ330.TXT = Essential TRANZ-330 information for developers TCLP.COM/EXE = TCL Preprocessor/compiler - executable * TCLD.COM = TCL Decompiler - executable * TCLL.COM = TCL Loader - executable * TCLL.DAT = TCL Loader - terminal database file SIM330.TXT = TRANZ-330 simulator - Documentation SIM330.COM = TRANZ-330 simulator - Executable SIM330.HLP = TRANZ-330 simulator - Help File SIM330.CRD = TRANZ-330 simulator - Card/Track definition file PINPAD.COM = TRANZ-330 simulator - Pinpad emulation module ITRANS.TCP = TRANZ-330 simulator - Internal Transaction Example TPSIM.COM = TRANZ printer simulator (PC using download cable) TRANZDDS.TXT = TRANZ Download Dial-up Server - Documentation TRANZDDS.COM = TRANZ Download Dial-up Server - Executable TRANZDDS.INI = TRANZ Download Dial-up Server - init file RECEIPT.TXT = Sample TCLP application - Documentation RECEIPT.TCP = Sample TCLP application - Source file SETKEY.TCP = Sample TCLP application to set pinpad master key DC330.TXT = Sample Debit/Credit application - Documentation DC330T.UDL = Sample Debit/Credit application - Test load file DC330R.UDL = Sample Debit/Credit application - Release load file DHSIM.COM = Demonstration Host Simulator - Executable DOWNLOAD.DAT = Sample Download Data file for DHSIM * = TCLP, TCLD and TCLL are documented via their internal help system. Use -H99 to retrieve all of the help information to a file. Eg: TCLP -H99 >TCLP.TXT DDS TRANZ TOOLS Page: 5 4. EXCERCISES 4.1 Stand-alone receipt printing application I have included a sample stand-alone receipt printing application in the files RECEIPT.TXT and RECEIPT.TCP - You can check out this application with the following commands: TCLP RECEIPT.TCP RECEIPT.TCL <- Compile symbolic TCP into standard TCL SIM330 RECEIPT.TCL <- Execute application under simulator TCLL RECEIPT.TCL -1 <- Load into TRANZ on COM1 [1] TCLP RECEIPT.TCP RECEIPT.UDL <- Compile symbolic TCP into ZonTalk UDL TRANZDDS <- Load application by ZonTalk download [2] [1] If you don't have a TRANZ download cable, you can construct one using the pinout from: TCLL -h5 [2] TRANZDDS Requires a "hayes" modem (See TRANZDDS.TXT and TRANZDDS.INI). You must set "Application name" to "RECEIPT" on terminal (If you are not familier with alphabetic entry, you may find it easier to rename RECEIPT.UDL to a numeric-name.UDL See RECEIPT.TXT for more information on the stand-alone receipt printing application. NOTE: RECEIPT requires a TRANZ-330 with a TRACK-2 card reader. If you have a TRACK-1 reader, see the control settings near the beginning of the RECEIPT.TCP file. 4.2 TCLP sample application TCLP includes a sample program which demonstrates some of it's capabilities. You can check out this sample with: TCLP -h7 >EXAMPLE.TCP <- Get sample application TCLP EXAMPLE.TCP EXAMPLE.TCL <- Preprocess example into standard TCL SIM330 EXAMPLE.TCL -F <- Execute example under simulator [1] TCLL EXAMPLE.TCL -1 <- Load sample into TRANZ on COM1 [2] [1] Use -F option with SIM330 because the example uses the RS-232 (DIN8) signals to determine printer online status - See SIM330 documentation [2] If you don't have a TRANZ download cable, you can construct one using the pinout from: TCLL -h5 DDS TRANZ TOOLS Page: 6 4.3 TCLD sample application TCLD includes a sample application which demonstrates how to decompile a .UDL file into complete source code. This application is a "christmas card" that I sent to my TRANZ customers one year. You can check it out with: TCLD -h5 >XMAS.UDL <- Get sample UDL input file TCLD -h6 >XMAS.SYM <- Get sample symbolic input file TCLD -h7 >TCLDEF.DAT <- Get TCL definitions (required for TCLD) TCLD XMAS.UDL XMAS.TCP S=XMAS.SYM -@ <- Decompile sample, applying symbolic info. (Examine XMAS.TCP to see results of decompilation) SIM330 XMAS.UDL <- Execute christmas card on simulator TCLL XMAS.UDL -1 <- Load xmas-card into TRANZ on COM1 [1] TRANZDDS <- Load xmas-card by ZonTalk download [2] [1] If you don't have a TRANZ download cable, you can construct one using the pinout from: TCLL -h5 [2] TRANZDDS Requires a "hayes" modem (See TRANZDDS.TXT and TRANZDDS.INI). You must set "Application name" to "XMAS" on terminal (If you are not familier with alphabetic entry, you may find it easier to rename XMAS.UDL to a numeric-name.UDL 4.4 Sample Debit/Credit application I have included a precompiled example of fairly complete TRANZ-330 Debit/Credit application. For details on the application, and things you can do to check it out, please refer to the DC330.TXT documentation file. 5. CONTACT INFORMATION Dave Dunfield Dunfield Development Services 115 Manion Heights Crescent RR#2 Carp, Ontario Canada K0A 1L0 www.dunfield.com