Author Topic: Tektronix 4924 Tape Drive Emulator  (Read 34780 times)

0 Members and 1 Guest are viewing this topic.

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #175 on: July 14, 2021, 08:21:44 am »
Fair enough and it is clearly evident that this is still not working right. The console output shows that we are getting to the end of the file and apparently not breaking out after the first INPUT command. However, I am struggling to see what else we are missing. I had a look over the manual again this morning hoping that a fresh pair of eyes might help.

Section 4 of the 070-2270-00_4051_GPIB_HW_Supp_Jul81.pdf manual describes in detail the processing of the INPUT command which in summary is as follows:

Initially the 4051 sets attention and the device responds by goint to attention and accepting the command from the Tek. The primary and then secondar address is sent using normal handshaking.

The device waits until ATN goes up and starts sending data. The manual again describes the normal handshaking process.

Apparently the Tek accepts data until "a CR delimiter is received, an alternate delimiter is received, or until 72 characters are received, whichever occurs first.". At this point the Tek stops the data transfer by holding NRFD low and processes the information. This takes between 4ms and 12ms. The Tek "searches the contents of the I/O buffer for valid numeric data which it then converts to floating point format and assigns to a variable in RAM. If a string is specified, it will read all the characters up to the delimiter into the string variable.

The Tek then resumes collecting more data up to a delimiter or 72 characters from the device and again stops and processes the buffer.

After all variables have been assigned, the Tek "terminates the operation by activating ATN and issuing an UNTALK/UNLISTEN sequence over GPIB".

So what I understood from this is that the ATN comes at the end of each INPUT command once all the provided variables have been read to stop transmission.

Of all the ASCII data files looked at so far, none have lines linger than 72 characters, so the Tek should read each line up to the CR, and then pause (for up to 12ms) and process that line. If all variables in the INPUT statement have been satisfied it should then issue ATN and stop transmission. If not, then it should proceed to read up to the next delimiter or until 72 characters have been reached and again process that line until such time that all variables have been read. It then issues ATN to stop transmission. If there is any more data to be read then the process is repeated in the next INPUT statement.

As you pointed out, the interpretation of the terminators is left up to the Tek so the emulator sends byte-by-byte and waits for the Tek to stop transmission once the INPUT statement has been satisfied.

I have pushed up an update. It doesn't really change anything much except that the close function is commented out and it adds a a couple of debug information bits. I would like to see the console output when we are reading one variable at a time.  I will let you know if I have any bright ideas in the meantime.

BTW, I have also been doing a bit of work on the binary format in READ, i.e. reading the binary header then reading x bytes according to the length specified in the header. Are there any files on the SD card that I can test with this? I have it working in principle in both actual binary and HEX format but would like to test it on real data files. Did you do any testing of the binary read?
« Last Edit: July 14, 2021, 08:48:59 am by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #176 on: July 14, 2021, 12:06:40 pm »
I will check out your v30 version and get back to you.

Yes, files 3 and 6 in the UTILITIES directory are both BINARY data files captured from tape.
However, my capture program is over serial, so my BASIC program to recover an entire tape converts each byte of a binary file into two ASCII HEX characters to ensure that the serial program does not interpret and strip control characters from the transfer.

My continuedDEV.ino READ_file and READ_one both have logic for BINARY files (PROGRAM or DATA) to convert each two ASCII HEX characters into a single binary byte.  I have been using Realterm successfully as the PC serial program at 115200 8n1 to display the ASCII and BINARY files over debug serial output.

I will try to capture a single numeric and single string variable GPIB transfer on my 4052 with my logic analyzer.

I have found this website HEX to binary converter useful in decoding one of my ASCII HEX files to binary to examine with HxD: https://tomeko.net/online_tools/hex_to_file.php?lang=en
« Last Edit: July 14, 2021, 12:08:58 pm by mmcgraw74 »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #177 on: July 14, 2021, 02:33:32 pm »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #178 on: July 14, 2021, 07:05:23 pm »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #179 on: July 14, 2021, 07:16:19 pm »
that was only the first half of the trace listing.

Here is the second half of the trace listing:

