TimePiloteer
Posts: 3
Joined: Thu May 19, 2022 3:37 pm

How to submit requests to fix incorrect control listings?

Hello, apologies if asked before. I'd like to know the best way to submit requests to update/change incorrect control listings for certain arcade games. I am noticing that many games are listed with incorrect joystick or button counts/directions/types. Where can I go to correct these or submit PRs? Where is this information stored? In the XML files that are generated I can see the incorrect controller port mappings, but I can't find the XML file source code in MAME driver source code. Are these XML files generated dynamically from driver information? Where do I look in the drivers to find the control listings? Sometimes I can see in the ports section listing for things like joystick_8ways, etc, but for some drivers I can't even find where that is set in the driver code.

I'm trying to correct a number of listings where for example button count is incorrect, or it lists 8 way joystick instead of 4 way, etc. Thanks so much for any help you can offer to point in the right direction to do this.
TimePiloteer
Posts: 3
Joined: Thu May 19, 2022 3:37 pm

Re: How to submit requests to fix incorrect control listings?

Maybe an example is necessary to get a response.

Take a look at the Konami game Video Hustler (Hustler):

http://adb.arcadeitalia.net/dettaglio_m ... search_id=

It has listed an 8 way joystick and 1 button. In actuality, the upright version of the game game uses two left/right directional buttons, and no joystick.

See the control panel picture:

http://adb.arcadeitalia.net/media/mame. ... elease=202

And info from the manual itself indicates only two buttons for direction and a Shoot button:

https://www.arcade-museum.com/manuals-v ... ustler.pdf

Looking at the driver source code I see it is listed as an 8 way joystick in the scobra.cpp driver:

static INPUT_PORTS_START( hustler )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )

PORT_START("IN1")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x03, "Infinite (Cheat)" )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )

PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END

In the XML file for the machine, you can see it listed as 8 way joystick:

http://adb.arcadeitalia.net/download_fi ... ustler.xml

Where/how is this XML generated or stored? I can't find this in the MAME source code. Is it extracted from the INPUT_PORTS settings in the driver? If I make a pull request to change the driver source, will that also affect the XML files as well? How would this specific example driver port config be changed to make this two way directional button instead of 8 way?
User avatar
Tafoid
Posts: 351
Joined: Thu Nov 06, 2014 12:50 pm
Location: USA
Contact: Website

Re: How to submit requests to fix incorrect control listings?

TimePiloteer wrote: Fri May 27, 2022 3:33 pm Maybe an example is necessary to get a response.

Take a look at the Konami game Video Hustler (Hustler):

http://adb.arcadeitalia.net/dettaglio_m ... search_id=

It has listed an 8 way joystick and 1 button. In actuality, the upright version of the game game uses two left/right directional buttons, and no joystick.

See the control panel picture:

http://adb.arcadeitalia.net/media/mame. ... elease=202

And info from the manual itself indicates only two buttons for direction and a Shoot button:

https://www.arcade-museum.com/manuals-v ... ustler.pdf

Looking at the driver source code I see it is listed as an 8 way joystick in the scobra.cpp driver:

static INPUT_PORTS_START( hustler )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )

PORT_START("IN1")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x03, "Infinite (Cheat)" )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )

PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END

In the XML file for the machine, you can see it listed as 8 way joystick:

http://adb.arcadeitalia.net/download_fi ... ustler.xml

Where/how is this XML generated or stored? I can't find this in the MAME source code. Is it extracted from the INPUT_PORTS settings in the driver? If I make a pull request to change the driver source, will that also affect the XML files as well? How would this specific example driver port config be changed to make this two way directional button instead of 8 way?

I've only taken a cursory look at the game you mentioned - Lil' Hustler - a clone/version of the original Konami game put out by Dynamo and indeed shows a control panel with 2 buttons for moving rather than a joystick. I have also seen Hustler cabinet pictures in flyers and elsewhere which show the original used a joystick so changing all Hustler machines to use 2 buttons would not be accurate.

The XML is generated using the command-line argument -listxml then capturing the contents to a file of your choice.
(EG: mame -listxml > listxml.txt)

There is also a way to produce it from within the UI:
Choose Unfiltered list -> Export Icon (3.5 disc icon at the top center) -> "Export List in XML format (like -listxml)". The result after 15 seconds or so will be written to your UI folder as exported_0000.xml or similar.

As far as programming needed to change the joystick to buttons, you'd need to use other sourcefile examples to determine how this is done.
TimePiloteer
Posts: 3
Joined: Thu May 19, 2022 3:37 pm

Re: How to submit requests to fix incorrect control listings?

Thanks for responding.

I understand how to generate the XML, what I'm not clear on is how the MAME exe generates the XML itself. Is it reading the driver port information? Or is there some other place in the source code where XML is stored? If I were to submit a PR to change it would I change the driver port source code?

For Lil Hustler, if other clones or variants used a joystick, it certainly wouldn't be an 8 way, as the game only responds to left/right inputs. Maybe that example wasn't the best, as many two-way games sometimes used 2 way joysticks on cocktails but used left/right buttons on uprights, or different licensors in different countries used joysticks vs buttons on their variants of the cabinets. But at the least this game should be marked either with 2 buttons or a 2 way joystick to more accurately reflect it's control scheme.

Some other examples:

Pandora's Palace (listed as 8 way in MAME, but manual calls for 4 way)
Roc n Rope (listed as 4 way in MAME but manual calls for 8 way)
Juno First (listed as 3 buttons in MAME but only uses 2 buttons)
User avatar
spludlow
Posts: 34
Joined: Thu Jan 24, 2019 2:15 pm
Contact: Website

Re: How to submit requests to fix incorrect control listings?

TimePiloteer wrote: Tue May 31, 2022 10:05 pm I understand how to generate the XML, what I'm not clear on is how the MAME exe generates the XML itself. Is it reading the driver port information? Or is there some other place in the source code where XML is stored? If I were to submit a PR to change it would I change the driver port source code?
It generates the machine XML from the drivers (the driver source code is the source of truth)

https://github.com/mamedev/mame/blob/ma ... nfoxml.cpp

Return to “MAME Discussion”