3

I've got the Timex/Sinclair 2068 emulation working under MAME and wanted to play with its extra graphics modes the original version of the Sinclair ZX Spectrum didn't have.

But despite an hour of Googling and staring at scans of TS2068 manuals that are not searchable, I can't seem to find how to change modes.

I don't think there's an extra BASIC keyword for graphics like there are for the joystick ports for instance. An I can't see anything on photos of the keyboard.

Is there a repurposed standard Speccy keyword that's given an extra use? Is there an extra keyword that I simply missed, or are the extra modes not accessible by BASIC and need a POKE to access?

1 Answer 1

6

Sinclair BASIC

The answer is just as low-level as POKE, but is not POKE.

  • OUT 255,2 enters "Hi-Color" mode
  • OUT 255,6* enters "Hi-Res" mode
  • OUT 255,0 goes back to normal Spectrum mode

OUT is similar to POKE but writes to an I/O port rather than a RAM address. Port 255 also controls other things by setting other bits. Note that 2 above sets bit 1 and 6 sets bits 2 and 4. *Some sources state that Hi-Res requires OUT 255,4

I don't think BASIC supports the non-Speccy modes in display, not just not by having commands to change modes. This means that if you change the mode in BASIC you will see garbage, and not your program displaying in 64 modes or with 1x8 colour attributes. You can still type blindly though.

Note that I haven't been able to test this fully since sources contradict each other and the TS 2068 emulated in MAME keeps crashing when I try to play with POKEing data into onto the screen. So there's probably mistakes in what Ive written. I will update this answer as I experiment...


It turns out it was crashing because the displayed memory in these modes actually overlaps the memory used by BASIC from what I can tell. So it really is only viable to use them in machine code.

Timex BASIC 64

So when you boot up a TS2068, even though it has a different ROM to a Sinclair ZX Spectrum, it's not all that different and has mostly the standard Sinclair BASIC with no support for the extra screen modes though it does have support for some of the other Timex features.

But there was also a version of BASIC made especially for the machine called "Timex BASIC 64". I expected it would come on a ROM cartridge "dock" to allow use of as much RAM to the programmer as possible and not require slow load from tape cassette after every crash. But from what I can find online, it was only available on tape. It did come in several versions for 2048 as well as 2068 and with and with floppy disk support.

This version of BASIC is designed to work in the TS-2068 memory map so your program and system variables etc will not exist in memory that is display memory for the extended graphics modes. Plus it includes extra commands including some to control the display mode:

SCREEN$ n
n=0 screen resolution = 256x192
n=1 Screen resolution = 512x192

This is the same SCREEN$ command that already has two functions in normal Speccy BASIC. It is used to read the character at a given screen x/y position; and it is used with LOAD and SAVE to read and write screen dump files to tape.

Note that this only allows you to select between normal and HiRes modes, but not HiColor mode, unless some info is missing.

2
  • Dumb question: why would an overlap between BASIC and the display area lead to a crash, and not just to weird noise on the display?
    – Tommy
    Commented Sep 18, 2022 at 1:02
  • 2
    @Tommy because I was writing bytes into every screen location and thus overwriting either the program or the variable area used by BASIC. I'll clarify where I wrote "play with"... With a BASIC program running you can see the pixels in the program/variable area changing dynamically. Commented Sep 18, 2022 at 2:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .