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

0 Members and 1 Guest are viewing this topic.

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #100 on: June 19, 2021, 07:41:34 pm »
Monty,

Your adapter arrived today. Thank you. At present, it seems I can't buy a Panduino board anywhere so I will continue using the development board that I dug out of my box of bits for now. I have connected it up to my setup on the breadboard using Dupont wires and based on your layout have created a pre-defined layout definition for the 644P/1248P. I have successfully connected it up with and read data from my Solarton DMM. I also upgraded the crystal on the development board from 8Mhz to 20Mhz so the 1284P running is running at full speed. It definitely feels snappier than using an Uno or Nano!

This week I have spent quite a lot of time working on the AR488-Store code but there is still a little more work to do before I am ready to upload an update to the Github. If you could give me a pointer to the latest versions of your Tek 4924 functions, that would be appreciated. In the meantime, I will be hooking up the SD card reader and getting the contents of Tek4924sd.zip onto an SD card. One slight problem I have at the moment is that I am using the SPI port header for the programming cable but it ought to be possible to connect the SD card reader directly to pins on port B so I will be exploring that option.

I think I will save your adapter for when I can get hold of a Panduino and then assemble as you have indicated. Thank you for the photos and clear instructions.

Regards.
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #101 on: June 19, 2021, 08:55:38 pm »
WaveyDipole,

Sorry, I thought you had a 1284-Narrow board.  The https://pandauino.com/en/buy/ indicates European users can by directly.  Otherwise, I can buy one and ship it to you.

My latest code is in this folder: https://github.com/Twilight-Logic/AR488_Store/tree/Monty1/src/AR488-644-TLIST-continuedDev

 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #102 on: June 20, 2021, 09:08:10 am »
Sorry, I thought you had a 1284-Narrow board.  The https://pandauino.com/en/buy/ indicates European users can by directly.  Otherwise, I can buy one and ship it to you.

That's great. Thanks. Funny that panduino.com doesn't come up in a Google search on the term 'panduino'. You would think it would be one of the first entries in the search results. Seems I can't do anything on that site without registering - not even view the cart! I did register and eventually got the confirmation e-mail but it contained a password in clear text - which I immediately changed! The site does not inspire confidence and I feel rather hesitant to buy from them at the moment. I only wanted to see what the total cost was including shipping. I didn't realise the Panduino was that expensive either. It hardly seems to compete with the Nano or Micro Pro and even the Mega 2560 can be had for less. It seems I can buy from Mouser but the shipping cost is 16.50$ with likely import duty to be added on top of that. Seems there is a significant factory lead time as well. Still its an option to consider eventually, but to avoid delay in development I will use what I have available for now.

My latest code is in this folder: https://github.com/Twilight-Logic/AR488_Store/tree/Monty1/src/AR488-644-TLIST-continuedDev

That's what I thought. Just wanted to confirm. I presume the contents of Tek4924sd.zip go directly into the root of the SD card? That's where I have put them for now.
« Last Edit: June 20, 2021, 10:25:11 am by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #103 on: June 20, 2021, 12:45:44 pm »
You had a typo in your search.  Search for Pandauino or 644-Narrow or 1284-Narrow.

Yes, this board is new and was in a crowdsource a couple of years ago.

ATMEL got interested and their Crowd Supply branch is the one manufacturing the board and has Mouser as their distributor.

Mouser shows 63 1284-Narrow in stock.  I can order one and ship to you, but the shipping fee they have sounds better than mine.  They have a Mouser in Hungary that is likely the one you would use.

Yes, unzip the contents to the root of the microSD card formatted as FAT32.  There will be three folders, and my code defaults to open the \root\ folder.



 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #104 on: June 20, 2021, 03:22:14 pm »
Ah, so that was it! My eyes somehow missed the 'a'. Thank you for pointing it out.

When I checked Mouser from here it showed a 8-week lead time on the 644 Narrow and an 18-week lead time on the 1284 Narrow! Now that I am registered at the Pandauino.com website, I can properly see the cart and after putting in my address details I can get the shipping cost. Despite the initial indication of €4.95, it turns out that it isn't any cheaper than Mouser unfortunately. In total it works out at around 50$ regardless and that is before any import duties. I am wondering whether it would be cheaper to design my own board.

Incidentally, do you mind if I use your circuit diagram in my documentation?

I have now connected and tested the SD card reader. It can co-exist with the programmer but does change the reported device signature so it is necessary to unplug the power lead from the SD card reader before programming. The example "Cardinfo" sketch was uploaded successfully and reads the contents of the SD card just fine even with the programmer connected. I used CS pin 3 rather than the default of 4. My initial reasoning was to avoid a clash, but on closer inspection it appears that the programmer does not use a CS pin at all. I am guessing that it takes the role of the master and assumes the Arduino to be the only slave device on the SPI bus.

In any case, I am now in a position to be able to move on to working on the device mode parts of the sketch in earnest and adding your routines in, health issues permitting.
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #105 on: June 20, 2021, 05:30:12 pm »
I don't mind you using my circuit diagram in your documentation.

Like I said, I see stock of 63 1284-Narrow at Mouser US, so I could get one and ship it to you much quicker than making your own board :)

Monty
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #106 on: June 28, 2021, 10:22:53 am »
I have uploaded my current work on AR488-Store. The code has been substantially re-written and all of the GPIB functions are now in the GPIB-device class. Bluetooth and Eeprom functions have been removed. There will still be a number of warnings, but there should be no errors.

