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: Error compiling: defining input in neogeo.c  (Read 1397 times)

0 Members and 1 Guest are viewing this topic.

Stormrider

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:September 28, 2014, 11:01:54 am
Error compiling: defining input in neogeo.c
« on: October 25, 2009, 03:06:03 am »
I am trying to change the enter bios input (only in input this game) for all Neogeo games editing the source code. I'm using neogeo.c, where I've found this:

   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Enter BIOS") PORT_CODE(KEYCODE_F2)   \

I can change keycode_f2 to keycode_b and it compiles and works. I can change it to JOYCODE_BUTTON8 and it compiles and works. However it doesn't compile if I write JOYCODE_1_BUTTON8 and the same with JOYCODE_1_BUTTON8 JOYCODE_1_BUTTON9 or what I first tried: KEYCODE_F2 OR JOYCODE_1_BUTTON8 JOYCODE_1_BUTTON9, which is what I have in a neogeo cfg file after editing the enter bios input (button combination to enter bios)

Any idea what's going wrong?

SirPeale

  • Green Mountain Man
  • Global Moderator
  • Trade Count: (+23)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 12963
  • Last login:August 04, 2023, 09:51:57 am
  • Arcade Repair in New England
    • Arcade Game and Other Coin-Op Projects
Re: Error compiling: defining input in neogeo.c
« Reply #1 on: October 25, 2009, 07:35:09 am »
That's an awful lot of work, why don't you just change the inputs on the input menu?

Stormrider

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:September 28, 2014, 11:01:54 am
Re: Error compiling: defining input in neogeo.c
« Reply #2 on: October 25, 2009, 01:30:37 pm »
Because I'm masochist
« Last Edit: October 25, 2009, 02:37:42 pm by Stormrider »

Stormrider

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:September 28, 2014, 11:01:54 am
Re: Error compiling: defining input in neogeo.c
« Reply #3 on: October 26, 2009, 06:48:04 am »
Nah, it's just that creating a neogeo.cfg with the custom input configuration simple doesn't work.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Error compiling: defining input in neogeo.c
« Reply #4 on: October 26, 2009, 05:56:05 pm »
I am trying to change the enter bios input (only in input this game) for all Neogeo games editing the source code. I'm using neogeo.c, where I've found this:

   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Enter BIOS") PORT_CODE(KEYCODE_F2)   \

I can change keycode_f2 to keycode_b and it compiles and works. I can change it to JOYCODE_BUTTON8 and it compiles and works. However it doesn't compile if I write JOYCODE_1_BUTTON8 and the same with JOYCODE_1_BUTTON8 JOYCODE_1_BUTTON9 or what I first tried: KEYCODE_F2 OR JOYCODE_1_BUTTON8 JOYCODE_1_BUTTON9, which is what I have in a neogeo cfg file after editing the enter bios input (button combination to enter bios)

Any idea what's going wrong?

Mame can do ORs with two PORT_CODE()s:

PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Enter BIOS") PORT_CODE(KEYCODE_F2) PORT_CODE(KEYCODE_B)   \

results in "F2 or B".

But it's not setup for hardcoding ANDs.  If you want to do this, I think you'd need to #define a PORT_CODE_AND, setup the tokens and write the new input_seq_append_and() function.  (Copying from the INPUT_TOKEN_CODE token and input_seq_append_or() function)
Robin
Knowledge is Power

Stormrider

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:September 28, 2014, 11:01:54 am
Re: Error compiling: defining input in neogeo.c
« Reply #5 on: October 26, 2009, 06:59:49 pm »
I've finally got to simplify an autohotkey script and make it work. I've added it to code of the script I'm using. This is the code:

#IfWinActive ahk_class MAME
~1Joy9::
if getkeystate("Joy3")
Send, {F2 down}
Send, {F2 up}
return

Apart from buttons for pause, show fps, coin and start, I use button combinations for using MAME's UI. The different action buttons + start button (joy9) perform functions: throtle, menu, overclock, service menu, reset, quit. Now, thanx to the script, when I press joy3 + the start button, I enter the service menu or bios (in case I am running a Neogeo game).
« Last Edit: October 26, 2009, 07:14:37 pm by Stormrider »