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: Proof-of-concept of Howard's idea  (Read 19828 times)

0 Members and 1 Guest are viewing this topic.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 08:33:39 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Proof-of-concept of Howard's idea
« Reply #80 on: August 09, 2004, 01:44:33 am »
My Bat File:


%echo off

cd\
g:
cd "\Development DON'T ERASE\sources\Controls Viewer2\"
johnny5.exe %1 -clone %2 -justprint
copy "g:\Development DON'T ERASE\sources\Controls Viewer2\controls.png" "e:\mame\controls.png"
e:
cd\
cd mame\
zip -q artwork\%1.zip controls.png

Of course your bat would use different paths.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Proof-of-concept of Howard's idea
« Reply #81 on: August 09, 2004, 09:54:28 am »
My Bat File:


%echo off

cd\
g:
cd "\Development DON'T ERASE\sources\Controls Viewer2\"
johnny5.exe %1 -clone %2 -justprint
copy "g:\Development DON'T ERASE\sources\Controls Viewer2\controls.png" "e:\mame\controls.png"
e:
cd\
cd mame\
zip -q artwork\%1.zip controls.png

Of course your bat would use different paths.

I see. Johnny calls irfanview directly. In that case, copying irfanview into  the Johnny directory should be part of installing Johnny, right? The docs should say "Make sure you install Irfanview first!" Also, it would probably be best if Johnny was automatically installed into a MAME subdirectory, then the makectrl.bat could be simplified:

@echo off
del controls.png
cd johnny5
johnny5 %1 -clone %2 -justprint
copy controls.png ..
cd ..

The viewer works great with this batch file when the iview32 is copied into the johnny subdirectory. If johnny is installed somewhere else, perhaps the makectrl.bat could be generated or modified by johnny.

The blanking of the screen is annoying when running mame from the command line, especially in windowed mode. Can't you render to a window that isn't visible? People running frontends probably don't want to look at a blank screen during the second or two that Johnny takes to generate the image. I'd rather see the frontend's "loading game..." message, that way the image generation process is more transparent.

I would like the viewer to dim out or optionally remove controls that are not used in the current game. For example, if I'm playing Gorf I don't want to see the trackball.

Does the viewer put labels on or near the buttons? I would like to see "High Punch" displayed on whatever button High Punch is mapped to. That is IMO the most important feature of the viewer. This is not on the default layout.

I see that the font size and type is selectable, that's a good thing since people with small screens may have a problem reading the text in the default layout.

I'm looking forward to finishing this project and putting it on my cab!
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 08:33:39 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Proof-of-concept of Howard's idea
« Reply #82 on: August 09, 2004, 04:58:29 pm »
So let me get this straigh budda... you went to all this trouble and haven't even tried the viewer before.  Pass me over some of that crack you are on.  

Answering your questions:

Notice the word beta in the zip file... this isn't a public release.  Also if you read the notes in the docs it discusses the fact that you must place irfanview in the j5 folder.  


The blanking of the screen isn't annoying to me. Presently it can't be removed either.  Although I can make the screen invisible, it has trouble scaling the image when I do so (why I have no clue, I'm looking into it.)  

That's not how the viewer works..... I'm not about to change the way it works at this point.  However, before the major mame changes I was adding support for control specific layout files.  In theory you could dim out the controls that way by using a different image for each layout with unused controls dimmed.  

I'm not sure what you mean..... the labels are placed directly over the buttons with the default layout.  

That is assuming:

A.  You are using ctrlr files and only ctrlr files to remap buttons (pre 84 ctrlr files at this point).  

B.  When you when into the viewr options you set the ctrlr sub folder to the one you actually use.

C.  You right clicked over top of p1 button 1 in the layout editor and changed the default key to which ever key you normally use.  Alt should never, ever, ever be used as a gaming key in a windows environment and thus by default I have it mapped to the key I use ("V").  

Should I change that?  Probably... but a side result of leaving it this way is users are forced to play around in the layout editor and thus learn more about how the viewer works, and thus less questions for me.  :)

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Proof-of-concept of Howard's idea
« Reply #83 on: August 09, 2004, 06:30:27 pm »
So let me get this straigh budda... you went to all this trouble and haven't even tried the viewer before.  Pass me over some of that crack you are on.  
I tried a previous release but it didn't work on the background image I was using.
Quote