[code]
    500         8 ns   CE   1    0    1   1   1   0
    501         8 ns   CE   1    0    1   1   0   0
    502     21.38 us   CE   1    0    0   1   0   0
    503     32.94 us   CE   1    1    0   1   0   0
    504     89.16 us   CE   1    1    0   1   1   0
    505     3.312 us   FF   1    1    0   1   1   0
    506     29.66 us   FF   1    0    0   1   1   0
    507     59.69 us   FF   1    0    1   1   1   0
    508     32.77 us   CD   1    0    1   1   1   0
    509         8 ns   C9   1    0    1   1   1   0
    510         8 ns   DF   1    0    1   1   1   0
    511         8 ns   C9   1    0    1   1   1   0
    512     9.176 us   C9   1    0    1   1   0   0
    513         8 ns   C9   1    0    1   1   1   0
    514         8 ns   C9   1    0    1   1   0   0
    515     25.74 us   C9   1    0    0   1   0   0
    516     33.46 us   C9   1    1    0   1   0   0
    517     84.29 us   C9   1    1    0   1   1   0
    518     3.320 us   FF   1    1    0   1   1   0
    519     303.7 us   FF   1    0    0   1   1   0
    520     59.68 us   FF   1    0    1   1   1   0
    521     82.38 us   F1   1    0    1   1   1   0
    522         8 ns   F1   1    0    1   1   1   0
    523         8 ns   DD   1    0    1   1   1   0
    524         8 ns   D1   1    0    1   1   1   0
    525     9.176 us   D1   1    0    1   1   0   0
    526         8 ns   D1   1    0    1   1   1   0
    527         8 ns   D1   1    0    1   1   0   0
    528     33.22 us   D1   1    0    0   1   0   0
    529     32.93 us   D1   1    1    0   1   0   0
    530     77.34 us   D1   1    1    0   1   1   0
    531     3.320 us   FF   1    1    0   1   1   0
    532     14.26 us   FF   1    0    0   1   1   0
    533     59.68 us   FF   1    0    1   1   1   0
    534     48.17 us   DF   1    0    1   1   1   0
    535         8 ns   C9   1    0    1   1   1   0
    536         8 ns   DF   1    0    1   1   1   0
    537         8 ns   C9   1    0    1   1   1   0
    538     9.176 us   C9   1    0    1   1   0   0
    539         8 ns   C9   1    0    1   1   1   0
    540         8 ns   C9   1    0    1   1   0   0
    541     38.09 us   C9   1    0    0   1   0   0
    542     32.94 us   C9   1    1    0   1   0   0
    543     72.46 us   C9   1    1    0   1   1   0
    544     3.320 us   FF   1    1    0   1   1   0
    545     18.08 us   FF   1    0    0   1   1   0
    546     59.68 us   FF   1    0    1   1   1   0
    547     44.36 us   CA   1    0    1   1   1   0
    548         8 ns   FF   1    0    1   1   1   0
    549         8 ns   CE   1    0    1   1   1   0
    550         8 ns   CA   1    0    1   1   1   0
    551     9.168 us   CA   1    0    1   1   0   0
    552         8 ns   CA   1    0    1   1   0   0
    553         8 ns   CA   1    0    1   1   1   0
    554         8 ns   CA   1    0    1   1   0   0
    555     42.43 us   CA   1    0    0   1   0   0
    556     32.94 us   CA   1    1    0   1   0   0
    557     68.12 us   CA   1    1    0   1   1   0
    558     3.312 us   FB   1    1    0   1   1   0
    559         8 ns   FF   1    1    0   1   1   0
    560     22.42 us   FF   1    0    0   1   1   0
    561     59.69 us   FF   1    0    1   1   1   0
    562     40.01 us   DF   1    0    1   1   1   0
    563         8 ns   FF   1    0    1   1   1   0
    564         8 ns   DF   1    0    1   1   1   0
    565     9.184 us   DF   1    0    1   1   0   0
    566         8 ns   DF   1    0    1   1   1   0
    567         8 ns   DF   1    0    1   1   0   0
    568     19.55 us   DF   1    0    0   1   0   0
    569     32.42 us   DF   1    1    0   1   0   0
    570     97.78 us   DF   1    1    0   1   1   0
    571     3.320 us   FF   1    1    0   1   1   0
    572     21.04 us   FF   1    0    0   1   1   0
    573     59.68 us   FF   1    0    1   1   1   0
    574     41.39 us   DF   1    0    1   1   1   0
    575         8 ns   DF   1    0    1   1   1   0
    576         8 ns   FF   1    0    1   1   1   0
    577         8 ns   DF   1    0    1   1   1   0
    578     9.176 us   DF   1    0    1   1   0   0
    579         8 ns   DF   1    0    1   1   1   0
    580         8 ns   DF   1    0    1   1   0   0
    581     17.65 us   DF   1    0    0   1   0   0
    582     32.94 us   DF   1    1    0   1   0   0
    583     92.91 us   DF   1    1    0   1   1   0
    584     3.312 us   FF   1    1    0   1   1   0
    585     26.98 us   FF   1    0    0   1   1   0
    586     59.68 us   FF   1    0    1   1   1   0
    587     35.46 us   CE   1    0    1   1   1   0
    588         8 ns   EE   1    0    1   1   1   0
    589         8 ns   CE   1    0    1   1   1   0
    590     9.184 us   CE   1    0    1   1   0   0
    591         8 ns   CE   1    0    1   1   1   0
    592         8 ns   CE   1    0    1   1   0   0
    593     23.58 us   CE   1    0    0   1   0   0
    594     32.94 us   CE   1    1    0   1   0   0
    595     86.98 us   CE   1    1    0   1   1   0
    596     3.312 us   FF   1    1    0   1   1   0
    597     31.85 us   FF   1    0    0   1   1   0
    598     60.22 us   FF   1    0    1   1   1   0
    599     30.06 us   CF   1    0    1   1   1   0
    600         8 ns   CE   1    0    1   1   1   0
    601         8 ns   DF   1    0    1   1   1   0
    602         8 ns   CE   1    0    1   1   1   0
    603     9.176 us   CE   1    0    1   1   0   0
    604         8 ns   CE   1    0    1   1   1   0
    605         8 ns   CE   1    0    1   1   0   0
    606     28.98 us   CE   1    0    0   1   0   0
    607     32.94 us   CE   1    1    0   1   0   0
    608     81.57 us   CE   1    1    0   1   1   0
    609     3.320 us   FF   1    1    0   1   1   0
    610     37.25 us   FF   1    0    0   1   1   0
    611     59.68 us   FF   1    0    1   1   1   0
    612     31.38 us   CB   1    0    1   1   1   0
    613         8 ns   FB   1    0    1   1   1   0
    614         8 ns   CF   1    0    1   1   1   0
    615         8 ns   CB   1    0    1   1   1   0
    616     9.176 us   CB   1    0    1   1   0   0
    617         8 ns   CB   1    0    1   1   1   0
    618         8 ns   CB   1    0    1   1   0   0
    619     27.13 us   CB   1    0    0   1   0   0
    620     33.46 us   CB   1    1    0   1   0   0
    621     82.90 us   CB   1    1    0   1   1   0
    622     3.312 us   FB   1    1    0   1   1   0
    623         8 ns   FF   1    1    0   1   1   0
    624     35.92 us   FF   1    0    0   1   1   0
    625     59.69 us   FF   1    0    1   1   1   0
    626     26.50 us   FD   1    0    1   1   1   0
    627         8 ns   F1   1    0    1   1   1   0
    628         8 ns   DF   1    0    1   1   1   0
    629         8 ns   D1   1    0    1   1   1   0
    630     9.176 us   D1   1    0    1   1   0   0
    631         8 ns   D1   1    0    1   1   1   0
    632         8 ns   D1   1    0    1   1   0   0
    633     33.06 us   D1   1    0    0   1   0   0
    634     32.41 us   D1   1    1    0   1   0   0
    635     78.02 us   D1   1    1    0   1   1   0
    636     3.320 us   FF   1    1    0   1   1   0
    637     13.05 us   FF   1    0    0   1   1   0
    638     60.21 us   FF   1    0    1   1   1   0
    639     48.86 us   DF   1    0    1   1   1   0
    640         8 ns   FF   1    0    1   1   1   0
    641         8 ns   DF   1    0    1   1   1   0
    642     9.176 us   DF   1    0    1   1   0   0
    643         8 ns   DF   1    0    1   1   0   0
    644         8 ns   DF   1    0    1   1   1   0
    645         8 ns   DF   1    0    1   1   0   0
    646     38.46 us   DF   1    0    0   1   0   0
    647     32.94 us   DF   1    1    0   1   0   0
    648     72.09 us   DF   1    1    0   1   1   0
    649     3.312 us   FF   1    1    0   1   1   0
    650     19.51 us   FF   1    0    0   1   1   0
    651     59.68 us   FF   1    0    1   1   1   0
    652     42.93 us   DF   1    0    1   1   1   0
    653         8 ns   FF   1    0    1   1   1   0
    654         8 ns   DF   1    0    1   1   1   0
    655     9.184 us   DF   1    0    1   1   0   0
    656         8 ns   DF   1    0    1   1   1   0
    657         8 ns   DF   1    0    1   1   0   0
    658     43.34 us   DF   1    0    0   1   0   0
    659     32.93 us   DF   1    1    0   1   0   0
    660     73.48 us   DF   1    1    0   1   1   0
    661     3.320 us   FF   1    1    0   1   1   0
    662     17.06 us   FF   1    0    0   1   1   0
    663     59.68 us   FF   1    0    1   1   1   0
    664     45.37 us   DF   1    0    1   1   1   0
    665         8 ns   DF   1    0    1   1   1   0
    666         8 ns   FF   1    0    1   1   1   0
    667         8 ns   DF   1    0    1   1   1   0
    668     9.176 us   DF   1    0    1   1   0   0
    669         8 ns   DF   1    0    1   1   1   0
    670         8 ns   DF   1    0    1   1   0   0
    671     41.42 us   DF   1    0    0   1   0   0
    672     32.94 us   DF   1    1    0   1   0   0
    673     69.14 us   DF   1    1    0   1   1   0
    674     3.312 us   FF   1    1    0   1   1   0
    675     21.42 us   FF   1    0    0   1   1   0
    676     59.68 us   FF   1    0    1   1   1   0
    677     41.02 us   DF   1    0    1   1   1   0
    678         8 ns   FF   1    0    1   1   1   0
    679         8 ns   DF   1    0    1   1   1   0
    680     9.184 us   DF   1    0    1   1   0   0
    681         8 ns   DF   1    0    1   1   1   0
    682         8 ns   DF   1    0    1   1   0   0
    683     18.54 us   DF   1    0    0   1   0   0
    684     32.41 us   DF   1    1    0   1   0   0
    685     92.54 us   DF   1    1    0   1   1   0
    686     3.312 us   FF   1    1    0   1   1   0
    687     26.29 us   FF   1    0    0   1   1   0
    688     59.68 us   FF   1    0    1   1   1   0
    689     36.15 us   CE   1    0    1   1   1   0
    690         8 ns   CE   1    0    1   1   1   0
    691         8 ns   DF   1    0    1   1   1   0
    692         8 ns   CE   1    0    1   1   1   0
    693     9.176 us   CE   1    0    1   1   0   0
    694         8 ns   CE   1    0    1   1   1   0
    695         8 ns   CE   1    0    1   1   0   0
    696     22.89 us   CE   1    0    0   1   0   0
    697     32.94 us   CE   1    1    0   1   0   0
    698     87.66 us   CE   1    1    0   1   1   0
    699     3.320 us   FF   1    1    0   1   1   0
    700     32.22 us   FF   1    0    0   1   1   0
    701     59.68 us   FF   1    0    1   1   1   0
    702     30.22 us   C8   1    0    1   1   1   0
    703         8 ns   FF   1    0    1   1   1   0
    704         8 ns   C8   1    0    1   1   1   0
    705     9.176 us   C8   1    0    1   1   0   0
    706         8 ns   C8   1    0    1   1   1   0
    707         8 ns   C8   1    0    1   1   1   0
    708         8 ns   C8   1    0    1   1   0   0
    709     28.82 us   C8   1    0    0   1   0   0
    710     32.94 us   C8   1    1    0   1   0   0
    711     87.99 us   C8   1    1    0   1   1   0
    712     3.312 us   FF   1    1    0   1   1   0
    713        96 ns   FF   1    1    0   1   1   0
    714         8 ns   FF   1    1    0   1   1   0
    715     30.74 us   FF   1    0    0   1   1   0
    716     60.21 us   FF   1    0    1   1   1   0
    717     31.07 us   F1   1    0    1   1   1   0
    718         8 ns   F1   1    0    1   1   1   0
    719         8 ns   D5   1    0    1   1   1   0
    720         8 ns   D1   1    0    1   1   1   0
    721     9.176 us   D1   1    0    1   1   0   0
    722         8 ns   D1   1    0    1   1   1   0
    723         8 ns   D1   1    0    1   1   0   0
    724     27.97 us   D1   1    0    0   1   0   0
    725     32.94 us   D1   1    1    0   1   0   0
    726     82.58 us   D1   1    1    0   1   1   0
    727     3.312 us   F1   1    1    0   1   1   0
    728         8 ns   FF   1    1    0   1   1   0
    729     36.23 us   FF   1    0    0   1   1   0
    730     59.68 us   FF   1    0    1   1   1   0
    731     26.20 us   CF   1    0    1   1   1   0
    732         8 ns   C7   1    0    1   1   1   0
    733         8 ns   DF   1    0    1   1   1   0
    734         8 ns   C7   1    0    1   1   1   0
    735     9.176 us   C7   1    0    1   1   0   0
    736         8 ns   C7   1    0    1   1   1   0
    737         8 ns   C7   1    0    1   1   0   0
    738     32.31 us   C7   1    0    0   1   0   0
    739     33.46 us   C7   1    1    0   1   0   0
    740     77.71 us   C7   1    1    0   1   1   0
    741     3.320 us   FF   1    1    0   1   1   0
    742     13.36 us   FF   1    0    0   1   1   0
    743     59.15 us   FF   1    0    1   1   1   0
    744     49.61 us   CF   1    0    1   1   1   0
    745         8 ns   FF   1    0    1   1   1   0
    746         8 ns   CF   1    0    1   1   1   0
    747     9.176 us   CF   1    0    1   1   0   0
    748         8 ns   CF   1    0    1   1   0   0
    749         8 ns   CF   1    0    1   1   1   0
    750         8 ns   CF   1    0    1   1   0   0
    751     38.24 us   CF   1    0    0   1   0   0
    752     32.41 us   CF   1    1    0   1   0   0
    753     72.84 us   CF   1    1    0   1   1   0
    754     3.312 us   FF   1    1    0   1   1   0
    755     18.23 us   FF   1    0    0   1   1   0
    756     60.22 us   FF   1    0    1   1   1   0
    757     49.93 us   DF   1    0    1   1   1   0
    758         8 ns   FF   1    0    1   1   1   0
    759         8 ns   DF   1    0    1   1   1   0
    760     9.184 us   DF   1    0    1   1   0   0
    761         8 ns   DF   1    0    1   1   1   0
    762         8 ns   DF   1    0    1   1   0   0
    763     37.38 us   DF   1    0    0   1   0   0
    764     32.94 us   DF   1    1    0   1   0   0
    765     73.16 us   DF   1    1    0   1   1   0
    766     3.320 us   FF   1    1    0   1   1   0
    767     18.43 us   FF   1    0    0   1   1   0
    768     59.69 us   FF   1    0    1   1   1   0
    769     43.99 us   DF   1    0    1   1   1   0
    770     9.200 us   DF   1    0    1   1   0   0
    771         8 ns   DF   1    0    1   1   1   0
    772         8 ns   DF   1    0    1   1   0   0
    773     42.26 us   DF   1    0    0   1   0   0
    774     32.93 us   DF   1    1    0   1   0   0
    775     68.30 us   DF   1    1    0   1   1   0
    776     3.312 us   FF   1    1    0   1   1   0
    777     22.26 us   FF   1    0    0   1   1   0
    778     59.68 us   FF   1    0    1   1   1   0
    779     40.18 us   CE   1    0    1   1   1   0
    780         8 ns   FF   1    0    1   1   1   0
    781         8 ns   CE   1    0    1   1   1   0
    782     9.184 us   CE   1    0    1   1   0   0
    783         8 ns   CE   1    0    1   1   1   0
    784         8 ns   CE   1    0    1   1   0   0
    785     18.85 us   CE   1    0    0   1   0   0
    786     32.94 us   CE   1    1    0   1   0   0
    787     91.70 us   CE   1    1    0   1   1   0
    788     3.312 us   FF   1    1    0   1   1   0
    789     27.66 us   FF   1    0    0   1   1   0
    790     60.22 us   FF   1    0    1   1   1   0
    791     34.25 us   CE   1    0    1   1   1   0
    792         8 ns   CE   1    0    1   1   1   0
    793         8 ns   DE   1    0    1   1   1   0
    794         8 ns   CE   1    0    1   1   1   0
    795     9.176 us   CE   1    0    1   1   0   0
    796         8 ns   CE   1    0    1   1   1   0
    797         8 ns   CE   1    0    1   1   0   0
    798     24.78 us   CE   1    0    0   1   0   0
    799     32.42 us   CE   1    1    0   1   0   0
    800     92.54 us   CE   1    1    0   1   1   0
    801     3.320 us   FF   1    1    0   1   1   0
    802     25.74 us   FF   1    0    0   1   1   0
    803     59.15 us   FF   1    0    1   1   1   0
    804     37.22 us   DF   1    0    1   1   1   0
    805         8 ns   C7   1    0    1   1   1   0
    806         8 ns   FF   1    0    1   1   1   0
    807         8 ns   C7   1    0    1   1   1   0
    808     9.176 us   C7   1    0    1   1   0   0
    809         8 ns   C7   1    0    1   1   1   0
    810         8 ns   C7   1    0    1   1   1   0
    811         8 ns   C7   1    0    1   1   0   0
    812     21.81 us   C7   1    0    0   1   0   0
    813     32.94 us   C7   1    1    0   1   0   0
    814     88.74 us   C7   1    1    0   1   1   0
    815     3.312 us   FF   1    1    0   1   1   0
    816     298.2 us   FF   1    0    0   1   1   0
    817     59.68 us   FF   1    0    1   1   1   0
    818     81.64 us   F1   1    0    1   1   1   0
    819         8 ns   FF   1    0    1   1   1   0
    820         8 ns   D1   1    0    1   1   1   0
    821     9.176 us   D1   1    0    1   1   0   0
    822         8 ns   D1   1    0    1   1   1   0
    823         8 ns   D1   1    0    1   1   0   0
    824     33.44 us   D1   1    0    0   1   0   0
    825     32.94 us   D1   1    1    0   1   0   0
    826     77.11 us   D1   1    1    0   1   1   0
    827     3.320 us   FF   1    1    0   1   1   0
    828     14.49 us   FF   1    0    0   1   1   0
    829     59.68 us   FF   1    0    1   1   1   0
    830     47.95 us   DF   1    0    1   1   1   0
    831         8 ns   FF   1    0    1   1   1   0
    832         8 ns   DF   1    0    1   1   1   0
    833     15.44 us   DF   1    0    1   1   0   0
    834         8 ns   DF   1    0    1   1   1   0
    835         8 ns   DF   1    0    1   1   0   0
    836     33.64 us   DF   1    0    0   1   0   0
    837     33.46 us   DF   1    1    0   1   0   0
    838     76.38 us   DF   1    1    0   1   1   0
    839     3.312 us   FF   1    1    0   1   1   0
    840     14.70 us   FF   1    0    0   1   1   0
    841     59.15 us   FF   1    0    1   1   1   0
    842     48.27 us   DF   1    0    1   1   1   0
    843     9.200 us   DF   1    0    1   1   0   0
    844         8 ns   DF   1    0    1   1   1   0
    845         8 ns   DF   1    0    1   1   0   0
    846     39.58 us   DF   1    0    0   1   0   0
    847     32.94 us   DF   1    1    0   1   0   0
    848     70.98 us   DF   1    1    0   1   1   0
    849     3.320 us   FF   1    1    0   1   1   0
    850     19.56 us   FF   1    0    0   1   1   0
    851     60.22 us   FF   1    0    1   1   1   0
    852     42.34 us   DF   1    0    1   1   1   0
    853         8 ns   FF   1    0    1   1   1   0
    854         8 ns   DF   1    0    1   1   1   0
    855     9.176 us   DF   1    0    1   1   0   0
    856         8 ns   DF   1    0    1   1   0   0
    857         8 ns   DF   1    0    1   1   1   0
    858         8 ns   DF   1    0    1   1   0   0
    859     16.16 us   DF   1    0    0   1   0   0
    860     32.93 us   DF   1    1    0   1   0   0
    861     94.40 us   DF   1    1    0   1   1   0
    862     3.312 us   FF   1    1    0   1   1   0
    863     24.97 us   FF   1    0    0   1   1   0
    864     59.68 us   FF   1    0    1   1   1   0
    865     36.85 us   BF   1    0    1   1   1   0
    866         8 ns   FF   1    0    1   1   1   0
    867         8 ns   BF   1    0    1   1   1   0
    868       608 ns   BA   1    0    1   1   1   0
    869         8 ns   BA   1    0    1   1   1   0
    870         8 ns   BE   1    0    1   1   1   0
    871         8 ns   BA   1    0    1   1   1   0
    872     9.176 us   BA   1    0    1   1   0   0
    873         8 ns   BA   1    0    1   1   1   0
    874         8 ns   BA   1    0    1   1   0   0
    875     21.03 us   BA   1    0    0   1   0   0
    876     32.94 us   BA   1    1    0   1   0   0
    877     89.51 us   BA   1    1    0   1   1   0
    878     2.688 us   FA   1    1    0   1   1   0
    879       632 ns   FF   1    1    0   1   1   0
    880     29.30 us   FF   1    0    0   1   1   0
    881     59.68 us   FF   1    0    1   1   1   0
    882     39.38 us   DF   1    0    1   1   1   0
    883         8 ns   CE   1    0    1   1   1   0
    884         8 ns   FF   1    0    1   1   1   0
    885         8 ns   CE   1    0    1   1   1   0
    886     9.176 us   CE   1    0    1   1   0   0
    887         8 ns   CE   1    0    1   1   1   0
    888         8 ns   CE   1    0    1   1   0   0
    889     19.13 us   CE   1    0    0   1   0   0
    890     33.47 us   CE   1    1    0   1   0   0
    891     90.90 us   CE   1    1    0   1   1   0
    892     3.312 us   FF   1    1    0   1   1   0
    893     27.93 us   FF   1    0    0   1   1   0
    894     59.68 us   FF   1    0    1   1   1   0
    895     34.51 us   C6   1    0    1   1   1   0
    896         8 ns   F7   1    0    1   1   1   0
    897         8 ns   C6   1    0    1   1   1   0
    898     9.184 us   C6   1    0    1   1   0   0
    899         8 ns   C6   1    0    1   1   1   0
    900         8 ns   C6   1    0    1   1   0   0
    901     25.06 us   C6   1    0    0   1   0   0
    902     32.41 us   C6   1    1    0   1   0   0
    903     86.02 us   C6   1    1    0   1   1   0
    904     3.312 us   F7   1    1    0   1   1   0
    905         8 ns   FF   1    1    0   1   1   0
    906     32.79 us   FF   1    0    0   1   1   0
    907     59.68 us   FF   1    0    1   1   1   0
    908     29.64 us   F9   1    0    1   1   1   0
    909         8 ns   F1   1    0    1   1   1   0
    910         8 ns   DF   1    0    1   1   1   0
    911         8 ns   D1   1    0    1   1   1   0
    912     9.176 us   D1   1    0    1   1   0   0
    913         8 ns   D1   1    0    1   1   1   0
    914         8 ns   D1   1    0    1   1   0   0
    915     29.40 us   D1   1    0    0   1   0   0
    916     32.41 us   D1   1    1    0   1   0   0
    917     81.68 us   D1   1    1    0   1   1   0
    918     3.320 us   FF   1    1    0   1   1   0
    919     37.67 us   FF   1    0    0   1   1   0
    920     59.68 us   FF   1    0    1   1   1   0
    921     24.77 us   CB   1    0    1   1   1   0
    922         8 ns   FF   1    0    1   1   1   0
    923         8 ns   CB   1    0    1   1   1   0
    924     9.176 us   CB   1    0    1   1   0   0
    925         8 ns   CB   1    0    1   1   1   0
    926         8 ns   CB   1    0    1   1   1   0
    927         8 ns   CB   1    0    1   1   0   0
    928     34.27 us   CB   1    0    0   1   0   0
    929     32.94 us   CB   1    1    0   1   0   0
    930     82.54 us   CB   1    1    0   1   1   0
    931     3.312 us   FF   1    1    0   1   1   0
    932     37.35 us   FF   1    0    0   1   1   0
    933     59.68 us   FF   1    0    1   1   1   0
    934     25.09 us   CF   1    0    1   1   1   0
    935     9.200 us   CF   1    0    1   1   0   0
    936         8 ns   CF   1    0    1   1   1   0
    937         8 ns   CF   1    0    1   1   0   0
    938     33.94 us   CF   1    0    0   1   0   0
    939     32.42 us   CF   1    1    0   1   0   0
    940     77.13 us   CF   1    1    0   1   1   0
    941     3.312 us   EF   1    1    0   1   1   0
    942         8 ns   FF   1    1    0   1   1   0
    943     13.94 us   FF   1    0    0   1   1   0
    944     59.68 us   FF   1    0    1   1   1   0
    945     48.50 us   F2   1    0    1   1   1   0
    946         8 ns   FF   1    0    1   1   1   0
    947         8 ns   F2   1    0    1   1   1   0
    948     9.176 us   F2   1    0    1   1   0   0
    949         8 ns   F2   1    0    1   1   1   0
    950         8 ns   F2   1    0    1   1   0   0
    951     38.82 us   F2   1    0    0   1   0   0
    952     33.47 us   F2   1    1    0   1   0   0
    953     71.19 us   F2   1    1    0   1   1   0
    954     3.320 us   FF   1    1    0   1   1   0
    955     19.87 us   FF   1    0    0   1   1   0
    956     2.992 ms   FF   0    0    0   1   1   0
    957     27.75 us   FF   0    1    1   1   1   0
    958         8 ns   FF   1    0    0   1   1   0
    959         8 ns   FF   0    0    0   1   1   0
    960         8 ns   F3   0    0    0   1   1   0
    961         8 ns   FF   0    0    0   1   1   0
    962         8 ns   93   0    0    0   1   1   0
    963         8 ns   92   0    0    0   1   1   0
    964       112 ns   92   0    1    1   1   1   0
    965        40 ns   93   0    1    1   1   1   0
    966         8 ns   93   0    1    1   1   1   0
    967         8 ns   92   0    1    1   1   1   0
    968        64 ns   92   0    0    1   1   1   0
    969        40 ns   92   0    1    1   1   1   0
    970     71.73 us   92   0    1    1   1   0   0
    971         8 ns   92   0    1    1   1   1   0
    972         8 ns   92   0    1    1   1   0   0
    973     48.43 us   DF   0    0    0   1   0   0
    974     26.90 us   DF   1    0    0   1   0   0
    975     1.165 ms   DF   1    0    1   1   0   0
    976         8 ns   DF   1    0    1   1   0   0
    977         8 ns   DF   1    0    1   1   0   0
    978         8 ns   DF   1    1    1   1   0   0
    979     77.57 us   DF   1    1    1   1   1   0
    980     3.320 us   FF   1    1    1   1   1   0
    981     3.300  s   FF   1    1    1   1   1   0
    982     32.33 ms   FF   1    0    0   1   1   0
    983     599.6 us   FF   1    0    1   1   1   0
    984         8 ns   FF   1    0    1   1   1   0
    985         8 ns   FF   1    0    1   1   1   0
    986         8 ns   FF   1    1    1   1   1   0
    987     108.7 us   BF   1    1    1   1   1   0
    988         8 ns   FF   1    1    1   1   1   0
    989         8 ns   BF   1    1    1   1   1   0
    990       608 ns   AD   1    1    1   1   1   0
    991         8 ns   BD   1    1    1   1   1   0
    992         8 ns   AD   1    1    1   1   1   0
    993     9.184 us   AD   1    1    1   1   0   0
    994         8 ns   AD   1    1    1   1   1   0
    995         8 ns   AD   1    1    1   1   0   0
    996     1.011  s   AD   1    1    1   1   0   0
    997     33.33 ms   AD   1    0    0   1   0   0
    998     598.6 us   AD   1    0    1   1   0   0
    999         8 ns   AD   1    0    1   1   0   0
   1000         8 ns   AD   1    1    1   1   0   0
   1001     104.3 us   AD   1    1    1   1   1   0
   1002     2.688 us   ED   1    1    1   1   1   0
   1003       624 ns   FF   1    1    1   1   1   0
   1004     617.4 ms   FF   1    1    1   1   1   0
   1005     32.41 ms   FF   1    0    0   1   1   0
   1006     597.5 us   FF   1    0    1   1   1   0
   1007         8 ns   FF   1    0    1   1   1   0
   1008         8 ns   FF   1    0    1   1   1   0
   1009         8 ns   FF   1    1    1   1   1   0
   1010     55.33 us   F2   1    1    1   1   1   0
   1011         8 ns   FF   1    1    1   1   1   0
   1012         8 ns   D2   1    1    1   1   1   0
   1013     9.176 us   D2   1    1    1   1   0   0
   1014         8 ns   D2   1    1    1   1   1   0
   1015         8 ns   D2   1    1    1   1   0   0
   1016     631.6 ms   D2   1    1    1   1   0   0
   1017     33.93 ms   D2   1    0    0   1   0   0
   1018     599.1 us   D2   1    0    1   1   0   0
   1019         8 ns   D2   1    0    1   1 
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #180 on: July 14, 2021, 07:19:11 pm »
good grief - it still didn't get all the trace.

