The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Howard_Casto on September 26, 2005, 12:43:43 am

Title: Johnny 5 beta 2.0 released!
Post by: Howard_Casto on September 26, 2005, 12:43:43 am
The new version is out.  A features list diectly from the readme:

Beta 2.0
What's New
========

Fixed Various bugs. 

Added Command.dat support.

Added fixes that are required by the new mame core, Johnny will still work with older versions of mame.

The auto hot key script has now progressed enough to be considered a true feature.  By using this seperate download package,
along with some help from your favorite fe, you can now view j5 and all it's supported dats while in mame!
(2000/Xp users only)

Added -ahk tag, which helps with the script.

Added -driver allowing the user to manually set the driver.

The viewer can now automatically retrieve the driver and clone, all that is required is the rom name, making it easier to use
j5 with your favorite fe.
===================================================

(The ahk script will be posted shortly.)

Barring anymore mame changes or any major bugs found, this will probably be the last version for a while, so enjoy!

Go get it at the lazarus homepage as usual. 
Title: Re: Johnny 5 beta 2.0 released!
Post by: Howard_Casto on September 26, 2005, 12:59:18 am
the new test script is online
Title: Re: Johnny 5 beta 2.0 released!
Post by: Howard_Casto on September 26, 2005, 01:40:56 pm
Version 2.1 is up due to a major bug being found.
Title: Re: Johnny 5 beta 2.0 released!
Post by: SirPoonga on September 26, 2005, 02:31:05 pm
FYI, if this is new news to you, visit http://www.oscarcontrols.com/lazarus and http://fe.donkeyfly.com
Title: Re: Johnny 5 beta 2.0 released!
Post by: mahuti on September 26, 2005, 03:08:54 pm
And there are a few recent threads here in the software board as well... with especially great links on how to optimally setup Johnny5.

http://forum.arcadecontrols.com/index.php?topic=43276.0
Title: Re: Johnny 5 beta 2.0 released!
Post by: jcrouse on September 27, 2005, 03:32:39 pm
Howard,
     Should we have questions, concerns or comments, where do you prefer we post them?

John
Title: Re: Johnny 5 beta 2.0 released!
Post by: mahuti on September 27, 2005, 04:52:51 pm
Tigerheli made a good setup tutorial here (http://www.mameworld.net/tigerheli/johnny/setup.htm)
Title: Re: Johnny 5 beta 2.0 released!
Post by: Howard_Casto on September 27, 2005, 08:04:41 pm
Howard,
Title: Re: Johnny 5 beta 2.0 released!
Post by: snekse on September 27, 2005, 09:26:12 pm
What exactly IS Johnny 5?  Never saw anything on your site that actually explained what it does....
Title: Re: Johnny 5 beta 2.0 released!
Post by: mahuti on September 27, 2005, 11:43:10 pm
Dynamically displays your controls based on a combination of your control configuration and game information from the controls.dat project and mame.

Pretty dang handy.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on September 28, 2005, 08:10:24 am
Dynamically displays your controls based on a combination of your control configuration and game information from the controls.dat project and mame.

Pretty dang handy.
Right - Basically you feed it a gamename and it shows a picture of YOUR panel and tells you that "In Game Y, you have 2 player mode, they alternate, it uses an 8-way joystick and when you press the Yellow button, the plane will loop."

Thanks for the plug, Mahuti -
http://www.mameworld.net/tigerheli/johnny/ (covers ways to use it), and
http://www.mameworld.net/tigerheli/johnny/setup.htm (covers how to get it working).

I'll probably revise the first page to specify what it acutally does. . .

Update:  Added a "Background and History" section to the main page.
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 03, 2005, 11:18:22 am
Is there a way to make it exit on any key rather than a specific one?
I think cpviewer or cpvw has an option like that where you set the exit keycode to 0 to mean "any".

If I launch johnny before launching the game, I want to make it as easy as possible to dismiss it and start playing, by moving the joystick in any direction for example.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Howard_Casto on October 03, 2005, 03:42:58 pm
Nope, and it's not going to happen. You see cpviewer only displays the image and that's it.  It doesn't need input.  J5 does a lot of other things and input is requried.  (Toggle key, navigation in command.dat, ect)
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 03, 2005, 05:21:54 pm
J5 does a lot of other things and input is requried.  (Toggle key, navigation in command.dat, ect)

is this documented anywhere? I saw you can enter a toggle key but I'm not sure what it does, I tried it and got some error (can't remember what off hand).
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 10, 2005, 07:57:17 am
Nope, and it's not going to happen. You see cpviewer only displays the image and that's it.
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 10, 2005, 03:33:19 pm
The AHK script, as is, assumes that the user uses a standard setup with "P" for the MAME pause key and "Esc" to exit Johnny5.
If your keys are different, you will need to modify the script or it won't work properly.

if your mame pause key is not P (my keywiz encoder doesn't generate the P key by default, so I changed MAME to use Q), you will need to replace the "p" with whatever key in the following lines:
~P::
Send, {p down} {p up}

if you set up Johnny5 to exit on a different key than escape, you will need to change Esc in the script with the corresponding key.
Send, {Escape down}
Send, {escape up}
~Escape::


Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 10, 2005, 03:55:30 pm
Correct for the most part, but Escape in the script is actually the key to exit MAME. . .
if you set up Johnny5 to exit on a different key than escape, you will need to change Esc in the script with the corresponding key.
Send, {Escape down}
Send, {escape up}
~Escape::
All that REALLY has to be changed is the last line ~Escape:: if you use a different key to exit MAME.
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 10, 2005, 04:22:15 pm
FYI, you can assign a block of code to multiple keys by listing them like labels:
~Z::
~X::
~LShift::
{
   do something here
}
return
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 10, 2005, 07:17:27 pm
Correct for the most part, but Escape in the script is actually the key to exit MAME. . .
All that REALLY has to be changed is the last line ~Escape:: if you use a different key to exit MAME.  The key to exit Johnny is optional.

yes, it gets actually complicated: with the default settings, if you press ESC when johnny was up, then johnny terminates and unpauses MAME, so the first part of the if statement applies to the johnny exit key. If you press the ESC key when MAME was up, then the AHK script exits, so if MAME and johnny don't use the same exit key, the script needs to be modified some more.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 11, 2005, 10:38:56 am
FYI, you can assign a block of code to multiple keys by listing them like labels:
~Z::
~X::
~LShift::
{
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 11, 2005, 05:14:12 pm
haven't looked at it it great details but it sounds like the right idea.

I do have a mode important problem though: the "vanilla" AHK script from HC rarely unpauses MAME properly. It does dome of the time but not always. So then I have to press P again to get back in the viewer (which also unpauses MAME since it saw the P, so now the game playing in the background) and press P again to exit the viewer, and then most (some) of the time mame stays unpaused because it didn't see the P press from the script on exiting Johnny.


I played around with it and I'm stumped. I was trying it pacman because when the ROm firswt start up you see colored patterns going very fast on the screen. I added a 3 second delay after exiting johnny before sending the P key to MAME and I sometimes see the screen in MAME update for a fraction of a second. Just as if it had received the P key twice in a row really fast. Maybe that
s a hint as to what's wrong.
Title: Re: Johnny 5 beta 2.0 released!
Post by: mccoy178 on October 11, 2005, 06:28:22 pm
Is there a way that once mame is paused, another key could be pressed to bring up johnny 5?  I wondered if mame could be paused, I could press P1B1 to bring up the viewer, then exit back out of it.  The timing is still off when unpausing mame, and I would like the option to view the controls when needed, as it takes some time to bring it up.
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 12, 2005, 01:03:57 am
yes you can do something like that pretty easily.
I think that's what Tiger-Heli does, so he may have a script to share.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 12, 2005, 06:58:47 am
haven't looked at it it great details but it sounds like the right idea.

I do have a mode important problem though: the "vanilla" AHK script from HC rarely unpauses MAME properly. It does dome of the time but not always. So then I have to press P again to get back in the viewer (which also unpauses MAME since it saw the P, so now the game playing in the background) and press P again to exit the viewer, and then most (some) of the time mame stays unpaused because it didn't see the P press from the script on exiting Johnny.


I played around with it and I'm stumped. I was trying it pacman because when the ROm firswt start up you see colored patterns going very fast on the screen. I added a 3 second delay after exiting johnny before sending the P key to MAME and I sometimes see the screen in MAME update for a fraction of a second. Just as if it had received the P key twice in a row really fast. Maybe that
s a hint as to what's wrong.
Yes that's been a big problem with the script all along.  (I think it's probably only a MAME problem, but that's 95% of what people are using it for). . .

See http://fe.donkeyfly.com/forum/index.php?topic=162.msg1015#msg1015 BTW, adjusting the "sleep" timings had little effect for me, I tried values from 250 to 25000 and still got the errors.  Worse - 1942 played fairly well, but 1943 never did, so I'm not sure you can use the same timings with all games.

BTW, that's exactly what the "sleep timers" and block input lines, and the whole ScreenState=-1 stuff is trying to overcome, but it doesn't look like it's there yet . . .

I did see something in the AHK help file on multithreading, and thought maybe disabling this would help, but haven't experimented with it, if you're feeling adventurous.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 12, 2005, 07:06:09 am
Is there a way that once mame is paused, another key could be pressed to bring up johnny 5?
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 12, 2005, 01:21:39 pm
one ofthe things you could do is maintain state information: if P was pressed once and MAME is the active window, then MAME is paused, if P is pressed again while MAME is the active window, then it's not paused anymore.
There is a (small?) danger of getting out of sync however, but if you can't have a dedicated button for whatever reason, this could be a workaround. Makes the script a little more complicated becasue now you have to check which window was active when P was pressed, so that you ignore it if the user presses P while the johnny display is up.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 12, 2005, 01:29:12 pm
one ofthe things you could do is maintain state information: if P was pressed once and MAME is the active window, then MAME is paused, if P is pressed again while MAME is the active window, then it's not paused anymore.
There is a (small?) danger of getting out of sync however, but if you can't have a dedicated button for whatever reason, this could be a workaround. Makes the script a little more complicated becasue now you have to check which window was active when P was pressed, so that you ignore it if the user presses P while the johnny display is up.
Good thought.
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 12, 2005, 01:38:52 pm
HC's script does not atttempt to check which window was active when the key was pressed to "filter" it. It maintains state information based on key presses only.
On the other hand I don't know that I have seen HC's script get out of sync, ever.
The problem with the script is that MAME is not seeing the "unpause" keypress for some reason, but I don't believe it's a flow in the state information logic, the script gets out of sync because MAME didn't do what it's supposed to.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 12, 2005, 01:42:18 pm
On the other hand I don't know that I have seen HC's script get out of sync, ever.
You just said three posts above that it did . . . (no, I know what you mean, but if the script is okay but MAME isn't, the end result is the same . . .)
Title: Re: Johnny 5 beta 2.0 released!
Post by: BuZz880 on October 13, 2005, 01:30:58 pm
Ok,

I've worked all this out but the commandline I need as described below:

For speed reasons, the way I want to use Johnny5 is by pre-generating a bunch of png's using a batch process (thanks listgen) that I will setup and with the -justprint feature.

Once I do this, what is the command line to have Johnny5 display my png?  I do not see it in the readme or I wouldn't ask.  I will be naming all my png's after the parent rom for example sf2.png, mk2.png, you get it.  Johnny5 will be called via the AHK script (which I love by-the-way).

(oh and yes I know I could probably just modify the AHK script to call irfanview to show the PNG but I'm not so sure how and before I tackled it I thought it might be easier just to do this plus this leaves me the option of having Johnny 5 compile an image on the fly if one doesn't already exist for whatever reason.)

Thanks.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 13, 2005, 02:11:46 pm
Ok,

I've worked all this out but the commandline I need as described below:

For speed reasons, the way I want to use Johnny5 is by pre-generating a bunch of png's using a batch process (thanks listgen) that I will setup and with the -justprint feature.

Once I do this, what is the command line to have Johnny5 display my png?
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 13, 2005, 02:18:37 pm
or you can call cpvw from JCrouse's page and use the -bg <picture name> command line option
Title: Re: Johnny 5 beta 2.0 released!
Post by: BuZz880 on October 13, 2005, 04:56:04 pm
I get it, thanks.. .I'll try all this later hopefully tonight otr tomorrow.
Title: Re: Johnny 5 beta 2.0 released!
Post by: AllisterFiend on October 16, 2005, 09:08:06 pm
I get it, thanks.. .I'll try all this later hopefully tonight otr tomorrow.

Just wondering if you have tried this yet.

I have already created .png files with my control layout (I only have about 40 games that I run on my system) and I just want to be able to pause my game in mame and have ahk view my .png (which is named after the rom image) using ifranview. and then when I press pause again have it go back to mame and continue to play.

I will also try but since I just started reading about these viewer programs, I'm a little overwhelmed. 

Allister Fiend

P.S. I know I at least need Ifranview and AHK, but do I even need johnny 5 or any other controls program just to view a .png in fullscreen?
Title: Re: Johnny 5 beta 2.0 released!
Post by: Howard_Casto on October 17, 2005, 01:54:28 am
In your case no.   J5 and other viewers are for people that have a cab that runs several games. 

I would like to point out, though that in the case of others in this thread, just displaying an image is a bad idea.  Every time, and I mean every time you update your controls.dat you'll need to regenerate those images, not just new ones, but all of them (because we constantly tweak entries).  For example, between this version and the next we are going on a spell-check spree, cleaning up misc details.  I'm guestimating at least 80 entries will change.  That and the fact that we'll add those games added in the recently released cp pack.  (Another 60 or so assuming they are all readable)

At first glance it may seem that just displaying images is easier, but in actuality it ends up being more work in the long run.  I only reccomend dislaying imges for those of you with a small games library and those who are forced to do so for various reasons.  It should be a last resort, not a first choice.
Title: Re: Johnny 5 beta 2.0 released!
Post by: AllisterFiend on October 18, 2005, 07:23:12 am

You answered your own question . . .

You can't (AFAIK) display the image in Johnny5, you can modify the AHK script to call Irfanview.

First, copy Irfanview to your images directory.  Open Irfanview and select options> >properties>fullscreen and disable "show text" to keep Irfanview from showing the image name (change any other options here as need (scale image, etc.).

The command line would be /fs for fullscreen,

so the AHK script needs something like

J5=i_view32.exe %1%.png /fs
Run,%J5%, C:\images, max

I haven't verified this, so the %1%.png might need one less percent sign or sth, but I think it will work.  Let me know if it doesn't and you need to change something.

 Tiger-Heli,

 I have tried what you said and everything works fine except for the fact that for some reason I can only get it load my .png's from the root directory of C:. I am using the Method 5 complex script and just changed around what you mentioned in the other post. I have tried to change the script around in various ways to get it to recognize subdirectories but I have had no luck.  I even went to the AHK website and tried some examples that they had (not that it matters much, the last time I tried to do any type of programming was way back on my Commodore 64, BASIC RULES!!!! :D).

 I also had to name my .png to the rom name plus add in the .zip to the filename to get it to load the images..ex..galaga.zip.png (no big deal, just wanted to get it out there in case someone is having trouble loading their picture.)

 Okay, now I have a question that might seem pretty stupid but remember I have not done any programming since the days of compute! magazine (does typing them from the back of the magazine count as programming...hmmmm)

 It is my understanding that AHK can determine if mame is running but it cannot determine whether mame is running while paused.  Is there anyway for a program to tell if mame is paused or is this something that the mame devs have to add into the mame code.  The reason I ask is that I really like method 5 but being able to launch your control viewer while the game is still running is a downer, I just know in the heat of a game I will do this sooner or later and screw my game up.  In other words I was wondering if a check could be added into the AHK script that would not allow you to say press the 7 key (as set up in the script) if it does not detect mame in the paused state.

Hope I got my message across as I am late for work now :) and in a hurry to get out of here.

Thanks for any help you guys could give.

Allister Fiend

P.S. thanks for the info Howard, if I decide to go with more games I will definetly set up johnny5
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 18, 2005, 08:15:12 am
I have tried what you said and everything works fine except for the fact that for some reason I can only get it load my .png's from the root directory of C:.
I added details on this in my Method 2 and Method 5 pages at http://www.mameworld.net/tigerheli/johnny/.

Did you copy Irfanview to the images directory, like I suggested?
Title: Re: Johnny 5 beta 2.0 released!
Post by: BuZz880 on October 18, 2005, 01:55:57 pm
I get it, thanks.. .I'll try all this later hopefully tonight otr tomorrow.

Just wondering if you have tried this yet.

I have already created .png files with my control layout (I only have about 40 games that I run on my system) and I just want to be able to pause my game in mame and have ahk view my .png (which is named after the rom image) using ifranview. and then when I press pause again have it go back to mame and continue to play.

I will also try but since I just started reading about these viewer programs, I'm a little overwhelmed. 

Allister Fiend

P.S. I know I at least need Ifranview and AHK, but do I even need johnny 5 or any other controls program just to view a .png in fullscreen?


Ok, I've pretty much moved on from this but here is what I recall before I gave up:

I could get Johnny5 to work properly with AFK script but found the load time unworkable on my Athlon 2500XP.

I then generated static pngs for 2019 games which only took 40 minutes or so at 368x240 resoultion using a bat file process. 

With CPVW I could not figure out how to keep my PNG from loading in the background (ie behind MAMEWAH) I tried all variations of autodosbox, dosbox and nodosbox to no avail.  The /M command didn't work well with AHK scripts either.

Irfanview I think was a little better but ultimately I didn't like it since the "P" key kicks you out of the image and into the setup of the thing which is not acceptable for this purpose.

So, in a word, I quit.

But I did discover CPVW in this process which is capable of rendering a Control Panel quickly enough that you could dispense the static PNG idea if only you could figure out how to bring it to the front of the screen.

What bugs me is I worked out a nice BAt/AHK script combo to generate a new image if one doesn't already exist (or in the case of a clone being launched to check for the parent image and display that instead) and all that process worked fine but I was stumped by the viewers.  I guess with CPVW I don't need to do this anyway.
Title: Re: Johnny 5 beta 2.0 released!
Post by: AllisterFiend on October 18, 2005, 06:46:30 pm
I have tried what you said and everything works fine except for the fact that for some reason I can only get it load my .png's from the root directory of C:.
I added details on this in my Method 2 and Method 5 pages at http://www.mameworld.net/tigerheli/johnny/.

Did you copy Irfanview to the images directory, like I suggested?  If so and it still doesn't work, you might have to use a batch file to do this.

In the images directory, create a file called irfanview.bat with the following:

echo off
cd\
cd images
i_view32.exe %1%.png /fs
exit

and mod the AHK script to read

J5=irfanview.bat %1%
Run,%J5%, C:\images, max
Quote
I also had to name my .png to the rom name plus add in the .zip to the filename to get it to load the images..ex..galaga.zip.png (no big deal, just wanted to get it out there in case someone is having trouble loading their picture.)
This sounds to me like your FE is passing galaga.zip to the script rather than just galaga. . .
Quote
It is my understanding that AHK can determine if mame is running but it cannot determine whether mame is running while paused.  Is there anyway for a program to tell if mame is paused or is this something that the mame devs have to add into the mame code. 
MameDev won't have to add anything.  That's what papaschtroumpf was getting at in his earlier reply about maintaining state implementation.  Basically, it's a matter of changing a variable when P is pressed with MAME active and not changing it when P is pressed otherwise.  I don't think it would be extremely difficult to set up, but I don't know how to do it either.

Ideally, I would like a solution for this as well.

Thank you Tiger-Heli,

I solved my first two problems (your suggestion that it was my frontend led me in the right direction), I'm using Dragon King 0.99 (eagerly awaiting the new release, hint, hint!),  I turned off a switch in my mame config file called send rom path and it took care of both problems.

As for my third problem, I do not think I have the programming ability to figure that out, (I will try though), hopefully  papaschtroumpf or someone else will come up with something (wink, wink, nudge, nudge).

Has anyone tried to post over on the AHK forum for a solution?

Thanks Again,

Allister Fiend
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 19, 2005, 07:58:29 am
I actually tested Method 5 and static images using IrfanView and it worked very well - much faster.

I know you got it working, but for others, rather than another batch file, I think you could just add the path to the images into the AHK Script.
Title: Re: Johnny 5 beta 2.0 released!
Post by: papaschtroumpf on October 19, 2005, 11:02:36 am
I've though about asking on the AHK support list, but I'm not sure how to characterize the problem to ask the question properly.
What do we believe the problem is exactly?

My own experimentation a week or two ago seemed to show that MAME was not getting the unpause key, or possibly was getting two of them in very fat succession (on the pacman startup screen I would see the test pattern change one step).
I added a 3s delay between the time we tell johnny to exit and MAME to unpause, so I thought the problem couldn't be with johnny, but if you say it works when calling irfanview or cpviewer in the scrips, then maybe I need to rethink my original conclusion.

I'll try and play with it more this weekend.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 19, 2005, 11:21:39 am
I've though about asking on the AHK support list, but I'm not sure how to characterize the problem to ask the question properly.
What do we believe the problem is exactly?
As I see it, we have 3 problems:

1)  Script does not pause with MAME in Win98.  (Possibly keyhook problem, but odd because script does work correctly in Win98 if you simply load it and try to launch Johnny from an application other than MAME.

2) Unmodified script (Method 4) gets confused when pausing and unpausing MAME.

3) Modified script (Method 5) is always active and should be only active with MAME paused, you posted earlier about this.  We need a way for the script to monitor whether MAME is running or paused . . .
Quote
My own experimentation a week or two ago seemed to show that MAME was not getting the unpause key, or possibly was getting two of them in very fat succession (on the pacman startup screen I would see the test pattern change one step).
My tests seemed to reflect that also . . .
Quote
but if you say it works when calling rfanview or cpviewer in the scrips, then maybe I need to rethink my original conclusion.
That was NOT what I said.  What I said was Method 5 (launch from a separate Hotkey after MAME is paused) worked when calling IrfanView and was faster than calling Johnny5.  Therefore, possibly it would be less problematic to call Irfanview than Johnny5 when MAME was paused (Method 4), but I did NOT test this out.
Quote
I'll try and play with it more this weekend.
Thanks
Title: Re: Johnny 5 beta 2.0 released!
Post by: AllisterFiend on October 19, 2005, 06:29:31 pm
I've though about asking on the AHK support list, but I'm not sure how to characterize the problem to ask the question properly.
What do we believe the problem is exactly?
As I see it, we have 3 problems:

1)  Script does not pause with MAME in Win98.  (Possibly keyhook problem, but odd because script does work correctly in Win98 if you simply load it and try to launch Johnny from an application other than MAME.

2) Unmodified script (Method 4) gets confused when pausing and unpausing MAME.

3) Modified script (Method 5) is always active and should be only active with MAME paused, you posted earlier about this.  We need a way for the script to monitor whether MAME is running or paused . . .
Quote
My own experimentation a week or two ago seemed to show that MAME was not getting the unpause key, or possibly was getting two of them in very fat succession (on the pacman startup screen I would see the test pattern change one step).
My tests seemed to reflect that also . . .
Quote
but if you say it works when calling rfanview or cpviewer in the scrips, then maybe I need to rethink my original conclusion.
That was NOT what I said.  What I said was Method 5 (launch from a separate Hotkey after MAME is paused) worked when calling IrfanView and was faster than calling Johnny5.  Therefore, possibly it would be less problematic to call Irfanview than Johnny5 when MAME was paused (Method 4), but I did NOT test this out.
Quote
I'll try and play with it more this weekend.
Thanks

  I posted a message on AHK forum last night. (papaschtroumpf, I just saw your post on their forum also), but mine was concerning problem #3.

  Thalon from the AHK forum posted a solution to problem #3 and so far it has been working for me, I'll list it here so someone else can test it out also.  I had to remove a line and add an } in his solution to get it to work. (I do not think it needed that line, oh well, it started to work when it was removed ;D)

  Okay, lets see if I can get this to list okay...

  This is what Thalon posted.

