Main > Software Forum

Johnny5 Run-time Error

<< < (3/4) > >>

Howard_Casto:
By operating system related I mean something is wrong with your windows install. 


When you pause mame it should have a high processing percentage used BUT as you do other things on your machine while it's paused the number should drop just enough for you to do what you are doing.  For example, I am typing this message while 1942 is pause as we speak.  When I stop typing the percentage goes up to around 98%, but while I'm typing th enumber drops to 80-90 percent. 

It sounds to me like your machine isn't dropping priorities like it should.  I have no clue what could cause this. 

Your system specs might give some sort of indication. 

Tiger-Heli:
Dustin,

Sorry I am late to the party, but anyway -

First, your initial error looks to me like the script is not passing the gamename to Johnny5, although I am not sure why.  I wrote my script for the previous version of J5 and have not tested with the latest one, but I would expect it to work.

--- Quote from: Howard_Casto on May 24, 2006, 05:34:21 pm ---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.

--- End quote ---
Agreed 

--- Quote ---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.

--- End quote ---
Not sure why you think the script is goofy.  All the 1,2,ctrl, etc. lines do is mean that you can press either Button 1 or Start to display J5 when MAME is paused.

(But most of my script was simple modifications (often suggested by you, Howard, IIRC) of the main script that you wrote - (which I couldn't come up with independently anyways)) -  :cheers:
[/quote]

Howard_Casto:
Well the thing about those buttons you added in is... even if they are working, they shouldn't work.  What you have is three open-ended functions, by all accounts the script shouldn't even be working.

To do multiple keys you should either setup a fucntion for teh keypress code and pass that funciton for each key, or setup a check of all keys pressed, rather than a translation.



I'll be honest, I had three people with similar j5 problems posting at the same time and this one got lost.  I don't know much about mamewah so I might not be able to tell, but we don't even know if mamewah is setup occrectly.  It could very well be that mw isn't setup to pass the command line.

Dustin Mustangs:
Ok, I have still been working with this and really haven't gotten anywhere but I did find some interesting things out.

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.  Please excuse me, because when it comes to command prompts my knowledge is pretty limited.  Is the -position tag a one time only thing, or do I need to specify it each time I run a game?  Regardless, I couldn't seem to get it to work.  I assume you run it each time you start a game and if that is the case then I can add this to the commandline format of my external application settings in mamewah.  Here is how it currently looks, could you suggest how to properly add the -position tag to this:


--- Code: ---### 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
--- End code ---

FYI, my J5.bat can be found a few posts up if that's where it would need to be added.


I seem to have found what was causing my high cpu usage while mame is paused.  For whatever reason I decided to generate a new mame.ini and see if that had any effect.  Well, it did.  CPU usage dropped from 100% while paused in (for example) gridlee, to 7%.  Average FPS went from 27 to 58.  After I found this I decided to go back through my origianl ini one setting at a time and change the new one to match, testing it's effect between each change.  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?).  Here is the weird part, changing it back to 0 had no effect on cpu usage while paused until I also changed 'cheat' back to 0, even though when I first changed cheat to 1 with skip_gameinfo at 0 it worked fine.  Regardelss of what and why this is going on, I now have it set so it behaves properly when paused during gameplay. 

This cut my wait for J5 to display from 14 seconds to 7 seconds (with the 1000 msec delay specified), still really long.  Changing the 1000 to something different just mad ethe wait longer.  Here are some examples:

500 msecond delay = 24 second wait
1000=7
1500=20
2000=26
2500=28
3000=8

Not exactly how I would have expected it to behave.  By the way this is all using the same script, the same game and pausing at the same exact time in gridlee, all launched through mamewah using the settings posted a few posts up.  I tried other delays also and the default 1000 produced my shortest wait.

I really am no where near knowledgable enough to get in the 'should tigers script work' debate, but I can tell you this.  Both scripts work the same on my machine.  The wait is SLIGHTLY altered, but really not enough to make any difference.  My end goal is to get tiger's working, but ever since howard expressed some concern I have been doing all my troubleshooting with his default script just to reduce the number of variables.

Speaking of which, can some one suggest how to use J5 with mame from the command line?  I guess I would also need the position tag added because I'll need to use that aand would likely screw it up, lol.  You should be able to get enough of my directory structure from the code I have post in various places above.  This would take mamewah out of the equation which would agian simplify things just for the sake of getting this working.  I have tried with no luck.  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.

Thanks again for all your help on this guys...

     

Howard_Casto:
Ok you don't seem to know how the script works then. 

If you don't pass at least a romname to the script it WILL NOT WORK!!!!!

The script, nor j5 have any way of know what the running game is. 

This is why prior to launch you tell it the rom name when you run the bat. 


How to run j5 from the command prompt is explained in the readme as is the position tag.  It has to be set every single time and to set it to work with a script you'll have to alter the script (throw it in, in the section where the command line is being "built" by the options sent).


And let me make this one clear... you CANNOT use j5 with mame without a script.  You can launch it before mame or launch it from your fe, but you can't launch it from within mame without a script. That is the whole purpose of the scripts. 

Maybe your conception of 7 seconds is longer than mine, but that doesn't sound long at all to me.  J5 doesn't just immediately show a picture when you launch it, it takes a few to parse the data.  Run it from the command prompt and time it and then run it from mame. You shouldn't see a difference of more than 2-3 seconds. 

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version