Author Topic: How to pass elements from romlist to emulator?  (Read 452 times)


  • Full Member
  • ***
  • Posts: 55
    • View Profile
How to pass elements from romlist to emulator?
« on: February 23, 2018, 02:40:35 PM »
I'm trying to send some other parameters to an emulator I'm working on. Other than romfilename and name, I can't figure out how to reference the other values in the romlist.

For example, to pass the ROM filename, I put this line in the cfg file for my emulator:

args                 "[romfilename]"

Looking at a line in a romlist for a MAME rom, I have this line:

cclimber;Crazy Climber;mame;;1980;Nichibutsu;;2;0;double joystick,double joystick;good;1;raster;;;;

So the first element is "romfilename", the second is "name", the third is the emulator, but what are the others?  I'm especially interested in the "cloneof" field (the next one, 4th on the line), but can't figure out how to address it.

The top line of the romlist says:


But those don't appear to be the variable names.


  • Full Member
  • ***
  • Posts: 73
    • View Profile
Re: How to pass elements from romlist to emulator?
« Reply #1 on: February 26, 2018, 11:22:56 AM »
Can you expand on that a bit? are you trying to pass the parameters to emulator or front end? Most of the parameters can be accessed via layout.nut through magic tokens e.g. [Year], [AltTitle] [Players] etc. You can check the wiki (listed in topics) for a complete list of magic tokens.

As for explanation of romlist:

Code: [Select]
cclimber;Crazy Climber;mame;;1980;Nichibutsu;;2;0;double joystick,double joystick;good;1;raster;;;;
cclimber = #Name    -- that is the actual name of rom (as in ur hd)
Crazy Climber = Title -- the actual title of game in db or one you gave in romlist
mame = Emulator -- emulator configured for romlist
; = CloneOf (missing value) -- arcade games usually have clones i.e. games which are based on same parent with minute differences usually regional. Here it mentions the parent (if any) of rom
1980 = Year -- year of release
Nichibutsu = Manufacturer -- manufacturer of game
; = Category (missing) -- action/board/shooter i.e. genre of game
2 = Players -- no of players
0 = Rotation (seems to be wrong) -- rotation angle of display
double joystick = Control (double entry it seems) -- control scheme
good = Status  -- status of game in mame database (working, good, not working)
1 = DisplayCount -- not sure but guess no of monitors
raster = Displaytype --type of display
; Altromname (missing) -- alternate name of rom
; AltTitle (missing) -- alternate title of rom
; Extra (missing) -- any other info not covered in other heads
; Buttons (missing) -- button config? perhaps not sure

Mind it this is only for mame, console emulators are usually limited to name, title, year, players and manufacturer.

P.S: to my surprise not all parameters are accessible. atm [Extra] & [Buttons] can't be accessed


  • Full Member
  • ***
  • Posts: 55
    • View Profile
Re: How to pass elements from romlist to emulator?
« Reply #2 on: February 26, 2018, 11:35:13 AM »
I'm trying to pass parameters from a ROMList to an emulator I'm working on.

So far I've only been able to get [romfilename], [name] and [title].

I know these are all accessible from a layout file as "magictokens", but that doesn't help me here unfortunately, at least in any way that I can see.

So for example I have a line in my romlist:


In my emulator config file (in this case "video_chooser.cfg") I have this line for args:

args                 "[romfilename],[romext],[name],[Manufacturer],[Year],[year][CloneOf],[cloneof]"

But only romfilename, romext and name are successfully sent. I haven't figured out a way to pass any of the other fields.

The reason I'm trying to do this, is I'm working on an emulator that plays videos, and would like to be able to send some other info from the ROM file, such as whether that video or playlist should loop, how many random videos to choose from a folder, etc. I can of course store that info in a secondary data file, but that's messy and I'd prefer to use the romlist.
« Last Edit: February 26, 2018, 12:01:42 PM by wrybread »