• Please review our updated Terms and Rules here

KAYPRO and KayFreHD as a hard disk module

Years back I downloaded a bunch of information that involved a GAL change on the FreHD to change port address and a fairly complex piggyback adapter for the Kaypro. Is this GAL change required with the smaller board from OSH Park that's linked from this thread?

Can someone _please_ take a few minutes and explain the broad outlines of how a stock FreHD (from Ian Mavric) is used with a K10?

I am preparing for a build but I haven't completed one yet, and so this is just the result of what I have discovered through research. If something is inaccurate then I hope someone more knowledgeable speaks up.

The original FreHD was developed for the TRS-80 series of computers that historically used a WD1001 controller board to connect the computer to an MFM HD. The FreHD emulates the 1001 and the HD plugging into the TRS-80 50 pin expansion port. This work was undertaken by Frédéric Vecoven and others. Ian Mavic sells this version.

Since the Kaypro used a similar HD controller (the WD1002) a Kaypro version was started. To do this two issues needed to be addressed, first was that the WD1002 was not the same as the WD1001, the second was that Kaypro's mapped their HDs differently from the way that TRS-80's did it. I think there was a short lived scheme to make a KayFreHD that plugged directly into the later Kaypro's 50Pin HD expansion. I think that is where the talk of GAL changes came from. However, it was soon realised that the Kaypro could use the same FredHD board as the TRS-80 with the use of an interface board and some software changes to the FreHD firmware. FreHD firmware version 2.14 will work with both the Kaypro and the TRS-80.

There are two ways to make the physical connection. Later Kaypros with the 50 way HD expansion can get away with the smaller board available from OSHPark. This board moves some lines around and buffers some signals and works with FreHD firmware 2.14 to emulate the WD1002/HD combination. However, some later Kaypros have the right main board but the 50 pin connector and/or the support chips for the HD are missing. In addition machines using earlier '83 boards don't have this connector at all. To solve this problem there is another project started by JAQ that adds a SHIM board between the CPU/EPROM and the rest of the computer.


http://www.quicktrip.co.nz/jaqblog/home/89-kprofrehd/

This does two jobs. First it gives earlier machines the 50 pin HD connector needed for the FreHD but it also adds support for larger EPROMs in the older machines. This is important because the Kaypro must have a HD aware firmware and the older machines dont support EPROMs large enough to support that code.

On the subject of boot ROMs, it seems that both the Advent ROM and the Kayplus ROM support HDs but the Kayplus seems to have errors with some programs that are unrelated to the HD. As far as I know this was not resolved, so the Advent ROM is still the prefered choice.


Fletch
 
Thanks very much for that great writeup! I had to order (3) of the 50-pin adapter boards from OSH Park, but only need one. If anyone else is interested in the others, drop me a PM. Yours for $8 ea. plus postage.
 
So, time for an update. Had some problems with the 2764 EPROMs I'd sourced locally so I doubled up the ROM image and used 27C128s instead. That worked and I updated the ROM and the CP/M system files for Advent TurboROM'84

OSHPARK took a surprisingly long time to deliver the 3 PCBs, but I have them and have assembled an interface. I've built a FreHD from my spares and will program the GAL and the PIC in the next few days. Once that's done I will test the FreHD using a known working copy of FW 2.13 on the Model 4P and if all goes well I'll reflash to Fw 2.14 and try to get it working with the Kaypro.
 
As I move from one system to the next, I decided to start looking into this for my Kaypro. I have a few questions after reading this thread (thanks to Fletch for the quick -catch up- post, though i did go through the entire thread). So I guess I'll go in order of questions:

FreHD - The original thread started with Frank who made an alternate KayFreHD. I never saw any gerbers or anything for that, and since everyone started using the FreHD boards, I'm guessing this is the route everyone does now and the original single board was abandoned? It sounds like FreHD v. 2.14 is the one everyone is using for this project now? I only ask because I'd have order either board, and since my TRS-80 already has a few ways to use a hard drive, I don't need any more for it so theres no benefit to using one board over another (unless using the kayfrehd board saves a pcb somehow)

