WDI-II support added to z80pack Z-1

176 views
Skip to first unread message

Udo Munk

unread,
Jul 26, 2022, 4:59:34 AM7/26/22
to Cromemco

Dave Mcnaught has implemented the WDI-II harddisk controller in the z80pack Cromemco Z-1 emulation, some details can be read here:


This is commited to the DEV branch in the repository, the MASTER branch only has completed and tested finished releases. So to try it out you must checkout DEV with git after cloning the repository.

This is not finished work, it will have issues, but everyone wellcome to test the WDI and if possible help making it perfect. We do not know anything about the WDI controller besides what's in the documentation for it, never have used such a machine before.

Mike Arnold

unread,
Jul 26, 2022, 11:14:59 AM7/26/22
to Cromemco
Some good work going on here. 

I see Dave has a query about CDOS 2.58 vs 2.36. The WDI-II was introduced to handle the IMI5007 which, although still IMI Command Bus, has a much simpler interface than the IMI7710. For example, it steps like a floppy rather than use an intelligent seek-to-track command. Also, the data clock increased from 5.184MHz to 7.68MHz, hence the redesign. CDOS 2.36 can only work with the original WDI whilst CDOS2.58 works with both boards (if my memory serves...). I have both WDI and WDI-II in my collection plus working IMI7710 and IMI5007 so can do simple tests. Note that I have original Cromemco hardware so cannot test the emulator.

Mike Arnold

unread,
Jul 26, 2022, 11:15:52 AM7/26/22
to Cromemco
Oh, forgot to ask. Has someone got a decent disassembly of the WDI driver code as I am starting on a fun project?

Udo Munk

unread,
Jul 26, 2022, 12:57:54 PM7/26/22
to Cromemco
Mike Arnold schrieb am Dienstag, 26. Juli 2022 um 17:14:59 UTC+2:
I see Dave has a query about CDOS 2.58 vs 2.36. The WDI-II was introduced to handle the IMI5007 which, although still IMI Command Bus, has a much simpler interface than the IMI7710. For example, it steps like a floppy rather than use an intelligent seek-to-track command. Also, the data clock increased from 5.184MHz to 7.68MHz, hence the redesign. CDOS 2.36 can only work with the original WDI whilst CDOS2.58 works with both boards (if my memory serves...).

Thanks for this info, explains why it works with 2.58 only, now we know it is not caused by inaccurate emulation.

I have both WDI and WDI-II in my collection plus working IMI7710 and IMI5007 so can do simple tests. Note that I have original Cromemco hardware so cannot test the emulator.

Cool, if your hardware is operational one could compare functions of the emulation with the real hardware and try to find
differences in behaviour.

The emulator can be tested by anyone with a PC (even a PI seems to be good enough) runing Windows, OSX or Linux,
maybe ...BSD, with a bit of knowledge how to build applications from a git source repository.

arnol...@talk21.com

unread,
Jul 26, 2022, 1:26:45 PM7/26/22
to crom...@googlegroups.com

 

 

From: crom...@googlegroups.com <crom...@googlegroups.com> On Behalf Of Udo Munk
Sent: 26 July 2022 17:58
To: Cromemco <crom...@googlegroups.com>
Subject: Re: WDI-II support added to z80pack Z-1

 

Mike Arnold schrieb am Dienstag, 26. Juli 2022 um 17:14:59 UTC+2:

I see Dave has a query about CDOS 2.58 vs 2.36. The WDI-II was introduced to handle the IMI5007 which, although still IMI Command Bus, has a much simpler interface than the IMI7710. For example, it steps like a floppy rather than use an intelligent seek-to-track command. Also, the data clock increased from 5.184MHz to 7.68MHz, hence the redesign. CDOS 2.36 can only work with the original WDI whilst CDOS2.58 works with both boards (if my memory serves...).

 

Thanks for this info, explains why it works with 2.58 only, now we know it is not caused by inaccurate emulation.

 

I have both WDI and WDI-II in my collection plus working IMI7710 and IMI5007 so can do simple tests. Note that I have original Cromemco hardware so cannot test the emulator.

 

Cool, if your hardware is operational one could compare functions of the emulation with the real hardware and try to find

differences in behaviour.

 

*** happy to help with tests. I would prefer not to reformat the disks but I have CDOS on the 5007, Cromix+ on one 7710 and CDOS on my second dodgy 7710. ***

 

The emulator can be tested by anyone with a PC (even a PI seems to be good enough) runing Windows, OSX or Linux,

maybe ...BSD, with a bit of knowledge how to build applications from a git source repository.

--
You received this message because you are subscribed to the Google Groups "Cromemco" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cromemco+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cromemco/7d88181a-7601-4570-983a-1bf10776e302n%40googlegroups.com.

David McNaughton

unread,
Jul 31, 2022, 1:22:12 AM7/31/22
to Cromemco
Mike, great to know that you are running the original hardware.

I've got 2 open questions at the moment:
  1. Does anyone know how the WDI-II controller knows what hard disk type is connected? This isn't clear from the instruction manual
  2. Does anyone know the file size of the /etc/hdboot file from Cromix 11.27, the one I have is 4096 bytes and appears truncated
    • it would be great if a few people would attach a copy of their /etc/hdboot file from Cromix 11.27, or point me in the direction of a copy somewhere

Mike Arnold

unread,
Jul 31, 2022, 4:14:57 AM7/31/22
to Cromemco
Dave, I can answer the first question immediately. The WDI does a read of command select port 1 (see table in WDI-II manual or Z2H manual or IMI product manuals). Bits 5 and 6 contain drive type as follows:
bit 6   bit 5   drive
 0         0         7710
 0         1        7720
 1         0         7740
 1          1        5007

As far as I know Cromemco never used the 7720 or 7740 so maybe the logic is "if not 5007 assume 7710". My guess.

If someone has a 11.27 system to hand they can answer your second question (it would take me a while to set up 11.27 to find out).

Mike

David McNaughton

unread,
Jul 31, 2022, 4:43:18 AM7/31/22
to Cromemco
Thanks Mike, I'll lay around with those 2 bits and see if I can get cromix to indicate a different sized disk.

You wouldn't need to set up a 11.27 system, just find an 11.27 system disk (not from Z80pack - thats where I got mine, so it will be the same ), mount it and check /etc/hdboot

Mike Arnold

unread,
Jul 31, 2022, 11:38:11 AM7/31/22
to Cromemco
Dave, I steamed up my Cromix 11.27 system and I attach two files. A photo of the etc directory and a copy of the hdboot file. Enjoy playing with them!

Mike

etc directory.JPG
HDBOOT

David McNaughton

unread,
Jul 31, 2022, 12:29:57 PM7/31/22
to Cromemco
Mike,
thanks - that did the trick. I can now boot direct to cromix 11.27 on my emulated WDI-II hard disk direct from the RDOS prompt with ;bh0 without any boot floppy mounted.

The last trick will be working out if there is a switch setting for RDOS so that it will boot direct to HD0 without user input at the prompt.
I know there is for floppy disk boot, but I'm not sure for hard disk boot?

Udo Munk

unread,
Jul 31, 2022, 12:51:51 PM7/31/22
to Cromemco
I also verified that hdboot works, the version on our disk images is corrupt, many thanks.

If you set FP switch 13 to upper position then RDOS boots from HD (down from FD).
15/16 can be used to set the boot device, both down = 0, 15 up + 14 down = 1 ...

Mike Arnold

unread,
Jul 31, 2022, 1:18:06 PM7/31/22
to Cromemco
Dave (or is it David?), glad that I could help. I might fire a few questions at you at some point as I am starting on a project to build a WDI to IDE convertor (hardware & software). I am currently at the "inflated expectations" point in my hype cycle curve so it may take longer than I expect! Don't scrap those WDI cards.

BTW, are you in Europe or the States? Just want to make sure I don't hassle you out-of-hours.

Mike

MikeS

unread,
Jul 31, 2022, 3:52:19 PM7/31/22
to crom...@googlegroups.com
I always thought that what the world needs is a WDI (II) to IDE/SDcard/RS-232) converter and I have indeed been saving my WDI and WDI-II cards in anticipation!
 
I do have 7 or 8 IMI drives, (HD11, HD5 and HD20) but they were becoming somewhat unreliable the last time I checked any of them.
 
BTW, AFAIK the actual drive mechanism of the HD20 (5020) is the same as the 5018 used in IBM PCs for a while; as a matter of fact, Cromemco supplied a kit that converted a WDI-II IMI-interface HD20 to the STDC ST506 interface.
 
Good luck with that project!! I can't wait ;-)
 
m
----- Original Message -----
Sent: Sunday, July 31, 2022 1:18 PM
Subject: Re: WDI-II support added to z80pack Z-1

--
You received this message because you are subscribed to the Google Groups "Cromemco" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cromemco+u...@googlegroups.com.

MikeS

unread,
Jul 31, 2022, 4:13:52 PM7/31/22
to crom...@googlegroups.com
What about the 5020?
 
What issue are you having with the drive type? Which IMI drive are you using?
 
The 11.27 system disks are in the Git repository (disk #200) and you can download the hdboot file from there.
 
If there's still a problem I do have the original Cromemco distribution disks if you need anything off them.
 
I do have an 11.27 STDC configuration set up at the moment but, since two of my HD20s are in external enclosures, it wouldn't be a big deal to install a WDI-II and plug in a drive if need be.
 
m
----- Original Message -----

MikeS

unread,
Jul 31, 2022, 4:44:19 PM7/31/22
to crom...@googlegroups.com
I assume we're talking RDOS 3.08? Which FDC?
 
There is a tech bulletin (023-9124) covering RDOS3.08 in the RDOS section of the Git repository, covering the new DIP settings for the hard disks; the autoboot switch depends on the FDC and is in the appropriate manual.
 
Sorry, I'm away from home at the moment and can't look up more detail.
 
m
----- Original Message -----

David McNaughton

unread,
Jul 31, 2022, 8:31:43 PM7/31/22
to Cromemco
| BTW, are you in Europe or the States? Just want to make sure I don't hassle you out-of-hours.

I'm in Australia, the big island in the South Pacific.

| I might fire a few questions at you at some point as I am starting on a project to build a WDI to IDE convertor (hardware & software)

My few cents worth:
  • The biggest hassle with the WDI-II and therefore with the software drivers on the ROS/CDOS/cromix side is:
    • On reads, the driver doesn't tell the controller what sector it wants
      • It makes the controller read the header for the first sector to pass under the head
      • it then makes the controller count the right number of sectors until the required sector will be the next under the head
      • It then reads the next sector to pass under the head, in full, and hopefully checks the sector number read in the header to confirm it has the right sector
    • Writes are fine, the sector number is in the header provided in RAM before the sector data
  • My natural tendency would be to use an ESP32 or a RPi-PICO
    • But because of the DMA you need all 16 address lines + 8 data lines + multiple control lines
    • then you need the lines that will interface to the IDE side
    • This many I/O lines means an ESP32 or an RPi-PICO will require a lot of support latches/buffers
    • Any of the Arduino style microcontrollers with lots of I/O pins are often much slower and don't have a lot of RAM
  • Whatever you choose, you are welcome to use my code to emulate the PIO/DMA/CTC functions

David McNaughton

unread,
Jul 31, 2022, 8:35:52 PM7/31/22
to Cromemco
| What issue are you having with the drive type? Which IMI drive are you using?
  1. I don't know how the WDI-II  interacts with the connected drive to determine the drive type
  2. I am emulating both the WDI-II and the IMI drive in software (it's for Z80PACK/cromemcosim)
  3. My current implementation makes the RDOS/CDOS/cromix drivers think that a 7710 is attached to the WDI-II, which is fine, but is just by luck
  4. I'l like to experiment with emulating different drive types, but I come back to #1.

Udo Munk

unread,
Aug 1, 2022, 4:13:19 AM8/1/22
to Cromemco
I have replaced the Cromix disk images in the z80pack Github repository so that they contain the
correct /etc/hdboot.
The Cromix kernel on the disks is gen'ed so that it asks about the boot device, I like options.
If you want a system that boot from the HD and uses it as root then crogen and answer the
questions about the boot device so:

Default root device                         (Y = Yes, N = No) <Y> ?
    Boot disk                               (Y = Yes, N = No) <Y> ?

No questions asked about the boot device anymore, but for booting from HD SW13 must be On, with
Off it will boot from the FDC.

For a system build without frontpanel set the boot options in conf/system.conf, default there is:
# front panel port value for machine without fp in hex (00 - FF)
fp_port         10
That boots from FDC, set to 30 to boot from HD.

Udo Munk

unread,
Aug 1, 2022, 4:51:16 AM8/1/22
to Cromemco
MikeS schrieb am Sonntag, 31. Juli 2022 um 22:13:52 UTC+2:
If there's still a problem I do have the original Cromemco distribution disks if you need anything off them.

If it is not too much trouble to provide the orginal distribution disks then please do so.
All disk images we have so far are work disks from someone, and as we saw with the /etc/hdboot
something might be corrupted. If possible I sure would like to archive orginal distribution disks
that have not been tampered with, thanks.

MikeS

unread,
Aug 1, 2022, 11:40:28 AM8/1/22
to crom...@googlegroups.com
Will do. They are write-protected and should be 'virgin' but I can't absolutely guarantee it even though I'm the only one who's ever used them; a lot can happen in 38 years ;-)
 
When I sent you the driver package (also distribution disks BTW) I think you said you preferred .dsk images? How are they made?
 
m
----- Original Message -----
From: Udo Munk
Sent: Monday, August 01, 2022 4:51 AM
Subject: Re: WDI-II support added to z80pack Z-1

--
You received this message because you are subscribed to the Google Groups "Cromemco" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cromemco+u...@googlegroups.com.

MikeS

unread,
Aug 1, 2022, 12:09:21 PM8/1/22
to crom...@googlegroups.com
Looks like it has a signal to tell whether it's a 5" or 8" drive, presumably in order to use the appropriate protocol.
 
The only 5" drive when it came out and the manual was printed was the HD5 5007 which AFAIK spins at 4800RPM vs. the 70xx's 3600, but I wonder how it distinguishes between the 5007 and the later 5018/5021 which spins at 3600.
 
m

Udo Munk

unread,
Aug 2, 2022, 3:20:43 AM8/2/22
to Cromemco
MikeS schrieb am Montag, 1. August 2022 um 17:40:28 UTC+2:
Will do. They are write-protected and should be 'virgin' but I can't absolutely guarantee it even though I'm the only one who's ever used them; a lot can happen in 38 years ;-)

Yes of course, we'll have to check them out if they are intact.

When I sent you the driver package (also distribution disks BTW) I think you said you preferred .dsk images? How are they made?

Right, plain .dsk images are easy to deal with, created with ddump.
Reply all
Reply to author
Forward
0 new messages