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 cfg defaults after crash using wireless XBox 360 controller  (Read 4897 times)

0 Members and 1 Guest are viewing this topic.

Randizzl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:September 06, 2018, 02:58:16 pm
  • I want to build my own arcade controls!
I have a specific issue that's really making me pull my hair out.

I've compiled a custom MAME64 executable for highscore as well as direct input.  I'm compiling mame 159.
This is being used in a cabinet I'm building that uses joysticks as well as XBox 360 wireless controllers.
I'm compiling the custome exe with direct input so as to allow the usage of JoyToKey so I can have keyboard buttons mapped to the XBox controllers for things like tab, esc, and F1 for restting.

My problem is this:
When the wireless XBox controllers are on, there are no problems.  However, when MAME is launched with them off, and exited, the program crashes, prompts with a windows error, and it clears the default.cfg.
It's specifically related to the XBox wireless controllers not being on, and with them being mapped to buttons in the emulator.  If the original, cleared, default.cfg is in place, it  no longer crashes and things are fine.
But if the modified default.cfg is in place, with my custom mappings, and XBox controllers off, it crashes.

Any advice?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME cfg defaults after crash using wireless XBox 360 controller
« Reply #1 on: May 09, 2015, 03:33:19 am »
I have more questions than advice. 

1.  Direct input is already enabled by default, so what are you doing specifically?
2.  Why are you using joy2key when mame supports joysticks?

Randizzl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:September 06, 2018, 02:58:16 pm
  • I want to build my own arcade controls!
Re: MAME cfg defaults after crash using wireless XBox 360 controller
« Reply #2 on: May 10, 2015, 02:15:16 pm »
I have more questions than advice. 

1.  Direct input is already enabled by default, so what are you doing specifically?
2.  Why are you using joy2key when mame supports joysticks?

I'm probably saying this wrong, so I apologize.
I'm compiling the mame exe so as to allow it to recognize injected key presses. 

When a keyboard is plugged in, and I try to have xbox controllers pass keyboard commands to MAME via JoyToKey, it ignores them.  I was told the only way to get it to recognize these inputs, is to compile your own source code and enable that feature.

I'm using JoyToKey because I want it to not only see the joystick commands, but also the ability to pass it keyboard inputs based on say ... pressing and holding a button for about a second.

For example, right now, the back button on the wireless XBox controller, as a default command, is inserting a coin.  But, through JoyToKey, when I press and hold the back button for about a second, it passes the 'esc' button, and closes MAME.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME cfg defaults after crash using wireless XBox 360 controller
« Reply #3 on: May 10, 2015, 07:16:57 pm »
Ok as I thought.  You are doing this the hard way.  While mame doesn't support macros in terms of holding down a button for x amount of seconds, it does in terms of hotkeys. 

For example, you can map the exit button to back+start.  You should be able to find tutorials all over the net on how to do this and it's rather easy if I recall.  I think trying it that way instead of a custom compile and doubly translating key presses might be a better way to go, if for no other reason then your problem is rather specific for anyone to help you with it. 

Randizzl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:September 06, 2018, 02:58:16 pm
  • I want to build my own arcade controls!
Re: MAME cfg defaults after crash using wireless XBox 360 controller
« Reply #4 on: May 10, 2015, 08:05:36 pm »
Ok as I thought.  You are doing this the hard way.  While mame doesn't support macros in terms of holding down a button for x amount of seconds, it does in terms of hotkeys. 

For example, you can map the exit button to back+start.  You should be able to find tutorials all over the net on how to do this and it's rather easy if I recall.  I think trying it that way instead of a custom compile and doubly translating key presses might be a better way to go, if for no other reason then your problem is rather specific for anyone to help you with it.

Well, you're helping me just by taking the time to read my post and reply with a suggestive and informative response.
I'll take the time to look into what you suggest and report back.

As a side note, do you know if it's possible to have a non-custom compiled MAME save high scores? (sorry for side tracking)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 12:27:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME cfg defaults after crash using wireless XBox 360 controller
« Reply #5 on: May 10, 2015, 11:43:16 pm »
Not that I'm aware.  Hiscores were removed some time ago.

Randizzl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17
  • Last login:September 06, 2018, 02:58:16 pm
  • I want to build my own arcade controls!
Re: MAME cfg defaults after crash using wireless XBox 360 controller
« Reply #6 on: May 11, 2015, 12:28:23 pm »
Okay, I got this working now.
It's not EXACLTY what I wanted, because one button to me is simpler than a multi-press, but working is better than not, lol.
Also, not having to complile MAME makes my life easier.

Before I was passing the back button (held for .75 seconds) to JoyToKey for 'esc', but now I have MAME configured to accept 'esc' from the keyboard, for my multiplayer joystick panel, but also pressing "back+start+rightBumper+leftBumper" will send the 'ui cancel' command.

I had to go back and reconfigure a bunch of other things to keep the experienced unified across all emulators, but again, it's working now.
Thanks Casto!

Also, I'm using mameuifx with a highscore.dat file in the 'dats' folder and the program configured for saving high scores to allow for that feature.