Add-on board - I see Geneb has an add-on board which you need to make the FreHD work on many of the Kaypro's with appropriate 50 pin connector. I assume this works on any kaypro (assuming the 50 pin issue mentioned below)

Shim - There is mention of a Z80 Shim. Since my (working) kaypro is a 2/83, I'm guessing I would need the Shim since I obviously don't have the connector needed on board. Are there gerbers anywhere for this Shim? I briefly looked at Jaq's blog, so if the info is there, i'll look further. The question is, with the Shim, would I also need the Add-on board as well?

Rom - I'm guessing it would also need the 2732 - 2764 adapter to use a better rom chip. I'm getting some of those type of 24pin to 28pin boards made anyway because it seems like everything I have almost needs these (trs-80, c64, etc). I assume it's just the normal adapter board that all these other systems use to allow for use of 2764 and larger roms in a 24 pin socket? Once I have that, one of the advent roms would work?

So in total, it would need all 4 of these pcb's to complete this task?
 
As I move from one system to the next, I decided to start looking into this for my Kaypro. I have a few questions after reading this thread (thanks to Fletch for the quick -catch up- post, though i did go through the entire thread). So I guess I'll go in order of questions:

>FreHD - The original thread started with Frank who made an alternate KayFreHD. I never saw any gerbers or anything for that, and since everyone started >using the FreHD boards, I'm guessing this is the route everyone does now and the original single board was abandoned? It sounds like FreHD v. 2.14 is the one >everyone is using for this project now? I only ask because I'd have order either board, and since my TRS-80 already has a few ways to use a hard drive, I don't >need any more for it so theres no benefit to using one board over another (unless using the kayfrehd board saves a pcb somehow)

I think they settled on using the same board for both the TRS-80 and the Kaypro. The only change is that for Kaypro the FreHD must run v2.14 of the firmware since that was the update that added Kaypro support.

>Add-on board - I see Geneb has an add-on board which you need to make the FreHD work on many of the Kaypro's with appropriate 50 pin connector. I assume >this works on any kaypro (assuming the 50 pin issue mentioned below)

This is for Kaypros with 50 way HD expansion headers on the motherboards, basically machines with '84 or Universal motherboards.

>Shim - There is mention of a Z80 Shim. Since my (working) kaypro is a 2/83, I'm guessing I would need the Shim since I obviously don't have the connector >needed on board. Are there gerbers anywhere for this Shim? I briefly looked at Jaq's blog, so if the info is there, i'll look further. The question is, with the >Shim, would I also need the Add-on board as well?

I would double check Jaq's blog but I believe that the 50pin connector on his board is designed to plug straight into the FreHD and there no need for Geneb's adaptor.

>Rom - I'm guessing it would also need the 2732 - 2764 adapter to use a better rom chip. I'm getting some of those type of 24pin to 28pin boards made anyway >because it >seems like everything I have almost needs these (trs-80, c64, etc). I assume it's just the normal adapter board that all these other systems use to >allow for use of 2764 and >larger roms in a 24 pin socket? Once I have that, one of the advent roms would work?

The SHIM includes a socket for a larger ROM and so a separate ROM expander isn't needed. However, I think that to use SHIM board with a 2'83 you need to use different PAL code on the SHIM board and (possibly??) connect an extra signal to the motherboard. The last post in Jaq's series covers this.

So in total, it would need all 4 of these pcb's to complete this task?

As far as I know, you need a SHIM PCB, A FreHD PCB, V2.14 of the FreHD firmware and an Advent TurboROM for an '83 motherboard (along with a set of turboROM utilities.)
 
As far as I know, you need a SHIM PCB, A FreHD PCB, V2.14 of the FreHD firmware and an Advent TurboROM for an '83 motherboard (along with a set of turboROM utilities.)

