Recipes for 2068 Advanced Video

Date: 1984
Type: Program
Platform(s): TS 2068
Tags: Graphics

Two short programs that switch the TS2068 into its advanced video modes. Program 1 reads Timex-supplied machine code from a hex DATA string, POKEs it above RAMTOP at 65400, asks for a video mode (from page 248 of the TS2068 manual; 62 gives the 64-column display) and calls it. Program 2 asks for Y,X positions and plots single hi-res points on the 512 by 192 screen by working out each address and bit itself.

Load and RUN program 1 first, then LOAD program 2, which follows it on the tape; don’t NEW in between. The March 1984 Syntax Errors column notes that program 1 must be RUN twice right after loading, because it gives a false error the first time.

Published in Syntax February 1984 (Recipes for 2068 Advanced Video).

Image Gallery

Source Code

   1 REM Don't NEW after this
   2 CLEAR 65399
   5 READ A,B,C,D,E,F
   6 DATA 10,11,12,13,14,15
  10 READ Q$
  15 LET P=1
  20 FOR X=65400 TO 65437
  30 LET X$=Q$(P TO P+1)
  40 LET V=VAL (X$(1))*16+VAL (X$(2))
  50 POKE X,V
  60 LET P=P+3
  70 NEXT X
  80 INPUT "Video Mode:";V
  90 POKE 65412,V
  95 RANDOMIZE USR 65400
 100 DATA "F3,3E,01,D3,F4,DB,FF,CB,FF,D3,FF,3E,01,F5,FB,CD,8E,0E,F3,DB,FF,CB,BF,D3,FF,AF,D3,F4,F1,FE,80,20,03,32,C2,5C,FB,C9"

   5 DEF FN R(N,D)=N-INT (N/D)*D
   7 OUT 255,62
  10 INPUT "Y<=191 from top? ";Y
  20 LET KK=INT (Y/64)
  30 LET JJJ=INT (FN R(Y,64)/8)
  40 LET III=FN R(FN R(Y,64),8)
  50 INPUT "X<=511 fm left? ";X
  60 LET HHHHH=INT (X/16)
  70 LET G=INT (FN R(X,16)/8)
  80 LET SSS=FN R(FN R(X,16),8)
  90 LET DAT=2↑(7-SSS)
 110 LET ADDR=16384+G*8192+KK*2048+III*256+JJJ*32+HHHHH
 120 POKE ADDR,DAT
 130 GO TO 10

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.