Main > Software Forum
Johnny5 Run-time Error
Dustin Mustangs:
Well, I used this page ( http://www.mameworld.net/tigerheli/johnny/ ) to attempt and get J5 working under 'Method 5'. I believe I followed everything to the T, with the exception of adjusting it for my directory structure.
I can get it to properly launch from a command prompt but when I try and get it to come up while paused in mame I get a runtime error. I have attached a screen capture of the error to this post. After I launch mame I do have the AHK icon in the notification area of my desktop if that makes any difference. There is also quite a bit more of a delay between the time I toggle on J5 and when the error pops up (the screen is blank in between) then when I run it from the command line and it works properly.
FYI I'm using the default J5 layout, xp, the standard command line mame, mamewah 1.61, and all my mame directories are on E:/, not C:/ . In accordance with this page ( http://www.mameworld.net/tigerheli/johnny/ahk_th.htm ) I changed the mamewah mame.ini file to show the emulator executable as default.bat which I made following the instructions on the same page.
I can't seem to figure this one out, any ideas??
???
Howard_Casto:
Well if it works from that command line and not from within mame doesn't that tell you that it is the script that is at fault? The script doesn't do anything to j5, it just launches it.
So if it's working at the command line but not in mame then the fault is at either the script, which tiger wrote, or the front-end, which minwah wrote.
I can't help you from either, except to say that tiger's script is a little goofy. Those 1, 2, ctrl, ect. lines he's got in there. All they are doing is messing up the function structure by leaving an open-ended query. Not sure what the point is there as he says they aren't being blocked out in mame and they certainly don't need to be blocked out to get the script to run correctly.
I would ask him.
In the meantime use my script. This new version doesn't have syncing problems as tiger describes and I know that it works.
Dustin Mustangs:
It does function with your script, but I don't think it's right yet.
It takes 14 seconds from the time I press pause in Mame till when it actually displays its image (2.53ghz p4, 512megs ram). For comparison, it takes less then 2 seconds to come up for the same game (1942) from the command prompt. The screen is blank during most of the 14s wait. When I unpause, mamewah flashes on the screen quick and then the game comes back up with the graphics a little bugged right along the left and right edge of Mame's image. If I exit J5 the screen flashes again and the graphics straighten out. If I go back to my FE and then back into the game the graphics straighten out also.
I have the ctrlr cfg field in the parsing options left blank. Could that have something to do with it? I wasn't sure what to put there and saw that it was capable of finding it itself. Maybe it is taking time searching for something else I could specify instead??
I'd really love to get this last kink ironed out. Anyone have any ideas??
Here's how I currently have it coded:
--- Code: ---### 0000.ini (mamewah v1.61) ###
emulator_title M.A.M.E.
### List Generation Settings ###
rom_path E:\Mame\roms
rom_extension zip
dat_file E:\Mame\mameinfo.dat
nms_file
catver_ini_file E:\Mame\catver.ini
list_generation_method rom_folder_vs_listxml
### Execution Settings ###
emulator_executable E:\Mame\mame.exe
commandline_format "[rompath]\[name].[romext]"{nodosbox}{safelaunch}
alt_commandline_format_1 [name]{autodosbox}{nosafelaunch}
alt_commandline_format_2 [name]{autodosbox}{nosafelaunch}
game_specific_config_path
### Artwork Locations ###
artwork_1_image_path E:\Mame\snap
artwork_2_image_path E:\Mame\marquees
artwork_3_image_path E:\Mame\cabinets
artwork_4_image_path E:\Mame\titles
artwork_5_image_path E:\Mame\cpanel
artwork_6_image_path E:\Mame\flyers
artwork_7_image_path E:\Mame\artwork
artwork_8_image_path E:\Mame\artwork
artwork_9_image_path E:\Mame\artwork
artwork_10_image_path E:\Mame\artwork
movie_preview_path E:\Mame\artwork\movies
movie_artwork_no 1
### Screen-Saver Settings ###
enable_music_in_screensaver 0
saver_type movie
movie_path
movie_fullscreen 1
quit_delay 30
wrapper_executable
wrapper_commandline_format [name]{nodosbox}{nosafelaunch}
scr_file
### External Application Settings ###
ipc_file_or_path
app_1_executable E:\J5\j5.bat
app_1_commandline_format [name]{nodosbox}{safelaunch}
app_2_executable
app_2_commandline_format
app_3_executable
app_3_commandline_format
auto_launch_apps 1
### Additional Settings ###
music_path c:\mamewah\music
lcd_display_file_path
lcd_fe_text
### Settings used by MAMEWAH ###
current_list 1
--- End code ---
--- 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
~p::
{
if p_pressed = 1
p_pressed = 0
else
p_pressed = 1
}
return
~1::
{
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=Johnny5.exe %1% -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
{
WinActivate,%Title%
WinRestore,%Title%
WinActivate,%Title%
WinWaitActive,%Title%
ScreenState=0
}
else
{
ExitApp ; Assign a hotkey to terminate this script.
}
}
return
--- End code ---
--- Code: --- 0
0
E:\Mame\
mame.exe
0
1
1
0
0
0
0
27
17
1
1
g:\mame\cpos\
g:\mame\cards\
--- End code ---
--- Code: ---e:
cd e:\J5
start johnny5.ahk %1 %2 %3 %4
--- End code ---
Howard_Casto:
--- Quote from: Dustin Mustangs on May 25, 2006, 11:51:48 pm ---It does function with your script, but I don't think it's right yet.
It takes 14 seconds from the time I press pause in Mame till when it actually displays its image (2.53ghz p4, 512megs ram). For comparison, it takes less then 2 seconds to come up for the same game (1942) from the command prompt. The screen is blank during most of the 14s wait. When I unpause, mamewah flashes on the screen quick and then the game comes back up with the graphics a little bugged right along the left and right edge of Mame's image. If I exit J5 the screen flashes again and the graphics straighten out. If I go back to my FE and then back into the game the graphics straighten out also.
--- End quote ---
It should take longer for j5 to come up, that is what fixed teh syncing issues. 14 seconds no but a few seconds yes.
What do you mean if you unpause? You can't unpause as when you pause j5 comes up. Pressing "p" again simply exits j5 and it unpauses mame for you. And what do you mean by exit j5?
Also what do you mean by "go back to my fe"? Unless minwah has done some crazy bad coding, you shouldn't be able to access mamewah while a game is running. It's back there, but you shouldn't be able to use it.
Be sure you are running j5 at the same res as mamewah and mame the same res as mamewah. If you don't you will notice issues when the apps switch.
When the mame screen gets corrupted, particularly in games that don't fill the entire screen, that is a mame issue. You'll also see the same corruption when any onscreen display comes up while in mame (a im-pop-up, on screen volume adjustment, ect). These issues will be fixed when aaron finishes the video core re-write for mame.
Dustin Mustangs:
Thanks for your help again on this Howard.
Let me describe a little better what is going on. I begin with a game running in Mame that was started via mamewah. I Hit "p" to pause it and bring up J5, exactly 14 seconds later (screen is blank for most of this time) the J5 display pops up and looks correct (I'm still using your default layout and background for now). I have the command.dat add on and at this point this also works correctly with "ctrl" working as the toggle. Hitting "p" again makes mamewah's display flash briefly and then the game I was playing in mame comes back up with some minor glitches in how it looks as mentioned above. And yes, this is on a game that doesn't fill the entire screen.
My other scenario, I referred to above as 'exit J5', was to hit "esc" instead of hitting "p" for the second time to return to mame. If I do this mame comes back up and the display doesn't have any of the glitches it would of had if I had hit "p" instead of "esc" to get back to mame. I can't remember if mamewah's display flashes across the screen in this scenario as it does with a second press of "p" and I am not in front of the computer to check right now. At this point I believe the script is unloaded because if I press "p" to pause again, mame pauses as normal and J5 never comes up.
By going back to my front end I meant exiting mame with "esc". This brings me back to mamewah. If I do this and then enter back into mame by loading a game, everything starts over just as before, including a glitch free display and with the J5 script loaded.
I'll look into the resolution settings and make sure they all match. Hopefully that will solve the graphics issue although my instinct tells me whatever is causing that extra delay is also what is goofing up the graphics. Really, I can deal with slightly bugged graphics. It's the delay that I'd love to have solved.
.........................................
I also thought of one other thing that seemed weird. The line in your script that has the path you need to adjust was giving me some errors. As posted on your site and modified for my directory structure it reads:
--- Code: ---Run,%J5%, e:\j5 DON'T ERASE\sources\Controls Viewer3\, max
--- End code ---
This gave me an error on this line that popped up when "p" was pressed in mame with the script loaded until I changed it to:
--- Code: ---Run,%J5%, e:\j5, max
--- End code ---
I know, I know; I erased the part that says don't erase but that got rid of the error on that line. Maybe this is part of the problem? How should this line look??
Thanks again for any help you can offer!
Navigation
[0] Message Index
[#] Next page
Go to full version