Main > Software Forum
Johnny5 - error with clones
whatisk:
On the weekend I finally got around to playing with using Johnny5 to display what buttons do what for games.
Everything appears to run pretty well, but occasionally I get the following error when going into Johnny5:
Run-time error '62': Input past end of file.
Just wondering if anyone has any suggestions as to what might be the cause? I'm running MAME0.95, Mamewah 1.62B10, and Johnny5 2.5.
I have Johnny5 running using method 5 from Tiger-heli's webpage.
Part of the mame.ini for Mamewah:
--- Code: ---### mame.ini (mamewah v1.62) ###
emulator_title M.A.M.E.
### List Generation Settings ###
rom_path C:\mame\roms
rom_extension zip
dat_file
nms_file
catver_ini_file c:\mame\catver.ini
list_generation_method rom_folder_vs_listxml
### Execution Settings ###
pre_emulator_app_commandlines c:\johnny\j5.bat [name]{nodosbox}{safelaunch}
emulator_commandline c:\mame\mame.exe [name]{autodosbox}{safelaunch}
post_emulator_app_commandlines
general_app_commandlines
--- End code ---
The J5.bat file:
--- Code: ---c:
cd\johnny
start johnny5.ahk %1 %2 %3 %4
--- End code ---
My Johnny5.ahk:
--- 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
~S::
~1::
~2::
~W::
{
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%
Run,%J5%, c:\johnny, 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 ---
Any help would be great :)
Howard_Casto:
My first suggestion would be to update your script, a new one is out.
Input past the end of file generally means a corrupted file was read. You need to figure out on which games it's doing this and post all related cfgs for said game.
whatisk:
--- Quote from: Howard_Casto on May 21, 2006, 10:29:35 pm ---My first suggestion would be to update your script, a new one is out.
--- End quote ---
I did download the latest script from your site when getting Johnny5 2.5, however when I looked at it, there didn't appear to be a section where the keys that call Johnny5 once P is pressed are defined. As I know very little about ahk scripts, I went back to the one I posted. I would assume that perhaps the controller screen comes up straight away when P is pressed with the new script?
I will do some more experimenting and find out which games are doing it and post any configs for them I can find.
Thanks Howard :)
whatisk:
Managed to get some time last night to have a bit of an experiment and it looks as though I'm getting the error on any game that is a clone.
Tried a dozen or so clones and every one I tried gave me the run-time error 62.
Surely all of the cfg files for the clones can't be corrupt ???
Here is the cfg file for one of them (Choplifter bootleg) - hopefully this is the correct file to post:
--- Code: ---<mameconfig version="10">
<system name="chplftbl">
<input>
<port type="P1_BUTTON2" mask="2" defvalue="2" value="2">
</port>
<port type="P1_BUTTON1" mask="4" defvalue="4" value="4">
</port>
<port type="P1_JOYSTICK_DOWN" mask="16" defvalue="16" value="16">
</port>
<port type="P1_JOYSTICK_UP" mask="32" defvalue="32" value="32">
</port>
<port type="P1_JOYSTICK_RIGHT" mask="64" defvalue="64" value="64">
</port>
<port type="P1_JOYSTICK_LEFT" mask="128" defvalue="128" value="128">
</port>
<port type="P2_BUTTON2" mask="2" defvalue="2" value="2">
</port>
<port type="P2_BUTTON1" mask="4" defvalue="4" value="4">
</port>
<port type="P2_JOYSTICK_DOWN" mask="16" defvalue="16" value="16">
</port>
<port type="P2_JOYSTICK_UP" mask="32" defvalue="32" value="32">
</port>
<port type="P2_JOYSTICK_RIGHT" mask="64" defvalue="64" value="64">
</port>
<port type="P2_JOYSTICK_LEFT" mask="128" defvalue="128" value="128">
</port>
<port type="COIN1" mask="1" defvalue="1" value="1">
</port>
<port type="COIN2" mask="2" defvalue="2" value="2">
</port>
<port type="SERVICE" mask="4" defvalue="4" value="4">
<defseq type="standard">KEYCODE_F2</defseq>
</port>
<port type="SERVICE1" mask="8" defvalue="8" value="8">
</port>
<port type="START1" mask="16" defvalue="16" value="16">
</port>
<port type="START2" mask="32" defvalue="32" value="32">
</port>
<port type="DIPSWITCH_NAME" mask="1" defvalue="0" value="0">
</port>
<port type="DIPSWITCH_NAME" mask="2" defvalue="0" value="0">
</port>
<port type="DIPSWITCH_NAME" mask="12" defvalue="12" value="12">
</port>
<port type="DIPSWITCH_NAME" mask="16" defvalue="16" value="16">
</port>
<port type="DIPSWITCH_NAME" mask="32" defvalue="0" value="0">
</port>
<port type="DIPSWITCH_NAME" mask="64" defvalue="0" value="0">
</port>
<port type="DIPSWITCH_NAME" mask="128" defvalue="128" value="128">
</port>
<port type="DIPSWITCH_NAME" mask="15" defvalue="15" value="15">
</port>
<port type="DIPSWITCH_NAME" mask="240" defvalue="240" value="240">
</port>
</input>
</system>
</mameconfig>
--- End code ---
I tried making a copy of the chplft cfg file and renaming it to chplftbl but still received the runtime error... Non-clone games appear to work fine though :banghead:
edit: changed title now that I have more of an idea what is causing the error
Howard_Casto:
Sorry man, but that's not your problem. I tried the game you posted and even used the cfg file you posted and everything ran great. I have no doubt that it's releated, but I don't think that there is a clone-specific error.
My guess is whatever you are using to feed the script data isn't setup properly.
you should launch the script like this:
==================================
j5.ahk romname parentname driver emulator
==================================
Of course you don't have to send all three but you do have to send them in order and you do have to send a romname no matter what. Also notice I didn't mention tacking on the "-driver" and "-cloneof" tags with the data. That stuff is tacked on inside the script to make things as painless as possible.
Navigation
[0] Message Index
[#] Next page
Go to full version