(under development)
TS1000/1500 Cartridges:
Timex made the TS1510 cartridge player to add the command cartridges to the TS1000 and
TS1500 computer. This cartridges are incompatible with the TS2068 cartridges.
The TS1000/1500/ZX81 use the signal /ROMCS to disable the internal ROM. The cartridge
works by pulling this low and placing its own ROM in this range. The Spectrum 48K and IF2
also works in this way.
TS2068 Cartridges:
TCC or Timex Command Cartridges are a solid state technological achievement. Like a video
game cartridge, they easily plug into TS2068 in Dock port to instantly meet diferent
needs. The tiny Timex Command Cartridges actually add up to 56K of additional ROM memory
to the computer. They can contain any kind of program (games, business programs, word
processors,...)
1º - Turn off TS2068
2º - Open Dock port and insert cartridge with label facing up
3º - Close Dock port
4º - Turn on TS2068
Now the software in cartridge will start to work.
Caution: Never remove or insert a cartridge with the computer on!
Types of TS2068 Cartridges:
Actually exists 3 types of cartridges: LROS, AROS and ROMs.
LROS takes control of the computer, the internal ROMs are not used;
AROS uses BASIC interpreter;
ROM is simply a ROM chip. In TS2068 to a ROM work, you must type OUT 244,3 to
"page" the DOCK port.
ROM extensions mapped into the DOCK bank are mostly
implemented as LROS (Language ROM Oriented Software) and AROS (Application ROM Oriented
Software). LROS programs are mapped at address 0 in the DOCK bank and they must be written
in machine code. AROS programs are mapped at address 32768 in the DOCK bank, and may be
either in machine code or in BASIC (The Timex BASIC interpreter allows the running of
BASIC programs from the DOCK bank). LROS programs always have autorun and they will be
started after initialization of the Timex computer is finished (an example of such
software is Zebra OS_64). AROS programs may be or may not to be autorun programs. Both
type of programs have a short header at the beginning which contains the necessary
informations (start address etc.) for their execution.
- 1, for RAM chunks, where initial RAM content is not given (in the emulator such chunks will be initially filled with zeros)
- 2, for ROM chunks
- 3, for RAM chunks where initial RAM content is
given (this is need to allow saving content of expanded RAM; also this is useful for
emulating non-volatile battery-protected RAM expansions) After the header, a pure image of
each presented chunk is stored in DCK file. Some examples will help understanding of such
organization. 16 Kb long LROS program needs header 0,2,2,0,0,0,0,0,0 in front of pure
binary image of this program. 24 Kb long AROS program needs header 255,0,0,0,0,2,2,2,0 in
front of binary image of it to become a valid DCK file. 64 Kb DOCK RAM disc cartridge (64K
of empty RAM) may be described as only 9-byte long DCK file with content
0,1,1,1,1,1,1,1,1. 32 Kb EXROM RAM disc cartridge mapped at address 32768 may be described
also using 9-byte long DCK file with content 254,0,0,0,0,1,1,1,1. If you put a 9-byte
header 255,2,2,0,0,0,0,0,0 in front of binary image of standard ZX Spectrum ROM, you will
get DCK file which will replace Timex HOME ROM with ordinary Spectrum ROM (e.g. you will
achieve Timex Computer 2048). At the last, if you put a header 255,3,3,0,0,0,0,0,0 in
front of binary image of Timex HOME ROM, you will allow writing in the HOME ROM!
That's all if only one bank is stored in DCK file. Else, after the memory image, a new
9-byte header for next bank follows, and so on.
The Spectrum Emulator Cartridge:
This cartridge made by Timex of Portugal, contains a ROM image of TC2048. I think that
this isn't a ROM cartridge, but a LROS cartridge, because it is simply plugged to TC2068
and it starts automaticaly. Many American Timex Sinclair 2068 users made a cartridge with
a ROM chip of a ZX Spectrum and because of this, they have to type the OUT 244,3 command.
Cartridge Software Overview
The TS2068 supports two basic types of
Cartridge or ROM-Oriented Software designated as LROS (Language ROM-Oriented Software) and
AROS (Application ROM-Oriented Software) which pluq into the cartridge connector. They are
identified via overhead bytes at Location 0 for an LROS or 32768 (8000H) for an AROS. The
fundamental difference is that an LROS contains Z80 machine code in memory chunk 0 and is
in total control of the TS2068 hardware including the RESTART implementation and
Interruption Mode setting and handling, while an AROS is dependent on the System ROM or an
LROS for these functions if needed. An AROS written in BASIC, which may also include
machine code accessed via the USR function, is supported from the System ROM BASIC
Interpreter and is mapped beginning in memory chunk 4. An AROS may also be written
entirely in Z80 machine code. An AROS written in any other high-level language would
require an LROS supporting that language and would have to be integrated with the LROS in
a single cartridge.
BASIC AROS Support
BASIC Application Cartridges are supported by special code in the Home ROM. A program
line is copied from the cartridge to a buffer in the Home RAM (ARSBUF) and is then
executed from there by the BASIC Interpreter. When a READ command is executed, the line
containing the appropriate DATA statement is also copied from the cartridge to the RAM.
The cartridge memory is enabled only fur search and copy operations for both program lines
and DATA statements, and when executing a USR function, otherwise the entire Home Bank is
enabled while executing in the BASIC Interpreter. There is no support for User-Defined
Functions which insert the expanded definition parameters directly into the program and
then require search of the program area to find these parameters whenever a function is
invoked.
Cartridge Software/Hardware
LROS
An LROS is identified by the following overhead
bytes:
Location | Description |
0000 | Not Used |
0001 | Cartridge Type -> O1=LROS |
0002/0003 | Starting Address (LSB/MSB) Address to be jumped to after Operating System initialization is complete. Order of bytes is as for a JP instruction. |
0004 | Memory Chunk Specification. Bits 0-7 represent Chunks 0-7 respectively in the Dock Bank in low active format: 0 if in use 1 if not in use NOTE: When writing to the Horizontal Select Register (Port F4H), the Chunk Specification is High Active |
The Memory Chunk Specification is used to enable the specified chunks in the
Dock Bank prior to jumping to the address specified in Location 2 and 3. Control is
transferred from the Initialization code in the Extension ROM via the GOT0 BANK routine in
Home Bank RAM Chunk 3, therefore Bit 3 of the Memory Chunk Specification must be set to 1
in order for the transfer to be accomplished as designed (Chunk 3 also contains the
Machine Stack).
CAUTION: If Chunk 3 is marked for' use in the Dock Bank, then when the Memory Chunk Spec.
is written to Port F4H by the Sank Enable code, execution will continue from that point in
Chunk 3 in the Dock Bank with the Stack Pointer addressing ROM.
An LROS is Z80 machine code and is in complete control of the TS 2068 hardware after
transfer to the starting address has been made. It can directly implement an application,
or it can support multiple applications by implementing a language other than basic. An
AROS dependent on such an LROS would have to be part of the same cartridge since there is
only one cartridge connector.
Interruption Mode 1 has
been set by the TS 2068 and interruptions are enabled prior to passing control to the LROS starting address, therefore the LROS must contain appropriate code at location 56 (38H) to cover the case where the interruption occurs after Chunk 0 in the Dock Bank has been enabled, but before any action by the software cartridge to disable the interruption has been taken. Once control is transferred, the LROS may then disable the standard TS 2068 interruption by setting bit 6 of Port FFH, mask the interruption by executing a DI instruction, or set a different Interruption Mode. It may change the location of the Machine Stack. It may also change the memory selection by writing to Port 0F4H with each bit set to 1 for the corresponding chunk to be enabled in the Dock Bank (high active format) or 0 to be enabled in the Home Bank. Thus, an LROS may contain code in Chunk 3, but it should be enabled after the OS RAM code has finished execution. Now that your LROS is in the driver's seat, you are on your own! Some important points to remember when,, mapping your Dock Bank memory and doing bank switching are:Location | Description |
32768 (8000H) |
Language Type 1 = BASIC [and machine code] 2 = Machine code only (Any other value will result in Error S, Missing LROS) |
32769 (8001H) |
Cartridge Type 2= AROS |
32770/32771 (8002/8003H) |
Starting Address(LSB/MSB) BASIC AROS= Addrs. of First Program Line Machine Code AROS = Addrs. of First Z80 Instruction |
32772 (8004H) |
Memory Chunk Specification Bits 0-7 represent Chunks 0-7 respectively in the Dock Bank in low active format as follows: 0 if in use 1 if not in use NOTE: Bits 0-3 must he set to 1 for proper execution. |
32773 (8005H) |
Autostart Specification: 0= No Autostart 1 = Autostart |
32774/32775 (8006/8007H) |
Number of bytes of RAM to be Reserved for Machine Code Variables (LSB/MSB - 0100H=1 byte Reserved; 0002H=512 bytes Reserved. |
BASIC AROS
A BASIC AROS is supported by special code in the System ROM (Section 3.2.1.2). The portion of the cartridge containing BASIC program lines is restricted to the upper half of the memory space beginning at location 32776 (8008H) in the Dock Bank. Support for User-Defined Functions, which requires searching for the definition parameters within the program, is not implemented. Also, because the support code interfaces directly to the bank switching code in.Home RAM Chunk 3 (does not allow for it to be relocated to Chunk 7), a BASIC AROS cannot utilize the advanced video modes and also execute BASIC program statements. If the cartridge contained machine code supporting advanced video modes, the TS 2068 would have to be returned to "Normal " video mode with the RAM mapped accordingly (see Figure 1.1-3) if control were to be returned to the BASIC Interpreter USR code.1.2 If you will be using the System ROM Calculator routines (RESTART 40 (28H) )
or any ROM routines that invoke them, you must initialize the System Variable YEM by doing
the following:
LD HL,5C92H Set HL=MEMBOT
LD (5C68H),HL Initialize MEM
1.3 Chunk 3 must not be designated as "in use" by the Cartridge Memory Selection
Specification byte. This will cause deselection of the bank switching code prior to
completion of the transfer of control to the cartridge starting address. Once control has
been transferred, the cartridge code may then enable Chunk 3 in the Dock Bank if desired.
(See Section 5.1.)
1.4 No entry is made in the System Configuration Table for an RROS if an LROS is present.
This means that an LROS designed to support either RAM based or cartridge based
applications must include code for detection of an AROS.
2 Machine Code AROS
When setting the AROS Overhead parameter requesting RAM space for machine code variables,
21 + n bytes (15H + n) must be requested where n is the number of bytes needed. The
machine language variables area then starts at 6 85 5H immediately following the 21-byte
CHANS area.
NOTE: This does not apply to an AROS that contains both BASIC and machine code.
3 BASIC AROS
3.1 USR Function - When testing the USR address against the Cartridge Memory Selection
byte to determine if the address is in the Home Bank or the Dock Bank, the wrong nibble is
tested in the register thus a valid cartridge address could be erroneously processed as a
Home Bank address. Since the ROM code cannot be corrected, the machine code in the
cartridge would have to be moved to an address that does not cause a problem.
3.2 FOR/NEXT - If the limit of the FOR statement has already been passed on its initial
execution, (e.g. FOR A=1 TO 10 and A has been set to 12), control is passed to the
statement following the corresponding NEXT. In the AROS support code, the address of this
statement is lost giving unpredictable results. Since the ROM code cannot be corrected,
care must be taken not to use this technique in an AROS Cartridge. Normal usage of
FOR/NEXT loops is not affected.
3.3 Advanced Video Modes- Because the BASIC AROS support code interfaces directly to the
Bank Switching code in Chunk 3 (does not access based on its relocatability), the second
display file cannot be open when executing BASIC program from an AROS.