Answering your questions:

Notice the word beta in the zip file... this isn't a public release.  Also if you read the notes in the docs it discusses the fact that you must place irfanview in the j5 folder.  

The only documentation I see has something about "Fudging".

Quote
The blanking of the screen isn't annoying to me. Presently it can't be removed either.  Although I can make the screen invisible, it has trouble scaling the image when I do so (why I have no clue, I'm looking into it.)  

That's not how the viewer works..... I'm not about to change the way it works at this point.  However, before the major mame changes I was adding support for control specific layout files.  In theory you could dim out the controls that way by using a different image for each layout with unused controls dimmed.  

The viewer assembles image pieces from somewhere, right? So have an equivalent image source that is dimmed and if a control is in the layout but not in the game get it from the dimmed image source.

Quote
I'm not sure what you mean..... the labels are placed directly over the buttons with the default layout.  

That is assuming:

A.  You are using ctrlr files and only ctrlr files to remap buttons (pre 84 ctrlr files at this point).  


All default options right out of the box. When a general release is done some kind of text should appear on the buttons.

Quote
B.  When you when into the viewr options you set the ctrlr sub folder to the one you actually use.


I haven't launched the viewer application, and thus have not set any viewer options.

Quote

C.  You right clicked over top of p1 button 1 in the layout editor and changed the default key to which ever key you normally use.  Alt should never, ever, ever be used as a gaming key in a windows environment and thus by default I have it mapped to the key I use ("V").  

I haven't used the layout editor on this release, I'm using all default options.

Quote
Should I change that?  Probably... but a side result of leaving it this way is users are forced to play around in the layout editor and thus learn more about how the viewer works, and thus less questions for me.  :)

I think the net effect will be that people won't use your viewer.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 08:33:39 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Proof-of-concept of Howard's idea
« Reply #84 on: August 09, 2004, 07:31:17 pm »
I think you are getting a bit defensive in your comments.  I really appreciate your help but I think I need to make a few things clear.  

J5 is beta, very beta, so the docs aren't the best in the world, however if you are familair with any of my apps you would know that nothing works out of the box.  Besides a little common sense is required... the viewer reads ctrlr files.  How is it supposed to know where your ctrlr files are or which ones you use without pointing to them?  There is a readme btw... it's called readme.txt and its' in the root folder.  

I expect users to play around with things just a tad before they start asking questions.  :)

No the viewer doesn't assemble an image.  The image is pre-rendered with labels overlayed on top of it.  Again, I can't believe you went to all of this trouble without experiencing the viewer yet.  By the sound of what you are wanting as opposed to what the viewer does you might find out that you don't like it that well.  I'll stress again how much I appreciate it, it just worries me a little that you made something work for an app without ever really using the app.  

As I said... default options never work.  As a matter of fact default options never work on nearly every complex application in the history of computing.  ;)


I'm sorry you feel that having to change a single control will keep people form using the viewer, but nothing could be further from the truth.  Judging by feedback and comments I get pretaining to this application it's seconded in popularity only by dragon king itself.  And keep in mind, it's beta and has never had an official public release.  
This type of applicaiton simply can't be a "turn key" solution because there are far too many variables.  If it was set and forget then it would lose a great deal of functionality.  

The controls viewer shows the real layout you have set, not some genric overlay based on mame defaults.  If you remap some keys for a particular game (in ctrlr files of course)  those changed will be reflected on the layout and thus a lot of info needs to be gathered about your particular mame setup.  

I really appreciate your feedback though.  

I won't bother to update the docs until much later when the viewer is made public and new ctrlr format is supported though as virtually every part of the backend will need to be changed.  






