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: Any Mame Programming WhizKids Out there? I need a Favor!  (Read 1098 times)

0 Members and 1 Guest are viewing this topic.

buges

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:October 14, 2007, 10:43:54 am
  • Get In, Shutup & Hold On!!
Any Mame Programming WhizKids Out there? I need a Favor!
« 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

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Any Mame Programming WhizKids Out there? I need a Favor!
« Reply #1 on: July 12, 2004, 09:57:36 am »
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.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

buges

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:October 14, 2007, 10:43:54 am
  • Get In, Shutup & Hold On!!
Re:Any Mame Programming WhizKids Out there? I need a Favor!
« Reply #2 on: July 12, 2004, 01:01:48 pm »
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