• Please review our updated Terms and Rules here

Tektronix 4050 BASIC graphics display limits

nikola-wan

Veteran Member
Joined
Mar 6, 2018
Messages
1,817
Location
Texas, USA
I just learned something from reviewing Micheal D. Cranford's update to his documentation for his 4051 FAST GRAPHICS ROM.

He stated:

ALL X,Y POSITIONS ARE IN GDU'S (0.128 DISPLAY RESOLUTION STEP SIZES).
COORDINATES ARE LIMITED TO THE DEFAULT DISPLAY: 0 TO 130 HORIZONTAL AND
0 to 100 VERTICAL (0 TO 1015 AND 0 TO 781 USABLE POINTS, RESPECTIVELY).

I was curious about these limits and wondered why not 0 to 1023 for the X-Axis since the Tektronix 4051 has a 10-bit DAC for X and Y.

So I wrote a test program for the 4051 EMULATOR to display bounding boxes for 0-100 for X and Y and 0-130 for X and 0-100 for Y and labels for 72 characters of text.

Here is the short program I wrote:

Code:
100 INIT
110 WINDOW 0,130,0,100
120 PAGE
130 MOVE 0,0
140 DRAW 100,0
150 DRAW 100,100
160 DRAW 0,100
170 DRAW 0,0
180 MOVE 0,100
190 PRINT "PAGE FULL - Above Graphics"
200 HOME
210 FOR I=1 TO 7
220 PRINT "        ";
230 A$=STR(I)
240 PRINT A$;
250 NEXT I
260 PRINT
270 FOR I=1 TO 6
280 PRINT "1234567890";
290 NEXT I
300 PRINT "123456789012";
310 MOVE 120,0
320 DRAW 130,0
330 DRAW 130,100
340 DRAW 120,100
350 PRINT ""
360 LIST 100,350

And the resulting screenshot from the 4051 EMULATOR configured for fine dot mode (single pixel) for TEXT and GRAPHICS:

4051 Graphics test-single pixel text and graphics.png

The 4051 EMULATOR adds a small border around the drawing area that I cropped with MS PAINT and used MS PAINT to measure the drawing area with this image:

4051 Graphics test-single pixel text and graphics - cropped.png

MS PAINT showed the upper left corner of this cropped image as 0,0 and the lower right corner as 1015, 797. The X=1015 certainly matches MDC FG doc X axis limit.
But I know that 4050 BASIC could write TEXT above the Y axis limit, so measuring the top right corner of the 0,0 to 100,100 bounding box I get 1015,16. If I subtract 16 from 797 I get 781 - matching MDC FG doc Y limit for graphics.

I was still curious why X limit = 1015 instead of 1023.

That answer is in the first line I displayed at the top of this post:

ALL X,Y POSITIONS ARE IN GDU'S (0.128 DISPLAY RESOLUTION STEP SIZES).

TEK 4050 BASIC GDUs for graphics are 0-130 for X and 0-100 for Y.

1015*0.128 = 129.92!
and 781*.128=99.968!

since 0,0 is an additional point here are my calculations for 1016x782:

1016x0.128 = 130.048!
782*0.128 = 100.096!

I had seen the 0.128 in the R12 manual, but wondered why 1023*0.128 = 130.944.

Now I know - I have been using slightly wrong scale factors for my 4050 BASIC programs like BITMAP, SVG and HPGL to R12!

In addition - I imagined that 4050 Graphics had square X and Y vector points - but 1015/4*3 = 761.25 not 781!

I have been using 1024x768 for the size of the 4050 graphics window - since I figured the extra points to the 780 resolution could be for the extra line of text at the top of the screen.

I was wrong again. My test results indicate the total vertical 'points' are 797+1=798 (since MS PAINT 0,0 is an additional point).

I tried MOVE 130,100 followed by PRINT "*" and nothing PRINTED past the 0,0 to 130,100 bounding box, but that could just be 4050 BASIC clipping.

I think I need to dust off my 47 year old assembly program I wrote to dump the 4051 ROMs using the X and Y D/A converters directly and see if I can print text (maybe even graphics?) past X=1015.

I also need to change my Convert HPGL to R12 program or the input data files to scale to 1016x782 X and Y vector points instead of 1024x768.
 
Last edited:
Back
Top