• Please review our updated Terms and Rules here

The Official Nabu PC Floppy Disk Controller thread

Well I just built my FDC replica and made my very own CPM bootable floppies with the help of greazeweazle and cpm tools. You can get the HFE and use with HxC2001 or image it to real floppies using the gw or kryoflux. These are the 3.5" with my white over black CP/M, Turbo Pascal and WordStar. I make my own images with a final touch of a real flux track0 on it.

The process is simple, using DD i create an empty floppy image:

for a nab3 (3.5 720KB):

diskdef nab3
seclen 1024
tracks 160
sectrk 5
blocksize 2048
maxdir 384
skew 2
boottrk 1
os 3
end

You use:

dd if=/dev/zero ibs=5K count=160 | tr "\0" "\345" >> new_nab3.dsk

now using cpmcp copy all the files you need. Don't forget cpm3.sys and ccp.com for a bootable.

Then using the HxCSoftware I load the raw image I created as:

1679422984340.png

Then save it as HFE. Now using greazeweazle you write this entire image to the floppy. And now comes the final touch:

Using greazleweazle again you write just the track0.0.raw from a 3.5 bootable flux, like the one provided by snucci and voila, a bootable disk.

Here attached HFE images with the track0 on it. I re-fluxed the floopies and imported into HxCSoftware again. You can use them to image your floppies or use direct in a hxc2001 floppy.
 

Attachments

  • nabu_35.zip
    424.4 KB · Views: 15
for a 5.25 360KB the process would be:

dd if=/dev/zero ibs=5K count=80 | tr "\0" "\345" >> new_nab2.dsk

diskdef nab2
seclen 1024
tracks 80
sectrk 5
blocksize 1024
maxdir 192
skew 2
boottrk 1
os 3
end
 
I use the hxc to import the img to set a compatible GAP3. But maybe i can use gw directly. I just need to figure out how to set the gap there
 
it looks like the HxC2001/Gotek usage is limited on Nabu. You can make HFE images from flux on PC and it will keep the DPT on track0 but looks like fluxing an image direct to the HxC2001 the drive will not store the DPT, so you cannot format or make new disks only using the HxC :/
 
I have found ways to get an image onto a disk using what everyone else has used but I am a bit confused when making my own.
Why can't I:
  • Take one of the images that you gave above in the zip file. I am going to use cpm35.hfs
  • Use HxCFloppyEmulator and convert to an img file.
  • cpmcp -f nab3 cpm35_hfe.img 0:ccp.com ccp.com
  • cpmcp -f nab3 cpm35_hfe.img 0:cpm3.sys cpm3.sys
  • dd if=cpm35_hfe.img of=new_nab3.img ibs=5K count=1
  • run dd if=/dev/zero ibs=5K count=159 | tr "\0" "\345" >> new_nab3.img
  • cpmcp -f nab3 nab3.img ccp.com 0:ccp.com
  • cpmcp -f nab3 nab3.img cpm3.sys 0:cpm3.sys
  • Use HxCFloppyEmluator and convert the new image with the correct GAP3
I know that this does not work but why not?

One thing I noticed is that if you use the parameters above using HxCFloppyEmulator the 250000 bitrate and 300 rpm you get a file size of 1961k (your file size).

If you look at your file you created it says that, at least the first track, is a speed of 248000 bitrate and 296 rpm which should have created a 2001kb file.

So, after trying a bunch of things I think that your image is a 250000 bitrate image but your track 0 you are overwriting in the image is at 248000 bitrate and 296 rpm?

Very confusing.

Also, I don't understand why your diskdef boottrk says 1 instead of 0. Shouldn't it be zero?

Gary
 
I have been doing some research on the DPT but have not found a solution yet. I was thinking of possibly starting to post in the HxC forums. I might still do that. Might as well use what I paid for.
 
I have noticed I can use this raw configuration:
1681069104491.png

  • create an empty floppy
  • export in hfe format
  • save the new empty floppy image onto a thumb drive for drive B:
  • boot into your cpm35.hfe image on drive A:
  • format drive B:
  • backup A: to B:
I can then boot from the backup.

Would this even work if the DPT was not being transferred during the backup?

Another question about your cpm definition. Since we are not using a skew in the HFE format why do you have a skew in the cpm definition? It seems to work better without a skew in both places.

Gary
 
