This was requested, so here's a step-by-step tutorial.
Creating and using a hard drive image for MAME in Windows
This will tell you how to create a virtual hard drive and convert its contents into a .chd file to use in MAME.
1. Open up Disk Management. How to do this will vary depending on your version of Windows, but generally opening a "Run" prompt and typing "diskmgmt.msc" will work.
2. In the menu, click on Action -> Create VHD. It will open up a window called "Create and Attach Virtual Hard Disk". Put in whatever name and location you want for the .vhd file. Also enter the size you want the drive to be, but keep in mind FreeDOS will have issues with larger drives. Leave everything else as it is and press OK.
3. You should now see a new disk in the Disk Management window with the size that you specified. It will say "Disk x", with "x" being a number that depends on how many hard drives you already have loaded. Make note of this number, as it will be important later! Right click this new disk and click Initialize Disk. In the next window, select MBR (Master Boot Record) and click OK.
4. Now right click where the new disk says "Unallocated" and click on New Simple Volume. This will open the New Simple Volume Wizard. Click next until you have to assign a drive letter, and give it whatever drive letter you want. In the Format Partition section of the wizard, make sure you format it under the FAT file system. You can also name the volume whatever you want. Click Next and then Finish.
5. You're done with Disk Management now, and you should have a new drive available with the drive letter, size, and volume name that you specified. Open it in file explorer and copy over whatever files you want into it.
6. You'll now want to go into a command prompt and get to your MAME folder. Make sure you have chdman.exe in this folder, as it's the utility you need to make .chd files. In the command prompt, put in:
chdman createhd -o name.chd -i \\.\PHYSICALDRIVEx -c none
A couple things you'll have to change here: for name.chd, that will be your file name, and you can change that to whatever you want. Also, remember the disk number from step 3? Put that in after PHYSICALDRIVE (eg if it said Disk 1, put in \\.\PHYSICALDRIVE1). The "-c none" parameter means that the drive will not be compressed, which you need to specify, otherwise ct486 won't like it. Run the batch file and it will make your .chd file. You don't need to specify cylinders or anything like that, chdman will figure that stuff out for you.
7. You now need to get ct486 to recognize your new drive. In the batch file you use to launch MAME with ct486, load in the new .chd with either -hard1 or -hard2. If you have not already created a batch file, find yourself a boot floppy image and just use the following:
mame64 ct486 -ramsize 64M -hard1 name.chd -flop1 floppy.img
Run the batch file and launch MAME.
8. While the memory is initializing, hit the DEL key to open setup. If this is your first time booting, you will be forced to open it anyway. Choose "Auto Detect Hard Disk" and let it look for your new drive. It will find it in the C drive if you chose hard1 or D if you chose hard2. After it's detected all the hard drives you loaded, escape from this screen.
If this is your first time booting ct486, you'll definitely want to go to Standard CMOS Setup and assign drive A to match the floppy size you used for the boot disk. You also want to go to Advanced CMOS Setup and change the System Boot Up Sequence to "A:, C:" so that it boots from the floppy first.
9. Select Write to CMOS and Exit and the system will reboot. Once the system is booted go to C: or D: to make sure your files are there. If so, congrats!