• Please review our updated Terms and Rules here

Pertec-interface tape controller.

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
I've been working on-and-off on my Pertec interface tape controller project. At this point, the device can read and write tapes to/form SIMH .TAP files stored on a microSD card and transfer them via USB serial to another system (you could also pop the SD card out and use a reader). The project is stand-alone, needing only a USB connection for a text console interface. My design was for streaming drives and I've tested it with a Fujitsu M2444AC and a Qualstar 1260. Both appear to work.

The initial PCB run only required a few bodge wires to change one of the FFs to edge-triggered from level. Otherwise, pretty slick so far with lots and lots of program memory left over. I piggyback an inexpensive STM32F407 MCU board to save folks from the agony of fine-pitch SMT.
So now, I'm looking at a final respin of the PCB and I'm open for suggestions.
-----------------------
One final issue is that I'm using Ymodem for transfers and it's not nearly as fast as a transfer could be. I'm thinking about changing the USB interface from a CDCACM to a composite CDCACM+MSD one.

Thoughts?
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
Yeah, I know. :) I suppose I do a WiFi interface...
I've got a spare UART header on the board, but it's TTL levels, so folks are going to hook a USB-to-serial dongle on that and you're back to USB again...
 
Last edited:

faxm0dem

New Member
Joined
Sep 19, 2022
Messages
2
Hi there,

I'm new here, and I'm interested in your project for the following reaseon.
We have a working Kennedy 9000 + 9219 and we'd like to control it using modern hardware. We would mostly like to read some old tapes, but write would be neat too.
One option we have is to purchase an ISA Pertec controller card from new old stock, and put it into a not-too-recent PC running DOS.
But it would be more practical to use more modern hardware.

If I understood correctly, your project is about controlling a pertec compatible tape drive with the SIMH emulator ?
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
I suppose you could, but my immediate goal is to image existing old tapes, so I work from SIMH TAP files--and I can read and write them just fine. The drive I use mostly for PE and GCR tapes is a Fujitsu M2444AC--that's a 2444 with the auxiliary buffer board installed. Works well in streaming mode; it'll do random reads, but the need to get a "running start" at a block makes little sense. The Qualstar 1260 is similarly oriented toward streaming.

So the interface is a USB menu-driven affair working to and from MicroSD storage. I have little doubt that the firmware could be adapted to do anything you really desired. The PCB has the basic interface logic in through-hole ICs--it's the MCU interface that has the smarts. Right now, I'm connecting to the board using Linux minicom, but any similar package would work, as it's not speed-critical. Depending on the MCU choice, you could adapt the interface to be RS232C serial or WiFi. The basic requirements for the MCU is sufficient speed to be able to service the data demands of the drive, a sufficient number of GPIOs and enough memory to hold one tape block plus whatever the MCU program needs.

Hope this helps.
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
Here's the log of a sample tape read that may give you a better idea. Still a fair amount of polishing--instead of moving files around using ymodem, I want to make this a composite USB device that allows for direct access of the SD card files.
Code:
Press 'G' start

Ready...
Delay is 9

Tape Status:  Offline       Write enabled Stop on 2 tapemarks

? dump
5120 bytes in block:
0000: 30 37 30 37 30 37 30 30 31 34 34 36 30 31 37 30   0707070014460170
0010: 37 36 30 34 30 37 37 35 30 30 35 35 31 35 30 30   7604077500551500
0020: 30 34 35 37 30 30 30 30 30 33 30 30 30 30 30 30   0457000003000000
0030: 30 34 34 34 33 35 30 37 31 30 36 30 30 30 30 30   0444350710600000
0040: 34 30 30 30 30 30 30 30 30 30 30 30 75 73 72 00   400000000000usr.
0050: 30 37 30 37 30 37 30 30 31 34 34 36 30 31 37 30   0707070014460170
0060: 37 37 30 34 30 37 37 35 30 30 35 35 31 35 30 30   7704077500551500
0070: 30 34 35 37 30 30 30 30 30 33 30 30 30 30 30 30   0457000003000000
0080: 30 34 34 34 33 35 30 37 31 31 31 30 30 30 30 31   0444350711100001
0090: 30 30 30 30 30 30 30 30 30 30 30 30 75 73 72 2f   000000000000usr/
00a0: 73 72 63 00 30 37 30 37 30 37 30 30 31 34 34 36   src.070707001446
00b0: 30 31 37 31 30 30 30 34 30 37 37 35 30 30 35 35   0171000407750055
00c0: 31 35 30 30 30 34 35 37 30 30 30 30 32 30 30 30   1500045700002000
00d0: 30 30 30 30 30 34 34 34 33 35 32 32 33 33 37 30   0000044435223370
00e0: 30 30 30 31 34 30 30 30 30 30 30 30 30 30 30 30   0001400000000000
00f0: 75 73 72 2f 73 72 63 2f 58 31 31 00 30 37 30 37   usr/src/X11.0707


Tape Status:  Online     Ready Protected Stop on 2 tapemarks

? rewind

Tape Status:  Online  Loadpoint   Ready Protected Stop on 2 tapemarks

? create tape10.tap
Block 100
Block 200
Block 300
Block 400
Block 500
Block 600
Block 700
Block 800
Block 900
Block 1000
Block 1100
Block 1200
Block 1300
Block 1400
Block 1500
Block 1600
Block 1700
Block 1800
Tapemark hit at 1818.
Block 1900
Block 2000
Block 2100
Block 2200
Block 2300
Block 2400
Block 2500
Block 2600
Tapemark hit at 2676.
Block 2700
Block 2800
Block 2900
Block 3000
Block 3100
Block 3200
Block 3300
Block 3400
Block 3500
Block 3600
Block 3700
Block 3800
Block 3900
Block 4000
Block 4100
Block 4200
Block 4300
Block 4400
Block 4500
Block 4600
Block 4700
Block 4800
Block 4900
Block 5000
Tapemark hit at 5037.
Block 5100
Block 5200
Block 5300
Block 5400
Block 5500
Block 5600
Block 5700
Block 5800
Block 5900
Block 6000
Block 6100
Block 6200
Block 6300
Block 6400
Block 6500
Block 6600
Block 6700
Block 6800
Block 6900
Block 7000
Block 7100
Block 7200
Block 7300
Block 7400
Block 7500
Block 7600
Block 7700
Block 7800
Block 7900
Block 8000
Block 8100
Block 8200
Block 8300
Block 8400
Block 8500
Block 8600
Block 8700
Block 8800
Block 8900
Block 9000
Block 9100
Block 9200
Block 9300
Block 9400
Block 9500
Block 9600
Block 9700
Block 9800
Block 9900
Block 10000
Block 10100
Block 10200
Block 10300
Block 10400
Block 10500
Block 10600
Block 10700
Block 10800
Block 10900
Block 11000
Block 11100
Block 11200
Block 11300
Block 11400
Block 11500
Block 11600
Block 11700
Block 11800
Block 11900
Block 12000
Block 12100
Block 12200
Block 12300
Block 12400
Block 12500
Block 12600
Block 12700
Block 12800
Tapemark hit at 12892.
Tapemark hit at 12893.
2 consecutive tape marks--ending.

Rewinding...

File tape10.tap written.

12893 blocks read.
4 files; 65986560 bytes copied.

Tape Status:  Online  Loadpoint   Ready Protected Stop on 2 tapemarks

? unload

Tape Status:  Offline  Loadpoint     Protected Stop on 2 tapemarks

? help

Legal commands are:

  HELP       Show all commands
  FILES      Show files on SD card
  DELETE     Delete (file name)
  TIME       Set date and Time
  SDINIT     (Re-)initialize SD interface
  SEND       Send YMODEM (file name)
  STATUS     Show tape status
  REWIND     Rewind tape
  CREATE     Create image file <filename>
  WRITE      Write tape from image <file> 
  DUMP       Read and disply tape block
  INIT       Initialize tape interace
  ADDRESS    Set tape drive address
  BACKSPACE  Backspace tape n blocks
  UNLOAD     Unload tape and go offline
  STOP       Stop after n tapemarks
  RETRIES    Set number of retries


