Jump to content
IGNORED

MESS -> MAME script conversions


Recommended Posts

So, finally got to using a newer version of MAME/MESS than 0.152 with 0.197 installed from the repositories.  I'll likely eventually upgrade it to the trunk, but for now, I've got bigger fish to fry. 

 

Trying a MESS script copied from the old computer throws all kind of errors, which brings me to a point: **this is why I often feel unmotivated to upgrade things - because useless and unnecessary changes seem to be the order of the day**.  Anyway, now that I have that off my chest, here's an example script from the MESS days:

mess64 ti99_4ev \
-peb:slot3 speech \
-peb:slot4 samsmem \
-peb:slot5 pcode \
-peb:slot6 tirs232 \
-peb:slot8 hfdc \
-hard1 ~/mess/TI-HD.hd \
-gromport multi \
-cart1 ~/mess/ti_carts/extended_basic.rpk \
-cart3 ~/mess/ti_carts/editor_assembler.rpk \
-cart4 ~/mess/ti_carts/ti-writer.rpk

Changing "mess64" to "mame' and attempting to launch the  following segments "peb" and "hard1", "hard2", etc give errors, and MAME doesn't start.

 

Of course, I've already done a bit of investigating, noticing that for some arbitrary and pointless reason "peb" now has to be the more verbose "ioport:peb".   I'm still having trouble with "hard1", and didn't find solution for that.   And I'm sure there are other erroneous syntax in this script that used to work perfectly. 

 

Any advice / help would be greatly appreciated.  Thank you for reading!  :)

 

Link to comment
Share on other sites

Some advice when asking for information or help on a forum: It's not a problem if you don't know the reason why something has been done or changed. You may, however, assume that the author had something in mind with that, and that it is neither "arbitrary" nor "pointless". Call it touchy, but sometimes I find it modestly motivating to write an answer on that premise.

 

OK, first to your current problem:

 

You have to define the type of hard disk. Previously, MESS only used a hard disk image that was accessed on a high-level base, not really an emulation at that point. Now in MAME, the HFDC and the hard disk drives are emulated as devices, and there is a choice between different Seagate drives and a generic one that automatically adapts to the hard disk image (i.e. it magically grows enough heads to read the image). Since emulated hard disk drives always require an image, but you don't want to mount three images every time, you can now select how many and which kinds of hard disks are attached. The connectors are named "h1", "h2", "h3". I assume that your hard disk image does not match an ST225 geometry, so the "generic" type is best to use.

 

... -ioport:peb:slot8:hfdc:h1 generic -hard1 myimage.hd

 

The same is true for the floppy drives. You have to decide which type of floppy drive you are using; a 5.25" (40 track) or 3.5" (80 track). The first two floppy drives are already mounted by default (floppy drives may run without image) as two 5.25" drives ("525dd"). If you need more than two drives, you have to add them using the connectors f1, f2, f3, and f4.

 

... -ioport:peb:slot8:hfdc:f3 525dd -flop3 mythirdimage.dsk

 

As I said, flop1 and flop2 are already available because two drives are mounted by default. I recommend not to use 80 track drives unless you know that you only use 80 track images with them. Once you write on a disk image in a drive with 80 tracks, you cannot read it in a 40 track drive any longer.

 

Next, you seem to be using the TI-99/4A with EVPC. There is some change here because the EVPC as such is now emulated as a card, and it occupies slot2 by default. So you just stay clear of the slot2, or you won't get any graphic output. Also, you can now attach or detach the mouse.

 

... -ioport:peb:slot2:evpc:colorbus busmouse

 

The problem with an attached mouse is that in Windows, the mouse pointer is captured when you launch MAME with mouse support. I already told the responsible devs that this is not really desirable, but for the time being, you can just detach the mouse (i.e. leave it detached) if you don't need it. (Note that this could not be configured in MESS, you had to live with that.) The advantage of the new colorbus connector is that theoretically you could attach a light pen in place of the mouse (if it were emulated).

 

The multi-expander (gromport multi) is certainly supported, and will continue to be supported, even though I'm normally not using it. It's fun to see the Review Module Library, but its benefit is marginal, and lots of cartridges don't work with it. Also, I recommend to create customized launch scripts for the most frequently used configurations. There is no wear on the connectors in the emulation, so we can afford to change the configuration whenever we need to.

 

The RPK modules should be replaced by the ZIP cartridges for all classic modules (not homebrew). The ZIP modules are verified to be authentic whereever possible, i.e. they are unpatched. The RPK module format is only supported for the TI-99/4A in whole MAME, and it is still there because I keep it for so long until we have a practical way of creating ZIP modules for homebrew cartridges. That is, your line should be

 

-cart1 exbasic -cart2 editass -cart3 writer

 

Now for your question about the change to the arguments.

 

My intention is to eventually support the sidecar expansions. For that reason, I have to model the I/O port as a "MAME slot device" so that it accepts devices to be plugged in. This, however, made the PEB a pluggable device so that you have to first plug it in (-ioport peb) and then all configurations in the PEB need that longer device path. For the Geneve and the SGCPU (ti99_4p), this is not the case; you still have "-peb:slotX", because neither of them has an I/O port. Actually, I considered to remove the PEB from the Geneve and SGCPU (so you only had -slotX), but this would require to write a lot of duplicate code just for the purpose of creating a simpler argument chain.

 

Another reason to "unplug" the PEB was the TI-99/8. It turned out that the TI-99/8 did not run well with the expansion cards of the TI-99/4A, in particular it did not run with the TI floppy disk controller: When you entered Extended Basic II, the console crashed. The reason was that the authors of Extended Basic II simply assumed that you can set up a PAB in CPU memory, which is only possible for the Hexbus devices. Hence, I had to work on the Hexbus which brought us the HX5102 and the Hexbus support, and we can now productively use the TI-99/8 in MAME. The PEB may now be plugged into the 99/8, or it may stay unplugged.

 

Remember that all this was not possible in MESS. It is a consequence of restructuring, and further progress in the code.

 

In some hopefully not too distant future, I envisage an intuitive, maybe graphical plug-together configuration of emulated systems in MAME. You'd pick a console, the PEB, then you drag and drop the cards you want to have, push a cartridge in the GROM port, and there you are. The already existing Lua interface seem to pave a way in that direction. But I had to to those changes at some point in time, well knowing that some people may be upset when things change, unregarded of the fact that I am available on this forum to quickly help when there are any issues.

 

Edited by mizapf
Forgot the slot
  • Like 3
  • Thanks 2
Link to comment
Share on other sites

  • 1 month later...

Ugh - well I'm making headway, finally, but not all is well in this wild world of MAME.  Here's my script:

mame ti99_4ev \
-ioport peb \
-ioport:peb:slot2:evpc:colorbus busmouse \
-ioport:peb:slot3 speech \
-ioport:peb:slot4 samsmem \
-ioport:peb:slot5 pcode \
-ioport:peb:slot6 tirs232 \
-cart ~/mame/ti_carts/exbasic.zip \

And this is the output:

$ mame-ti.sh 
~/bin/mame-ti.sh: line 10: -rompath: command not found
Fatal error: Device TI-99 cartridge load failed: Invalid image

The machine does start up when I comment out the cartridge line, so it is working other than the invalid image.

 

A couple questions popped up.  @mizapf you mentioned that the mouse could be detached - how does one do that?  My next question may indeed lead to the answer to the first and that is how do I change the Partial Emulation mode toggle from ScrollLock to another key?

Link to comment
Share on other sites

ZIP cartridges are not mounted by path, but only by name.

 

-cart exbasic

 

The cartridges must be stored in the rompath.

Your rompath line seems to be missing, so I cannot tell what is wrong with it.

 

---

 

A short explanation: Why does MAME not use the path name of the cartridge (as it does with RPK)?

 

Answer: MAME does not only handle cartridges with -cart; in fact, the "software name" (here, "exbasic") may define a set of simultaneous image mount operations. I did not make use of that, but in general, one could define "editass" (Editor/Assembler) to contain the cartridge (which is plugged into the slot) and the companion Disk A that contains EDIT1 and ASSM1/ASSM2. Hence, when you add "-cart editass", the cartridge is plugged in and the Disk A is inserted into DSK1. Also, the software name may be used to refer to related other cartridges, e.g. declare one cartridge as a master and others as clones. All this information is contained in the ti99_cart.xml file that is distributed with MAME (stored in the hash folder).

Edited by mizapf
  • Thanks 1
Link to comment
Share on other sites

Thanks!  Getting closer I can feel it.  Since I have a system-wide (package manager) install of MAME, where would I place the mame.ini?  It seems to have no affect being placed in ~ (home) or in ~/mame/ (which is where the cart and rom folders reside).

 

I thought that

-ioport:peb:slot2:evpc:colorbus busmouse

was required for using the EVPC(?)

 

