Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Johnny5 -justprint and irfanview  (Read 1125 times)

0 Members and 1 Guest are viewing this topic.

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Johnny5 -justprint and irfanview
« on: October 07, 2005, 11:15:11 am »
I create a batch file to try and create a static image for all the games supported by controls.ini using johnny5.
I still don;t have Internet access at home so I don't have an exact copy of what I did but basically I have a for loop that calls another batch file that creates a single picture:

for %%f in (D:\mame\ROMS\*) do makeOne.bat %%~nf

and makeOne.bat along the lines of :

johnny5 %1 -position 0,0,800,600 -justprint
<more stuff here that weeds out the "not found" pictures>

This ended up crashing my computer, upon investigation it turns out I had dozens of i_view32 (or whatever it's called) processes.
I don't know if it's an issue with my specific version of irfanview (I tried what I think is the latest, and a much older one that I had around) but when I run the program from the command line, it doesn't seem to leave irfanview processes around.
Maybe it's a timing issue, irfanview "hangs around" after the makeOne batch file returns?

I went around the problem by removing irfanview from the johnny5 directory, and doing the bmp to png convertion by adding something like the following line after the call to johnny5
"C:\Program Files\Irfanview\i_view32" controls.bmp /convert=controls.png /one

Maybe it's the /one (run only one instance) that does the trick, or maybe it's the way I'm doing it with the batch file.

Either way, this may help someone that runs into the same problem

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:August 02, 2025, 06:13:49 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Johnny5 -justprint and irfanview
« Reply #1 on: October 07, 2005, 05:10:27 pm »
It's hwo you have things setup I'm guessing.  You have a bat calling a bat, which can cause timing issues. 

You need to take the contents of the bat and put them in the larger bat.  Depending upon your os and dos version, the main batch file may not wait until the inner batch is launched and finished before going on to the next stage fo the loop.  Irview would obviously become confused and halt because the image it's trying to convert would be constantly manipulated by the most recent j5. 


This is assuming of course, that yoru for loop is in a batch file.... if it's in code then your problem is obvious. If you'll excuse me for using visual basic/c++ terms you are doing a "shell", not a "shellandwait".


Again, this is all a guess.  IRview is free and that's why I originally added support for it, but they keep changing the command line switches and the internal workings, and I can't really keep up with it.   

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re: Johnny5 -justprint and irfanview
« Reply #2 on: October 07, 2005, 05:16:20 pm »
yeah, it's in a batch file. I should probably do "wait makeOne.bat" which is the batch file way of doing a "shellandwait" properly (I think, at least it is for external apps), even though windows XP documentation indicates that calling a batch file from another one should wait for the inner one to finish.
My solution of calling irfanview directly from my inner batch file works also, so I'm not too worried about this.

The reason I have 2 batch files, is that the outer one could be autogenerated with ListGen so that I don't bother generating pictures for games I don't play.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:August 02, 2025, 06:13:49 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Johnny5 -justprint and irfanview
« Reply #3 on: October 07, 2005, 05:55:31 pm »
Xp's command line has more bugs than a three month old dead guy found on a hot summer's day.  I love xp, but where the command line is "emulated" it can act crazy at times.  You are probably right, but I wouldn't trust m$'s docs. 

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re: Johnny5 -justprint and irfanview
« Reply #4 on: October 07, 2005, 08:25:37 pm »
Xp's command line has more bugs than a three month old dead guy found on a hot summer's day.
That made me laugh!