Tape Status:  Offline       Protected Stop on 2 tapemarks

? files

08/30/2022  18:41:40  17780284  tape2.tap
08/31/2022  15:31:02  66089688  tape10.tap

14962600 KB free

Tape Status:  Offline       Protected Stop on 2 tapemarks

? send tape10.tap

Ready to send ymodem tape10.tap...

Tape Status:  Offline       Write enabled Stop on 2 tapemarks

?
 

NeXT

Veteran Member
Joined
Oct 22, 2008
Messages
7,088
Location
Kamloops, BC, Canada
Yeah, I know. :) I suppose I do a WiFi interface...
I've got a spare UART header on the board, but it's TTL levels, so folks are going to hook a USB-to-serial dongle on that and you're back to USB again...
What about us folks with spare serial terminals? :p
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
Sure, all you need is a 3.3V to EIA level translator. UART I/O is part of the source code, so it would just be a matter of changing the output device... (The UART code is mostly there for debugging).
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
If it's flagged by the formatter as an uncorrectable error, we include the error flag in the TAP file block header. Corrected errors are noted in the log, but otherwise no flags are set in the header. But yes, all data from the formatter is included.
 

faxm0dem

New Member
Joined
Sep 19, 2022
Messages
2
Thanks for the details. Dumping to a .tap file would certainly cover our current needs :)
Do you plan to release the code, schematics, PCB layout ?
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
I need some input before my next re-spin of the PCB.

The first version uses the STM32F407VE board shown here
I like this board because it has a battery-backed clock as well as connectors for SPI, JTAG and serial interfaces. And it was inexpensive if ordered through AliExpress ($10-12 each). I have no idea what one goes for now.

But it's somewhat dated; I'm wondering if a Teensy board might be a better choice. Code-wise, they're pretty much the same, though you don't get the battery-backed clock.

In fact, any MCU board with about 35 available GPIOs should work.

Thoughts?
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
Well, an external battery can take care of keeping the RTC going, if desired.
Just ordered 5 Teensy 4.1 batteries from Aliexpress for $2 each+shipping; total bill was less that $15.

It's going to be hard to do better than this--600MHz CPU with SD micro and even a header for Internet. Has a meg of SRAM and 8M of program memory.

Has sufficient GPIO, so maybe it's the answer. I should have a solid opinion by November.
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
Going back over my choices for MCU boards with sufficient I/O, the STM32F4VE boards are a bargain. Even with chip shortages, they're $13-14 USD on Aliexpress.
Lots of vendors.

The Teensy 4.1 is $30-50 and doesn't really give much more utility.
I looked at the RPi Pico, but it's a 3.3V GPIO and not a lot of it. I'd also have to add a MicroSD card.

Any other suggestions?
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
40,258
Location
Pacific Northwest, USA
I've been playing a bit with USB composite CDC+MSC and decided that it's going to create more problems than it solves. Even limiting remote access to the filesystem to read-only, there's the problem of reading a file while it's still being written (USB MSC simply passes the disk data over as a type of SCSI drive; there's no relation at all to the filesystem software in the MCU.) Incredibly, there doesn't seem to be a USB class that pertains to raw file data only. And older Windows OSs (e.g. XP) tend to choke on USB composite devices.

So, my inclination is to keep the USB interface as a simple CDCACM one and provide YMODEM file transfer-out only as part of that. For those hard-bitten traditionalists, that also allows the UART interface on the STM32F407 to be used instead of USB.

For those doing bulk transfers of many reels of tape, the MicroSD card can be popped out and handled on any host capable of handling the cards.

Next is a slight re-spin of the PCB to incorporate the few bodge wires and then putting the whole thing up on Github. It works well enough for me and the MCU software can be played with to anyone's satisfaction. All of the physical tape drive interaction is localized in one module.
 
Top