nikola-wan
Veteran Member
I have begun the process of re-reading the dozens of Tektronix 4050 series program tapes I collected 18 years ago, and another huge collection of 36 tapes from Al Kossow.
Somehow - I failed to find the files I downloaded to my PC while making copies of the tapes in 2000
As I began to use my serial program on a laptop connected to my now operational and upgraded 4054A, I have re-encountered the issues with using RS-232 serial for program and data transfer, and have begun to learn how to deal with 40 year old data tape cartridges with disintegrated drive belts.
My serial transfer program uploaded to the Tektronix 4051 web emulator github site:
Tek405xEmulator
and my Tektronix 405x Program Files Archive site:
Tektronix-4051-4052-4054-Program-Files
is able to recover programs from a readable tape with an Option 1 Serial Interface on your working Tek 405x computer by substituting a printable character string ~X~ where X is the fundamental character typed for each of the control characters heavily used in Tektronix PLOT50 PRINT statements.
However - the emulator above uses a different scheme to form a control character as X<BS>_ where <BS> is the backspace control character. I have successfully manually edited some of my recovered programs with Notepad++ to change my control character scheme to the emulator scheme, but that is still a lot of manual effort that I haven't done for the programs I have recovered so far. Yes - a small program should be able to automatically accomplish that conversion - that I haven't written yet.
But I ran into two killer serial transfer program issues:
1 - Transfer from PC to Tek tape
2 - Transfer of "Fast Graphics" ASCII data files to the PC
1 - I was able to transfer Tek 4050 ASCII program files both to and from my PC in 2000 with my program with no serial hardware handshaking protocol, but the higher performance of my current PC now overruns the Tek on transfers back to tape. The 4052/4054 Serial Option ROM added a new serial command CALL "CMFLAG" that according to a Teknique article adds handshake control - but until late yesterday I could not find ANY documentation on all the parameters. The only bitsavers documentation I have found is the original 4051 Option 1 Serial operators manual. Then yesterday I found a Tektronix 4114 Host Programming guide with one page outlining the 4114 CMFLAG parameters. I am hoping the 4052/4054 CMFLAG has the same parameters. Bottom line on using serial - I don't think this method will work for the Tek 4051, and I'm not confident I have got it fully working with my 4054A.
2 - One of Al's program tapes was labeled 4051 Graphics Demos and the first demo program was titled "PICTURE TAPE INDEX" with the following files:
120 PRINT "PICTURE TAPE INDEX"
130 PRINT "~J~~J~~J~1-------ALL PICTURES"
132 PRINT "1.2-----CONVERT Z,X,Y TO STRING DATA"
134 PRINT "1.4-----CONVERT PRINT @0: TO STRING"
136 PRINT "1.6-----FAST GRAPHICS TO PLOTTER"
140 PRINT "2-------INTRO TO FAST GRAPHICS"
150 PRINT "3-------TEK LOGO OLD"
160 PRINT "4-------GARGOYLE"
170 PRINT "5-------MICKEY MOUSE"
180 PRINT "6-------SNOOPY"
190 PRINT "7-------WIZARD"
200 PRINT "8-------R2-D2"
210 PRINT "9-------FLAKEY FUNT"
220 PRINT "10------R2 TALK"
I got excited as I am a huge R2-D2 Star Wars fan - and have built my own aluminum full-size remote controlled R2-D2.
Then the bad news - this tape is apparently an ancestor to Zetopans 4051 Fast Graphics ROM Pack, and the first program uses a 4051 CALL "EXEC" program to draw the vectors on the screen after the program FINDs a selected data file.
The program comments outline the structure of the fast graphics data as three ASCII characters per vector - with MOVE and DRAW as one bit of the first character and the 10-bits of X and 10-bits of Y across all three 7-bit ASCII characters.
I knew (from trying) that my 4054A would not run the CALL "EXEC" code (which jumps to 6800 assembly code and uses the 4051 ROM entry points and 4051 X&Y D/A converter I/O addresses - totally different than for the 4052 and even different for the larger X&Y 4054).
That didn't stop me from trying to transfer the ASCII data files from the tape and attempt to create BASIC PRINT statements to draw them.
Now I ran into a new issue with my serial transfer to the PC - the data is really packed 7-bit binary, and NOT intended to be accessed from a BASIC program, just accessed by the CALL "EXEC" assembly language program.
1 - INPUTing the data file from BASIC into a string variable: the string variable must be dimensioned as large as the entire data file, as the Tek is looking for a carriage return control character to terminate each string. And the Tek BASIC strips the trailing carriage return character and passes the remaining data to your program
2 - My original serial transfer program used software handshaking during the transfer - as XON/XOFF control characters are NOT found in Tek BASIC programs. That is not true for the Fast Graphics Data files
3 - Tektronix 4000 series graphics terminals already used a packed ASCII file format for host computers to send graphics data to the terminals, but the 19" terminals had more resolution so there are two different formats. Later, they added dot intensity and even later color values in these formats. This was 60's and 70's bleeding edge DVST graphics technology innovation before memory prices allowed true bitmap displays. For the 4050 series computers - displaying vector drawings from a program file can easily exceed the 16KB of memory in the original 4051.
Tekniques Vol 7 No 3 Tekniques_Vol_7_No_03.pdf page 5 outlines the huge performance advantage and memory space advantages of the R12 Graphics Enhancement ROM Pack available in a version for 4051 and a different pack for 4052 and 4054. This ROM Pack also added MUSIC commands to the computers!
I need one of these R12 ROM Packs for my 4052/4054
In the meantime I have downloaded and converted to a BASIC program (that runs on all 4051/4052/4054 computers and even the Tek 4051 Emulator) the SNOOPY picture. I added a PAGE command to clear the screen and the SNOOPY title. I also shortened the BASIC program by putting multiple draw commands on a single PRINT statement.
SNOOPY program file
Here is a screenshot of SNOOPY from the emulator:
SNOOPY screenshot from Tek 4051 emulator
and another screenshot from my 4054A:
SNOOPY on my 4054 upgraded to 4054A
I made two changes to my posted serial transfer program - change 190 to CALL "CMFLAG",4 and change 192 to 2400 baud.
I also stopped using PUTTY for the PC serial transfer program and have been experimenting and learning how to use RealTerm. I have even tried having RealTerm capture to a file without displaying, and also writing two HEX characters for every incoming byte. I also changed line 570 to E$=B$&M$ to add a carriage return to the incoming FAST GRAPHICs data file string to replace the one dropped by Tek BASIC.
I have not gotten any of the other graphics files transferred and converted yet - and I also found a set of 4014 graphics files posted by Jos Dreesen that I would like to try to convert to display on Tek 4050 computers - possibly changing the format to floating point ASCII data statements to read from tape. This technique would not work with the emulator until it supports programs accessing another file.
Monty
PS - I managed to mangle the R2-D2 file where I can't read it anymore. I have one transfer to the PC before that - but there is a lot of missing data and therefore lots of bad vectors
It will take some major surgery to try to recover this file. Does anyone have the R2-D2 file from the Tektronix 4014 demo?
Somehow - I failed to find the files I downloaded to my PC while making copies of the tapes in 2000
As I began to use my serial program on a laptop connected to my now operational and upgraded 4054A, I have re-encountered the issues with using RS-232 serial for program and data transfer, and have begun to learn how to deal with 40 year old data tape cartridges with disintegrated drive belts.
My serial transfer program uploaded to the Tektronix 4051 web emulator github site:
Tek405xEmulator
and my Tektronix 405x Program Files Archive site:
Tektronix-4051-4052-4054-Program-Files
is able to recover programs from a readable tape with an Option 1 Serial Interface on your working Tek 405x computer by substituting a printable character string ~X~ where X is the fundamental character typed for each of the control characters heavily used in Tektronix PLOT50 PRINT statements.
However - the emulator above uses a different scheme to form a control character as X<BS>_ where <BS> is the backspace control character. I have successfully manually edited some of my recovered programs with Notepad++ to change my control character scheme to the emulator scheme, but that is still a lot of manual effort that I haven't done for the programs I have recovered so far. Yes - a small program should be able to automatically accomplish that conversion - that I haven't written yet.
But I ran into two killer serial transfer program issues:
1 - Transfer from PC to Tek tape
2 - Transfer of "Fast Graphics" ASCII data files to the PC
1 - I was able to transfer Tek 4050 ASCII program files both to and from my PC in 2000 with my program with no serial hardware handshaking protocol, but the higher performance of my current PC now overruns the Tek on transfers back to tape. The 4052/4054 Serial Option ROM added a new serial command CALL "CMFLAG" that according to a Teknique article adds handshake control - but until late yesterday I could not find ANY documentation on all the parameters. The only bitsavers documentation I have found is the original 4051 Option 1 Serial operators manual. Then yesterday I found a Tektronix 4114 Host Programming guide with one page outlining the 4114 CMFLAG parameters. I am hoping the 4052/4054 CMFLAG has the same parameters. Bottom line on using serial - I don't think this method will work for the Tek 4051, and I'm not confident I have got it fully working with my 4054A.
2 - One of Al's program tapes was labeled 4051 Graphics Demos and the first demo program was titled "PICTURE TAPE INDEX" with the following files:
120 PRINT "PICTURE TAPE INDEX"
130 PRINT "~J~~J~~J~1-------ALL PICTURES"
132 PRINT "1.2-----CONVERT Z,X,Y TO STRING DATA"
134 PRINT "1.4-----CONVERT PRINT @0: TO STRING"
136 PRINT "1.6-----FAST GRAPHICS TO PLOTTER"
140 PRINT "2-------INTRO TO FAST GRAPHICS"
150 PRINT "3-------TEK LOGO OLD"
160 PRINT "4-------GARGOYLE"
170 PRINT "5-------MICKEY MOUSE"
180 PRINT "6-------SNOOPY"
190 PRINT "7-------WIZARD"
200 PRINT "8-------R2-D2"
210 PRINT "9-------FLAKEY FUNT"
220 PRINT "10------R2 TALK"
I got excited as I am a huge R2-D2 Star Wars fan - and have built my own aluminum full-size remote controlled R2-D2.
Then the bad news - this tape is apparently an ancestor to Zetopans 4051 Fast Graphics ROM Pack, and the first program uses a 4051 CALL "EXEC" program to draw the vectors on the screen after the program FINDs a selected data file.
The program comments outline the structure of the fast graphics data as three ASCII characters per vector - with MOVE and DRAW as one bit of the first character and the 10-bits of X and 10-bits of Y across all three 7-bit ASCII characters.
I knew (from trying) that my 4054A would not run the CALL "EXEC" code (which jumps to 6800 assembly code and uses the 4051 ROM entry points and 4051 X&Y D/A converter I/O addresses - totally different than for the 4052 and even different for the larger X&Y 4054).
That didn't stop me from trying to transfer the ASCII data files from the tape and attempt to create BASIC PRINT statements to draw them.
Now I ran into a new issue with my serial transfer to the PC - the data is really packed 7-bit binary, and NOT intended to be accessed from a BASIC program, just accessed by the CALL "EXEC" assembly language program.
1 - INPUTing the data file from BASIC into a string variable: the string variable must be dimensioned as large as the entire data file, as the Tek is looking for a carriage return control character to terminate each string. And the Tek BASIC strips the trailing carriage return character and passes the remaining data to your program
2 - My original serial transfer program used software handshaking during the transfer - as XON/XOFF control characters are NOT found in Tek BASIC programs. That is not true for the Fast Graphics Data files
3 - Tektronix 4000 series graphics terminals already used a packed ASCII file format for host computers to send graphics data to the terminals, but the 19" terminals had more resolution so there are two different formats. Later, they added dot intensity and even later color values in these formats. This was 60's and 70's bleeding edge DVST graphics technology innovation before memory prices allowed true bitmap displays. For the 4050 series computers - displaying vector drawings from a program file can easily exceed the 16KB of memory in the original 4051.
Tekniques Vol 7 No 3 Tekniques_Vol_7_No_03.pdf page 5 outlines the huge performance advantage and memory space advantages of the R12 Graphics Enhancement ROM Pack available in a version for 4051 and a different pack for 4052 and 4054. This ROM Pack also added MUSIC commands to the computers!
I need one of these R12 ROM Packs for my 4052/4054
In the meantime I have downloaded and converted to a BASIC program (that runs on all 4051/4052/4054 computers and even the Tek 4051 Emulator) the SNOOPY picture. I added a PAGE command to clear the screen and the SNOOPY title. I also shortened the BASIC program by putting multiple draw commands on a single PRINT statement.
SNOOPY program file
Here is a screenshot of SNOOPY from the emulator:
SNOOPY screenshot from Tek 4051 emulator
and another screenshot from my 4054A:
SNOOPY on my 4054 upgraded to 4054A
I made two changes to my posted serial transfer program - change 190 to CALL "CMFLAG",4 and change 192 to 2400 baud.
I also stopped using PUTTY for the PC serial transfer program and have been experimenting and learning how to use RealTerm. I have even tried having RealTerm capture to a file without displaying, and also writing two HEX characters for every incoming byte. I also changed line 570 to E$=B$&M$ to add a carriage return to the incoming FAST GRAPHICs data file string to replace the one dropped by Tek BASIC.
I have not gotten any of the other graphics files transferred and converted yet - and I also found a set of 4014 graphics files posted by Jos Dreesen that I would like to try to convert to display on Tek 4050 computers - possibly changing the format to floating point ASCII data statements to read from tape. This technique would not work with the emulator until it supports programs accessing another file.
Monty
PS - I managed to mangle the R2-D2 file where I can't read it anymore. I have one transfer to the PC before that - but there is a lot of missing data and therefore lots of bad vectors
Last edited: