Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mame source/compiling question  (Read 1217 times)

0 Members and 1 Guest are viewing this topic.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Mame source/compiling question
« on: July 02, 2008, 12:10:53 pm »
I would like to add a few 'new' input types to Mame, for example IPT_WHEEL360 and IPT_WHEEL270.  These would be exactly the same as IPT_DIAL and IPT_PADDLE respectively, but would only apply to driving games. In turn I would like the -listxml output to report these types as 'wheel360' and 'wheel270'. Functionally nothing will change, just how the input appears to the user.

I had a bit of a go at this but I seemed to have messed something up  :-\ When I start Mame I can go into the tab menu but after that controls do not work properly (inc. UI controls such as Escape). I think it might be a change I made in \src\emu\inptport.h:

Code: [Select]
/* analog inputs */
#define __ipt_analog_start IPT_PADDLE
#define __ipt_analog_absolute_start IPT_PADDLE
IPT_PADDLE, /* absolute */
IPT_WHEEL270, /* absolute */
IPT_PADDLE_V, /* absolute */
IPT_AD_STICK_X, /* absolute */
IPT_AD_STICK_Y, /* absolute */
IPT_AD_STICK_Z, /* absolute */
IPT_LIGHTGUN_X, /* absolute */
IPT_LIGHTGUN_Y, /* absolute */
IPT_PEDAL, /* absolute */
IPT_PEDAL2, /* absolute */
IPT_PEDAL3, /* absolute */
IPT_POSITIONAL, /* absolute */
IPT_POSITIONAL_V, /* absolute */
#define __ipt_analog_absolute_end IPT_POSITIONAL_V

IPT_DIAL, /* relative */
IPT_WHEEL360, /* relative */
IPT_DIAL_V, /* relative */
IPT_TRACKBALL_X, /* relative */
IPT_TRACKBALL_Y, /* relative */
IPT_MOUSE_X, /* relative */
IPT_MOUSE_Y, /* relative */
#define __ipt_analog_end IPT_MOUSE_Y

Can anyone point out what I might have done wrong? Still very much learning from a bit of trial and error at the moment.


Edit: BTW I want to do this to make filtering games much, much easier.
« Last Edit: July 02, 2008, 12:19:35 pm by Minwah »

Cakemeister

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1002
  • Last login:May 31, 2024, 06:23:16 pm
  • I'm a llama!
Re: Mame source/compiling question
« Reply #1 on: July 02, 2008, 12:28:23 pm »
Try doing a complete clean recompile. Mame may not have the dependencies set up so if you change one .h file it may not automatically recompile any .c which #includes the .h file.
Old, but not obsolete.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Mame source/compiling question
« Reply #2 on: July 02, 2008, 02:03:04 pm »
Try doing a complete clean recompile. Mame may not have the dependencies set up so if you change one .h file it may not automatically recompile any .c which #includes the .h file.

Thanks very much for the tip, that did it! All seems to work fine now:

Code: [Select]
<input players="3" coins="3" service="yes">
<control type="wheel360" minimum="0" maximum="255" sensitivity="25" keydelta="10"/>
<control type="pedal" minimum="0" maximum="63" sensitivity="100" keydelta="4" reverse="yes"/>
</input>

Thanks again!  ;D