Running a custom rom with lr-mame*
-
I tried M20 for you and I could run msdos20, only when selecting bios 2.0f and using an alternate cpu selecting in the mame-gui.
Be aware that this driver is a preliminary driver so it can be hit and miss. -
@Folly Thanks for looking into this! What are the steps you took to start the rom? Via standalone mame, or via lr-mess?
Concerning the m20 itself, it should be ok, I am using it successfully on retropie since a few years, running it with standalone mame. I can also pass along different bios options on the commandline with no issue.
What I am trying to achieve is running m20 roms via a libretro core, so I started looking into lr-mess. Here I cannot add arguments via cmd, but specify via an xml config file. I feel like I am half way there, but I am not sure how to properly set up the directory structure. So far I have:
- Added my custom rom properties to ~/RetroPie/BIOS/mame/hash/m20.xml
- Created a rom folder ~/RetroPie/roms/m20
- Added my floppy image/ rom as well as m20 bios files to the created roms folder
- Running /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mess/mamemess_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg /home/pi/RetroPie/roms/m20/games.img --verbose
It starts up mame with m20 driver successfully, it finds the game properties in the modified xml file, but it does not find the game image itself. So I am still doing something wrong with the folder structure. So far I am hesitant to use the add-mamedev-systems script, since I would like to first understand the necessary steps myself and be able to launch from the cmdline.
-
@eberhab said in Running a custom rom with lr-mame*:
Concerning the m20 itself, it should be ok, I am using it successfully on retropie since a few years, running it with standalone mame. I can also pass along different bios options on the commandline with no issue.
Ok, that's a good sign.
so I started looking into lr-mess. Here I cannot add arguments via cmd
Adding arguments is possible but it can only be done by adding single quotes.
You can use my script as @mitu suggests.
When selecting m20 it will generate a module script and install the default options.
After the install you can find the loaders in /opt/retropie/configs/m20/emulators.cfg
Here is an example :lr-mess-m20-flop1 = "/opt/retropie/emulators/retroarch/bin/retroarch --config /opt/retropie/configs/m20/retroarch.cfg --appendconfig /opt/retropie/configs/m20/retroarch.cfg.add -S /home/pi/RetroPie/roms/m20 -s /home/pi/RetroPie/roms/m20 -v -L /opt/retropie/libretrocores/lr-mess/mamemess_libretro.so 'm20 -rompath /home/pi/RetroPie/BIOS/mame;/home/pi/RetroPie/roms/m20/ -cfg_directory /opt/retropie/configs/m20/lr-mess -c -ui_active -flop1 %ROM%'"
If you need a separate install with extra bios options I can try and make an extra menu item for m20 in the menu-item : systems with extras.
Let me know what options you normally add to mame and I can have a look. -
I was also able to run pcos102.
I discovered that the hash table states that you have to use the commandvl
to list the disk content.
It also states that you can launch .cmd files from the command-line-prompt.
Do you know how to run a program from pcos ?Edit :
I was able to runmazedaze.cmd
fromgamesd
( booting withpcos102
).
Just enteredmazedaze
.
-
@Folly Single quotes! That's awesome! Thanks a lot for your help @Folly and @mitu. I figured out the directory structure and with what I learned about lr-mess and adding custom arguments, I can now run my m20 images with libretro. Then I tested your script, which makes the setup process a lot easier. The default options for the m20 work well for me, my disks do not need custom bios settings.
What's left to do now for me is to figure out how to map some of the keyboard keys from the m20 to the vitual gamepad.
Concerning the M20 itself, if you are interested, you can find a lot of information, including commands, images, and even new games on: http://www.z80ne.com/m20/
Basically you can run applications from pcos by just typing the app name, or you can switch back and forth between pcos and the basic interpreter by entering "basic" and "system" commands respectively. -
@Folly After setting up the m20 with
add-mamedev-systems
do I have to modify es_systems.cfg myself, or can the script do that too? I see some menu options for es and artwork, but I am not entirely sure how to proceed.EDIT: Also, which of the emulators the script creates did you use to test mazedaze from gamesd? I have some trouble getting the keyboard to work. I can use it to access the mame menu, but I cannot type into the console.
The script seems to disable softlist mode and passes all arguments like driver and floppy to lr-mess via command line. Does this mean that I can use custom floppys without having to add them to the m20.xml hash table?
-
@eberhab said in Running a custom rom with lr-mame*:
@Folly After setting up the m20 with
add-mamedev-systems
do I have to modify es_systems.cfg myself, or can the script do that too?No, that's not needed.
Just like any other module-script that is installed it will add the entry in es_systems.cfg.
Just have a look.I see some menu options for es and artwork, but I am not entirely sure how to proceed.
We have predefined gamelists with media for some categories and for some systems. If you select that option all predefined gamelists with media will be downloaded to the specific roms/<a system directory> directory. It's downloaded over there so other gamelists/media, in the regular directory, is not overwritten. If somehow you have gamelists/media already in the roms/<a system directory> then you should backup them first.
M20 is not there, so if you want to make some than you can share it over here :
https://retropie.org.uk/forum/topic/32188/creating-es-gamelists-with-media-for-mame-lr-mame-lr-messArtwork is a selection of artwork for mame standalone mostly containing the handheld categories.
It's downloaded in the regular artwork directory for mame standalone. If you have already artwork then you should backup them.These arwork files also contain overlays for lr-mess. So there is and option to create overlay configs for lr-mess and extract bezels and backgrounds for these lr-mess overlay-configs.
The first config file will be placed next to the rom and will refer to other overlay configs in the normal retroarch/overlay directory.
If you have files over there that you want to keep then you have to backup them.EDIT: Also, which of the emulators the script creates did you use to test mazedaze from gamesd?
I used the example I gave you earlier.
I have some trouble getting the keyboard to work. I can use it to access the mame menu, but I cannot type into the console.
You have to enable a hotkey_disable_key in the retroarch.cfg otherwise hotkey's will get in the way.
Also the keyboard will not exactly react like mame standalone.
For typing mazedaze I switched back and forth between keyboard=emulate and keyboard=natural in the mame-gui.
That way I was able to use and find the correct keys to run mazedaze.The script seems to disable softlist mode and passes all arguments like driver and floppy to lr-mess via command line. Does this mean that I can use custom floppys without having to add them to the m20.xml hash table?
The non-basename loaders will indeed disable softlist-mode so you will be able to use custom floppies without editing the xml's.
Btw.
For our project we use the cygnus-blue-flames theme which has many exotic themes. If you want to add m20 you can discuss it here :
https://retropie.org.uk/forum/topic/29961/request-for-artists-working-on-themes-needs-for-lr-mess-mame-additions -
Would be nice if games booted with some autoboot function.
Do you know if that is possible ? -
@Folly Perfect, again thanks a lot for all your help and the additional info :)
I did not find an entry for the m20 in the es_systems.cfg, but the file had been edited by hand before, so I'll try to run the installer again and/ or start with a fresh setup.
Concerning the autoboot I see two options:
- You can rename the file you want to run into an INIT.* file with the fm (filemove) command. e.g.
fm mazedaze.cmd INIT.CMD
. This means that you have to modify the disk image which afaik only works unzipped and with mame > 0.212 - From retropie one should be able to supply autoboot commands e.g.
-autoboot_delay 5 -autoboot_command "mazedaze\n"
They could be supplied by calling a custom *.cmd file rather than the rom itself?
Would it make sense to update the RetroPieWiki/Emulators/MESS article to mention
add-mamedev-systems
and to briefly describe the setup? Also a link from the general MAME article pointing to MESS probably could be helpful, too.Here is some preliminary artwork for the M20 if you want to have a peak. I am using it with std carbon theme, will have a look into the thread you suggested.
I'll continue to debug the issues that I currently have, mainly with the keyboard not working as expected and the lr-mess core crashing every other time I run it on my pi2 (so far it works fine on the pi4).
EDIT: If it is interesting for people I could imaging to compile a list of cmd files to start different games. Providing modified images does not feel like the right way to go, since we'd be creating duplicates of existing images with different checksums, which potentially increases confusion and makes it harder to get all available images integrated into the hash tables.
- You can rename the file you want to run into an INIT.* file with the fm (filemove) command. e.g.
-
@eberhab said in Running a custom rom with lr-mame*:
@Folly Perfect, again thanks a lot for all your help and the additional info :)
;-)
I did not find an entry for the m20 in the es_systems.cfg, but the file had been edited by hand before, so I'll try to run the installer again and/ or start with a fresh setup.
That's a good one.
Then you will be able to experiment and see where the files go. If you feel confident enough you can use it on your existing image.
For many things I added help, so check that.
If you feel that some help has to be added then let me know and I will see if I can add some text.Concerning the autoboot I see two options:
- You can rename the file you want to run into an INIT.* file with the fm (filemove) command. e.g.
fm mazedaze.cmd INIT.CMD
. This means that you have to modify the disk image which afaik only works unzipped and with mame > 0.212
Ok, thats a nice one.
Would be nice if there are disks with only 1 game that will autostart. Would be an addition if they were also in the mame soltlist but that will probably never happen.- From retropie one should be able to supply autoboot commands e.g.
-autoboot_delay 5 -autoboot_command "mazedaze\n"
They could be supplied by calling a custom *.cmd file rather than the rom itself?
For a few system I added such autoboot loaders to be installed. So if 1 disk contains more games then the disk can be duplicated and renamed in order to load the game automatically. However with this system the gamedisk needs pcos first so you still need swapping the disks.
Would it make sense to update the RetroPieWiki/Emulators/MESS article to mention
add-mamedev-systems
and to briefly describe the setup? Also a link from the general MAME article pointing to MESS probably could be helpful, too.
You can have a look in thesystems with extras
menu-item for the autoboot installs.That would be the goal, however the script is still 3rd party.
So not part of the official RetroPie work, therefor it should not be added yet.Here is some preliminary artwork for the M20 if you want to have a peak. I am using it with std carbon theme, will have a look into the thread you suggested.
Ok will have a look.
I'll continue to debug the issues that I currently have, mainly with the keyboard not working as expected and the lr-mess core crashing every other time I run it on my pi2 (so far it works fine on the pi4).
The specs of the pi2 are too low would use the pi4 indeed.
- You can rename the file you want to run into an INIT.* file with the fm (filemove) command. e.g.
-
@eberhab said in Running a custom rom with lr-mame*:
the disk image which afaik only works unzipped and with mame > 0.212
In the mame-gui of the latest mame (now 250) you can select a disk-image.
While doing that you can choose that changes are written to a new disk-image.
Insert a new name and now all changes will be written in the new image.
I changed a basic file with succes. -
@Folly Again thanks a lot for adding the nice artwork to the cygnus-bf theme!
Just a quick summary of what I did the past days and what I found out so far concerning automating the loading process of M20 images.
Most of the discs actually have the pcos included, so the need to launch with two floppies might not really be there. I looked closer into your example with mazedaze where you booted the virtual m20 with pcos102. It seems that mazedaze is actually on the "giochhi" image file (it's the entry just aboved the "gamesd" disk in the hash file). The giocchi disk boots up fine all by itself, with no need for a separate pcos disk. You should be able to try yourself. Then disk then boots into an italian start screen where you can make your choice. The issue with the keyboard here are mainly origination from the underlying pcos being italian.
Concerning the "gamesd" disk, the situation is a bit more complicated. I matched the checksum from the hash table with the file that circulates the internet, and this is a "broken" images, which is missing some header data in order to work in the m20. I have described how to fix this in an article about M20 emulation on z80ne.com (you can verify with sha1sum and hexdump). The image can be fixed easily by transplanting the missing header from a working image file (e.g. from pcos102). If you are not on linux, in any case I have uploaded a fixed image into the
[dropbox folder]from my previous post. The fixed image should then also boot right away in flop1 with no need to load an additional pcos disk. The keyboard should also work better since the underlying pcos is german.Both images booth with
-bios 0
so also here luckily there is no need to make custom settings. The only issue with bios settings I see with the msdos image, which indeed needs a different bios setting. Its not a game though, so maybe it's no loss if msdos would not be available oob.Overall I think the mamedev systems installer should work with most disks oob, as long as people use working images. One could think about a way to let people know if the image has a missing header, since it seems to be the case for most of the circulating images unfortunately.
-
@eberhab said in Running a custom rom with lr-mame*:
@Folly Again thanks a lot for adding the nice artwork to the cygnus-bf theme!
Just a quick summary of what I did the past days and what I found out so far concerning automating the loading process of M20 images.
Thanks for the reply.
Most of the discs actually have the pcos included, so the need to launch with two floppies might not really be there. I looked closer into your example with mazedaze where you booted the virtual m20 with pcos102. It seems that mazedaze is actually on the "giochhi" image file (it's the entry just aboved the "gamesd" disk in the hash file). The giocchi disk boots up fine all by itself, with no need for a separate pcos disk. You should be able to try yourself. Then disk then boots into an italian start screen where you can make your choice. The issue with the keyboard here are mainly origination from the underlying pcos being italian.
I have that one also.
Indeed loading directly into an Italian menu.
Didn't know what I had to enter though, but translation has been activated by my script, just pressing HOTKEY T and it will translate.
So loading worked by entering two letters of the game to be loaded.Concerning the "gamesd" disk, the situation is a bit more complicated. I matched the checksum from the hash table with the file that circulates the internet, and this is a "broken" images, which is missing some header data in order to work in the m20. I have described how to fix this in an article about M20 emulation (you can verify with sha1sum and hexdump). The image can be fixed easily by transplanting the missing header from a working image file (e.g. from pcos102). If you are not on linux, in any case I have uploaded a fixed image into the dropbox folder from my previous post. The fixed image should then also boot right away in flop1 with no need to load an additional pcos disk. The keyboard should also work better since the underlying pcos is german.
Earlier on I had also a qwertz keyboard layout, that is a German one I think.
Will try your fix. ( LOADS PERFECTLY NOW !)
Theoretically it should be added to mame somehow.Both images booth with
-bios 0
so also here luckily there is no need to make custom settings. The only issue with bios settings I see with the msdos image, which indeed needs a different bios setting. Its not a game though, so maybe it's no loss if msdos would not be available oob.msdos needs an other bios and another cpu board and will run when selected.
But basically I don't think it's very interesting as msdos can be executed better on other devices or in other emulators.Overall I think the mamedev systems installer should work with most disks oob, as long as people use working images. One could think about a way to let people know if the image has a missing header, since it seems to be the case for most of the circulating images unfortunately.
Good to know that the default install will work for most !
A gamelist with video could be made explaining in the video how to run or whether a disk is bad or not. -
Can you make a summarise in you first post of this thread ?
I think that would be a good thing, don't you think so too ?Then I can add a link in my tread on how to run m20.
-
@eberhab said in Running a custom rom with lr-mame*:
If you are not on linux, in any case I have uploaded a fixed image into the [dropbox folder] from my previous post. [...]
Please don't post links with/to ROMS/BIOS/other copyrighted material.
-
-
@Folly @mitu I am still experimenting with -autoboot_command to get some more complex disk combinations to autostart. However I am seeing some differences in the characters being typed into pcos whether I type them by hand or having them entered by autoboot. In the UI I can choose between "natural" and "emulated" keyboard. The autoboot option seems to be using the natural keyboard inputs, whereas I would them to behave like typing on the emulated keyboard.
I looked into -autoboot_script to handle the input by lua script, which seems more flexible. I am using
manager.machine.natkeyboard:post_coded()
which also seems to enter characters on the "natural" keyboard. Do you know if/ how I can automate input on the emulated keyboard/ in the same fashion like entering them by hand? -
Indeed I have seen lua scripts that can do that.
I have also experimented once with them.
However I find it too complicated and it's probably also very hard to implement in my script.For some systems I think I might have changed the characters in the autoboot command so the good characters are typed.
Also not an ideal situation.
For the m20 it could be different between disks also.I have experimented with the m20floppy tool adding single INIT.CMD or INIT.BAS files to pcos102 or pcos13.
To some degree I find that that is the best solution to boot a single program directly without autoboot/menu trouble.However there are problems with some/many programmes.
othello.bas gives an error "line buffer overflow in 0" first, typing run afterwards will run the game but it's not displayed properly in pcos102 and no idea how to enter coordinates.
In pcons13 it does the same "line buffer.... ", when running it builds up the page breaks in some line.
bd.cmd does run but has bad graphics. -
Do you have an account here ? :https://forums.bannister.org/ubbthreads.php?ubb=postlist&Board=1
-
@eberhab said in Running a custom rom with lr-mame*:
I am still experimenting with -autoboot_command to get some more complex disk combinations to autostart [...]
I'm not that familiar with MAME's LUA scripts, my only attempt of using it is a simple plugin to stop the game when the menu comes up. As @folly suggested, you may ask in their forums (or on Reddit's
/r/mame
).
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.