How to add an external disk drive inside a machine .xml definition file?

Por friguron

Master (168)

Imagen del friguron

23-05-2020, 03:05

Hi all

Some days ago I asked something about openmsx in some other thread, and as a side effect, I learnt how to add an external disk drive (for example) to a diskless machine via command line.

The exact example was adding a FD-051.BIN Yamaha disk drive to a Toshiba-HX20E

The command line was something like this:

openmsx -exta Yamaha_FD-05 -diska dsk/my_disk.dsk -machine Toshiba_HX-20E

The thing is I'd like to fork this Toshiba HX-20E .xml definition file and then add permanently this external Yamaha disk drive into the machine .xml definition file (to save some typing mainly)

No problem, I said, Let's duplicate the original HX20 defintion .xml file and add some easy slot definition somewhere, it can't be that difficult... let's see...

I came up with this (non working) definition for primary slot 2:

   (primary slot="2" )
        (ROM id="Yamaha External disk drive")
          (mem base="0x0000" size="0x10000")
          (rom)
            (sha1)4b08a057e5863ade179dcf8bc9377e90940e6d61(/sha1)
            (filename)FD-051.bin(filename)
          (/rom)
        (/ROM)
    (/primary)

NOTE: I changed xml tags with parentheses or else my example couldn't be rendered by the forum "code" macro

Once I booted my modified hx20 machine, Slot 2 got full of this yamaha .rom file contents but in runtime it just hangs. I suppose I should tell openmsx this rom file it's not just .rom data, but a disk drive controller. But I couldn't discover how to do it...

What is worst, if I try to define a -diska command line .dsk file, openmsx says it considers my disk drive definition as invalid, and claims it can't connect the .dsk file to a non existant diska device. So that's the proof I didn't manage to properly define an external disk drive controller via .xml definition file.

I read openmsx documentation but I couldn't come with a proper solution for my needs.

So my question is:
"How could I add an external disk drive definition inside an existing machine.xml file to emulate the -exta command line I mentioned above" ?

Thanks!

Login sesión o register para postear comentarios

Por sdsnatcher73

Paragon (1083)

Imagen del sdsnatcher73

23-05-2020, 07:08

You should look at the xml of a machine that has an internal disk drive (for openMSX emulation internal and external eventually is not different). You could even put the disk rom and memory mapped I/O in a subslot of the HX-20... you then keep 2 available external slots.

Por Manuel

Ascended (16831)

Imagen del Manuel

23-05-2020, 09:53

Your idea is correct. But you only copied the ROM part of the configuration. Just copy everything from the Yamaha FD-05 XML file between the secondary tags.

Por friguron

Master (168)

Imagen del friguron

23-05-2020, 13:56

I will try later and tell my success.

EDIT: Fantastic, a mix between your two suggestions did the trick.
I added the disk controller onto the vast subslot space an HX-20 offers and now my "hx20" alias machine can load .dsk files Smile

Thanks!

Por Manuel

Ascended (16831)

Imagen del Manuel

23-05-2020, 15:57

Yes, this is the equivalent of physically building in a disk controller, disk ROM and disk drive into that machine (although I guess it wouldn't fit in reality...)