Here is the end of the trace (hopefully)

Code: [Select]
   1019         8 ns   D2   1    0    1   1   0   0
   1020         8 ns   D2   1    0    1   1   0   0
   1021         8 ns   D2   1    0    1   1   0   0
   1022         8 ns   D2   1    1    1   1   0   0
   1023     36.31 us   D2   1    1    1   1   1   0
   1024     3.312 us   FF   1    1    1   1   1   0
   1025     662.5 ms   FF   1    1    1   1   1   0
   1026     31.47 ms   FF   1    0    0   1   1   0
   1027     599.6 us   FF   1    0    1   1   1   0
   1028         8 ns   FF   1    0    1   1   1   0
   1029         8 ns   FF   1    0    1   1   1   0
   1030         8 ns   FF   1    1    1   1   1   0
   1031     67.88 us   CE   1    1    1   1   1   0
   1032         8 ns   CE   1    1    1   1   1   0
   1033         8 ns   DE   1    1    1   1   1   0
   1034         8 ns   CE   1    1    1   1   1   0
   1035     9.176 us   CE   1    1    1   1   0   0
   1036         8 ns   CE   1    1    1   1   1   0
   1037         8 ns   CE   1    1    1   1   0   0
   1038     912.2 ms   CE   1    1    1   1   0   0
   1039     35.54 ms   CE   1    0    0   1   0   0
   1040     869.8 us   CE   1    0    1   1   0   0
   1041         8 ns   CE   1    0    1   1   0   0
   1042         8 ns   CE   1    1    1   1   0   0
   1043     50.68 us   CE   1    1    1   1   1   0
   1044     3.312 us   FF   1    1    1   1   1   0
   1045     23.98  s   FF   1    1    1   1   1   0
   1046     19.00 ms   FF   0    1    1   1   1   0
   1047     27.76 us   DF   1    1    1   1   1   1
   1048         8 ns   FF   0    1    1   1   1   0
   1049         8 ns   FF   0    1    1   1   1   0
   1050         8 ns   F7   0    1    1   1   1   0
   1051         8 ns   FB   0    1    1   1   1   0
   1052         8 ns   92   0    1    1   1   1   0
   1053     124.7 us   FF   0    0    0   1   1   0
   1054     34.31 us   FF   1    0    0   1   1   0
   1055     156.9 us   FF   0    0    0   1   1   0
   1056     28.28 us   FF   0    1    1   1   1   0
   1057         8 ns   FF   1    0    0   1   1   0
   1058         8 ns   FF   0    0    0   1   1   0
   1059         8 ns   F3   0    0    0   1   1   0
   1060         8 ns   F7   0    0    0   1   1   0
   1061         8 ns   92   0    0    0   1   1   0
   1062       120 ns   92   0    0    1   1   1   0
   1063         8 ns   92   0    1    1   1   1   0
   1064       136 ns   92   0    0    1   1   1   0
   1065         8 ns   92   0    0    1   1   1   0
   1066         8 ns   92   0    1    1   1   1   0
   1067     60.49 us   82   0    1    1   1   1   0
   1068     9.200 us   82   0    1    1   1   0   0
   1069         8 ns   82   0    1    1   1   1   0
   1070         8 ns   82   0    1    1   1   0   0
   1071     49.94 us   CF   0    0    0   1   0   0
   1072     27.43 us   CF   1    0    0   1   0   0
   1073     123.3 ms   CF   1    0    1   1   0   0
   1074         8 ns   CF   1    0    1   1   0   0
   1075         8 ns   CF   1    0    1   1   0   0
   1076         8 ns   CF   1    1    1   1   0   0
   1077     63.82 us   CF   1    1    1   1   1   0
   1078     3.320 us   FF   1    1    1   1   1   0