Thanks. So the Shim replaces the need for the add-on board that geneb made? Meaning the frehd can connect directly to the shim?
 
Does anyone have an image of a working FreHD on a Kaypro or just a copy of the files (to save on setup time?) Also, I have a spare assembled addon board to connect a FreHD to a kaypro. Can send photos, will mail in Continental US for $18.50 shipped. PM me
 
Thanks. So the Shim replaces the need for the add-on board that geneb made? Meaning the frehd can connect directly to the shim?

Being new I cant edit my posts to correct formatting errors. I'd answered the question in my last post but it was lost in the wall of text.

As I move from one system to the next, I decided to start looking into this for my Kaypro. I have a few questions after reading this thread (thanks to Fletch for the quick -catch up- post, though i did go through the entire thread). So I guess I'll go in order of questions:

FreHD - The original thread started with Frank who made an alternate KayFreHD. I never saw any gerbers or anything for that, and since everyone started using the FreHD boards, I'm guessing this is the route everyone does now and the original single board was abandoned? It sounds like FreHD v. 2.14 is the one everyone is using for this project now? I only ask because I'd have order either board, and since my TRS-80 already has a few ways to use a hard drive, I don't need any more for it so theres no benefit to using one board over another (unless using the kayfrehd board saves a pcb somehow)

I think they settled on using the same board for both the TRS-80 and the Kaypro. The only change is that for Kaypro the FreHD must run v2.14 of the firmware since that was the update that added Kaypro support.

Add-on board - I see Geneb has an add-on board which you need to make the FreHD work on many of the Kaypro's with appropriate 50 pin connector. I assume this works on any kaypro (assuming the 50 pin issue mentioned below)


This is for Kaypros with 50 way HD expansion headers on the motherboards, basically machines with '84 or Universal motherboards.

Shim - There is mention of a Z80 Shim. Since my (working) kaypro is a 2/83, I'm guessing I would need the Shim since I obviously don't have the connector needed on board. Are there gerbers anywhere for this Shim? I briefly looked at Jaq's blog, so if the info is there, i'll look further. The question is, with the Shim, would I also need the Add-on board as well?

I would double check Jaq's blog but I believe that the 50pin connector on his board is designed to plug straight into the FreHD and there no need for Geneb's adaptor.

Rom - I'm guessing it would also need the 2732 - 2764 adapter to use a better rom chip. I'm getting some of those type of 24pin to 28pin boards made anyway because it seems like everything I have almost needs these (trs-80, c64, etc). I assume it's just the normal adapter board that all these other systems use to allow for use of 2764 and larger roms in a 24 pin socket? Once I have that, one of the advent roms would work?
The SHIM includes a socket for a larger ROM and so a separate ROM expander isn't needed. However, I think that to use SHIM board with a 2'83 you need to use different PAL code on the SHIM board and (possibly??) connect an extra signal to the motherboard. The last post in Jaq's series covers this.

So in total, it would need all 4 of these pcb's to complete this task?

As far as I know, you need a SHIM PCB, A FreHD PCB, V2.14 of the FreHD firmware and an Advent TurboROM for an '83 motherboard (along with a set of turboROM utilities.)
 
Does anyone have a Kaypro version of the FreHD utilities? As a base minimum it would be useful to have VHDUTL for debugging.
 
So there is progress.

1) I created a new HD image on the TRS-80. VHDUTL can create an image for a ST-251 on the fly as part of the mount (MNT) option. This is a 45MB drive which is all I need for the Kaypro.

2) I connected up the adaptor board and the FreHD. Unfortunately the 50 way female connector I had has very short mounting pins so I couldnt get the adaptor to sit properly on the Kaypro MB and maintain a good contact. I need either a taller socket or some spacers to raise the mainboard a little to allow the daughterboard to clear the floppy cage. In the interim I made a second adaptor that can take a short ribbon cable.