When you convert a HFE file to a raw image format file, you end up with only the sector data... you lose all the other data that is present in a formatted track (gap data, index marks, ID record data, crc, etc...), data that a HFE file retains. While that isn't an issue with many disk formats, it does present an issue with the NABU format. Specifically, the NABU format embeds data in gap 1 at the start of track 0 that the cp/m loader and BIOS look for and use. This 'out of band' data happens to be the bytes that represent the cp/m Disk Parameter Block. If the NABU cp/m loader doesn't find that data, it will not boot the disk. The BIOS looks for it and actually configures the DPB with the data that it finds. The NABU uses 3 different floppy DPB's for bootable disks... SSDD 40 trk, DSDD 80 trk, and DSDD 160 track. The DPB for each varies, and so the specific embedded data will depend on the disk format used.

The reason you can create an empty HFS file and format it with the NABU format utility to create a working bootable floppy image is because it's the NABU format utility that puts the out of band data on the disk. You will note that the format utility prompts for the type of disk you are formatting, and based on your response it will put the appropriate DPB data in gap 1 for the selected floppy format.

It's a clever way to go about supporting multiple disk formats, but it makes using images somewhat more challenging.
 
I have never been able to get a formatted disk to boot yet. I can do a backup that seems to boot. Not being able to format and boot a disk would be another question. Has anyone been able to do that?
 
I have never been able to get a formatted disk to boot yet. I can do a backup that seems to boot. Not being able to format and boot a disk would be another question. Has anyone been able to do that?

You can't boot a disk that has simply been formatted. You need to copy the system track contents to the newly formatted disk, as well the required system boot files.

The COPYSYS.COM utility should be on your bootable disk. After formatting a new disk, you should run it. It will prompt you for source/destination drives along the way (the utility is written for an 80 column terminal, so you will need to scroll left/right to see the full text of the prompts), and it will copy the system track from your working boot disk to the newly formatted disk. It will also prompt you to copy CPM3.SYS to the the new disk as well... answer Y to that.

For some reason, the utility does *not* copy CCP.COM to the new disk, but this file is required to successfully boot. So after COPYSYS is finished, you need to do this:

Code:
PIP B:=CCP.COM

Your new disk should now be bootable.
 
Last edited:
I've recently got my FDC working, with a FlashFloppy Gotek. I'm using the CPM boot disk in HXC format provided by Santo (I think?) in his Nabu FDC YouTube video. Does anybody know where I can get additional HXC format images compatible with my Gotek, or know how I can create such images myself please?
 
I'm gonna need to dig up a FDC at some point...and a couple old Tandon-style drives...and a couple disk ][ shells... 😜
 
I've recently got my FDC working, with a FlashFloppy Gotek. I'm using the CPM boot disk in HXC format provided by Santo (I think?) in his Nabu FDC YouTube video. Does anybody know where I can get additional HXC format images compatible with my Gotek, or know how I can create such images myself please?

Sorry, I meant HFE of course, not HXC.
 
I've recently got my FDC working, with a FlashFloppy Gotek. I'm using the CPM boot disk in HXC format provided by Santo (I think?) in his Nabu FDC YouTube video. Does anybody know where I can get additional HXC format images compatible with my Gotek, or know how I can create such images myself please?

The original HFE files were created using flux transitions extracted from original NABU floppy disks. Briefly, a tool such as a Kryoflux or Greaseweazle would be used to extract the flux data, and then that data is converted to the an HFE format image using a tool such as the HxC Floppy Emulator software. Per my post above, this process retains all of the required data needed by the NABU to recognize the disk image as a valid NABU image.

Additional images can be found on @snuci 's web site found here.
 
Thanks, I had found those other images (there are only two in HFE format, one of which is a blank disk, useful in itself of course).

I was hoping there would be a easy(ish)way of creating an HFE image from a selection of “pure” CP/M files, rather than a direct conversion of a physical floppy? I.e. so I can leverage the large amount of existing CP/M software out there already, see what will work on the NABU.

(Still really hoping somebody else has been through this and would be willing to share their images. If I do get there first I definitely will!)
 
Well I just built my FDC replica and made my very own CPM bootable floppies with the help of greazeweazle and cpm tools. You can get the HFE and use with HxC2001 or image it to real floppies using the gw or kryoflux. These are the 3.5" with my white over black CP/M, Turbo Pascal and WordStar. I make my own images with a final touch of a real flux track0 on it.

The process is simple, using DD i create an empty floppy image:

for a nab3 (3.5 720KB):

diskdef nab3
seclen 1024
tracks 160
sectrk 5
blocksize 2048
maxdir 384
skew 2
boottrk 1
os 3
end

You use:

dd if=/dev/zero ibs=5K count=160 | tr "\0" "\345" >> new_nab3.dsk

now using cpmcp copy all the files you need. Don't forget cpm3.sys and ccp.com for a bootable.

Then using the HxCSoftware I load the raw image I created as:

View attachment 1254471

Then save it as HFE. Now using greazeweazle you write this entire image to the floppy. And now comes the final touch:

Using greazleweazle again you write just the track0.0.raw from a 3.5 bootable flux, like the one provided by snucci and voila, a bootable disk.


Here attached HFE images with the track0 on it. I re-fluxed the floopies and imported into HxCSoftware again. You can use them to image your floppies or use direct in a hxc2001 floppy.
Thank you for this very helpful post, I somehow missed it the first time through the thread. The HFEs you attached work fine on my NABU with FDC and FlashFloppy Gotek. However, I don’t use Linux so am struggling to follow the instructions on how to create an image myself. Any chance you know how to do it on Windows (ideally) or Mac please? I did find a dd equivalent to Windows which seemed to be working, but then it failed looking for the ‘tr’ command anyway.

EDIT - I've actually managed to do the first two parts now. Using Windows Subsystem for Linux I have created the raw image. Then using cpmtools (downloaded from nabunetwork.com, downloads page), I copied the files I wanted using cpmcp (I had to edit diskdefs to add the 'nab3' definition as above). Then I created an HFE from this raw image using the HxC software. At this point I thought I might be there, but although the disk reads on my NABU (Gotek), it displays garbage as the directory listing. I assume it is the part I highlighted with an underline above that I'm missing, but I can't figure out how to do it at all. Which parts of this are needed when "just" creating an HFE for use in a Gotek, as opposed to creating a physical floppy disk? And how exactly do I do them? I've downloaded greazeweazle but it means nothing to me, so can't work out how to "just write the track0.0.raw from a 3.5 bootable flux" part.
 
Last edited:
Thank you for this very helpful post, I somehow missed it the first time through the thread. The HFEs you attached work fine on my NABU with FDC and FlashFloppy Gotek. However, I don’t use Linux so am struggling to follow the instructions on how to create an image myself. Any chance you know how to do it on Windows (ideally) or Mac please? I did find a dd equivalent to Windows which seemed to be working, but then it failed looking for the ‘tr’ command anyway.

EDIT - I've actually managed to do the first two parts now. Using Windows Subsystem for Linux I have created the raw image. Then using cpmtools (downloaded from nabunetwork.com, downloads page), I copied the files I wanted using cpmcp (I had to edit diskdefs to add the 'nab3' definition as above). Then I created an HFE from this raw image using the HxC software. At this point I thought I might be there, but although the disk reads on my NABU (Gotek), it displays garbage as the directory listing. I assume it is the part I highlighted with an underline above that I'm missing, but I can't figure out how to do it at all. Which parts of this are needed when "just" creating an HFE for use in a Gotek, as opposed to creating a physical floppy disk? And how exactly do I do them? I've downloaded greazeweazle but it means nothing to me, so can't work out how to "just write the track0.0.raw from a 3.5 bootable flux" part.
These instructions assume you have an actual floppy drive and a greaseweazle hardware device that can write flux images to it. You could probably do the same thing though if you took the raw image file you created used the HxC software to export it to a kryoflux flux stream and then copied the track0.0.raw from one of snuci's kryoflux streams file over to your exported flux streams. At that point you can use the HxC software to load your stream and convert it back to an HFE image.

That being said i have to ask, since i have not yet tried using a gotek with my nabu yet, does just using the format command to format an existing hfe image not work correctly?
 
These instructions assume you have an actual floppy drive and a greaseweazle hardware device that can write flux images to it. You could probably do the same thing though if you took the raw image file you created used the HxC software to export it to a kryoflux flux stream and then copied the track0.0.raw from one of snuci's kryoflux streams file over to your exported flux streams. At that point you can use the HxC software to load your stream and convert it back to an HFE image.

That being said i have to ask, since i have not yet tried using a gotek with my nabu yet, does just using the format command to format an existing hfe image not work correctly?

Yes, the disk based format utility (and I assume the cycle 1 format in the disk utilities menu) will format the hfe image file just fine on the Gotek. Copying ccp.com and cpm3.sys to the formatted image will result in a bootable image.

The format utility supports all three of the boot image formats (SSDD 40 trk 48tpi, DSDD 80 trk 48tpi, and DSDD 160 trk 96tpi), and writes the correct DPB data based on user response to the utility prompts.
 
Format works yes, but how do I get files into that image from my PC? Sorry for the dumb questions, this is new to me and very confusing!
 
FWIW I've already tried loading a valid (created with FORMAT on the NABU) HFE file in the HxC software, then exporting it as a raw image. This raw image can be read ok by cpmtools. I then load this raw image back into the HxC software (using the settings from post #141) and export it again as an HFE, but that HFE doesn't then work on the NABU (shows a corrupt directory listing).
 
Back
Top