The NEW Build Your Own Arcade Controls
Main => Software Forum => Topic started by: buges on July 11, 2004, 10:29:47 pm
-
Hi
Im Playing around with the 84u2 source at the mo, adding a few bits & bobs to customise mame for my cab.
The problem i have is that i would like to add a service option on the the main menu, i can add the bits so it shows up ok on the menu, but i dont know how to mimic pushing the F2 button on the keyboard when u select my service option.
have tried IPT_SERVICE & KEYCODE_F2
but got a fuction error in usrintrf.c
I think if any1 can help me, alot of others will add this to there own builds, just saves grabbing the kb from the cab a hitting F2 which is a pain in the ar*e!
Hope that lot made sence
Thanx
Buges
-
Hi
Im Playing around with the 84u2 source at the mo, adding a few bits & bobs to customise mame for my cab.
The problem i have is that i would like to add a service option on the the main menu, i can add the bits so it shows up ok on the menu, but i dont know how to mimic pushing the F2 button on the keyboard when u select my service option.
have tried IPT_SERVICE & KEYCODE_F2
but got a fuction error in usrintrf.c
I think if any1 can help me, alot of others will add this to there own builds, just saves grabbing the kb from the cab a hitting F2 which is a pain in the ar*e!
Hope that lot made sence
Thanx
Buges
There's a bit of code in inptport.h which looks like it maps F2 to service mode:
#define PORT_SERVICE(mask,default) \
PORT_BITX( mask, mask & default, IPT_DIPSWITCH_NAME | IPF_TOGGLE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE ) \
PORT_DIPSETTING( mask & default, DEF_STR( Off ) ) \
PORT_DIPSETTING( mask &~default, DEF_STR( On ) )
#define PORT_SERVICE_NO_TOGGLE(mask,default) \
PORT_BITX( mask, mask & default, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
Changing the KEYCODE_F2 to something else may do what you are looking for.
I haven't tried it, so YYMV.
-
Thanx Buddabing
But Im complete newbie with C, only been playing with it for a couple of days.
Everything else i wanted to do in my version like adding new drivers, menu color ect.. i have figured out.
But this has stumped me.
How hard can i be to simulate pressing a key on the KB, without acually pressing it!
ARRRGGHHH!!!!!
Any other boards i might try without getting flammed for being a newbie?
We all gotta start somewhere
Buges