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: Mixing in PC games with hardcoded keys  (Read 3006 times)

0 Members and 1 Guest are viewing this topic.

GamingGreg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 304
  • Last login:August 05, 2018, 06:04:30 pm
Mixing in PC games with hardcoded keys
« on: October 08, 2003, 07:57:16 pm »
Anyone know what's the best way to add a standard PC game (that uses hardcoded keys) onto your cabinet?

In my case I'm trying to add the game Nickelodeon Party Blast (for the kids).  I'm using MameWah and an IPac.  Unfortunately it doesn't support a different keyboard configuration for the game (control keys are hard coded and can't be changed).

I can manually program the IPac to make the game work, however I don't know of an automated way to program it.  I could do this via a batch file if so.  I'm told that MameWah could probably automate this, but I'd have to define and emulator for just that game (is that right?).

Also I've heard that reprogramming the IPac too much could be bad, although it would probably take a long time to for it to die.  Is that also right?

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re:Mixing in PC games with hardcoded keys
« Reply #1 on: October 08, 2003, 09:11:07 pm »
You could just create a batchfile that changes the IPAC, then runs the Game, then changes the IPAC back to normal.  Then just have Mamwah launch that batch file.

DAmnb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 181
  • Last login:July 28, 2011, 03:35:40 pm
  • R-Type for president!
    • TheGameCollector
Re:Mixing in PC games with hardcoded keys
« Reply #2 on: October 09, 2003, 04:55:51 am »
And you dont have do define an emulator for just that one game, create a emulator called PC Games or what ever and point it to a dir where you keep all the batchfiles for running the different games, change the rom extention to .bat and your all set.

About reprogramming the IPac depending on what type of EPROM it uses the number of cycles it can take should be in the 10.000 range  ;)

paigeoliver

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10994
  • Last login:July 06, 2024, 08:43:49 pm
  • Awesome face!
Re:Mixing in PC games with hardcoded keys
« Reply #3 on: October 09, 2003, 06:20:38 am »
Also, if that is the only application with hardcoded keys that you use, then it may just be simpler to reprogram your ipac for that game, and then just remap your Mame/other keys to the new setup.
Acceptance of Zen philosophy is marred slightly by the nagging thought that if all things are interconnected, then all things must be in some way involved with Pauly Shore.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Mixing in PC games with hardcoded keys
« Reply #4 on: October 09, 2003, 06:42:35 am »
Anyone know what's the best way to add a standard PC game (that uses hardcoded keys) onto your cabinet?

In my case I'm trying to add the game Nickelodeon Party Blast (for the kids).  I'm using MameWah and an IPac.  Unfortunately it doesn't support a different keyboard configuration for the game (control keys are hard coded and can't be changed).

I can manually program the IPac to make the game work, however I don't know of an automated way to program it.  I could do this via a batch file if so.  I'm told that MameWah could probably automate this, but I'd have to define and emulator for just that game (is that right?).

Also I've heard that reprogramming the IPac too much could be bad, although it would probably take a long time to for it to die.  Is that also right?

Actually, MAMEWAH has a built-in function to enable automatic programming of the IPAC, for this exact reason.  Ever wondered what the 'WINIPAC Filename' and 'IPC Filename / Path' options were for?

I have never had any feedback on the feature so I suspect no-one has used it.  All you do is enter the WINIPAC.EXE path in Misc Options, and set your .IPC Path (in the case of PC Apps).  I'd recommend making a list of PC apps using LNK files (ask me if you are unsure how to do this).  When each PC game/app is launched, the IPAC will be reprogrammed according to the IPC file.  Oh yes, the IPC must be named the same as the app .lnk file (eg 'Mortal Kombat 4.lnk' would use 'Mortal Kombat 4.ipc').

You will need to setup an IPC file for your emulators as well, so that the emulators key's (eg MAME defaults) are reprogrammed after you have played PC games.

Again, ask me if you need some help, I could use the feedback on the IPAC stuff...

GamingGreg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 304
  • Last login:August 05, 2018, 06:04:30 pm
Re:Mixing in PC games with hardcoded keys
« Reply #5 on: October 09, 2003, 02:35:34 pm »
MinWah,

I know how to create windows shortcut (LNK) files.  If I setup a few different PC games, I'm guessing that the LNK files (and IPC files) should be put together in one directory (essentially the ROMs dir for the 'PC games' emulator).

I'm also guessing that if there is no .IPC file it won't try to reprogram the IPAC for that game. Is that right?

Scenario:
MAME emulator (has MAME.IPC defined)
PCApps emulator (has PCApps.IPC defined [same as MAME.IPC])
PCGame1 (has PCGame1.IPC)
PCGame2 (no IPC defined)

In this scenario when launching PCGame1 it would reprogram, but launching PCGame2 it would not.  Is that right?
Does it reprogram back upon return from PCGame1?  With an emulator ones defined, would it be trying to reprogram everytime it launches a MAME game?

I'm just trying to understand how this works.



Anyone,

If I opt for using a batch file approach, how can I make the batch file wait until the pc game exits before continuing on?

Thanks again guys!

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re:Mixing in PC games with hardcoded keys
« Reply #6 on: October 10, 2003, 02:35:21 pm »
I just purchased a keyWiz to replace my sh*tty keyboard hack but haven't really played with it yet.
I think that I mapped things in a way were I can live with 2 configs (and using the Kazaam on a toggle switch should allow me to switch between these two configs at the touch a button)

If I needed more configs I can probably use a batch file to reprogram the keyWiz on the fly, however can I use the iPac mechanism built in mamewah to load keyWiz configurations? (sorry, this may be a totally stupid question because I just really started using the keyWiz and I'm still learning how it works).

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Mixing in PC games with hardcoded keys
« Reply #7 on: October 11, 2003, 07:44:22 am »
I know how to create windows shortcut (LNK) files.  If I setup a few different PC games, I'm guessing that the LNK files (and IPC files) should be put together in one directory (essentially the ROMs dir for the 'PC games' emulator).

I'm also guessing that if there is no .IPC file it won't try to reprogram the IPAC for that game. Is that right?

Scenario:
MAME emulator (has MAME.IPC defined)
PCApps emulator (has PCApps.IPC defined [same as MAME.IPC])
PCGame1 (has PCGame1.IPC)
PCGame2 (no IPC defined)

In this scenario when launching PCGame1 it would reprogram, but launching PCGame2 it would not.  Is that right?
Does it reprogram back upon return from PCGame1?  With an emulator ones defined, would it be trying to reprogram everytime it launches a MAME game?

I'm just trying to understand how this works.



Anyone,

If I opt for using a batch file approach, how can I make the batch file wait until the pc game exits before continuing on?

Thanks again guys!

OK:

The IPC's for PC apps must be in the same directory as each other, but does not need to be the same folder as the LNK files.  This path is what you enter in 'IPC Filename / Path'.

If there is no IPC file then it will not try to program anything.

In your scenario, you do not (cannot) use PCApps.IPC.  When you launch PCGame1, the IPAC will get programmed.  When you run PCGame2 the IPAC will not program.  The IPAC is only programmed when a game is launched (ie it will not get programmed 'back' after quitting a game).

When MAME is launched, it will not reprogram every time - only if the last game you launched was associated with a different IPC file (ie not MAME).  MAMEWAH remembers which IPC was programmed last, so it does not program un-necessarily.

Please see the Readme with v0.962 for some info I added.  It is more or less what I have just said :)

GamingGreg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 304
  • Last login:August 05, 2018, 06:04:30 pm
Re:Mixing in PC games with hardcoded keys
« Reply #8 on: October 23, 2003, 03:10:43 pm »
Okay I finally got around to setting MameWah up to use the IPAC files. (Real Life gave me a detour.)   Anyway here's a few things I noticed:

The above senario worked for the most part.  When I launched PCGame1 it programmed the IPAC and then when launching a MAME game it programmed it back.  However if I launched PCGame2 after launching PCGame1, it would not program it back.

After thinking about it some it's like another level is needed (a system, front-end, or "MameWah" level).

Currently there is a game level (IPC named the same as the rom/LNK file), and an emulator level (IPC named same as emulator name), but we probably need a MAMEWAH.IPC (which in my case would be the same as MAME.IPC, and then I wouldn't use MAME.IPC).

In other words, when launching a game, MameWah would first look for a game level IPC, then an emulator IPC, then the MAMEWAH.IPC if all else fails.  Then it would compare that with the last one used (if different then program).

Also, I suppose that the MAME.IPC could be the system default as well, as this would be most everyone's (if not everyone's) default config.  Perhaps that's what you intended.

Further it also appears that MameWah doesn't store (on disk) the last IPC used.   In the above scenario if I launched PCGame1 and then shutdown the computer, then the next time I loaded MameWah and launched a MAME game I'd still be using the IPC from PCGame1 and not MAME.IPC.

Hope that helps some.   I'm also not sure also how many are using this cababilty in MameWah; maybe I'm the first.

(Side Note: I like to avoid having to reprogram the IPAC if at all possible as I know it will eventually wear out (It'll still take years to wear out, but each reprogram brings it nearer to it's demise).  So I like to handle key mapping in software if I can.   If my IPAC does wear out maybe I'll look into using the KeyWiz instead.)

GamingGreg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 304
  • Last login:August 05, 2018, 06:04:30 pm
Re:Mixing in PC games with hardcoded keys
« Reply #9 on: October 23, 2003, 03:18:27 pm »
MinWah,

I should probably also mention that in my configuration (with MameWah 0.962) I had just a directory defined for the PCApps emulator (no IPC).  That directory contained the IPC for PCGame1.  Then for the MAME emulator I had the full filename and path to MAME.IPC defined.  

Let me know if you need to know anything more.  Thanks again for such a great front-end!

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Mixing in PC games with hardcoded keys
« Reply #10 on: October 23, 2003, 05:17:54 pm »
MinWah,

I should probably also mention that in my configuration (with MameWah 0.962) I had just a directory defined for the PCApps emulator (no IPC).  That directory contained the IPC for PCGame1.  Then for the MAME emulator I had the full filename and path to MAME.IPC defined.  

Let me know if you need to know anything more.  Thanks again for such a great front-end!

OK, thanks for trying it all out - I think you probably are the first :)

You are absolutely right in everything you mention.  From that I conclude that yes, I need to add an option for 'MAMEWAH IPC Filename'.  If this happens to be the same as your emulator IPC, then it will not reprogram.  Also I will add the last IPC filename programmed to MAMEWAH.CFG, so it knows what was programmed last even after a restart.

On a related note, ideally it would be nice if the WINIPAC program did a check before programming to see which keycodes are currently programmed, against which keycodes are about to be programmed.  If they are the same, then don't bother programming.  This way, even if a different IPC filename is sent to WINIPAC but with the same keycodes, it is not reprogrammed.  I mentioned this to Andy and he may get his WINIPAC programmer to take a look at some point...

GamingGreg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 304
  • Last login:August 05, 2018, 06:04:30 pm
Re:Mixing in PC games with hardcoded keys
« Reply #11 on: October 23, 2003, 05:36:29 pm »
Quote
...ideally it would be nice if the WINIPAC program did a check before programming to see which keycodes are currently programmed, against which keycodes are about to be programmed. ...

I agree that would be nice.   It would also be nice if WINIPAC could somehow return a success or failure status to you.  That way you'd know whether to try it again or not.  If it did fail (maybe after two or three failed attempts) you could prompt if they want to try it again or continue on.  Generally my IPAC programs with no problem, but on occasion it does fail (setting the speed down helps).

Right now if it fails on PCApp 1, I have to exit the game, launch a MAME game (so that MameWah switches it's pointer back to MAME.IPC), then exit, and the launch PCApp1 again.  This has the side effect of also programming the IPAC to what's already in there (another place where the above would be helpful).

anitabill

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 32
  • Last login:June 15, 2012, 07:51:07 am
  • I'm a llama!
Re:Mixing in PC games with hardcoded keys
« Reply #12 on: October 27, 2003, 08:58:33 am »
I just purchased a keyWiz to replace my sh*tty keyboard hack but haven't really played with it yet.
I think that I mapped things in a way were I can live with 2 configs (and using the Kazaam on a toggle switch should allow me to switch between these two configs at the touch a button)

If I needed more configs I can probably use a batch file to reprogram the keyWiz on the fly, however can I use the iPac mechanism built in mamewah to load keyWiz configurations? (sorry, this may be a totally stupid question because I just really started using the keyWiz and I'm still learning how it works).

Minwah

I dont know if this has been answered yet. Will the Keywiz work?

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Mixing in PC games with hardcoded keys
« Reply #13 on: October 28, 2003, 05:03:02 am »
I just purchased a keyWiz to replace my sh*tty keyboard hack but haven't really played with it yet.
I think that I mapped things in a way were I can live with 2 configs (and using the Kazaam on a toggle switch should allow me to switch between these two configs at the touch a button)

If I needed more configs I can probably use a batch file to reprogram the keyWiz on the fly, however can I use the iPac mechanism built in mamewah to load keyWiz configurations? (sorry, this may be a totally stupid question because I just really started using the keyWiz and I'm still learning how it works).

Minwah

I dont know if this has been answered yet. Will the Keywiz work?

Sorry I missed that.

I don't know is the answer.  If the KeyWiz can be programmed in a similar way to the IPAC (ie programmingexefname.exe keyconfig.???) then yes, it could be used just the same :)