Time Printed: 14 Jul 2021 09:29:31

Hopefully here is the complete trace zip file:

* INP5_6V.zip (6.46 kB - downloaded 29 times.)
« Last Edit: July 14, 2021, 07:21:48 pm by mmcgraw74 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #181 on: July 14, 2021, 08:15:10 pm »
Thank you for the detailed posts!

From the first post I see that the graphic shows the first 74 bytes read up to E19.40[CR] then a slight pause then an ATN and the byte 01101101 or hex 6D which is the MSA for INPUT. That is in line with the expected behaviour of the Tek but not quite as described. I was expecting a UNT first and then a new cycle of MTA, MSA, data, UNT. The Realterm screenshot shows that the next 74 characters are being read up to -5 when the process evidently hangs. I am not seeing an 'ATN asserted!' after the E19.40[CR] though.

On the graphic, the ATN comes after the handshake on the CR character is complete and the emulator starts handshaking the next character. There is a slightly elongated NDAC bump at this point and then both NDAC and NRFD stay low which means that the Tek is not ready to receive and we have a short pause. The Tek is likely processing the first 74 characters that have been received. Then comes ATN and 6D, however the emulator has already started the next handshake at this point and is not actively listening to the ATN. It is still sitting waiting for NRFD to go high. ATN and NRFD do eventually go high and the Tek has places the 6D on the bus and waits for an acknowledgement of the ATN and MSA command which does not come. Meanwhile the emulator being in send mode continues its attempt to send more data (i.e. the emulator send loop continues) until the process hangs.

