• Please review our updated Terms and Rules here

Tektronix 4051 Tape Emulator

oldmicros

Member
Joined
Nov 13, 2015
Messages
30
Location
Missouri
I've read with interest the recent 4051 discussions here and have noticed that a tape emulator has been mentioned. I too have recently repaired a 4051 and since the tape drive is not functional, I am looking for alternatives. I thought it would be nice to just throw a bunch of images on an SD card and access via the GPIB. I was working on a similar project for the HP series 80 machines so already have a microcontroller wired to an SD card and HPIB drivers. I was planning to work on this over the holiday break when I have some spare time. Is anyone else actively pursuing this? Does this sound useful or is there a better way? I'd prefer not to have to connect to another computer to load programs.
Thanks,
Bill
 
First of all, welcome to VCFED.

Congratulations on restoring yet another 4051!

I think it may have been Monty who mentioned about the tape emulator?

It might be worth a www search for GPIB emulators before you make a start - as it is just possible that a unit for a Commodore PET either may work as-is or with a few modifications...

I think this would be useful. I could use it on my NASCOM for example...

Where are you based?

Dave
 
Dave,

Thanks. I was glad to get it up and running.

I used one 35 years ago while in college and always remembered what a cool machine it was.

I am in the US.

I'm not sure a general purpose emulator would work with the 4051.

I've looked at the documents for the 4924 external tape drive and it has a very particular command set.

The commands are identical to the internal tape drive commands - just directed at the GPIB via the @n: syntax.

I'm thinking it would make sense to emulate the 4924.

Bill
 
I've read with interest the recent 4051 discussions here and have noticed that a tape emulator has been mentioned. I too have recently repaired a 4051 and since the tape drive is not functional, I am looking for alternatives. I thought it would be nice to just throw a bunch of images on an SD card and access via the GPIB. I was working on a similar project for the HP series 80 machines so already have a microcontroller wired to an SD card and HPIB drivers. I was planning to work on this over the holiday break when I have some spare time. Is anyone else actively pursuing this? Does this sound useful or is there a better way? I'd prefer not to have to connect to another computer to load programs.
Thanks,
Bill

oldmicros,

I started a thread on a Tektronix 405x GPIB flash device:
http://www.vcfed.org/forum/showthread.php?64018-Tektronix-405x-GPIB-Flash-Drive&p=518793#post518793
and wired an Arduino NANO board to a GPIB cable and added a microSD flash card.

Arduino code that I found for GPIB was all as GPIB master - so they could connect to GPIB devices.

What we need is a GPIB device - and the 4051/4052/4054 BASIC instructions for GPIB work with primary and secondary address bytes to define the operation. Later GPIB equipment used text commands.

I did some research in Tektronix GPIB documentation I had and that posted on bitsavers, and began a document specifying primary and secondary addresses we needed to support.

Then I got sidetracked looking at how Tektronix supported the hierarchical file system in their floppy drive - imagining that we needed to support at least one level of directories so we can put the entire repository of files I have recovered from tapes and posted on my github repository for Tektronix 4050 programs:

https://github.com/mmcgraw74/Tektronix-4051-4052-4054-Program-Files

Right now - I'm trying to write an Arduino program to stabilize my Star Wars BB-8, so I can have it ready to drive at the Star Wars Celebration in Chicago next April, so I have not made any further progress on my GPIB flash drive project.

Monty
 
Dave,

Thanks. I was very happy when it was alive again! I used one back in college and always remembered how cool it was.

Monty,

Thanks for the link to your previous thread. Sounds like you were making good progress with this..

I have looked at the 4924 docs and my first thought was to emulate that. It doesn't look like tape image files exist so these would need to be created from the separate program files.

I wasn't aware that there was a GPIB floppy drive available. Your plan of emulating that may be a better way to go.

Think I'll connect my existing circuit just to see what the bus traffic looks like. It's already got a monitor function programmed in.

Thanks,
Bill
 
I have been making (slow) progress on the tape emulator.
I have implemented and tested FIND, MARK, OLD, SAVE, HEADER.

I am currently testing WRITE/READ functionality.
Does anyone know what the 'n' in the basic statement ON EOF(n) represents?
Looks like it's always 0 in the examples.
I am trying to generate a valid EOF with my emulator and so far haven't found the magic combination.
Would be nice to know that at least the 4051 is set up to correctly detect it.

Thanks!
 
I have been making (slow) progress on the tape emulator.
I have implemented and tested FIND, MARK, OLD, SAVE, HEADER.

I am currently testing WRITE/READ functionality.
Does anyone know what the 'n' in the basic statement ON EOF(n) represents?
Looks like it's always 0 in the examples.
I am trying to generate a valid EOF with my emulator and so far haven't found the magic combination.
Would be nice to know that at least the 4051 is set up to correctly detect it.

Thanks!

Here is what I found in the system reference:

EOF.jpg

Zero seems to only apply for the internal tape? Maybe you need the GPIB address for the 4924?

Monty
 
I've also read only values 0-9 are valid. So maybe GPIB address or some kind of logical assignment number.