Code: [Select]
~p::
IfWinActive, ahk_class {M.A.M.E.class}
{
   if p_pressed = 1
     p_pressed = 0
   else
     p_pressed = 1
}
return

~7::
{
   if p_pressed = 1
   {
      If ScreenState =1
      {
         send, {Escape down}
         send, {Escape up}
......
      }
   }
return

  And this is how It looks in the script that I am using.

Code: [Select]
#SingleInstance force
#Persistent
; The asterisk prefix makes the remapping more complete on XP/2k/NT. For 9x systems you can remove it.
DetectHiddenWindows, On
ScreenState=0
~p::
{
   if p_pressed = 1
     p_pressed = 0
   else
     p_pressed = 1
}
return

~7::
{
   if p_pressed = 1
   {
If ScreenState = 1
{
send, {Escape down}
send, {Escape up}
WinActivate,%Title%
WinRestore,%Title%
WinActivate,%Title%
WinWaitActive,%Title%
ScreenState=0
}
else
{
WinGetActiveTitle, Title
J5=i_view32.exe %1%.png /fs
Run,%J5%, L:\arcademachine\mame\arcadecabinetcontrols, max
ScreenState=1
}
   }
}
return
~Escape::
{
If ScreenState = 1
{
WinActivate,%Title%
WinRestore,%Title%
WinActivate,%Title%
WinWaitActive,%Title%
ScreenState=0
}
}
return
~=::
if ScreenState=1
{
send, {Escape down}
send, {Escape up}
WinActivate,%Title%
WinRestore,%Title%
WinActivate,%Title%
WinWaitActive,%Title%
ScreenState=0
}
else
{
ExitApp ; Assign a hotkey to terminate this script.
}
return

Let me know how this works for you.

Here are the links to the two messages on the AHK forums...

http://www.autohotkey.com/forum/viewtopic.php?p=35492#35492
http://www.autohotkey.com/forum/viewtopic.php?t=5915

Thanks,

Allister Fiend
Title: Re: Johnny 5 beta 2.0 released!
Post by: bigfuz on October 20, 2005, 05:40:31 pm
Tiger-Heli, whats the reason behind the "Win98SE does not work (and likely will not ever)" for AHK?
Title: Re: Johnny 5 beta 2.0 released!
Post by: Howard_Casto on October 20, 2005, 08:34:15 pm
It's a limitation of windows 98.  98 doesn't allow high-level hooking of the keyboard.  While it possibly could be done at a very low level, it'd screw up the inputs in mame and virtually everything else.  Long story short, it *may* be possible, but not with ahk or any of the wrappers I make and not easily. 
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 22, 2005, 07:42:19 am
AllisterFiend - Great find - I updated http://www.mameworld.net/tigerheli/johnny/ahk_th.htm to reflect your method.
Title: Re: Johnny 5 beta 2.0 released!
Post by: diabolic on October 22, 2005, 12:59:12 pm
AllisterFiend - Great find - I updated http://www.mameworld.net/tigerheli/johnny/ahk_th.htm to reflect your method.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Tiger-Heli on October 22, 2005, 01:03:50 pm
I had to add a } to the script for method 5 to work for me.
Is it wrong on my page?

Where did you add it?
Title: Re: Johnny 5 beta 2.0 released!
Post by: diabolic on October 22, 2005, 01:14:28 pm
Is it wrong on my page?

Where did you add it?

Actually I added { and }.
Title: Re: Johnny 5 beta 2.0 released!
Post by: Howard_Casto on October 23, 2005, 02:50:35 am
Just to go over the ahk limitations discussion.....

It is indeed a 98 problem.  9X handles low level input differently than a NT based environment does.  The reason notepad and more "windowsey" apps aren't affected is because they only use high level input scanning and don't hook the keyboard buffer.   Basically anything running direct input in exclusive mode, allegro's input system or anything similar isn't going to work. (Read 99% of all emulators.) Apps coded in visual studio languages (like notepad and many of the apps that come with windows) will.  Daphne probably has about a 50/50 shot in 98 as sdl seems to be less picky.  Some of the console emulators support sdl input plugins so that might be a solution for them.  Otherwise, you are sol.

You'll notice that j5 detects the inputs in 98 as well.  That's because I used vb6 to code it and I don't use any fancy hooking methods.