wj2k3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 122
  • Last login:August 22, 2006, 12:23:48 am
  • Not!
Re:Proof-of-concept of Howard's idea
« Reply #85 on: August 13, 2004, 04:11:49 pm »
HowardC

Is it possible to have the viewer use different background images depending on the "*Display Control Info P1" entry?

I have a 2-player cpanel but I use a close-up image of just the player-1 controls for this application so that it is easier to view.  I would like to use an image of the whole CP (showing both joysticks) for games such as Crazy Climber.  I could also have different images for Joy+2Button vs Joy+3Button (etc.) and dim out the buttons that are not used.

Thanks for the great work. (along with Buddabing).  This has been a great addition to my cab (once I figured out to set  artwork_resolution so that I could actually see something besides a big blur. :-\)

-wj2k3

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Proof-of-concept of Howard's idea
« Reply #86 on: August 16, 2004, 09:24:57 pm »
I've uploaded a new release. The patches are here.

Hopefully you should be able to apply the patches with "patch < patch1.txt" and "patch < patch2.txt". If that doesn't work, LMK and I'll email you the complete source files.

I removed support for changing the button that displays the controls independent of pause. Now the only way to display the controls is to pause.

I also changed the behavior of the -nomakectrl flag. If the flag is turned on, then the game will expect your home-grown artwork in the artwork\gamename.zip file.

The game calls makectrl.bat which is expected to be in the same directory as mame.exe. The controls.png which is generated by makectrl.bat is also expected to be in that directory.

The aspect ratio correction is not perfect and shows mostly on vertical games that are very skinny, such as bagman.

These patches are for version 0.84. I will create a version 0.85 patch when the code is more stable.

You will get better results if you add artres 2 to your mame.ini, if you have one. I just learned that. :)

Sorry it's been so long since the last release. I was sick for a few days last week and I also lost a bit of time playing Doom 3.

Regards,
Buddabing
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

wj2k3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 122
  • Last login:August 22, 2006, 12:23:48 am
  • Not!
Re:Proof-of-concept of Howard's idea
« Reply #87 on: August 17, 2004, 10:59:10 am »
buddabing,

Video games!  Who has time for playing games! ;)

Glad you are feeling better.  

I agree that Pause is the only way to go.

Yes, I too just learned about artwork_resolution=2.  Makes a world of difference. :-[  

Could you please send me the source files to compile.  I am still ignorant when it comes to 'patch'ing.  I will message you with my e-mail.

Thanks again (HowardC too) 8)
-wj2k3

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Proof-of-concept of Howard's idea
« Reply #88 on: August 19, 2004, 04:04:10 pm »
Ok, I've integrated the patch.  I'm using .83 btw and I don't think I needed to change anything.

Here's feedback if you are looking for it, I'll try to post some more if interested:

1. Probably isn't good  to have mame crash if the files aren't present
2. Maybe I'm just tired, but why does Bezel artwork need to be turned on for it to work.  Can it just be artwork turned on instead?
3. Speaking of Bezel,  haven't done extreme testing or looked heavily into the source, but it the game has a bezel the controls don't get squashed.  If they don't have a bezel, the controls are squashed.

These are just some quick notes.  Still fine tuning my configuration for Johnny5, so won't post that yet.  BTW, Howard, Johnny5 is still going to support the old ctrlr files not just the new ones, correct?

Have to say it's very cool to have the controls up during pause.


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 08:33:39 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Proof-of-concept of Howard's idea
« Reply #89 on: August 19, 2004, 06:44:03 pm »
2600 has a point..... why not simply use the completely unused flyer or marquee slots?  They were put in for expansion, well, we are expanding.  :)

Weather or not I will also support the old ctrlr format in future versions is unknown.  Mind you I would like to, but I wasn't finished with the whole parsing hierarchy when the format changed and thus the old format is only 80% complete.  I don't really see myself wasting my time working on a dead format when users could simply upgrade and not have to worry about it.  


