Creating floppy or HDD images from a file list

Started by vampirefrog, February 26, 2014, 08:01:38 PM

Previous topic - Next topic

vampirefrog

Hi guys. I'm trying to get some files into the XM6 emulator, and I figured the best way to do it, for my purposes, is to create a floppy or HDD image file, and pass it as an argument to XM6 when starting it up, so then it boots it and I can do some automated stuff (I'm trying to automate the process).

I've been unable to find a program that creates a floppy or HDD image from a list of files, and I figured you guys could help me out.

In case you're wondering what my project is, it's a bunch of tools for handling MDX files (convert to VGM, MIDI, MML, dump info etc.) and you can find it at https://github.com/vampirefrog/mdxtools

vampirefrog

Or at least an explanation of some of the file formats.

lydux

Hi vampirefrog,

Human68K use FAT12 filesystem just like PC but as 1.2MB and with a specific x68000 bootloader for bootable media. In linux, I would do something like this :

$ dd if=/dev/zero of=myfloppyimage.xdf bs=1024 count=1232
$ mkdosfs -F12 myfloppyimage.xdf
$ mount -o loop myfloppyimage.xdf /mnt/floppy
... Copy all files I want into /mnt/floppy
$ umount /mnt/floppy

I don't know Windows, but I guess such software that allow you to write files into plain FAT12 floppy image exists.

But if your requirement is just to transfert files between your host and an XM6 guest, I would suggest you to use the builtin host<->guest drives bridge in XM6 (aka WINDRV). This specific feature allow you to map all your Windows drives into a guest x68000 running human68k.
It's a bit buggy with network shares, but work well with local drives.
To use it, you first need to enable it in the XM6.INI configuration file. There is no option inside XM6 directly, you have to do it manually :

...
[Windrv]
Enable=2
...


Next, you need the human68k driver WINDRV.SYS. Here is the one I've made (unfinished, but working) : http://nfggames.com/X68000/Uploads/windrv-bin-1.00.zip
Copy WINDRV.SYS somewhere on a human68k floppy or hard drive image, and edit your CONFIG.SYS to add this line :

DEVICE = path_to_windrv_sys\WINDRV.SYS

Then, by modifying AUTOEXEC.BAT, you'll be able to automate stuffs between your host and guest.


For simplicity, here is a ready to use human68k v3.02 image with this WINDRV.SYS : http://nfggames.com/X68000/Uploads/human302_windrv.zip

Of course, don't use this driver on a real system !


PS : I don't have time to look into your tools actually, but this looks like very usefull and promising as we lacks of tools and informations with MDX ! Thanks, and keep up the good work ! ;)

vampirefrog

Thanks for the hints!

Indeed, I can mount xdf files as fat12. However, I'm on windows now and I'm trying to figure out how to get windrv to work.

I've tried with XM6 Pro and got this:


Which looks like it's not loading.
I've then tried with XM6 2.05 and got this:


But when I type "C:" or "D:" and so on, it pops up an Abort/Retry/Ignore error. What can I do?

vampirefrog

#4


And here it is in XM6-Pro

neko68k

Use this emulator.
With this WINDRV.SYS
Change the options like here. Click the number to choose a path then reboot the emulator.


vampirefrog

Quote from: neko68k on February 27, 2014, 02:32:48 PM
Use this emulator.
With this WINDRV.SYS
Change the options like here. Click the number to choose a path then reboot the emulator.



Well, this worked, however, I need to have VGM logging enabled, to enable the commands sent to the YM2151 and MSM6258. That's the whole point of my endeavor. So I need to get WINDRV working with this: http://vgm.mdscene.net/forum/viewtopic.php?t=1320, which is based on XM6 2.05.

Either that, or somehow get the source to xm6 type G. I've also noticed that XM6-Pro takes a folder as an argument, which means I can start it with that folder (and from there use autoexec.bat and so on), but, again, no VGM logging patch and no source. I did contact mijet, the guy who made XM6-Pro, but hasn't replied yet.

I've also tried generating floppy images with mkdosfs, but they are not recognized, and I think it has something to do with the fact that Human68k uses 1024b sector size, and a different filename format, according to http://ja.wikipedia.org/wiki/Human68k

So, to recap, my options are:

1. Figure out how to use WINDRV on XM6 2.05.
2. Get the source to XM6 TypeG, use WINDRV, and apply the VGM logging patch.
3. Get the source to XM6-Pro and use folders, and apply the VGM logging patch.
4. Figure out how to generate Human68k floppy images.

vampirefrog

Ok, I've figured out how to generate floppy images usable by Human68k, at least with mkdosfs:


mkdosfs -F 12 -s 1 -S 1024 -f 2 -r 192 ddimg.xdf

the logical sector size needs to be 1024, and sectors per cluster is 1. I just wrote a small program to dump the info from a working XDF file (the one lydux sent me btw).

So now I have to find an equivalent of mkdosfs for windows, and one that does all the jobs of dd + mkdosfs + mount + cp

Cheers!

neko68k

iirc gimons will share source for type g if you ask nicely and dont share it around.

vampirefrog