I have added one of your functions (TLIST) into AR488_Store_Tek. I can only test using a terminal program, but it seems to work when the entire command sequence is sent together using cut and paste. When typing them one at a time manually, the delay between commands seems to cause some of the text to be omitted or EOI gets detected before any text appears in the terminal. I don't have a Tek 4050 to test this on though. You will see that only minor changes were needed to your original function, for example, setting the GPIB bus to the correct state before and after the function is executed as well as directing the output to GPIB rather than to serial. I left the original lines in place but commented out so you can see what I have done. The output is streamed in the original fashion using ArduinoOutStream into an 82 character line buffer (80 chars + CR + LF) - this is assuming an 80 character display width. The buffer is then passed to the GPIB bus function that sends its contents across the GPIB bus.

Assuming that this actually works on the 4050, then we can start to add in other commands.

There is still a bit of tidying up to do but this should now compile and hopefully run that one test command.

BTW, are all of your functions in TLIST-continuedDev now complete or still in development?
« Last Edit: June 28, 2021, 10:35:36 am by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #107 on: June 28, 2021, 12:32:42 pm »
Great progress.

I'll test your new code on my Tektronix 4052 and report back!

I have not changed continuedDev in a couple of weeks. 
I was waiting to test the new GPIB Store code before more work.

Monty
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #108 on: June 28, 2021, 09:17:51 pm »
Hmm, I tried to compile your new version and the 2nd include statement errors with No such file or directory: AR488_GPIBdevice.h

Code: [Select]
Arduino: 1.8.15 (Windows 10), Board: "ATmega644, Yes (UART0), EEPROM retained, Standard pinout, 644P / 644PA, BOD 2.7V, Disabled, External 16 MHz"

AR488_Store:13:10: fatal error: AR488_GPIBdevice.h: No such file or directory

 #include "AR488_GPIBdevice.h"

          ^~~~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

AR488_GPIBdevice.h: No such file or directory



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
« Last Edit: June 28, 2021, 09:20:03 pm by mmcgraw74 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #109 on: June 29, 2021, 07:32:32 am »
My apologies. It seems that although two of the files (AR488_GPIBdevice.h and AR488_GPIBdevice.cpp) were present in my local directory, they had not been added to the repository with 'git add' and so they were not uploaded when I did a 'git push'. They have now been added so all files should be present and correct and you should be able to download the missing files from the repository.

Incidentally, I wasn't sure which secondary address to assign to the TLIST command. According to the information here:

https://github.com/mmcgraw74/Tektronix-4050-GPIB-Flash-Drive

the TLIST command is assigned to secondary address 115 (decimal) or 73 (hex). On the other hand, the .ino file here:

https://github.com/mmcgraw74/Tektronix-4050-GPIB-Flash-Drive/blob/master/Tek-GPIB-Tape-Emulator%20command%20template.ino

shows it assigned to secondary address 105 (decimal) 69 (hex) which according to the above is assigned to the DIRECTORY command. I imagined that DIRECTORY might correspond to your CD function but couldn't be sure. For testing purposes I have assigned TLIST to secondary address 115 for now and this is the address you will have to send, but it can easily be changed to 105 if required.
« Last Edit: June 29, 2021, 11:41:37 am by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #110 on: June 29, 2021, 01:55:00 pm »
I had to change the SD card CS pin to 4 to work with my board.

Compile was successful with no errors - but a warning that we were at 80% of RAM:

Sketch uses 24918 bytes (38%) of program storage space. Maximum is 64512 bytes.
Global variables use 3309 bytes (80%) of dynamic memory, leaving 787 bytes for local variables. Maximum is 4096 bytes.
Low memory available, stability problems may occur.

I plugged the 4924 Tape Emulator into my Tektronix 4052 and typed:

TLIST @5:

The system reported this error message:

MAG TAPE CARTRIDGE REQUIRED IN IMMEDIATE LINE - MESSAGE NUMBER 57

Actually this may be progress, but likely the system needs the Tape Emulator to report status or some other command that I haven't coded yet.

For example, the 4924 Operators Manual Table 2-3 shows 4924 Error Messages with error 7 "No Cartridge Inserted"

I don't think the 4050 is making that call, since when I try it as a BASIC command: INPUT @5,30:A  the system hangs.

The system doesn't hang on the TLIST @5: command, so it is figuring there is no cartridge some other way.

Does your code provide debug messages to serial port - such as Secondary Address received for Primary Address 5?

I could use that to discover what command the system is sending to the tape emulator.

Otherwise I will have to get my logic analyzer hooked up to the GPIB bus to look at the transfers.

The Secondary Address for "STATUS" is 0 according to the 4924 Tape Drive Service Manual Table 1-2 on page 1-6.
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #111 on: June 29, 2021, 06:33:48 pm »
Yes, there is a debug option which sends to the default Serial port. In AR488_Config.h uncomment at least:

//#define DEBUG_STORE

I think I may have left it un-commented already. This should show the HEX code for the secondary address being received. Un-commenting the following will show a bit more information:

//#define DEBUG_STORE_COMMANDS

By default the output will go to Serial. This can be changed in the 'Debug Port' section after #define DB_SERIAL_ENABLE. The line '#define DB_SERIAL_ENABLE' should already be un-commented, although under normal running it should be commented out.

