How to get Sunrise IDE working in openMSX

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

04-05-2006, 22:51

I noticed a few people on #msx@rizon had trouble getting openMSX working with the IDE extension, so I'll just take the liberty of explaining the surprisingly simple procedure. Especially handy for those who want to view the new Dragon's Lair movie, which doesn't quite fit on your average disk image. Tongue

Ingredients:
1x suitable computter Wink
1x openMSX v0.6.0
1x MSX-DOS2 disk image
1x Sunrise IDE Bios ROM (IDE240.DAT) [here]
1x Sunrise FDISK 3.1 (IDEFDISK.COM) [here]

First put the IDE240.DAT file in your openMSX roms directory. (e.g. C:\Program Files\openMSX 0.6.0\share\systemroms) Then start openMSX's catapult, and select a suitable MSX model (like the turboR GT) and the IDE extension. Put IDEFDISK.COM on your MSX-DOS2 disk image, and insert it in drive A. If the IDE extension is not in the list, either select Test MSX Hardware from the File menu, or Display Broken Configurations from the View menu.

Now start openMSX and wait for DOS2 to load. Start fdisk, either by typing IDEFDISK or by typing IDEFDISK /FAT16 if you also want to create FAT16 partitions. Using FAT16 has it's advantages and problems, and I won't cover it here. If you don't know how to make a FAT16 partition in FDISK, you probably shouldn't use one either.

If you chose to use FAT12 partitions, you'll be presented with the simple version of the FDISK tool. Just Press A when at the main menu to have it generate partitions automagically, then W to write the partitions to the virtual harddrive. Last press I to initialize (logical format) these partitions. You cannot specify the size or location of the harddisk by the way, it will always be 100MB, unless you edit the openMSX configuration files.

Reset openMSX, untill you've booted from the floppy again. Your floppy drive will now be called drive E: btw, since the first 4 partitions of your newly fdisk-ed harddrive are numbered A: through D: if you chose FAT12. Copy COMMAND2.COM and MSXDOS2.SYS to drive A: (first partition of the HD) and you should now have a bootable virtual MSX hd. :)

If you wanted to view the Dragon's Lair demo, then these last steps apply to you as well. First download and upzip the demo to an easy to remember directory, such as C:\TEMP\
Then start openMSX with the IDE device enabled. Once it's up and running go to the console menu which is usually under the F10 key. Then type the following:

diskmanipulator chdir hda1 <targetdir>
diskmanipulator import hda1 <sourcefile>

<targetdir> would be the destination directory on the MSX harddisk. This can be anything that actually exists on the first partition.
<sourcefile> is the path and filename of the file you want to copy from your PC's HD to the MSX's HD.

Remeber openMSX is made by quaint unox folx, so you'll have to use / instead of \ and you do not have to specify the sourcedrive. So the C:\TEMP\ from our example would be /TEMP/ instead. Unfortunately, you cannot use wildcards, so you'll have to do this file by file. After you're done, press F10 again to close the console, and check the contents of your virtual HD, your files should now be there, and you should be ready from some nice SC4 action. :)

Login or register to post comments

By Manuel

Ascended (13371)

Manuel's picture

04-05-2006, 23:09

SOme additions:

If you chose to use FAT12 partitions, you'll be presented with the simple version of the FDISK tool. Just Press A when at the main menu to have it generate partitions automagically, then W to write the partitions to the virtual harddrive. Last press I to initialize (logical format) these partitions. You cannot specify the size or location of the harddisk by the way, it will always be 100MB, unless you edit the openMSX configuration files.

YOu could replace this by:

diskmanipulator create myhd.dsk 30M 30M 30M

for example, to create a formatted IDE disk image with 3 30MB partitions. You would have to copy it over the existing hd.dsk of course, which is e.g. in C:\Program Files\openMSX\persistent\ide\untitled1\hd.dsk.

The openMSX console is basically a TCL shell. So, you have to use TCL rules. From using-diskmanipulator.txt:

        If you want to use wild-cards when importing files, you will have to use
        the TCL glob-command. This command will perform the wild-card expansion
        and return a TCL list. Enclose the glob command in between '[' and ']':

           diskmanipulator import hda1 [glob *.txt] [glob *.asc]

       This command will copy all files matching *.txt and *.asc in the current
       directory on the host OS to the first partition of the master IDE drive
       on the emulated MSX.

        The glob-command can also take extra options. For instance, if you only
        want to expand regular files and not the names of directories you can
        do this:

           diskmanipulator import hda1 [glob -type f info*]

        Consult you local TCL guru or documentation for more info about the
        glob-command and TCL lists.

Anyway, as I already said, to enjoy more diskmanipulator commands, check out that doc.

By NYYRIKKI

Enlighted (4646)

NYYRIKKI's picture

04-05-2006, 23:35

Ok, that was way more, than I ever know before this post! Smile

What I did was, that I downloaded Dubaron DiskImage, then I took my CF card out of MSX and placed it to my PC CF reader. Then I placed the files from PC to that CF card using Windows explorer. After that I started the program and took disk image out of my CF card and started that image in OpenMSX. This same procedure should work for HD users as well...

It is great to see, that there is even integrated possibility to move files in OpenMSX!

One question: Does anyone know good program, that can handle hard disk images on Windows? I bet that FAT12 partition support is not in the top of the list in most Windows HD image handling programs. :)

By NYYRIKKI

Enlighted (4646)

NYYRIKKI's picture

04-05-2006, 23:40

Oh BTW, current Windows version of OpenMSX has a little bug, that causes this method not to work, if size of the hard disk image is smaller, than defined in OpenMSX config file. Adjust the size to little bit smaller than your image is before you start OpenMSX and you'll be fine. This will be fixed in next version.

By mars2000you

Enlighted (5041)

mars2000you's picture

04-05-2006, 23:51

One question: Does anyone know good program, that can handle hard disk images on Windows? I bet that FAT12 partition support is not in the top of the list in most Windows HD image handling programs.

Probably not a complete tool, but you can use DiskManager created by the RuMSX author : the options MSX-DOS 2 and Custom (+ changing the number of sectors per disk to change the size of the harddisk image) give directly a MSX-DOS 2 formatted harddisk image on which you can add (or drag and drop) the files that interest you (including the 2 MSX-DOS 2 files of course).

By Manuel

Ascended (13371)

Manuel's picture

05-05-2006, 09:02

By the way, NYYRIKKI is darn right about that bug Smile It occurs only on Windows though.

But indeed, I forgot to mention that with 0.6.0 you should make sure that the harddisk image you use is always equal or bigger than 100MB (unless you modified the hardwareconfig.xml). If you don't, the harddisk image will get corrupted.

On non-Windows and for next release, this will not be a problem: the harddisk image will be automatically sized up to 100MB (or another value you set up in the hardwareconfig.xml).

My MSX profile