Fact of the matter is, ctrlr files are pretty new and thus you won't see any real speed decreases between using the new versions of mame over the older one's that still had ctrlr support.  I've also released a ini to cfg converter, so re-authoring your ctrlr files isn't an issue either.  I honestly can't see any reason not to upgrade, considering mame now handles mice and joysticks better, which would be a good reason to upgrade for any mamer that uses more than sticks and buttons.  

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Today at 09:22:20 am
  • The Bears Still Suck!
Re:Proof-of-concept of Howard's idea
« Reply #90 on: August 19, 2004, 10:35:39 pm »
2600 has a point..... why not simply use the completely unused flyer or marquee slots?  They were put in for expansion, well, we are expanding.  :)
Why not just make a new layer called controls.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Today at 09:22:20 am
  • The Bears Still Suck!
Re:Proof-of-concept of Howard's idea
« Reply #91 on: August 19, 2004, 10:38:45 pm »
I've also released a ini to cfg converter, so re-authoring your ctrlr files isn't an issue either.

Actually it is.  Unles you make it an option for the viewer to auto configure itself via the mame.ini file.   As that will be point to the ctrlr folder with the ini format.  You;d need to be able to specific a different folder OR possibly a different extention in the same folder.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Proof-of-concept of Howard's idea
« Reply #92 on: August 19, 2004, 11:17:54 pm »
Ok, I've integrated the patch.  I'm using .83 btw and I don't think I needed to change anything.

Here's feedback if you are looking for it, I'll try to post some more if interested:

1. Probably isn't good  to have mame crash if the files aren't present
Definitely true. I'll fix that.
Quote
2. Maybe I'm just tired, but why does Bezel artwork need to be turned on for it to work.  Can it just be artwork turned on instead?
I'm not sure what you mean. You can selectively turn on artwork layers with a command line switch?

I put the controls artwork in the bezel layer only because it didn't work when I put it in the artwork layer. I suppose I could try putting it in the other layers.

Quote
3. Speaking of Bezel,  haven't done extreme testing or looked heavily into the source, but it the game has a bezel the controls don't get squashed.  If they don't have a bezel, the controls are squashed.

Actually, the more that the aspect ratio of the game differs from the aspect ratio of the physical screen, the more that the controls artwork will be stretched or squashed. The games that have bezels are set up so that the total area of bezel plus game has the 4:3 aspect ratio.

Quote
These are just some quick notes.  Still fine tuning my configuration for Johnny5, so won't post that yet.  BTW, Howard, Johnny5 is still going to support the old ctrlr files not just the new ones, correct?

Have to say it's very cool to have the controls up during pause.


Thank you for your feedback. I will be releasing a v0.85 patch soon. I'm glad to know that v0.83 will work with the patch.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Today at 09:22:20 am
  • The Bears Still Suck!
Re:Proof-of-concept of Howard's idea
« Reply #93 on: August 20, 2004, 12:20:37 am »
Actually, the more that the aspect ratio of the game differs from the aspect ratio of the physical screen, the more that the controls artwork will be stretched or squashed. The games that have bezels are set up so that the total area of bezel plus game has the 4:3 aspect ratio.
This is partially correct.  The bezel does not have to be 4:3.  The game area int he bezel doesn't have to be 4:3.  Mame is try to make the game screen fit the bezel mask area AND stretch the bezel image and game area to make the game area the correct ratio if hwstretch and keepaspect are on.  However mame isn't always successful at this as the discusion from my artwork fill edges hack have found out.

I tmight be possible to not stretch a single layer. The way the code is setup in mame it goes through each layer and adjusts it accordingly.  I wonder what would happen if you skipped over a laye.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Proof-of-concept of Howard's idea
« Reply #94 on: August 20, 2004, 09:36:55 am »
Doh, sorry about that Howard, completely forgot about your conversion tool.  Even if I don't upgrade, I could use that or make some xml files so not a big deal.

Concerning the Bezel topic, I was a little bit quick on that just because I don't like using the bezels.  Sorry about that, I should get off my ars and just delete the bezels since I don't use them.