You are probably correct that the tape drive would need to return the correct status showing online and ready first. That would make sense. That shouldn't be difficult. I will have a look at the documentation. There are no tapes so theoretically the system should always be online unless the SD card doesn't mount. The problem is that at present the Arduino will crash if the SD card is not present. For testing purposes it might be sufficient to just send an OK code but in the long run it might be better to find a way to handle and escape any SD load failure and return a suitable error status.

You are right that with the 644 the system reports 81% of dynamic memory used. On the 1284 it reports 20%.
« Last Edit: June 29, 2021, 06:47:44 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #112 on: June 30, 2021, 01:08:20 am »
« Last Edit: June 30, 2021, 01:22:44 am by mmcgraw74 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #113 on: June 30, 2021, 08:11:48 am »
Thank you for the detailed output. This is really helpful. I obviously need to have a look at why both NDAC and NRFD are ending up inactive when the TLIST function is executed.

The list in the output corresponds to addresses that have a function implemented, most of which are just empty functions with the exception of TLIST. Those 'not found' do not yet exist in the array that lists the implemented functions, so they are 'not found'. The list of secondary addresses should correspond to those functions mentioned in your example .ino file.
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #114 on: June 30, 2021, 12:35:40 pm »
How about the printing of all the commands received on each debug output line?  Is that from both debug statements being enabled and I only need to enable one at a time?

I'm going to look at the transactions following the receipt of the TLIST command to see what else the system is sending - or possibly it is what else the TLIST program is sending?
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #115 on: June 30, 2021, 01:38:12 pm »
Here is my decode of the GPIB states. 
I also added the missing columns of ADDR (same as DATA for GPIB) and the REN and EOI signals.
The Tektronix 4924 Service Manual indicates the system will assert EOI at the end of a transaction (with the CR in the case of my test program).

The error reported by the system might be due to the code trying to react to the TLIST, while the system is trying to send the PRINT command to Secondary Address 116?

Particularly since the system did not send the CR on this PRINT command to sec addr 116 transaction (my PRINT statement has no data so the system just sends a CR according to the 4924 Service Manual page B-13 table for the PRINT command).

Code: [Select]
HPIB STATE  -  State Listing                                                                                                           
                                                                     
                                                                                                           
Label    > ADDR STAT DATA   Time    ATN SRQ IFC NDAC NFRD DAV REN EOI 
Base     > Hex  Hex  Hex  Relative  Bin Bin Bin Bina Bina Bin Bin Bin 
__________ ____ ____ ____ _________ ___ ___ ___ ____ ____ ___ ___ ___ 
                                                                     
    -70      8D   8C   8D  137.6 us   0   0   1    1    0   0   0   1 Sec Addr (72H) 114 decimal
    -69      8D   AC   8D  40.41 us   0   0   1    1    0   1   0   1
    -68      8D   A4   8D    504 ns   0   0   1    0    0   1   0   1
    -67      8D   A5   8D  18.79 us   1   0   1    0    0   1   0   1
    -66      8D   AD   8D    456 ns   1   0   1    1    0   1   0   1
    -65      8D   2D   8D  26.66 us   1   0   1    1    0   1   0   0
    -64      80   2D   80  27.71 us   1   0   1    1    0   1   0   0
    -63      A0   2D   A0    104 ns   1   0   1    1    0   1   0   0
    -62      E0   2D   E0      8 ns   1   0   1    1    0   1   0   0
    -61      E0   2D   E0      8 ns   1   0   1    1    0   1   0   0
    -60      F0   2D   F0      8 ns   1   0   1    1    0   1   0   0
    -59      F0   2D   F0      8 ns   1   0   1    1    0   1   0   0
    -58      F2   2D   F2      8 ns   1   0   1    1    0   1   0   0
    -57      F2   25   F2  33.17 us   1   0   1    0    0   1   0   0
    -56      F2   35   F2  3.600 ms   1   0   1    0    1   1   0   0
    -55      F2   35   F2      8 ns   1   0   1    0    1   1   0   0
    -54      F2   3D   F2      8 ns   1   0   1    1    1   1   0   0
    -53      F2   1D   F2  37.58 us   1   0   1    1    1   0   0   0 CR (0D)
    -52      F2   3D   F2  38.68 us   1   0   1    1    1   1   0   0
    -51      F2   BD   F2  21.95 us   1   0   1    1    1   1   0   1
    -50      F2   BC   F2  56.97 us   0   0   1    1    1   1   0   1
    -49      F2   A4   F2    528 ns   0   0   1    0    0   1   0   1
    -48      F2   B4   F2    416 ns   0   0   1    0    1   1   0   1
    -47      F2   BC   F2  18.37 us   0   0   1    1    1   1   0   1
    -46      F2   B4   F2      8 ns   0   0   1    0    1   1   0   1
    -45      F2   B4   F2      8 ns   0   0   1    0    1   1   0   1
    -44      F2   BC   F2      8 ns   0   0   1    1    1   1   0   1
    -43      F2   B4   F2      8 ns   0   0   1    0    1   1   0   1
    -42      F2   A4   F2  9.864 us   0   0   1    0    0   1   0   1
    -41      F2   B4   F2  23.51 us   0   0   1    0    1   1   0   1
    -40      A0   B4   A0  32.61 us   0   0   1    0    1   1   0   1
    -39      A0   94   A0  38.58 us   0   0   1    0    1   0   0   1 UNTALK (5F)
    -38      A0   84   A0    800 ns   0   0   1    0    0   0   0   1
    -37      A0   8C   A0  93.54 us   0   0   1    1    0   0   0   1
    -36      A0   AC   A0  28.65 us   0   0   1    1    0   1   0   1
    -35      A0   A4   A0    472 ns   0   0   1    0    0   1   0   1
    -34      80   A4   80  27.14 us   0   0   1    0    0   1   0   1
    -33      C0   A4   C0    136 ns   0   0   1    0    0   1   0   1
    -32      C0   B4   C0  124.3 us   0   0   1    0    1   1   0   1
    -31      C0   94   C0  27.28 us   0   0   1    0    1   0   0   1 UNLISTEN (3F)
    -30      C0   84   C0    480 ns   0   0   1    0    0   0   0   1
    -29      C0   8C   C0  137.8 us   0   0   1    1    0   0   0   1
    -28      C0   AC   C0  41.30 us   0   0   1    1    0   1   0   1
    -27      C0   A4   C0    432 ns   0   0   1    0    0   1   0   1
    -26      FF   A4   FF  34.70 us   0   0   1    0    0   1   0   1
    -25      FF   A5   FF  27.27 us   1   0   1    0    0   1   0   1
    -24      FF   AD   FF    496 ns   1   0   1    1    0   1   0   1
    -23      FF   A5   FF     24 ns   1   0   1    0    0   1   0   1
    -22      FF   A4   FF  2.625 ms   0   0   1    0    0   1   0   1
    -21      C0   A4   C0  28.82 us   0   0   1    0    0   1   0   1
    -20      C0   F4   C0      8 ns   0   0   1    0    1   1   1   1
    -19      C0   A4   C0      8 ns   0   0   1    0    0   1   0   1
    -18      C0   B4   C0    112 ns   0   0   1    0    1   1   0   1
    -17      C0   BC   C0  1.992 us   0   0   1    1    1   1   0   1
    -16      C0   B4   C0      8 ns   0   0   1    0    1   1   0   1
    -15      C0   B4   C0      8 ns   0   0   1    0    1   1   0   1
    -14      C0   BC   C0      8 ns   0   0   1    1    1   1   0   1
    -13      C0   B4   C0      8 ns   0   0   1    0    1   1   0   1
    -12      C0   A4   C0  9.864 us   0   0   1    0    0   1   0   1
    -11      C0   B4   C0  23.51 us   0   0   1    0    1   1   0   1
    -10      C8   B4   C8  24.24 us   0   0   1    0    1   1   0   1
     -9      DA   B4   DA      8 ns   0   0   1    0    1   1   0   1
     -8      DA   94   DA  38.49 us   0   0   1    0    1   0   0   1 Primary Addr (35H) Device 5 Listen Addr
     -7      DA   84   DA    368 ns   0   0   1    0    0   0   0   1
     -6      DA   8C   DA  102.4 us   0   0   1    1    0   0   0   1
     -5      DA   AC   DA  19.66 us   0   0   1    1    0   1   0   1
     -4      DA   A4   DA    400 ns   0   0   1    0    0   1   0   1
     -3      88   A4   88  30.91 us   0   0   1    0    0   1   0   1
     -2      8C   A4   8C    144 ns   0   0   1    0    0   1   0   1
     -1      8C   B4   8C  122.5 us   0   0   1    0    1   1   0   1
      0      8C   94   8C  28.02 us   0   0   1    0    1   0   0   1 Sec Addr (73H) 115 decimal = TLIST
      1      8C   84   8C    432 ns   0   0   1    0    0   0   0   1
      2      8C   8C   8C  137.1 us   0   0   1    1    0   0   0   1
      3      8C   AC   8C  14.29 us   0   0   1    1    0   1   0   1
      4      8C   A4   8C    376 ns   0   0   1    0    0   1   0   1
      5      8C   A5   8C  18.92 us   1   0   1    0    0   1   0   1
      6      8C   AD   8C    496 ns   1   0   1    1    0   1   0   1
      7      8C   2D   8C  26.62 us   1   0   1    1    0   1   0   0
      8      80   2D   80  28.77 us   1   0   1    1    0   1   0   0
      9      A0   2D   A0     80 ns   1   0   1    1    0   1   0   0
     10      A0   2D   A0      8 ns   1   0   1    1    0   1   0   0
     11      E0   2D   E0      8 ns   1   0   1    1    0   1   0   0
     12      E0   2D   E0      8 ns   1   0   1    1    0   1   0   0
     13      F0   2D   F0      8 ns   1   0   1    1    0   1   0   0
     14      F2   2D   F2     24 ns   1   0   1    1    0   1   0   0
     15      F2   25   F2  59.75 us   1   0   1    0    0   1   0   0
     16      F2   35   F2  4.007 ms   1   0   1    0    1   1   0   0
     17      F2   35   F2      8 ns   1   0   1    0    1   1   0   0
     18      F2   3D   F2      8 ns   1   0   1    1    1   1   0   0
     19      F2   1D   F2  24.94 us   1   0   1    1    1   0   0   0 CR (0D)
     20      F2   3D   F2  39.10 us   1   0   1    1    1   1   0   0
     21      F2   BD   F2  22.05 us   1   0   1    1    1   1   0   1
     22      F2   BC   F2  56.44 us   0   0   1    1    1   1   0   1
     23      F2   A4   F2    624 ns   0   0   1    0    0   1   0   1
     24      F2   B4   F2    424 ns   0   0   1    0    1   1   0   1
     25      A0   B4   A0  85.34 us   0   0   1    0    1   1   0   1
     26      A0   94   A0  38.06 us   0   0   1    0    1   0   0   1 UNTALK (5F)
     27      A0   84   A0    328 ns   0   0   1    0    0   0   0   1
     28      A0   8C   A0  1.120 us   0   0   1    1    0   0   0   1
     29      A0   AC   A0  37.65 us   0   0   1    1    0   1   0   1
     30      A0   A4   A0    456 ns   0   0   1    0    0   1   0   1
     31      A0   B4   A0    264 ns   0   0   1    0    1   1   0   1
     32      80   B4   80  26.46 us   0   0   1    0    1   1   0   1
     33      C0   B4   C0    136 ns   0   0   1    0    1   1   0   1
     34      C0   94   C0  37.93 us   0   0   1    0    1   0   0   1 UNLISTEN (3F)
     35      C0   84   C0    200 ns   0   0   1    0    0   0   0   1
     36      C0   8C   C0  1.112 us   0   0   1    1    0   0   0   1
     37      C0   AC   C0  37.78 us   0   0   1    1    0   1   0   1
     38      C0   A4   C0    496 ns   0   0   1    0    0   1   0   1
     39      C0   B4   C0    424 ns   0   0   1    0    1   1   0   1
     40      C0   A4   C0  34.24 us   0   0   1    0    0   1   0   1
     41      C6   A4   C6     64 ns   0   0   1    0    0   1   0   1
     42      FF   A4   FF      8 ns   0   0   1    0    0   1   0   1
     43      FF   A5   FF  27.26 us   1   0   1    0    0   1   0   1
     44      FF   A4   FF  2.625 ms   0   0   1    0    0   1   0   1
     45      C0   A4   C0  28.82 us   0   0   1    0    0   1   0   1
     46      C0   F4   C0      8 ns   0   0   1    0    1   1   1   1
     47      C0   A4   C0      8 ns   0   0   1    0    0   1   0   1
     48      C0   B4   C0    112 ns   0   0   1    0    1   1   0   1
     49      C8   B4   C8  59.64 us   0   0   1    0    1   1   0   1
     50      DA   B4   DA      8 ns   0   0   1    0    1   1   0   1
     51      DA   94   DA  38.50 us   0   0   1    0    1   0   0   1 Primary Addr (35H) Device 5 Listen Addr
     52      DA   84   DA    488 ns   0   0   1    0    0   0   0   1
     53      DA   8C   DA  1.112 us   0   0   1    1    0   0   0   1
     54      DA   AC   DA  36.97 us   0   0   1    1    0   1   0   1
     55      DA   A4   DA    480 ns   0   0   1    0    0   1   0   1
     56      DA   B4   DA    424 ns   0   0   1    0    1   1   0   1
     57      8A   B4   8A  30.50 us   0   0   1    0    1   1   0   1
     58      8B   B4   8B    128 ns   0   0   1    0    1   1   0   1
     59      8B   94   8B  38.46 us   0   0   1    0    1   0   0   1 Sec Addr (74H) 116 decimal
     60      8B   84   8B    296 ns   0   0   1    0    0   0   0   1
     61      8B   8C   8B  1.112 us   0   0   1    1    0   0   0   1
     62      8B   AC   8B  36.63 us   0   0   1    1    0   1   0   1
     63      8B   A4   8B    480 ns   0   0   1    0    0   1   0   1
     64      8B   B4   8B    264 ns   0   0   1    0    1   1   0   1
     65      8B   B5   8B  18.66 us   1   0   1    0    1   1   0   1
     66      8B   BD   8B    640 ns   1   0   1    1    1   1   0   1
     67      8B   3D   8B  27.53 us   1   0   1    1    1   1   0   0
     68      8B   BD   8B  46.35 us   1   0   1    1    1   1   0   1
     69      8B   BC   8B  56.44 us   0   0   1    1    1   1   0   1
     70      8B   A4   8B    696 ns   0   0   1    0    0   1   0   1
     71      8B   B4   8B    264 ns   0   0   1    0    1   1   0   1
     72      80   B4   80  84.37 us   0   0   1    0    1   1   0   1
     73      A0   B4   A0    128 ns   0   0   1    0    1   1   0   1
     74      A0   94   A0  38.46 us   0   0   1    0    1   0   0   1 UNTALK (5F)
     75      A0   84   A0    440 ns   0   0   1    0    0   0   0   1
     76      A0   8C   A0  1.112 us   0   0   1    1    0   0   0   1
     77      A0   AC   A0  37.02 us   0   0   1    1    0   1   0   1
     78      A0   A4   A0    432 ns   0   0   1    0    0   1   0   1
     79      A0   B4   A0    424 ns   0   0   1    0    1   1   0   1
     80      80   B4   80  25.80 us   0   0   1    0    1   1   0   1
     81      C0   B4   C0    136 ns   0   0   1    0    1   1   0   1
     82      C0   94   C0  37.92 us   0   0   1    0    1   0   0   1 UNLISTEN (3F)
     83      C0   84   C0    368 ns   0   0   1    0    0   0   0   1
     84      C0   8C   C0  1.120 us   0   0   1    1    0   0   0   1
     85      C0   AC   C0  37.61 us   0   0   1    1    0   1   0   1
     86      C0   A4   C0    336 ns   0   0   1    0    0   1   0   1
     87      C0   B4   C0    416 ns   0   0   1    0    1   1   0   1
     88      C0   A4   C0  34.41 us   0   0   1    0    0   1   0   1
     89      C2   A4   C2     64 ns   0   0   1    0    0   1   0   1
     90      DF   A4   DF      8 ns   0   0   1    0    0   1   0   1
     91      FF   A4   FF      8 ns   0   0   1    0    0   1   0   1
     92      FF   A5   FF  27.26 us   1   0   1    0    0   1   0   1
     93      FF   F5   FF  115.1 ms   1   0   1    0    1   1   1   1
     94      FF   F5   FF      8 ns   1   0   1    0    1   1   1   1
     95      FF   FD   FF      8 ns   1   0   1    1    1   1   1   1
     96      DF   FD   DF  42.09 us   1   0   1    1    1   1   1   1
     97      DF   DD   DF  8.768 us   1   0   1    1    1   0   1   1
     98      DF   FD   DF  5.004  s   1   0   1    1    1   1   1   1
     99      FF   FD   FF  3.312 us   1   0   1    1    1   1   1   1

Time Printed: 30 Jun 2021 08:05:59


« Last Edit: June 30, 2021, 02:13:23 pm by mmcgraw74 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #116 on: June 30, 2021, 07:25:11 pm »
How about the printing of all the commands received on each debug output line?  Is that from both debug statements being enabled and I only need to enable one at a time?

The output you are seeing is from two debug levels. The first one (#define DEBUG_STORE) is at a general level for the module and is showing the command processor looping through the command addresses and stopping at the one it finds - hence the lengthening list of numbers as you progress through the commands. If it doesn't find a command handler in the list (i.e. because we have not implemented it yet) it will print 'not found'. If it does, then it will print "Executing secondary address command: xx".

The second (#define DEBUG_STORE_COMMANDS) shows messages from within the actual command function. As each command function is added, messages from other commands will appear on separate lines. From your output, we have addressed the emulator and the command 115 has started the TLIST handler, but it didn't complete the function as we didn't get an "End TLIST handler" message.

The string of numbers was helpful to me at the time but it does look confusing. All that is actually needed is to determine whether the secondary address command was received and whether a handler was found and executed or not.

Your surmise regarding the next PRINT command is probably correct. The response to the TLIST command is to output some data, i.e. a list of file headers as documented:

TLIST   9 (MTA 69)(MSA 105)(Header)(UNT)

After sending 105 [hex 73] The computer would need to listen [read] the '(header)' response before sending UNT. Quite how that works with the 4050 - whether it happens automatically or whether the BASIC program needs to read the response into a variable (or file) - I am uncertain.

Sending the next PRINT command while the emulator is in send mode would confuse things since both devices would now be in send mode at the same time. Since the sender sets DAV and the recipient the NDAV/NRFD signals, you would have a situation where both computer and emulator are trying to send and waiting for NDAC/NRFD, but neither is in the correct mode to assert them. That might explain error 69.

I would like to determine two things:

1. whether both computer and tape drive send EOI or just one of them (i.e. the tape drive)
2. whether the status code is sent as a single byte or as ASCII output

In the meantime, I investigated a bit further and noticed that your function had a 'return' in the section starting:

Code: [Select]
if ((f_name[7] == 'L') && (filenumber == number)) {
At that point I realised that the function would have been exiting here without an 'End TLIST handler' message. This also explained a puzzle I had been trying to figure out as to why I was getting no EOI signal on my LA trace!

I have modified the function slightly, replacing the 'for' loop with a 'while' loop and taking advantage of the boolean nature of the 'file.openNext' method which returns 'true' so long as there is a next file to open and  returns 'false' when there are no more files to process, to iterate over the directory. Your original 99 file limit was also retained. Program execution now drops out of both loops as soon as the 'lastfile' flag is set, whereupon everything is closed off, an EOI signal is sent, and the GPIB bus set to an appropriate state before finishing the function. Both loops still drop out immediately the last file is reached and termination code does not need to be duplicated in two places. To be fair, 'return' is still going to be faster as there would be no need to re-evaluate the conditions for the inner and outer loop.

I have also cleaned up the debug output a bit. Hopefully it is now a bit clearer.

I have added an ERROR function as well as had an attempt at the FIND command. When I tested ERROR it returned a blank instead of '0'. I am uncertain whether the data is meant to be returned as a byte or an ASCII character, hence my earlier question and possible need for adjustment. I will have a further dig around the documentation. I have not yet made any attempt to test FIND.

I spotted this line which may need to be re-worked:

Code: [Select]
    if (!dirFile.open(directory, O_RDONLY)) {
      sd.errorHalt("Open directory failed - possible invalid directory name");
    }

Not sure, but I think it may send to the default serial port which might not be available. Maybe the if statement could be used to set an error code instead?

The updated files have been uploaded to the GitHub repository.

The output below is from my PuTTy session on the PC (ignore the GPIBbus debug messages):

Code: [Select]
> ++mode 1


Interface mode set to: CONTROLLER

> ++addr 5


Set device primary address to: 5

> ++mta


GPIBbus::sendMTA: address device: 5

GPIBbus::sendMTA: cstate: 1

GPIBbus::sendMTA: cstate: 3

addressDevice: 5

> ++msa 115


> ++read eoi


 1      ASCII   PROG [Root Menu]   4
 2      ASCII   DATA [DIR LIST]   4
 3      NEW                       3
 4      NEW                       3
 5      LAST                     3
> ++unt


GPIBbus::sendMTA: cstate: 2

>

As you can see, I successfully received your file header list sent by the TLIST function. One assumes the same output would be forthcoming on the 4050.

Debug output on emulator:

Code: [Select]
Executing secondary address command: 73
Started TLIST handler...
Reached last file.
End TLIST handler.
« Last Edit: June 30, 2021, 07:52:10 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #117 on: June 30, 2021, 07:42:51 pm »

I think this line:

Code: [Select]
sd.errorHalt("Open directory failed - possible invalid directory name");
will also have to be re-worked.

The updated files have been uploaded to the GitHub repository.

The output below is from my PuTTy session on the PC (ignore the GPIBbus debug messages):

Code: [Select]
> ++mode 1


Interface mode set to: CONTROLLER

> ++addr 5


Set device primary address to: 5

> ++mta


GPIBbus::sendMTA: address device: 5

GPIBbus::sendMTA: cstate: 1

GPIBbus::sendMTA: cstate: 3

addressDevice: 5

> ++msa 115


> ++read eoi


 1      ASCII   PROG [Root Menu]   4
 2      ASCII   DATA [DIR LIST]   4
 3      NEW                       3
 4      NEW                       3
 5      LAST                     3
> ++unt


GPIBbus::sendMTA: cstate: 2

>

As you can see, I successfully received your file header list sent by the TLIST function. One assumes the same output would be forthcoming on the 4050.

Debug output on emulator:

Code: [Select]
Executing secondary address command: 73
Started TLIST handler...
Reached last file.
End TLIST handler.

The sderror line was in the example program I found.

I'll download the new code with your latest changes and test it again - this time just trying to test the TLIST command.
« Last Edit: June 30, 2021, 07:44:34 pm by mmcgraw74 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #118 on: July 01, 2021, 01:32:49 pm »
Here is a small python3 program to reverse the hex characters in the output:

Code: [Select]
#!/usr/bin/python3

import sys

infilepath = ""
outfilepath = ""
linecount = 0
origline = ""
modline = ""
hexcode = ""
flag = 0


def convertHex(codestr):
    codeval = int(codestr,16)
    codeval = 255 - codeval
    newcode = "{:02X}".format(codeval)
    return newcode

if len(sys.argv) == 2:
  infilepath = sys.argv[1]

if len(sys.argv) == 3:
  infilepath = sys.argv[1]
  outfilepath = sys.argv[2]

if (infilepath == ""):
    infilepath = input("Filename: ")

if (outfilepath != "" ):
    cnvfile = open (outfilepath, 'w')

with open(infilepath) as lafile:
    origline = lafile.readline()
    while origline:
        linecount += 1
        if (linecount>7 and flag == 0):
            modline = origline[0:13]
            hexcode = origline[13:15]
            if (hexcode):
                modline = modline + convertHex(hexcode) + "   "
                hexcode = origline[18:20]
                modline = modline + convertHex(hexcode) + "   "
                hexcode = origline[23:26]
                modline = modline + convertHex(hexcode) + "  "
                modline = modline + origline[26:]
                if (outfilepath != ""):
                    cnvfile.write(modline)
                else:
                    print(modline, end='')
            else:
                flag = 1
                if (outfilepath != ""):
                    cnvfile.write(origline)
                else:
                    print(origline, end='')
        else:
            if (outfilepath != ""):
                cnvfile.write(origline)
            else:
                print(origline, end='')

        origline = lafile.readline()
 
    lafile.close()
    if (outfilepath != ""):
        cnvfile.close()


I figured taking a few minutes to write the program would be more useful than working through the output manually and decoding each byte by hand! I am not sure what LA you are using but I did wonder though whether it has an option to set the polarity of the capture (i.e. to pulse going low rather than high). What logic analyzer are you using BTW?

UPDATE: program updated to take an input and output file parameter. Called without filename parameters it will prompt for an input filename. Called with only the input filename as a parameter it will output to screen.
« Last Edit: July 01, 2021, 06:56:19 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #119 on: July 01, 2021, 01:45:11 pm »
I'm using an HP16500B logic analyzer.
I'll check on inverting the data
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #120 on: July 01, 2021, 05:32:04 pm »
Section 3-7 of the 16500B manual covers "Assigning Edge Triggers". It might be that one of the options to select the down or falling edge might be the one to choose, but I am not sure. One the other hand if the machine 'knows' that it is decoding the GPIB protocol, then it ought to be able to determine that a low going pulse is the correct direction to signal that a bit is 'on'.

That 16500B seems to have a very minimalistic design but from the manual I can see that it is rather sophisticated and can be programmed for various tasks. There's a HP16500A on eBay UK for what might be considered a reasonable UK price. Better price, in fact, than a Hantek 4032 that I was thinking of getting, although obviously a lot bigger. Seems to have a 50MHz anf 35MHz card in the back and comes with cables and pods as well as lots of clips. I would expect that the clips are far better than those cheap far east ones. I can see from your posts that it is possible to export the capture image and data. Are any disks required to start it up? How difficult is it to find the program it? How long a timeframe will it capture for GPIB?
« Last Edit: July 01, 2021, 06:25:12 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #121 on: July 01, 2021, 05:48:25 pm »
I didn't find any way to invert the data in the Waveform view or state LIST view.
I do have the GPIB inverse assembler hardware - I just couldn't get it to work.  I think my problem is the POD numbering changed for the 16500, and the HP Inverse assembler supports the earlier 1650 or 16510. 

I also have a 1650 and can hook up GPIB to it - it doesn't support network or floppy.  I am using the floppy drive in my 16500B to save the Waveform screen print and state listings, and have a USB floppy to transfer the files to my PC.  I think one reason I haven't done this is I don't have the GPIB inverse assembler files available on the HP-IB tape to use with the 1650.

I upgraded my 16500B from hard disk to SSD based on info on this site:
https://www.philpem.me.uk/elec/testgear/hp16500b/start

Without the hard disk, you do need floppy disk with the system files to boot the logic analyzer.  Then the boot floppy can be removed and you can use the floppy to save or load files.  Obviously the hard disk is much faster and you can save setups to the hard disk easier.

The HP GPIB Inverse Assembler program does properly invert the address and data for GPIB.

The 100/500MHz Logic Analyzer plugin supports 4K samples.  These can be clocked or transitional.  I was capturing in transitional mode which captures on any signal transition and measures the relative time between transitions - so you get longer traces than with a fixed clock.  The GPIB inverse assembler disassembles the GPIB state transactions and adds the timing too.
« Last Edit: July 01, 2021, 05:53:47 pm by mmcgraw74 »
 

Offline WaveyDipoleTopic starter

  • Frequent Contributor
  • **
  • Posts: 852
  • Country: gb
Re: Tektronix 4924 Tape Drive Emulator
« Reply #122 on: July 01, 2021, 06:55:46 pm »
The unit I was looking at is a 16500A rather than B and has a floppy inserted in the back of it. Not sure whether it has a hard drive. It does apparently have an error with the touch screen interface. I understand these units can be operated with a mouse though?

Replacing the hard disk with an SSD seems a good idea. The other thing I thought of was to replace the  floppy drive with one of those drop-in replacement SSD card floppy emulators. Do you have the floppy image files by any chance?

I am curious when you mention "GPIB inverse assembler hardware". Is this a card that plugs into one of the slots at the back?  Its a shame if it not working is down to manufacturing changes in the pod hardware. My program will invert the hex values, but obviously can't provide the additional timing information.

I take it then, that the data is saved to floppy during the capture? Or is it captured in memory and the memory dumped (saved) afterwards?

Would the 16500A do GPIB "out of the box" or does it need additional hardware/programming? Is the additional hardware required only for inverse GPIB decoding?

Does the 16500  scan for modern protocols such as I2C or SPI ?

Sorry for all the questions, but I am trying to determine whether a basic unit with ribbon cables, pods and OS floppy purchased off eBay would be of use immediately or whether I would need to hunt around for various bits for it such as floppies, plug-in modules and decoders/programs. Or would I be better off buying a Salaea, DsLogic or Hantek USB connected LA?

When I searched for the 100/500MHz Logic Analyzer plugin, I found listings for the HP1661C but that unit is rather more expensive. I would be happy to have a reliable unit that runs at 50MHz for now.

BTW, I have just updated the output converter program posted earlier as had I spotted an error in it.
« Last Edit: July 01, 2021, 07:11:10 pm by WaveyDipole »
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #123 on: July 01, 2021, 09:21:27 pm »
The 16500A is floppy only, doesn't have the disk controller board.

The 16500 mouse is an HP proprietary HP-IL interface, might be hard to find - I don't have one, but my touch screen works.

I see that the Keysight link to the 16500B floppy disks that is on the philpem doesn't work anymore :(

I don't think I would recommend the 16500A.

The HP 10324B GPIB/RS-232C/RS-449 BUS Preprocessor module plugs into another module which has pod connectors for HP Logic Analyzers.  I finally got it to do something by removing an expansion logic analyzer module, then powering the LA back up and loading the CHPIB_I inverse assembler file for the 16510A.  It said I needed to move two of the cables - and when I was done and tried to trigger on a BASIC command that triggered without the 10324B - it only captured one event, and didn't look like it supported secondary GPIB addresses, so I'm back to my direct connection setup.
 

Offline mmcgraw74

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: Tektronix 4924 Tape Drive Emulator
« Reply #124 on: July 01, 2021, 10:11:38 pm »
On the good news front, I was able to get the TLIST data from the emulator if I used the INPUT @5,19:A$,B$,C$,D$,E$ command as shown in the first photo.  This is not a good substitute for the TLIST command as I had to know how many files prior to issuing the command and then assign each file to a different string.



Here is the logic analyzer timing diagram showing the burst transfers of each text string from the emulator to BASIC:



You can see in the 4052 photo that the TLIST @5: command still didn't work, but I figured out why.

  • The 4924 manual does not show a TLIST command - my bad
  • The 4050 manual indicates TLIST @5: would send the internal tape TLIST to GPIB device 5 - not what we want

On the good news front - that command would work if the system supported a TLIST from a 4924, but that won't happen.
I don't see TLIST in any of my recovered programs.  It is needed with the tape drive to see what files are on the tape, but my plan with the emulator is to create a MENU program in every folder including the /root/ folder.  One way to get something equivalent would be to code the TLIST secondary address command to open a specific file (like FIND 2 would open the file in my root folder) and then use READfile to display the list of files.

So, how do I get my FIND, CD, READfile and OLD code enabled on AR488_STORE?

The filenumber parameter passed to FIND will be from GPIB from the system as an integer (CR delimited)
The directory parameter passed to CD will be from GPIB from the system as a character string (also CR delimited)
« Last Edit: July 01, 2021, 11:12:45 pm by mmcgraw74 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf