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: Controlling CPViewer or Johnny5 with JOYCODE Inputs  (Read 1556 times)

0 Members and 1 Guest are viewing this topic.

stoli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 23
  • Last login:September 12, 2010, 09:38:38 pm
    • Stoli's World
Controlling CPViewer or Johnny5 with JOYCODE Inputs
« on: July 15, 2006, 06:54:36 pm »
Since the PC that I used to build my MAME cab did not have a PS2 port, I used a GPWiz to interface my CP. No problem with setting up MAME and MAMEWAH as a front end, but now I want to integrate a CP viewer like Johnny5 or CPViewer or CPVW, etc.. 

I can launch them OK from MAMEWAH, but I can't seem to figure out how to get them to close (exit) using a button on my CP ( i.e. JOYCODE_1_BUTTON12). Is it possible, or am I forced to use RBJoy or Joy2Key?

Thanks

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Controlling CPViewer or Johnny5 with JOYCODE Inputs
« Reply #1 on: July 16, 2006, 04:58:16 pm »
At the moment I don't support joysticks.  I have a good reason but you probably don't wnat to hear it.  If so let me know though and I'll ramle on for a page and a half.  :)

stoli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 23
  • Last login:September 12, 2010, 09:38:38 pm
    • Stoli's World
Re: Controlling CPViewer or Johnny5 with JOYCODE Inputs
« Reply #2 on: July 18, 2006, 01:27:40 pm »
I'm sure it's a good one. I do some software development myself and appreciate the time and effort it takes to get it right and try to keep all the different platforms out there happy.

mccoy178

  • It's hard to work with a straight jacket on
  • Trade Count: (+9)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3127
  • Last login:September 03, 2021, 10:23:42 am
  • Go Bucks!
Re: Controlling CPViewer or Johnny5 with JOYCODE Inputs
« Reply #3 on: July 18, 2006, 11:42:06 pm »
Could this situation be a candidate for Auto Hot Key?  Can AHK use joystick inputs?  If so, it could be a solution for hard coded exit in emulators.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Controlling CPViewer or Johnny5 with JOYCODE Inputs
« Reply #4 on: July 19, 2006, 12:57:21 am »
Yes but it'll have the same issue. 


Here's the deal. 

J5 is used three ways:

     Always on (on a second screen). 

     Toggeled between mame (via ahk).

     Called manually and exited when done (like in a fe or something). 


Now for the latter adding joystick support is simple.... just add the old winapi in and you are done. 


For the other two, however, it causes complications.  See via the winapi method, which causes the least overhead, joystick status is always read and acted upon, even if the form doesn't have focus.  Which can cause issues to say the least.  There are ways around it, but j5 is used in so many different ways it is "safer" for me to leave it out.  Directinput is also an option but it chokes when another app has also wrangled the joystick, which would probably be the case as well. 


I'm not saying I won't add it, I'm just not going to add it yet. 

An ahk script would work, but it'd be constantly polling the joystick status and thus would have to be closed when j5 is closed. 




Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Controlling CPViewer or Johnny5 with JOYCODE Inputs
« Reply #5 on: July 19, 2006, 03:15:15 am »
Im used Autohotkey script for the joystick code for Arcade Music Box, since Blitz+ self didden
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Controlling CPViewer or Johnny5 with JOYCODE Inputs
« Reply #6 on: July 19, 2006, 03:48:18 pm »
There's a new api call called "getjoystatusex" or something to that degree... it supports more than 16 inputs.  It only works on 98se or above though (no big deal and nobody should be running anything less). 

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Controlling CPViewer or Johnny5 with JOYCODE Inputs
« Reply #7 on: July 19, 2006, 04:27:51 pm »
Your are correct. But it would been good to support joysticks as well, so they can been used a least one method.

You can simply add a another command (or something like that) to the commandline to (like -exitjoy 23). Should not been a problem. If no exitjoy are set, the joystick is disabled (default).

Don
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Controlling CPViewer or Johnny5 with JOYCODE Inputs
« Reply #8 on: July 19, 2006, 10:10:36 pm »
Like I said... I'm going to add it, just not yet.  With the new ledwiz options and the xml options in play the cfg file for j5 is in flux, and it'd be best to add new options after I've structred that file better.