3) With a ribbon cable linking the adaptor to the Kaypro motherboard ADVFMT could see the FreHD as a HD adaptor but there was a massive amount of garbage on screen and lost characters when typing. Looking at the schematic for the adaptor it seems that the only source of power for the buffer chips is the two pin PWR connector on the adaptor board. It does seem to work without this power connected, maybe the LS chips can draw enough power from their inputs, it could be that this problem would be less if the adaptor was plugged straight into the Kaypro MB. For now I am powering both the adaptor and the FreHD. This seems to solve the garbage character issue.

4) I discovered that ST-251 is NOT in the prepackaged list of HD's supported by ADVFMT. I therefore put in the required heads and cylinders using option 20 (user defined drive) This works and I ran the full HD test suite to test the FreHD without issue.

5) I successfully partitioned the drive into 6 partitions of about 8MB each. I selected 4kb blocks and 1024 directory entries. ADVFMT says it formated ok. I checked in Turbomap and all drives are there.

HOWEVER

I cant copy anything onto the HD partitions, when I do I am told that there isnt enough directory space. Since these drives are empty I dont understand why that is happening. I have tried a variety of formats and block/directory sizes without luck

Open to suggestions
 
4) I discovered that ST-251 is NOT in the prepackaged list of HD's supported by ADVFMT. I therefore put in the required heads and cylinders using option 20 (user defined drive) This works and I ran the full HD test suite to test the FreHD without issue.

Can you post those settings?
 
Can you post those settings?


Cylinders: 840
Heads: 6
Skew: 1
No landing Zone

I have tried both Advent 512 byte format and Kaypro format. The Advent format lets you partition the drive with different combinations of block size and directory entries, none of which work. I have tried a couple of different SD cards including the one from the working TRS-80. The disk image filesize does increase after partitioning and the FreHD passes the "surface test" where there are multiple low level reads and writes to the card.
 
Last edited:
More progress.

The image generated by the VHDUTL command produces a file that is only a few Kb in size and is expected to expand as more data is added. I can see that this works because just running the surface test on the drive increases the SD card file to around 32k. As a hunch I took one of Ian's TRS-80 image files that is about 42MB in size and formatted it for the Kaypro. This produced an immediate improvement. Instead of PIP failing on the first file I was able to transfer about 20 files before I ran out of directory space. When I list the directory, I see a number of "blank" <space>.<space> entries between the legitimate files. My guess is that the format of the directory isn't working properly.

I tried again this time using Advent 1024 format. This time I was able to copy all the files (about 28 files) from A: to C: Directory listing again showed garbled none existent entries. I used Turbogen to copy a 56K system image to C:. This resulted in a bootable HD but all files on C: disappeared. Recopied them from A: and this time the directory is clean with no garbled entries.

I never had a CP/M machine with a HD back in the day, would we expect that copying the system tracks to a HD would delete the data on that partition? Do I have to copy system tracks onto every partition?
 
I'm about to embark on replacement of the WD controller and disk in my Kaypro 10 with the FreHD. One concern at the moment is how to transfer the contents of the current (flaky) Seagate disk to the FreHD. I can image the hard drive using David Gesswein's mfmemu device, so that part of the equation is doable. Can anyone point me to a format description of the FreHD image file? I assume I'll need to prepend some sort of informational header to the raw block data, but prefer not to engage in a reverse engineering exercise if it's documented somewhere.
 
After a lot of digging, I found the header description in 'reed.h' from the xtrs sources. What I'm not understanding at all is how the FreHD determines the emulated disk geometry. The cylinder count is restricted to a single byte and there is no field for number of heads. The original drive had 820 cylinders and 6 heads, so I'm not getting how to properly describe it in the header.
 
More progress.

