A Screen Memory Map for the TS 2068

Screen memory map heading art, man watching a woman type at a computer
Screen memory map heading art, man watching a woman type at a computer

On the TS-1000 we learned that the screen could be addressed directly by POKEing numeric values directly into certain memory locations. The locations that were to be POKEd depended on how much memory the program in the computer took up. The memory locations for the screen resided in an area above the program memory and was said to “float”. The first screen location could be determined with the formula “LET X = PEEK 16396 + 256 * PEEK 16397 + 1”.

We also learned that the screen was stored in memory as 24 lines of 33 characters each for a total of 792 memory locations. The first 32 characters of each line on the screen would have their CODE numbers held in memory and could be changed by POKEing that memory location with a different number.

The last row or character should not be POKEd because it held a value of 118 which, when altered, would cause the program to crash.

Try as I may, I could not find an area in the TS-2068’s memory that held the CODE numbers of the characters on the screen.

There is a good reason for this! None of the techniques used to hold screen information for the 1000 are used in the 2068, as far as I can see!

The CODE numbers of the screen characters are not held in memory but exact screen information is retained in memory in a very devious and complicated way.

On page 265 of the owner’s manual we find that the screen DISPLAY FILE resides in the memory locations between 4000-57FF hex or 16384 to 22527 decimal. Unlike the 1000, whose screen memory map floats, the 2068’s screen map resides in a stationary area. This should make it easy to address, right? Read on …

One day, while trying to POKE these locations with character CODEs, I discovered I was winding up with some weird arrangement of dots ranging from one dot to a line of 8 dots.

The answer was obvious! The characters on the screen were not being held in memory by their individual CODE numbers but with a total of 8 numbers for each character. Each character was represented by an 8 by 8 matrix where each line was represented by the visual representation of an 8 digit binary number. The letter “A” would therefore be seen as;

0 0 0 0 0 0 0 0  (0)
0 0 1 1 1 1 0 0  (60)
0 1 0 0 0 0 1 0  (66)
0 1 0 0 0 0 1 0  (66)
0 1 1 1 1 1 1 0  (126)
0 1 0 0 0 0 1 0  (66)
0 1 0 0 0 0 1 0  (66)
0 0 0 0 0 0 0 0  (0)

The 0s and 1s on the left side are the binary numbers of the letter “A” where the 0’s are visually displayed on the screen as “null” or blank dots (PAPER colour) and the 1s are displayed as solid dots (INK colour). The numbers to the right of the binary numbers are their decimal equivalent and it is these that are stored in memory. In other words, it takes 8 numbers, stored in memory, to hold the information for each screen character. The amount of screen locations are 32 characters per line (not 33 as on the 1000) for 24 lines for a total of 768 positions. 8 decimal BIN numbers are in memory for each screen character for a total of 6144 RAM memory locations (6K) to hold the entire screen map.

Now comes the complicated part! The screen is divided into 3 sections of eight lines each. The top third section resides in RAM at locations 16384 to 18431, the middle third at locations 18432 to 20479 and the bottom third at locations 20480 to 22527. The locations for the lines of bit-graphics for each character are not consecutive as can be demonstrated by the following program:

100 FOR N=16384 TO 22527
110 POKE N,1
120 PRINT AT 21,20;N
130 NEXT N

This routine POKEs a single dot to the screen at every possible bit-graphics (BIN) location. You will notice that the screen is scanned in 3 sections with each section being scanned 8 times. The following routine produces a screen grid (bottom 2 lines not in grid) for easy visualization and asks the user for 2 inputs. The first is the character you want to be POKED from the screen and the second is a co-ordinate. Enter either an alphabetic, numeric or graphic character for the first prompt. For the second prompt the following parameters must be observed:

TOP THIRD OF SCREEN - 0 TO 255
MIDDLE THIRD        - 2048 TO 2303
BOTTOM THIRD        - 4096 TO 4351

The character you enter for the first prompt will appear in the upper left hand corner of the screen. The second prompt must have a number entered that fits into the range above. The character will then be POKED to the new screen location, byte by byte.

This routine may help you write a program in which you can create your own hi-res screen graphics to cover the entire screen. All you have to do is determine the BINARY image of each graphic character you want to appear, convert the binary numbers into decimal and POKE them into the proper memory locations – Ed.

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