In any case, I'm attempting to create a valid EOF at the end of binary data and so far haven't had any luck.
I have used the WRITE to create 3 string variables ("A1","B2","C3") on my emulated device.
The data written looks valid -
40
02
41
31
00*
40
02
42
32
00*
40
02
43
33
00*

*These extra bytes come from the 4051 (some kind of delimiter?)
They are read back in by the 4051 as part of each variable during a READ.

So I am trying to determine what to store as a valid EOF indicator after the 3rd variable.

I can perform 3 separate READ statements and see that the 4051 reads 5 bytes per variable and then UNTALKS/UNLISTENS after each one.
I display the 3 variables and they are correct.

Now when I READ a 4th variable I am attempting to generate an EOF.

I have tried the following at the end of the above data -
E0 00
E0 01
E0 02 (not sure what the length should be for EOF header)
E0 FF
FF

I can see the 4051 accepting 2 bytes when I send data starting with E0 but then it indicates an error 63 - error in binary data header.
When I send FF it only accepts that byte with the same error 63.

I have also tried sending EOI at various locations in the above data with no success.

Was wondering if anybody had any thoughts on what it could be looking for?

Thanks
 
The extra byte at the end of a string is identified as a "system byte" in the Tektronix documentation (i.e. we may never know what it is for).

I am 100% convinced the EOF character is $FF. There is no length for the header though, it is just a byte of $FF...

I will have a more in-depth look tomorrow as I am going out tonight...

Dave
 
Hmmm, very little documentation on the parameter to the EOF function!

As Monty mentioned above, try "ON EOF( <your GPIB ID> ) THEN XXX".

Dave
 
I have not had any success with generating an EOF. Tried all the above suggestions.

I am starting to think that ON EOF is only handled for the internal tape drive.

I started looking at the 4051 ROM listings and found the variable PNDEOF used in the REAHDR routine in the BINCTL section.

But looking through other listings, I can not find where it is set to anything other the 0x80 (internal mag tape EOF)

Maybe someone more familiar with the listings can verify?

By the way, does someone have a post linked version of the ROM listing. Or at least a memory map of where the different ROM sections lie?

Thanks.
 
Try using the TYP(n) function instead. That is what I have seen used in an example program to find the end of file marker. I tried to find the example program last night - but failed. I will have another look again today.

Dave
 
I have not had any success with generating an EOF. Tried all the above suggestions.

I am starting to think that ON EOF is only handled for the internal tape drive.

I started looking at the 4051 ROM listings and found the variable PNDEOF used in the REAHDR routine in the BINCTL section.

But looking through other listings, I can not find where it is set to anything other the 0x80 (internal mag tape EOF)

Maybe someone more familiar with the listings can verify?

By the way, does someone have a post linked version of the ROM listing. Or at least a memory map of where the different ROM sections lie?

Thanks.

oldmicros,

Here is an example program using TYP function to see what type of variable is next - or detect EOF

4050_TYP_example.jpg

I now think the BASIC EOF function only works with the internal tape and the value in parenthesis must therefore be zero (as the 4050 considers itself to be GPIB device 0).

I believe the 4924 creates an EOF TYP in a binary file when the 4050 closes that file.

Monty
 
I've read with interest the recent 4051 discussions here and have noticed that a tape emulator has been mentioned. I too have recently repaired a 4051 and since the tape drive is not functional, I am looking for alternatives. I thought it would be nice to just throw a bunch of images on an SD card and access via the GPIB. I was working on a similar project for the HP series 80 machines so already have a microcontroller wired to an SD card and HPIB drivers. I was planning to work on this over the holiday break when I have some spare time. Is anyone else actively pursuing this? Does this sound useful or is there a better way? I'd prefer not to have to connect to another computer to load programs.
Thanks,
Bill

When you say it's not functional do you mean it doesn't do anything at all, or doesn't read/write successfullly?
 
By not functional I mean unable to read/write. Motor movement seems OK in both directions.

How is the tension on the tape you are testing with? If the tension is too low - you can't read the tape.

If you pull open the spring loaded cover where the tape head contacts the tape and push in on the tape gently with your thumbnail (so you don't get finger oil on the tape) - the tape should deflect about halfway to the inside edge of the cartridge. If it deflects more than that - it is too loose.

Old cartridge drive belts are a typical problem - they loose tension or they are broken.

I've had success replacing the old drive belts with a belt from a DC6250 tape (they are much newer than the DC300/DC600 tapes).

Monty
 
I have not had any success with generating an EOF. Tried all the above suggestions.

I am starting to think that ON EOF is only handled for the internal tape drive.

I started looking at the 4051 ROM listings and found the variable PNDEOF used in the REAHDR routine in the BINCTL section.

But looking through other listings, I can not find where it is set to anything other the 0x80 (internal mag tape EOF)

Maybe someone more familiar with the listings can verify?

By the way, does someone have a post linked version of the ROM listing. Or at least a memory map of where the different ROM sections lie?

Thanks.

Actually I do have a memory map of the 4051 ROM entry points posted in the 4051 Assembler documentation on my Tektronix 405x program repository:

https://github.com/mmcgraw74/Tektronix-4051-4052-4054-Program-Files4051-Assembler/Tek 4051 Assembler Program Instructions Tekniques Vol 7 No4 062-7456-01.pdf
 
Last edited:
Back
Top