The image generated by the VHDUTL command produces a file that is only a few Kb in size and is expected to expand as more data is added. I can see that this works because just running the surface test on the drive increases the SD card file to around 32k. As a hunch I took one of Ian's TRS-80 image files that is about 42MB in size and formatted it for the Kaypro. This produced an immediate improvement. Instead of PIP failing on the first file I was able to transfer about 20 files before I ran out of directory space. When I list the directory, I see a number of "blank" <space>.<space> entries between the legitimate files. My guess is that the format of the directory isn't working properly.

I tried again this time using Advent 1024 format. This time I was able to copy all the files (about 28 files) from A: to C: Directory listing again showed garbled none existent entries. I used Turbogen to copy a 56K system image to C:. This resulted in a bootable HD but all files on C: disappeared. Recopied them from A: and this time the directory is clean with no garbled entries.

I never had a CP/M machine with a HD back in the day, would we expect that copying the system tracks to a HD would delete the data on that partition? Do I have to copy system tracks onto every partition?

Hi, Fletch. I just re-read your posting. After you use the Advent tools to partition and format the drive, you must generate + write a system,then reboot before trying to access the new volumes. Perhaps you did that up front, but your description above implies you generated a new system _after_ first trying to access the drive. If that was indeed the case, I'm not surprised there were issues.
 
And... Success! The header description from the xtrs sources predates Kaypro CP/M support. The required information is in 'reed.h' from the FreHD v1.14 firmware sources. The reserved byte at offset 26 is repurposed for number of heads. Cylinder count is now a 16-bit word with high-order byte at offset 27 and low-order at 28. One point I'm still a bit unsure about is offset 29: number of sectors per cylinder. I'm assuming this means actual physical sectors (1024 bytes in the case of the Advent hard disk format) rather than TRS80 equivalent sectors (256 bytes). For my 6-head drive, this is 54 (36h).

The steps to migrate my existing drive:

Capture a sector data image from the ST251 using the mfmemu device (http://www.pdp8online.com/mfm/mfm.shtml)

Grab the 256 byte header from any FreHD hard disk image (dd if=hdimage of=header.bin bs=256 count=1).

Use a hex editor to enter physical drive parameters per 'reed.h' and my advice above. Zero the checksum byte at offset 3.

Write a quicky C utility to generate the checksum (described in reed.h), then use hex editor to patch that into location 3.

Concatenate header and data into a FreHD image (cat header.bin data.bin > hard4-1)

Copy hard4-1 to an SD card and insert into FreHD

Turn on system and... bingo! Booted the first time and appears to be operating correctly. All six CP/M volumes are showing up as expected. I'm going to continue testing, but so far so good. Next step is to update the vhdutlkp.com utility to accept real-life head, cylinder and sector counts rather than assuming the TRS80 LDOS environment.
 
Here are a couple of photos of the FreHD and adapter installed in my K10:

install2b.jpg

install2a.jpg

I highly recommend mounting a female DIP connector and plugging the piggyback directly into the FreHD. Worked out very well. By angling the power connector, there's plenty of height for the 50-pin cable from the motherboard. All power is coming over the 50-pin connector from the motherboard. Although there have been reports of problems with this approach, it seems quite stable. Getting rid of the hard drive removed the major source of heat from the system. Although not shown here, I ended up replacing the noisy AC fan with an adjustable speed DC fan from my scrap box. I can back it down to just a whisper and it keeps the unit nice and cool.

After a bit of thought, I'm not going to bother with the vhdutlkp utility. Should be simpler to code a Python application that can be used on any modern platform to create a blank Kaypro-compatible hard disk image.
 
Last edited:
I'm planning on embarking on this project soon but for an older Kaypro II. Would be great if anyone could share any Kaypro Hard Drive Images they have created.

I do have a FreHD to build (as well as the shim for the older kaypro), but I'm curious is anyone has tried this with the TRS-IO instead of the FreHD (or has an idea why it wouldn't work). I'll likely try both but it would cool if that worked as well.
 
Back
Top