Weird.  The mouse is still getting captured even after removing that line.  I guess that's not a big deal.   What is important is getting that Partial mode toggle working.  I added the lines

#
# MAME SPECIFIC OPTIONS
#
ramsize
writeconfig               0
skip_gameinfo             1
natural                   0
uimodekey                 HOME

to the bottom of the mame.ini.  I suspect though that mame.ini isn't in the right place, or that mame doesn't know where to look (or even to look in the first place?).

Link to comment
Share on other sites

So I'd misplaced the -rompath argument outside the mame call - not sure why I did that.  Here's the script now, which seems to be working fine:

mame ti99_4ev \
-rompath ~/mame/roms/ \
-ioport peb \
-ioport:peb:slot3 speech \
-ioport:peb:slot4 samsmem \
-ioport:peb:slot5 pcode \
-ioport:peb:slot6 tirs232 \
-cart exbasic \

Still don't have "HOME" as the partial emulation toggle yet though :(


Not sure what the contention is with that...

 

Just got partial toggle working.  Placing the mame.ini in the ~/.mame/ folder did the trick :D

Okay, awesome - just one last issue to settle.  I had to place the exbasic.zip file in the ~/mame/roms/ folder in order for it to be found.  I'd prefer to have the carts in a separate folder ~/mame/ti_carts.

Thank you @mizapf for all your help today.  Good to get MAME off the ground.  :D

Edited by WhataKowinkydink
make a line bold :)
Link to comment
Share on other sites

22 minutes ago, mizapf said:

BTW, although I am certainly a big fan of the Linux package system, I usually recommend to pull MAME from the sources and recompile it. This ensures that you are always up-to-date. (Unlike many open source projects, building MAME is a treat.)

I think I'll do that eventually - just installing it from the package manager is a good way to "hit the ground running" (at least in theory ;) )

Link to comment
Share on other sites

Yes, I can understand. The problem I am actually facing is that the Linux distributions do not necessarily agree how to store MAME in their paths. Thus, if people ask what to do (as you), I cannot blindly rely on my setup but have to consider that your files are somewhere else.

 

If you plan to build it, keep a bookmark for this page: https://www.mizapf.de/en/ti99/mame/buildmame

 

  • Thanks 1
Link to comment
Share on other sites

Okay, just getting back on this again.   It's really close now - I got the rompaths all sorted out and that the directories need quotes around them.  Now I would just like to get the hard disk working again.  Here's the script:

mame ti99_4ev \
-rompath "~/mame/roms/;~/mame/ti_carts/" \
-ioport peb \
-ioport:peb:slot3 speech \
-ioport:peb:slot4 samsmem \
-ioport:peb:slot5 pcode \
-ioport:peb:slot6 tirs232 \
-cart exbasic \
-ioport:peb:slot8:hfdc:h1 generic -hard1 ~/mame/TI-HD.hd \

And this is what I get out :( :

$ mame-ti.sh 
Error: unknown option: -ioport:peb:slot8:hfdc:h1

Thank you for putting your peepers on it.   Excited to get MAME going again.

Link to comment
Share on other sites

No, there is no implication. It is kind of a path expression, just if you referred to c:\mame\roms without having created c:\mame.

 

Addition (to your next message): The path expression must be set up of elements with colons in between. When you want to plug in a card, there is no colon after the slotN. But if you want to address something on the card, you have to continue the chain.

 

... -ioport:peb:slot8 hfdc -ioport:peb:slot8:hfdc:h1 general

  • Thanks 1
Link to comment
Share on other sites

13 minutes ago, mizapf said:

No, there is no implication. It is kind of a path expression, just if you referred to c:\mame\roms without having created c:\mame.

 

Addition (to your next message): The path expression must be set up of elements with colons in between. When you want to plug in a card, there is no colon after the slotN. But if you want to address something on the card, you have to continue the chain.

 

 


... -ioport:peb:slot8 hfdc -ioport:peb:slot8:hfdc:h1 general

 

Ahh, I think I see how you're doing it.... interesting. 

 

Edit: Got it working.  Cool!  Thank you.  Yeah, that is interesting.  Complicated, but in the end I am starting to see the sense in it.

Edited by WhataKowinkydink
Link to comment
Share on other sites

No, the hard disks don't make a noise (at least not from me...). I thought about that, but one of the the ST225 that I have seems to have died...

 

The path expressions may look a bit complicated - but you typically but them in a script and don't see them any longer (unless you edit it). I once thought about something like relative path expressions, but it is not really worth the effort.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...