The following information describes the Timex 2068 emulator and Series One interface operation. Gerton Lunter‘s excellent Spectrum emulator, Z80 V2.01, is used with modified Timex and Series One Interface code to make it all work. To try it, you simply replace the ROMS.BIN file in Z80-201.ZIP with one available for free in the EMULATOR area of QBOX-USA (file area #5). Download file TX_2068.ZIP and the shareware version of Z80 v2.01. TX_2068.ZIP includes the new ROMS.BIN, an updated LAYOUT.SCR, and this DOC file. QBOX-USA is a free BBS system dedicated to the QL and other Sinclair computers. It is operated on a QL computer equipped with an IDE hardrive and a 300-14400 baud modem. The phone number is 1-810-254-9878 and it is in operation 24 hours a day. QBOS-USA is located in Sterling Heights, Michigan.
Features now available to the TIMEX 2068 emulated in Z80.
1. Microdrive Interface – up to 8 microdrives using an emulated Series One interface. CAT, FORMAT, ERASE, MOVE, LOAD *, SAVE *, VERIFY *, and MERGE * are used with the microdrives. You must enable the microdrive with the F8 key.
FORMAT "m";n;"name" This must be done to create cart. CAT n n = microdrive number. LOAD *"m";n;"filename" "m" = microdrive channel. LOAD *"m";n;"filename"CODE x,y Loads y bytes to address x. SAVE *"m";n;"filename"LINE x Auto starting program at line x. SAVE *"m";n;"filename"CODE x,y Saves y bytes at address x. SAVE *"m";n;"filename"SCREEN Saves SCREEN file. ERASE "m";n;"filename" Do not add CODE for binary files. VERIFY *"m";n;"filename" MERGE *"m";n;"filename"
Read Gerton Lunter’s Documentation for more detailed information.
2. Serial Port – Send/Receive (SAVE/LOAD) data/programs over the PC serial ports; LLIST/LPRINT to the PC parallel ports; and SAVE/LOAD to disk. You must set up the comm port, LPT port or disk file name with the F4 key. Some of the following must have the streams OPENed first.
LOAD *"b" Load basic files from comm port or disk. LOAD *"t" Load text files from comm port or disk. LOAD *"b"CODE x Load binary file to address x. LOAD *"b"SCREEN Load SCREEN file from comm port or disk. SAVE *"b" Send basic files to comm port or disk. SAVE *"t" Send text files to comm port or disk. SAVE *"b"LINE x Save basic prog w/auto starting at line x. SAVE *"b"CODE x,y Send binary file to comm port or disk. SAVE *"b"SCREEN Send SCREEN file to comm port or disk. LIST #3 or LLIST OPEN #3;"t" first. Use comm, LPT or disk. PRINT #3 or LPRINT OPEN #3;"t" first. Use comm, LPT or disk. LIST #n Lists program to stream n. INKEY$ #n Returns single character string, if avail. INPUT #n;x Inputs variable from stream n. PRINT #n Outputs print sequence (...) to stream n. CAT #n;x Catalog of Microdrive x sent to stream n.
Read Gerton Lunter’s Documentation for serial port emulation/operation.
3. Design your own command – feature of the SERIES ONE interface. Machine code knowledge is required. Write me if further information is desired.
4. CLEAR # – Reset all channels to original and reclaim all memory used by the channels.
5. CLS # – Restores screen attributes to the original values.
6. OPEN #n;”x” – Links specified channel “x” with stream n. Start of basic memory moves up to make room for channels. Channels are: “m” for microdrive, “b” or “t” for serial port, and “n” for network. The network feature is not supported.
7. CLOSE #n – Unlinks any channel from stream n and reclaims memory used by it.
8. 48k snapshot save – Saves the memory state of the Timex 2068 to disk in a compressed file with a filename you select and an extension of .Z80. Note: you cannot normally load Spectrum snapshot (.Z80) files to the Timex 2068 emulator. Memory organization is similar but not the same.
Features not in Spectrum but working in the TIMEX 2068 emulation.
1. ON ERR – Traps errors and redirects program execution. Example:
10 ON ERR GO TO 1000
2. DELETE – Works like a normal Timex 2068. Used as follows:
DELETE , Deletes all basic lines from memory. DELETE X,Y Deletes basic lines from line X to line Y.
3. FREE – Prints out the available basic memory. Used as follows:
PRINT FREE
4. RESET, RESET *, RESET #n – Works just like the normal Timex but is not very useful. Requires firmware written to take advantage of it. It could have worked much like CLOSE #n does in the Series One interface.
These functions are displayed on the new LAYOUT.SCR file in TX_2068.ZIP
All features of the Timex 2068 emulator work except:
1. STICK – Hardware support in the Z80 emulator is not available.
2. SOUND – Hardware support in the Z80 emulator is not available.
3. Access to the XROM memory and its TAPE routines cannot be done because the rom is not provided for. The same is true for the DOCK bank memory.
This makes AROS and LROS programs unavailable as well as any of the extra VIDEO modes (normal display only). The second display file cannot be opened because the Z80 Spectrum emulator does not support it.
4. SAVE/LOAD/MERGE/VERIFY – Emulation of TAPE commands to disk is not supported. However, the tape commands can be used to load files through the parallel port only when a file named SA_LD.BIN (included in TX_2068.ZIP), is loaded to memory and you are using a registered Z80 v2.01. To obtain a registered copy, you must write to Gerton Lunter. Please read the instructions in the shareware Z80-201.ZIP file. The TAPE commands will only work in the REAL MODE and only with the parallel port connected to a tape cassette interface. Use key F7 to set up loading from the LPT port and not from DISK. The file, SA_LD.BIN, must be loaded to ram from an emulated Microdrive or Serial Port to address 25282 decimal (62C2H). The normal location of the TAPE routines is in the XROM (see #3). This file is designed to be loaded from disk as though it were from an emulated comm port (key F4, RS232 Input). Load it as CODE, from Timex basic, to address 25282 as in:
LOAD *"b" CODE 25282. (you must include 25282 with this file)
Save it to a microdrive file, if desired, as in:
SAVE *"m";1;"SA_LD" CODE 25282,1330
Or, save it with the name “run” if you want it to be loaded when the keyword RUN is entered after initializing the emulator. Refer to Gerton’s documentation about the save/load syntax. Again, you must use REAL mode (F6) and your emulated Timex speed must be between 100% and 110% in order to load tape programs through the parallel port (requires a fast 386 or higher). Around 105% was best on my computer.
If the SA_LD.BIN code is not loaded, any tape commmand written in basic will pass syntax. But during execution, an “Invalid I/O device” error will be generated. After loading the tape routines, the LOAD “” or LOAD “filename” will work properly as long as no code address nor length is used. If there are numbers, such as an auto starting line number, a “Nonsense in Basic” error will be displayed because the five byte floating point form of these numbers has not been added. To get around this problem, use VAL “number”. To avoid this condition entirely, make sure the file, SA_LD.BIN has been loaded before using the tape commands.
One final note about “MERGE”: the SA_LD.BIN file must be loaded in order to use the “MERGE” command for microdrive files or an “Invalid I/O device” error will be displayed. The microdrive “MERGE” command uses some code in the tape routines for MERGEing operations. Note: the Series One code will not allow MERGEing an auto starting basic program. In addition, I have not found the MERGE operation to be very reliable with large programs in either the Timex or Spectrum emulation.
5. The RAM RESIDENT CODE is not in memory. There is no XROM to copy it from so the space is free for the use of other code. However, this space is also used by the special tape routine, SA_LD.BIN. See #4.
6. The Timex variable, Physical RamTop (P_RAM) has been relocated to 5CCCH and the first Series One interface variable (FLAGS3) is at 5CB4H. The other Timex Series One interface variables are located starting at 6856H. In contrast, the Spectrum Series One interface variables start at 5CB6H. The Series One interface variables cause the start of Basic to move up by 58 bytes.
7. To OPEN a channel, you must use OPEN #n;”x”. The letter n is the number of the channel and “x” can be “t”, “b”, “n”, or “m”. See Gerton’s documentation. The important item here is that you must use a semicolon and not a comma in the command like the Spectrum allows. The Timex syntax check passes the comma, thus not paging in the interface one rom. When a comma is used, an “Invalid I/O device” error is generated by the Timex error routines and the command is never acted upon by the Series One interface.
8. The screen colors are white on blue, my personal favorite combination. If other screen colors are needed, let me know and I will try to get you the information on how to change the code.
9. BASIC programing starts at address 26709 decimal, before enabling the Series One interface. It normally starts at 26710 in the Timex. I had to do this because of the way the Series One interface code expects memory to be organized. There is a one byte difference in length, from the start of Channels to the start of Basic, between the Spectrum and Timex computers. If I can figure out how to work around this difference, the start of basic may be changed back to 26710. The way it is now may cause problems with some programs.
One such program may be TIMACHINE. TIMACHINE loads OK but basic programs will not load from the Series One interface. Basic programs can only be loaded from the Tape interface.
You may run into another problem that keeps some programs from loading properly. Some programs will not load correctly if the Series One interface variables are initialized and the start of Basic is moved up to accommodate them. One such program is WINDOW PRINT 32. The solution to this is complicated but I will try to explain. To load the Tape routines, you must enable the Series One variables and extended channels. But, this is why WINDOW PRINT 32 fails to load properly. The Series One variables must be removed and the channels restored back to normal. We can do this with a NEW command but the Tape routines must be protected by loading them above RAM TOP first. Load the tape routines to address 60000 and do CLEAR 59999. Next, do a NEW to remove the Series One variables.
10 CLEAR 59999
20 LOAD *"m";1;"SA_LD"CODE 60000 : REM or use RS 232 redirection
30 NEW
Then, using a FOR/NEXT loop, PEEK the Tape routines and POKE them back to address 25282.
10 LET y=25282
20 FOR x=60000 TO 61329 : REM 1330 total bytes
30 POKE y,PEEK x
40 LET y=y+1
50 NEXT x
RAM TOP should be moved back up to the normal location with CLEAR 65367 or higher if desired. Once completed, the TAPE routines are back in place and the Series One variables have been eliminated. Be careful not to enable the Series One interface with a syntax error or the interface variables will be recreated. Hopefully, you can now load the Tape program without problems.
10. OUT 244,n will cause the border to change color. Many Timex programs have this instruction written in machine code to ensure that HOME bank memory chunks are enabled during program execution. Short of changing the program code or Gerton Lunter rewriting his emulator, there is no solution for this. Note: when low, each of the 8 bits sent out port 244 enables 8k of HOME bank memory. Or, when high, each bit enables either DOCK or XROM bank memory. The DOCK bank is enabled when the value of 8 bits sent out port 255 is <128. Otherwise, the XROM bank is enabled when the value of the 8 bits sent out port 255 is >127. This memory bank switching is not available in this Timex emulation. The Z80 v2.01 emulator does not recognize port 244 and handles any OUT 244,n instruction like a border color change through port 254.
11. Most programs that I have tried have worked with this Timex emulation. That includes HOTZ and HOTZ AROS (my favorite), as long as the XROM bank, DOCK bank and ram resident code are not accessed. Of course, programs that make use of the STICK and SOUND command are not going to work.
ARTWORX is one program that will not work properly in this emulation. There may be many others that fail to work properly but I haven’t tried them yet.
TASWORD II loads properly but I’ve had trouble getting the alphabet letters (strangely not the numbers) to print to the screen. Just exit to Basic with SYMBOL SHIFT “a”. Next press “b” to enter BASIC and then RUN. The problem goes away.
If you can help make this Timex 2068 project better, let me know how it can be done. I personally would like to use OS-64 with this emulator but I don’t have the skill to change the Z80 emulator to make it compatible with the XROM bank, DOCK bank and the two displays files. If enough USA users will become registered users of Z80, maybe Gerton Lunter will consider making his emulator fully Timex compatible.
Keith Watson
[phone number omitted]
[address omitted]