I'm not sure if you can fix the aspect ratio easily, but a quick hack is to have a blank or black bezel for the game.  I used the vertbezels on retroblast as a starting point if you want to give it a try.  It's a hack, but may help if there isn't a better way in the code.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Proof-of-concept of Howard's idea
« Reply #95 on: August 20, 2004, 09:44:52 am »
Bugfix: MAME crashes if there is no viewer installed. Here is a quick fix, it's just changing one line of code.

Search for code in artwork.c that looks like this:

if (piece->layer >= LAYER_BEZEL && piece->intersects_game && piece->visible) /* Buddabing */

Inside the final paren add this little snippet:
      && piece->prebitmap!=NULL
      
I'll put out a revised patch for v0.84 and a new patch for v0.85 today.

I'll also try 2600's black bezel idea.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Proof-of-concept of Howard's idea
« Reply #96 on: August 20, 2004, 05:14:58 pm »
New patches with MAME version 0.85 support. These patches will allow images created with the Johnny5 viewer application to be displayed in MAME when pause is pressed.

The v0.85 patch is here

The v0.84 patch is here

This version should not crash if there is no viewer.

Please post feedback to this thread. If you would like me to email you the patched source files, PM me.

Regards,
Buddabing
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Proof-of-concept of Howard's idea
« Reply #97 on: August 24, 2004, 09:44:45 am »
I know it's still a WIP, here's a couple more comments:

Buddabing
 - I'm sure you know, but the patch worked concerning crashing.  Tested a bunch of different ways.
 - I'm having trouble with the -nomakectrl command.  It's not making the control, but I can't get it to display.  Could you do a quick test on this? I placed a controls.png in the artwork\gamename.zip and a few other variations, but still not getting it displayed unless of course I have a controls.png in the mame directory.

HowardC
- Under the options for the viewer.  Is it possible to make the ctrlr folder a path instead of the folder name?  Same with any mame folder you need to access.
- The few games I've tested work fine, but I can't seem to get ikari to show the 8-way direction.  Anything I'm doing wrong or known issue?
- Also, when you generate the controls.png file is the file generated to the resolution that the game is running at or the resolution before the game is launched?

SirPoonga
Figure while I'm here I'll ask you so you don't get the shaft.  I can post a seperate topic elsewhere if you want, but What would the correct way to enter kchamp into the database.  It's one of those games where controls and commands are coupled together.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Today at 09:22:20 am
  • The Bears Still Suck!
Re:Proof-of-concept of Howard's idea
« Reply #98 on: August 24, 2004, 09:54:11 am »
SirPoonga
Figure while I'm here I'll ask you so you don't get the shaft.  I can post a seperate topic elsewhere if you want, but What would the correct way to enter kchamp into the database.  It's one of those games where controls and commands are coupled together.

I will get back to you on this soon, I am busy the next couple of day.  Post a message ont he controls.dat forum so HowardC and I can look at the issue.  Off hand I can't remember what that game used.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 08:33:39 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Proof-of-concept of Howard's idea
« Reply #99 on: August 24, 2004, 01:30:56 pm »
- Under the options for the viewer.  Is it possible to make the ctrlr folder a path instead of the folder name?  Same with any mame folder you need to access.
- The few games I've tested work fine, but I can't seem to get ikari to show the 8-way direction.  Anything I'm doing wrong or known issue?
- Also, when you generate the controls.png file is the file generated to the resolution that the game is running at or the resolution before the game is launched?

SirPoonga
Figure while I'm here I'll ask you so you don't get the shaft.  I can post a seperate topic elsewhere if you want, but What would the correct way to enter kchamp into the database.  It's one of those games where controls and commands are coupled together.

No it's not possible, but why exactly would you want to?  You pass the mame path and then it can "automagically" figure the rest out if you just give a folder name.  It's actually simplier that way.  

Nope it doesn't show up for me either.  I found a bug and fixed it and it's a biggie.  Thanks for your help!

