| Main > Software Forum |
| Johnny5 Run-time Error |
| << < (4/4) |
| Tiger-Heli:
--- Quote from: Dustin Mustangs on June 04, 2006, 11:56:37 am ---First off, I couldn't get your -position tag to work for setting J5's resolution so that may still be what is hanging me up. Is the -position tag a one time only thing, or do I need to specify it each time I run a game? --- End quote --- Everytime --- Quote ---Here is how it currently looks, could you suggest how to properly add the -position tag to this: --- End quote --- From J5's readme, the tag looks like this. -position x,y,width,height. You want to add it to the AHK script. For example, find the line that reads J5=Johnny5.exe %1% -ahk 1000 and change it to J5=Johnny5.exe %1% -position 0,0,800,600 -ahk 1000 --- Quote ---My cpu usage didn't spike until I changed 'skip_gameinfo' to 1, which actaully didn't make mame skip the game info (those are the left, right screens when it first starts up, right?). --- End quote --- I think you are thinking about -skip disclaimer. That would be the screen that comes up when you first start MAME about usage with ROMS you don't own is illegal, press OK to continue. Gameinfo is the square box with the game CPU's and resolution, etc. Interesting that cheat and this setting caused the CPU usage. --- Quote ---Speaking of which, can some one suggest how to use J5 with mame from the command line? --- End quote --- I go through exactly this process in my Troubleshooting (or similar name - MW is down) section of the page. Quoting: --- Quote ---If the batch file does not work properly, I recommend a systematic approach to troubleshooting: Navigate to your MAME directory, open a command prompt, and type mame and a romname followed by enter. Ensure MAME starts properly and pauses properly. This verifies MAME is setup correctly. (Once I had BuddaMAME still configured to use the external viewer and didn't realize that was what was happening rather than the script.) Navigate to your c:\johnny directory, open a command prompt, and type Johnny5 and a romname followed by enter. Ensure Johnny5 launches and displays the correct information for the romname. This verifies that Johnny5 is working. If this fails, try running Johnny5 with the -debug flag, and, if necessary contact Howard Casto for assistance. While in the c:\johnny directory, open a command prompt, and type start johnny5.ahk and a romname followed by enter. Ensure the AHK icon appears in the statusbar. Press one of the launch keys and verify that Johnny5 is displayed with the correct information for the romname. Press any of the launch keys again and verify that Johnny5 closes, but the AHK icon stays loaded. Press any of the launch keys again and verify that Johnny5 again launches with the correct information. Press Escape and verify that Johnny5 closes, but the AHK icon stays loaded. Press Escape again and verify that the AHK icon disappears from the status bar. This verifies that the AHK script is being loaded and mostly working. Perform the following steps to troubleshoot: If the AHK icon fails to appear, verify that AHK is properly installed and .ahk files are associated with AutoHotKey. Try reinstalling the application if necessary. If Johnny5 fails to launch, verify the path to Johnny5 in the script and the line that contains J5=Johnny5.exe do not have any typos in them. Possibly try substituting Johnny5 for another program like Notepad or Wordpad and verifying that this is launched. Try commenting out or removing commands from the script and see if this helps. Finally, if Johnny5 launches but does not display the correct game info, try either adding the -debug flag to the J5=Johnny5.exe line in the script, substituting Notepad or Wordpad for Johnny5, or looking at the .bat files created by Johnny5 to verify the correct romname info is being passed to Johnny5. Minwah had an error with this, and I am awaiting resolution on it. Next, while in the c:\johnny directory, open a command prompt, and and type start johnny5.ahk and a romname followed by enter. Ensure the AHK icon appears in the statusbar. Now, navigate to the MAME directory (cd\ - enter, cd mame - enter) and type mame and the same romname followed by enter. Perform the same tests as initially run and verify that the script behaves properly. This verifies that the script is compatible with MAME. If Johnny5 does not display at all, you may have some type of compatibility issue with your system, but I don't know how to troubleshoot this. Finally, if all the above works fine but default.bat fails the initial check, look for typos in the default.bat file. --- End quote --- --- Quote ---I guess I would also need the position tag added because I'll need to use that aand would likely screw it up, lol. What I was doing was double clicking the J5.ahk and then running a command prompt on my mame directory using 'mame gridlee'. This produced the same problem and screen as in my very first post. Not changing anything, if I run a command prompt on the J5 folder like 'johnny5 gridlee' it displays fine and with pretty much no delay. --- End quote --- like Howard said, what you posted won't work. In order (from simplest to most automated): 1) Navigate to E:\J5 (from a command prompt), then type johnny5 gridlee -position 0,0,800,600 - Verify J5 displays. 2) Navigate to E:\J5 (from a command prompt), then type Start johnny5.ahk gridlee (with the position command added to the AHK script. Then navigate to the MAME directory and run MAME gridlee. Verify J5 displays when MAME is paused. 3) Navigate to E:\J5 (from a command prompt), then type j5.bat gridlee. AHK and MAME should both launch. Verify J5 displays when MAME is paused. |
| Dustin Mustangs:
Thanks for taking the time to spell it out for me Tiger, I needed it. Running the position tag from the command prompt worked just fine. It came up real quick, less then 2 seconds. When I added it to the script and tried to run that from the command prompt I got another run-time error (see attached) when pressing pause once gridlee was running. If it matters, the AHK icon did appear on my task bar before I started up Mame. I double checked this with your instructions, but just in case I screwed this up along the line, here are my exact steps and my .ahk: Open command prompt on E:\J5 type 'Start johnny5.ahk gridlee' and hit enter Open command prompt on E:\mame type 'mame gridlee' and hit enter --- Code: ---#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 SetKeyDelay, 250,250 ~p:: { if ScreenState > -1 { If ScreenState =1 { ScreenState=-1 send, {Escape down} send, {escape up} WinActivate,%Title% WinRestore,%Title% WinActivate,%Title% WinWaitActive,%Title% sleep 250 Send,{p down}{p up} ScreenState=0 } else { ScreenState=-1 WinGetActiveTitle, Title sleep 100 J5=Johnny5.exe %1% -position 0,0,800,600 -ahk 1000 if 0 >1 J5=%J5% -clone %2% if 0 >2 J5=%J5% -driver %3% if 0 >3 J5=%J5% -emu %4% Run,%J5%, e:\j5, max ScreenState=1 } } } return ~Escape:: if ScreenState=1 { ScreenState=-1 WinActivate,%Title% WinRestore,%Title% WinActivate,%Title% WinWaitActive,%Title% sleep 250 Send,{p down}{p up} ScreenState=0 } else { ExitApp } return --- End code --- |
| Howard_Casto:
" e:\j5" should be " e:\j5\" That's the only thing I see and that shouldn't even make a difference. The error you are getting is different this time (you should have mentioned that). It is caused when j5 tries to resize the screen too soon. Remove the ", Max" from the script and that should remove the error. Since you are now setting the size of the form yourself so you no longer need to have the script force maximization for you. The two functions are fighting each other. |
| Tiger-Heli:
--- Quote from: Howard_Casto on June 09, 2006, 12:51:44 am ---" e:\j5" should be " e:\j5\" That's the only thing I see and that shouldn't even make a difference. The error you are getting is different this time (you should have mentioned that). It is caused when j5 tries to resize the screen too soon. Remove the ", Max" from the script and that should remove the error. Since you are now setting the size of the form yourself so you no longer need to have the script force maximization for you. The two functions are fighting each other. --- End quote --- Agreed - Good catch, Howard. |
| Navigation |
| Message Index |
| Previous page |