Authors
Publication
Pub Details
Date
Pages
BASIC Terms
I have finished the code to make the Timex run under Gerton’s Z80 emulator and finally debugged the Series One interface code to work with the Timex 2068.
The final product is changed greatly from the one that I demonstrated down in Dayton. The machine stack is located where it is suppose to be at 6200H and not at high memory like it is in the Spectrum. Channels are located at 6840H initially and not like I had it in the demo at Dayton. Basic starts at 26709, initially, one byte lower than normal. This is due to the Series One code. I’m not sure that I can change this but am still trying.
I was having trouble with the CLOSE routine because the Spectrum shadow ROM pages in at 1708H and not at 13A8H where is needs to with the Timex. To overcome this, I changed the Timex code to make a hookcode call with hookcode 32H to address 1708H in the shadow ROM; works rather well.
At this time I have written no doc for the Timex running with Z80. There needs to be something written to explain why some programs may not work. This includes any that use the ram resident code or XROM code.
The only program that I have found that doesn’t work right is Timachine. Timachine will load and will compile properly but the shadow ROM will no longer load programs. I was only able to load by use of the cassette interface. I have an interface now and the code that I have assembled will work to load programs through the parallel port if the user has a registered version.
Timex 2068 Emulation on a PC Using Z80
The following information compares the Timex 2068 emulator, running on an IBM compatible, with the real thing. Gerton Lunter’s excellent Spectrum emulator, Z80 V2.01, is used with modi- fied Timex 2068 and Series One Interface code to make it work. To use it, you will have to replace the file, ROMS.BIN, in Z80-201.ZIP with one available for free in the EMULATOR area of QBOX-USA.
Features now available to the TIMEX 2068 emulated in Z80
- Microdrive Interface – up to 8 microdrives using an emulated Series One interface. CAT, FORMAT, ERASE, MOVE, VERIFY and MERGE are used with the microdrives. Read Gerton Lunter’s Documentation for Syntax.
- 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. Read Gerton Lunter’s Documentation for serial port emulation/operation.
- Design you own commands – a feature of the SERIES ONE interface.
- CLEAR # – Reset all channels to original and reclaim all memory used by the channels.
- CLS # – Restores screen attributes to the original values.
- 6. OPEN #n;”x” – Creates channels for mircodrive, serial port, and network. The network feature is not supported.
- CLOSE #n – Closes a channel and reclaims memory used by it.
- NMI saves – Save the memory state of the Timex 2068 to disc. Note: you cannot load Spectrum saved NMI (.Z80) files. Memory organization is similar but not the same.
Features not in Spectrum but working in the TIMEX 2068 emulation
- ON ERR – Traps errors and redirects program execution. SS+Extended mode “F”.
- DELETE – Works like a normal Timex 2068, CapShift “O”.
- FREE – Prints out the available basic memory, PRINT SS+Extended mode “A”.
- RESET, RESET *, RESET #n – Works just like the normal Timex, does nothing. Requires firmware written to take advantage of it. It could have worked much like CLOSE #n does in the Series One interface.
All features of the Timex 2068 emulator work except
- 1TICK – Hardware support in the Z80 emulator is not available.
- SOUND – Hardware support in the Z80 emulator is not available.
- Access to the XROM memory and its TAPE routines cannot be done because the rom is not provide 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.
- SAVE/LOAD/MERGE/VERIFY – Emulation of TAPE commands to disk is not supported. However, these tape commands are available for registered users only. They will work only with the parallel port connected to a cassette interface and with use of a Tape file, SA_LD.BIN (included in TX_2068.ZIP). This file must be loaded to ram from an emulated Microdrive or Serial Port to address 25282 dec, (62C2H). The normal location of the TAPE routines is in the XROM (see #3). The file, SA_LD.BIN, was setup to be loaded as a RS-232 file. Load it as CODE from Timex basic to address 25282 as: LOAD *”b” CODE 25282. Save it to a microdrive file as: SAVE *”m”; 1;”SA_LD” CODE 25282,1330. Refer to Gerton’s documentation. 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. Around 105% was best on my computer. One final note about “MERGE”: the SA_LD.BIN file must be loaded in order to use the “MERGE” command for microdrive files or else an “Invalid I/O device” error will be displayed.
- The RAM RESIDENT CODE is not in memory. There is no XROM to copy it from so the space is free for use of other code. However, this space is used by a special tape routine to SAVE/LOAD to the parallel port for registered users. See #4.
- 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 SCB6H.
- 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. 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.
- The screen color and ink color is white on blue, my favorite. If other screen colors are needed, let me know and I will try to get you the information on how to change the code.
- BASIC programing starts at address 26709 dec. before enabling the Series One interface. It normally starts at 26710 dec 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 of memory, from Channels to Basic, between the Timex and Spectrum. This may change in a future version if I can figure out how to work around it. This may cause problems with some programs. One such program may be Timachine. Timachine runs OK but basic programs to be compiled by Timachine will not load from the Series One interface. These programs can only be loaded from the Tape interface.
- OUT 244,n will cause the border to change color. Many Timex programs have this instruction, written in machine code, to make sure certain memory chunks are enabled during program execution. Short of changing the program code, there is no solution for this.
- All programs that I have tried did work with this Timex emulation. That includes HOTZ and HOTZ AROS (my favorite Timex programs), 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. There may be many others that fail to work properly but I haven’t used them yet. If you can help to make this Timex 2068 project better, let me know how and what to do. I personally would like to use OS-64 with this emulator but I don’t have the ability to make it compatible with the XROM bank, DOCK bank or two displays files. If enough USA users will become registered users of Z80, maybe Gerton Lunter will consider making his emulator fully Timex compatible.