The file is generated at the size of the screen prior to launch.  However you can specify any resolution you like.  When you write your bat, simply tack on a "-position 0,0,width,height" flag and the viewer will size prior to the generation.  

Heh, karate champ.  There is a reason sirp directed you towards me.  It's sirp's fancy database system (which is amazing and you should all thank him for regularly as it holds the project together) but it's my insaine data file format.  I usually do the hairy one's myself, so I went ahead and did it for you.  Check it out in the "games to be added" section and see if it's ok.  


2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Proof-of-concept of Howard's idea
« Reply #100 on: August 24, 2004, 04:01:52 pm »

No it's not possible, but why exactly would you want to?  You pass the mame path and then it can "automagically" figure the rest out if you just give a folder name.  It's actually simplier that way.  

Nope it doesn't show up for me either.  I found a bug and fixed it and it's a biggie.  Thanks for your help!

The file is generated at the size of the screen prior to launch.  However you can specify any resolution you like.  When you write your bat, simply tack on a "-position 0,0,width,height" flag and the viewer will size prior to the generation.  

Heh, karate champ.  There is a reason sirp directed you towards me.  It's sirp's fancy database system (which is amazing and you should all thank him for regularly as it holds the project together) but it's my insaine data file format.  I usually do the hairy one's myself, so I went ahead and did it for you.  Check it out in the "games to be added" section and see if it's ok.  



Not a big deal, but here's why I asked.  It seems logical to me, but it's always logical when one does it themselves.  I keep my ini, roms, and ctrlr folders/files in one directory (ex. D:\emulators\mame\).  Then if I switch/try a different version I put it their own directory (ex. D:\emulators\mame83).  Then I just point the folders to the correct location in the mame.ini file.   Less copying and duplicating of files for me.

Position -  Just like in the readme.  Sorry.  On the other hand may have found a bug, when using the -justprint tag the image of the CP is correct but there is an extra black background that isn't sized correctly.  This doesn't happen if don't use -justprint.  I was originally asking because I was wondering if the picture quality would be better if it was made for the resolution it would be used for instead of scaling it down using -artres since that scales all artwork down.  Didn't know if buddabing could pass that argument to you.

Ikari and kchamp - Thanks, the kchamp one was a bit confusing.  Didn't know if it should be left or reverse or should you list the moves.  Glad it's in.

Definitely thank Sirpoonga and all of you, I know it's a lot of work and almost why I hate to post the bugs.  I know you all are busy and with typing it's not always clear that I'm not complaining and asking for things to be done, just trying to do some documenting and testing for you all.

wj2k3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 122
  • Last login:August 22, 2006, 12:23:48 am
  • Not!
Re:Proof-of-concept of Howard's idea
« Reply #101 on: August 25, 2004, 12:22:10 pm »
Finally, I was able to use the patches to update the source code and compile it.  Thanks Buddabing for forwarding the update source files in the mean time while I was educating myself.

Patched and compiled the 0.85 code and everything seems to be working great except the -nomakectrl flag.  It prevents Mame from calling the batch file but it does not look for art in the artwork zips.  It does display the control.png file (if present) in the Mame directory.  And iif no file is present, it does not crash.

The Johnny5 viewer is working great too.  This project should certainly increase contributions to the Controls.Dat project.

Thanks you two for the great work.
-wj2k3

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Today at 09:22:20 am
  • The Bears Still Suck!
Re:Proof-of-concept of Howard's idea
« Reply #102 on: August 25, 2004, 01:37:32 pm »
Heh, karate champ.  There is a reason sirp directed you towards me.  It's sirp's fancy database system (which is amazing and you should all thank him for regularly as it holds the project together) but it's my insaine data file format.  I usually do the hairy one's myself, so I went ahead and did it for you.  Check it out in the "games to be added" section and see if it's ok.  
True, HC does the more difficult ones.  Since he understand how they should look and feel in the format he can figure out how to put it in the system :)  Also I have been way to busy lately with interviews and such that I just don;t have time right now.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Proof-of-concept of Howard's idea
« Reply #103 on: August 25, 2004, 02:24:54 pm »
I know it's still a WIP, here's a couple more comments:

Buddabing
  - I'm having trouble with the -nomakectrl command.  It's not making the control, but I can't get it to display.  Could you do a quick test on this? I placed a controls.png in the artwork\gamename.zip and a few other variations, but still not getting it displayed unless of course I have a controls.png in the mame directory.

A change I made didn't make it into my production patch.

In artwork.c, look for this code in function open_and_read_png:

/* open the file */
if (strcmp(filename,"controls.png")==0 && !options.nomakectrl)
        file = mame_fopen(gamename, filename, FILETYPE_NOPATH, 0);
else
        file = mame_fopen(gamename, filename, FILETYPE_ARTWORK, 0);
if (!file)
      return 0;

Add the bold faced part &&!options.nomakectrl

There are two places you can put your own artwork if you use -nomakectrl. One is where you tried, in the artwork\gamename.zip file. The other is in the gamename subdirectory of the artwork folder, e.g.
c:\mame\artwork\joust for joust. In this case, controls.png is unzipped. Uppercase/lowercase should not matter.

I'll be creating a patch for 0.86 soon and updating the patches for 0.85 and 0.84.

Sorry for any inconvenience.

Regards,
Buddabing

I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

wj2k3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 122
  • Last login:August 22, 2006, 12:23:48 am
  • Not!
Re:Proof-of-concept of Howard's idea
« Reply #104 on: August 25, 2004, 04:13:31 pm »
Buddabing,

No inconvenience at all and absolutely no apology necessary.  Like 2600 said, I am not complaining but just commenting to try to help.  

Any inconvenience?  Quite the contrary!  Before this project, I was headed down the path of trying to incorporate an LCD screen to display controls.  This is so much more convenient/easier/cheaper.  You could walk away from this project at anytime and I would be grateful as H. E. double hockey sticks for your contribution to the community.

And now for my contribution (if anybody wants it).  I actually like the code the way it is.  I have written a BAT file that runs as my executeable from MameWah and gives me several choices.

Choice one, takes my homebrewed filename.png from my controls_image directory and copies it to my MAME directory as controls.png.  That way when I hit Pause, my homebrew images are shown.  If there is no image for that filename yet, it launches johnny5 to create one.

Choice two (launched from Mamewah using the Extra Options #1 feature)  sends along the extra flag 'johnny5' as the variable %2 which causes the Batch file to run Johnny5 to create the controls.png file in the Mame directory.  

Choice three (via MameWah's Extra Options #2) sends the extra flag 'create' to the batch file which then runs Johnny5, copies the controls.png to the Mame directory as controls.png and to my controls_image directory as filename.png.  This is useful to replace a homebrew image that I no longer want (or is messed up) and want to start over with.

Look forward to the 0.86 version and trying out my new found patching skills.

-wj2k3 :D

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Proof-of-concept of Howard's idea
« Reply #105 on: August 26, 2004, 02:28:55 pm »
Update for version 0.86 is here. I've included a brief howto.

I have not updated the patches for 0.85 and 0.84. That will come later.

WJ2K3 - I will get the .86 source files out to you today. Do you still want the .85 source files?

As always, I appreciate your feedback.

Regards,
Buddabing

I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

wj2k3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 122
  • Last login:August 22, 2006, 12:23:48 am
  • Not!
Re:Proof-of-concept of Howard's idea
« Reply #106 on: August 26, 2004, 04:00:10 pm »
Bubba,

If u could send me the 0.86 files just incase.  I think I have got a handle on this patching, now that I have acquired the correct version of patch.  I was succesful with patching the 0.85 files but I would like to compare my 0.86 files to yours to make sure they came out right.

Again thanks for all the hard work.

The Bat files that I am using work great because the roms load so much faster.  I only have to wait for J5 to create the image the first time, or if I want to re-create/update it.  

HC, look forward to trying out the update J5 that can use multiple layouts depending on controls.

-wj2k3

-wj2k3