I think the emulator needs to check for ATN being asserted during the handshake, probably at the point where the emulator is waiting for NRFD to go high to indicate that the receiver is ready. If it gets an ATN at this point, it needs to immediately drop out of the handshake and go into listening mode.

The other problem is that the MSA apears to be being sent on ATN without preceding UNT to finish the last transmission and or MTA + MSA to start the new INPUT command. There is an issue with that at present, in that the emulator does not remember whether it is in talk or listen mode between successive assertions of the ATN signal. It relies on MTA/MLA being sent followed by MSA to determine that.

I will need to have a think about how to deal with this.

I will also review your further post with the logic analyzer output tomorrow morning.
« Last Edit: July 14, 2021, 08:37:39 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #182 on: July 14, 2021, 08:39:52 pm »
Sounds like progress!

I will make another attempt to get my 4924 tape drive working again.  It should give a definitive trace, but I'll have to create a tape with the same data file.
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #183 on: July 14, 2021, 10:28:32 pm »
The 4924 5V power supply NPN transistor is bad.  I've ordered a NOS cross reference, but won't get it for a week or so :(
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #184 on: July 15, 2021, 11:15:31 am »
The 4924 5V power supply NPN transistor is bad.  I've ordered a NOS cross reference, but won't get it for a week or so :(

I hope you don't have a leaky electrolytic capacitor or something causing an excessive current draw. At least the transistor is a relatively simple fix.

I have had a go at implementing possible fixes for the two things I mentioned in my previous post and have uploaded the updated code. Since I don't own a Tek computer, I am unfortunately limited in how far I can test this.
« Last Edit: July 15, 2021, 12:21:02 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #185 on: July 15, 2021, 01:24:02 pm »
I just tried your v31 on my 4054A and 4052.

the OLD function is not working, but INPUT, CD, FIND are working.
INPUT does take a long time for first command (Send Error reported in debug log), then works for subsequent INPUT.

So I did a FIND@5:2 which opened /root/2

Then:

Code: [Select]
INPUT@5:A$      It took some a couple of seconds to return to BASIC prompt(maybe a timeout?)
A$                     Returned /root/
INPUT@5:A$      Returned to prompt quicker
A$                     Returned /Games/
INPUT@5:A$      Returned to prompt quicker
A$                     Returned /UTILITIES/
PRI@5,19:"ADVENTURE"
FIND@5:51        file 51 is ADVENTURE program
OLD@5:             Hung Tektronix

Serial debug output for this experiment:



So this is progress for INPUT.

Apparently CD works, but OLD Hangs Tektronix power cycle of Tek and Emulator required

4052 2nd test of CD and OLD:

Power up Tek, connect Emulator

FIND@5:1
OLD@5:

Tek hung had to be power cycled.

Here is the serial debug output for this experiment:


« Last Edit: July 15, 2021, 01:26:50 pm by mmcgraw74 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #186 on: July 15, 2021, 02:18:39 pm »
Ok, so some progress on the INPUT issue at last  :)

The 'Send error' can be ignored. It indicates that either ATN was detected or both NDAC and NRFD were high indicating a fault condition. Either should cause the send loop to abort which is what we are now seeing. The writeByte() function was not originally written to anticipate the controller interrupting the send process as this situation never came up before. I could change change it to send a specific error code for each condition so as to be able to differentiate them. For now I will change the debug message to say something like 'ATN or ERR on send'.

Not sure why the delay before the first INPUT command, but I have also noticed a couple of seconds a delay here with my setup before any any file data is output. The GPIB command comes through on the emulator console almost immediately. It might be a delay reading the SD Card or it may be something else such as timeouts. I have GPIB timeout set at 5 secs but the length of delay in this case is about 2.5 seconds which seems to be comparable to what you have reported. I will look into it.

Regarding OLD, any chance of a snapshot of the trace? I need to see the transition between the two commands (FIND and OLD) if possible. FIND is a listen command, whereas old is a TALK command. I am interested in whether the Tek is sending a UNL at then end of FIND, or at least an MTA before the MSA for OLD. Thanks.
« Last Edit: July 15, 2021, 02:42:42 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #187 on: July 15, 2021, 03:02:55 pm »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #188 on: July 15, 2021, 05:18:23 pm »
Thank you although a decoding of the hex characters doesn't seem to make much sense. There are UNT and UNL characters evident but also a 7F (127). There seem to be NULL and other random characters being sent while ATN is asserted which doesn't make sense. Anything send during ATN should be a a primary or secondary address, or a GPIB command character.

The randomness of the characters is such that I would begin to wonder whether there is a problem with the mechanical connection or something nearby inducing EMF into the wires...

HPIB STATE  -  State Listing                                                   

                                                                     
Code: [Select]
Label    >   Time     STAT    DATA ATN NDAC NFRD EOI DAV SRQ
Base     > Relative   Binary  Hex  Bin Bina Bina Bin Bin Bin
__________ _________ ________ ____ ___ ____ ____ ___ ___ ___

      0     37.52 us 10010100   25 0    0    1   1   0   0 MLA
      1     65.79 us 10000100   25 0    0    0   1   0   0
      2     11.45 us 10001100   25 0    1    0   1   0   0
      3     18.10 us 10101100   25 0    1    0   1   1   0
      4     31.74 us 10101100   7D 0    1    0   1   1   0 SECRET?
      5         8 ns 11101101   7F 1    1    0   1   1   0 ?
      6         8 ns 10101100   7F 0    1    0   1   1   0 ?
      7       336 ns 10101100   7B 0    1    0   1   1   0 FIND
      8     83.62 us 10100100   7B 0    0    0   1   1   0
      9         8 ns 10101100   7B 0    1    0   1   1   0
     10         8 ns 10100100   7B 0    0    0   1   1   0
     11     25.38 us 10110100   7B 0    0    1   1   1   0
     12     42.34 us 10010100   7B 0    0    1   1   0   0
     13     96.24 us 10000100   7B 0    0    0   1   0   0
     14     11.44 us 10001100   7B 0    1    0   1   0   0
     15     15.93 us 10101100   7B 0    1    0   1   1   0
     16     19.30 us 10101101   7B 1    1    0   1   1   0 DATA
     17     37.15 us 10101101   78 1    1    0   1   1   0
     18         8 ns 10101101   60 1    1    0   1   1   0 `
     19        24 ns 10101101   20 1    1    0   1   1   0 SPC
     20     61.41 us 10100101   20 1    0    0   1   1   0
     21         8 ns 10101101   20 1    1    0   1   1   0
     22         8 ns 10100101   20 1    0    0   1   1   0
     23     1.311 ms 10110101   20 1    0    1   1   1   0
     24     15.68 us 10010101   20 1    0    1   1   0   0
     25     129.4 us 10000101   20 1    0    0   1   0   0
     26     11.45 us 10001101   20 1    1    0   1   0   0
     27     38.81 us 10101101   20 1    1    0   1   1   0
     28     41.80 us 10101101   31 1    1    0   1   1   0 1
     29     64.15 us 10100101   31 1    0    0   1   1   0
     30         8 ns 10101101   31 1    1    0   1   1   0
     31         8 ns 10100101   31 1    0    0   1   1   0
     32     37.77 us 10110101   31 1    0    1   1   1   0
     33     20.42 us 10010101   31 1    0    1   1   0   0
     34     124.7 us 10000101   31 1    0    0   1   0   0
     35     11.44 us 10001101   31 1    1    0   1   0   0
     36     15.79 us 10101101   31 1    1    0   1   1   0
     37     32.86 us 00101101   31 1    1    0   0   1   0
     38     27.70 us 00101101   3D 1    1    0   0   1   0 =
     39       160 ns 00101101   1D 1    1    0   0   1   0 (group separator)
     40         8 ns 00101101   1D 1    1    0   0   1   0
     41         8 ns 00101101   0D 1    1    0   0   1   0 CR
     42     68.24 us 00100101   0D 1    0    0   0   1   0
     43         8 ns 00101101   0D 1    1    0   0   1   0
     44         8 ns 00100101   0D 1    0    0   0   1   0
     45     37.76 us 00110101   0D 1    0    1   0   1   0
     46     43.93 us 00010101   0D 1    0    1   0   0   0
     47     101.2 us 00000101   0D 1    0    0   0   0   0
     48     11.45 us 00001101   0D 1    1    0   0   0   0
     49     39.82 us 00101101   0D 1    1    0   0   1   0
     50     21.98 us 10101101   0D 1    1    0   1   1   0
     51     56.33 us 10101100   0D 0    1    0   1   1   0 ?
     52     32.90 us 10100100   0D 0    0    0   1   1   0
     53         8 ns 10101100   0D 0    1    0   1   1   0
     54         8 ns 10100100   0D 0    0    0   1   1   0
     55     53.48 us 10100100   5F 0    0    0   1   1   0 UNT
     56     27.04 ms 10110100   5F 0    0    1   1   1   0
     57        24 ns 10111100   5F 0    1    1   1   1   0
     58     42.91 us 10011100   5F 0    1    1   1   0   0
     59     17.82 us 10000100   5F 0    0    0   1   0   0
     60         8 ns 10001100   5F 0    1    0   1   0   0
     61         8 ns 10000100   5F 0    0    0   1   0   0
     62     23.31 us 10010100   5F 0    0    1   1   0   0
     63     35.98 us 10000100   5F 0    0    0   1   0   0
     64     11.45 us 10001100   5F 0    1    0   1   0   0
     65     34.52 us 10101100   5F 0    1    0   1   1   0
     66     27.51 us 10101100   7F 0    1    0   1   1   0
     67       232 ns 10101100   3F 0    1    0   1   1   0 UNL
     68     87.06 us 10100100   3F 0    0    0   1   1   0
     69         8 ns 10101100   3F 0    1    0   1   1   0
     70         8 ns 10100100   3F 0    0    0   1   1   0
     71     26.14 us 10110100   3F 0    0    1   1   1   0
     72     38.26 us 10010100   3F 0    0    1   1   0   0
     73     115.8 us 10000100   3F 0    0    0   1   0   0
     74     11.45 us 10001100   3F 0    1    0   1   0   0
     75     23.56 us 10101100   3F 0    1    0   1   1   0
     76     35.50 us 10100100   3F 0    0    0   1   1   0
     77       112 ns 10100100   39 0    0    0   1   1   0 ?
     78         8 ns 10100100   38 0    0    0   1   1   0 ?
     79         8 ns 10100100   00 0    0    0   1   1   0 ?
     80     27.30 us 10100101   00 1    0    0   1   1   0 DATA
     81     837.4 us 10110101   00 1    0    1   1   1   0
     82         8 ns 10110101   00 1    0    1   1   1   0
     83         8 ns 11111101   00 1    1    1   1   1   0
     84     4.477  s 10111101   00 1    1    1   1   1   0
     85     18.28 ms 10111100   00 0    1    1   1   1   0 ?
     86     25.98 us 10110100   00 0    0    1   1   1   0
     87         8 ns 10100100   00 0    0    0   1   1   0
     88         8 ns 10101100   00 0    1    0   1   1   0
     89         8 ns 10100100   00 0    0    0   1   1   0
     90     2.808 us 11100100   3F 0    0    0   1   1   0 UNL
     91         8 ns 11111101   3F 1    1    1   1   1   0
     92         8 ns 10100100   3F 0    0    0   1   1   0
     93        64 ns 10100100   7F 0    0    0   1   1   0 ?
     94         8 ns 10100100   3F 0    0    0   1   1   0 UNL
     95     20.42 us 10110100   3F 0    0    1   1   1   0
     96     36.64 us 10110100   39 0    0    1   1   1   0 ?
     97         8 ns 10110100   38 0    0    1   1   1   0 ?
     98         8 ns 10110100   30 0    0    1   1   1   0 ?
     99         8 ns 10110100   20 0    0    1   1   1   0 ?
    100     38.46 us 10010100   20 0    0    1   1   0   0
    101     63.45 us 10000100   20 0    0    0   1   0   0
    102     11.45 us 10001100   20 0    1    0   1   0   0
    103     19.38 us 10101100   20 0    1    0   1   1   0
    104     23.01 us 10101101   20 1    1    0   1   1   0 DATA
    105     27.54 us 00101101   20 1    1    0   0   1   0
    106     28.23 us 00101101   66 1    1    0   0   1   0 f
    107       192 ns 00101101   46 1    1    0   0   1   0 F
    108     35.46 us 00100101   46 1    0    0   0   1   0
    109         8 ns 00101101   46 1    1    0   0   1   0
    110         8 ns 00100101   46 1    0    0   0   1   0
    111     23.94 us 00110101   46 1    0    1   0   1   0
    112        24 ns 00111101   46 1    1    1   0   1   0
    113     34.98 us 00011101   46 1    1    1   0   0   0
    114     38.77 us 00111101   46 1    1    1   0   1   0
    115     21.96 us 10111101   46 1    1    1   1   1   0
    116     69.57 us 10111100   46 0    1    1   1   1   0 ? (F)
    117     35.77 us 10100100   46 0    0    0   1   1   0
    118         8 ns 10111100   46 0    1    1   1   1   0
    119         8 ns 10100100   46 0    0    0   1   1   0
    120     23.31 us 10110100   46 0    0    1   1   1   0
    121     26.36 us 10110100   44 0    0    1   1   1   0 ? (D)
    122         8 ns 10110100   40 0    0    1   1   1   0 ? (@)
    123     37.91 us 10010100   40 0    0    1   1   0   0
    124     74.29 us 10000100   40 0    0    0   1   0   0
    125     11.45 us 10001100   40 0    1    0   1   0   0
    126     38.40 us 10101100   40 0    1    0   1   1   0
    127     37.62 us 10100100   40 0    0    0   1   1   0
    128       168 ns 10100100   00 0    0    0   1   1   0 ?
    129     32.02 us 10100101   00 1    0    0   1   1   0 DATA
    130     49.58 us 10110101   00 1    0    1   1   1   0

Time Printed: 15 Jul 2021 08:53:45


Its a bit odd that there seems to be no hex 64 (MSA for OLD) being sent?

Noted regarding hex 7F (127) being EOT. I have also seen the DC3 (device control 3) byte in a listing somewhere (manual?) and wondered what its purpose is.
« Last Edit: July 15, 2021, 05:48:48 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #189 on: July 15, 2021, 05:35:04 pm »
According to the 4924 tape service manual, 127 is the EOF character in a file.

I have seen NULL and DC3 characters in ASCII data files, particularly in tape file headers I have extracted from recovered tapes.

BTW - I have been making sure to put a CR with nothing else after the last line in ASCII PROGRAMs.  This may cause the Tektronix to stop fetching more lines of characters and end the OLD command.

But the current OLD not working issue - no lines are transferred.

I'll check the 4924 description of the SAVE command - it could be the 4924 or Tektronix adds an EOF character after the Tektronix ends the SAVE command
« Last Edit: July 15, 2021, 05:37:46 pm by mmcgraw74 »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #190 on: July 15, 2021, 05:51:57 pm »
I just checked one of my latest tape dumps - and I see character 255 (FFh) immediately after a CR with no other characters after the last BASIC program statement.

Example:

Code: [Select]
190 END[CR]
[CR]
[FF]

Yes, 4924 service manual page A-3 description of end-of-file mark:

end-of-file mark: The byte (hexadecimal FF) written onto a tape to mark the logical end of a file.

Likely only written by Tektronix on SAVING ASCII PROGRAM files - I don't see it on ASCII DATA files, and the BINARY DATA type bytes encode EOF as type 7
« Last Edit: July 15, 2021, 05:55:18 pm by mmcgraw74 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #191 on: July 16, 2021, 08:23:06 am »
I knew I saw DC3 recently somewhere....

From the 4924 service manual, 2-09. No description is given for its purpose though.
[ Specified attachment is not available ]
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #192 on: July 16, 2021, 12:14:07 pm »
See page 7-42 in the 070-2056-01 4050 Graphics System Reference manual section of the FIND statement usage of [CR][DC3] to terminate the file header string:

 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #193 on: July 16, 2021, 06:20:24 pm »
I tried to figure out why OLD command was not working, but I was not successful.

 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #194 on: July 17, 2021, 07:50:20 am »
I haven't worked it out either yet, but FIND followed by OLD works here via the terminal. I noted that your second image of the console output shows only the debug messages from the FIND command, but nothing at all from OLD, so it looks like OLD is not being received but I don't know why.

In the graphic we can see a UNL during the first ATN phase, but it is completely missed - DAV goes down on the next byte - hex 20. We also see SRQ asserted. Why and by which device? This might be causing the Tek to attempt a serial poll, but I am not seeing GPIB command 18. After the missed UNL things appear to go awry.

Is there a chance of getting another capture of the trace from FIND + OLD please? Could you also enable //#define DEBUG_DEVICE_ATN please. It might be best to do two separate scans first of the complete FIND which should show us the state of the GPIB bus when it is completed, and then the attempted OLD.

« Last Edit: July 17, 2021, 03:36:56 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #195 on: July 17, 2021, 05:09:21 pm »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #196 on: July 17, 2021, 05:39:00 pm »
If I CD to a directory manually, FIND a data file with two numbers per line, INPUT A,B - the first two numbers are correct.
However, the second INPUT A,B command done manually, results in the numbers in incorrect order.

Here are the commands:

Code: [Select]
PRI @5,19:"ADVENTURE"
FIND @5:1
INPUT @5:A,B
A
 1
B
 133488
INPUT @5:A,B
A
 1641035
B
 5
INPUT @5:A,B
A
 92813
B
 8


Here is the first couple of lines of the contents of the /ADVENTURE/1 ASCII data file (each line is [CR] delimited:

Code: [Select]
   DATA 1,133488,1,6771679,2,36315,2,8849417,3,4673330,4
   DATA 1641035,5,1987117,6,234943,6,387847,7,7400652,8
   DATA 92813,8,249958,9,9462081,10,2517217,11,7523733,11
   DATA 7763223,12,1512460,13,8969927,14,7412167,14,12721

You had asked before whether the "DATA" in the file above would interfere with INPUT of the variables.

Here is page 10-22 of the BASIC Reference showing how Text is ignored in extracting a VALue from a string:



The Emulator should continue reading from the same line if the contents have not been consumed.
It appears the Emulator is reading the second line to satisfy the second INPUT command and the third line to satisfy the third INPUT command.

I think the FIND command is not terminating properly, because I wrote a program to run all the test commands above and the program generates an error on the line number with the FIND command and stops the program execution.

Likely the Tektronix must timeout on the GPIB bus condition if the FIND command is typed individually.

I may have been able to capture the FIND command typed manually: 

Here are the waveform and trace listings:



* BAD_FIND.zip (1.98 kB - downloaded 19 times.)

Sorry the columns are in a different order in my latest trace listings, I eliminated the SRQ signal - which appears to be mysteriously wiggling in the trace.  I also eliminated the STATUS bits which included the SRQ pin.  Maybe the emulator is not setting the SRQ to output mode - or is initializing it as zero?
« Last Edit: July 17, 2021, 05:42:23 pm by mmcgraw74 »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #197 on: July 17, 2021, 11:01:18 pm »
I uploaded a new microSD card zip file for testing, including my Adventure game with data files converted to INPUT format.
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 851
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #198 on: July 18, 2021, 09:05:56 am »
Thanks for the update to the SD files.

In the meantime, I did spot something in the information your posted which may possibly have a bearing. It seems that the emulator responded to UNL but not to UNT. It was also responding to UNT and UNL only after the attention period had ended so I did wonder whether that might be causing a timing issue. You mention nthat enabling DEBUG_DEVICE_ATN cause OLD work (sort of). Since all that does is print more messages to the console, which, in effect, takes more time, that also might indicate a timing issue. I have posted an update that should ensure that state changes in response to UNL and UNT happen within the attention period. Whether it fixes the problem remains to be seen....

I haven't looked at the problem you reported with INPUT yet.
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #199 on: July 18, 2021, 12:07:43 pm »
Thanks, I'll check out your new version.

It also appears that each INPUT command may consume an entire ASCII line of characters, so in the Adventure files I uploaded, I changed the DATA files to match the program INPUT statements.  I also removed spurious characters like quote marks for strings and "DATA" in the numeric ASCII DATA files.  I did a test of an INPUT statement of a character string with quotes and the resulting string had the quote characters included - which is not what I wanted.  Without the quotes, the strings are terminated by [CR], which is what is needed.

All of my prior ports of Adventure were actually using binary data files - created with WRITE statements and consumed by READ statements.  Binary data files will not have [CR] termination as the data headers define exactly the type of variable and exactly the length.

I'm hoping your UNL/UNT changes will fix the INPUT (and other) command termination.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf