Previous Thread
Next Thread
Print Thread
Page 1 of 4 1 2 3 4
#110532 - 08/06/17 07:34 AM Generic bezel  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
In the past I've created generic (cocktail) bezels for my arcade setup, but I had to add the definition to the horizont.lay and vertical.lay files, and then (re)compile MAME. Is it possible do simply do this from the artwork directory in stead, e.g. by creating a horizont.zip and vertical.zip file containing the artwork and .lay files? If not, would it be possible to add such a feature so people can add their own generic screen definitions?

#110533 - 08/06/17 08:33 AM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
Same answer as every time this comes up - yes an option for fallback artwork would be nice to have, but it isn't implemented at this time. It's on my (very long) TODO list.

#110534 - 08/06/17 08:36 AM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Sorry, I wasn't aware this had come up before. Would it be helpful if I had a look at implementing it, and provided the code changes?

#110535 - 08/06/17 09:00 AM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
It's a kind of "here be dragons" thing, especially at the moment with options system in flux. If you do want to try, remember that you have to consider the possibility of multi-screen systems, and not break things by default. You definitely don't want to do something that will cause it to choose an unsuitable view when a person launches an unfamiliar system. Consider Nichibutsu mahjongs with private player LCDs, dual-screen Cave games, punch-out, etc. You need to ensure that whatever you do won't make it easy to cause one of these to come up with important stuff hidden.

#110536 - 08/06/17 10:16 AM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Thanks for the warnings; you raise valid points here that I'll keep in mind when having a crack at this. I figure that when/if I manage to figure out how best to do it, I can easily do it again on the next code base, and create a patch for the current code. smile

#110561 - 08/09/17 09:01 PM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
I think I'm getting somewhere... smile What I currently have:
- Load explicit file (UNCHANGED)
- Load driver name (UNCHANGED)
- Load parent driver (moved up; e.g. internal neogeo layout had preference over parent artwork)
- Load parent of parent (will find neogeo for clone of neogeo games)
- For single screen: load horizont or vertical
- Load internal default views (UNCHANGED)
- For single screen: load internal horizont or vertical (UNCHANGED)
- If no layout has been found, load internal defaults based on number of screens (0, 2, 3, 4) (UNCHANGED)

As an example: lastblad
- Load lastblad
- Load neogeo
- Load horizont
- Load internal neogeo
- Load internal horizont

As an example: lastbladh
- Load lastbladh
- Load lastblad
- Load neogeo
- Load horizont
- Load internal neogeo
- Load internal horizont

As an example: darius
- Load darius
- Load internal darius

I'll do a lot more testing, but I'm reasonably happy so far. smile

Any remarks/change requests/additional features?

#110563 - 08/10/17 12:29 AM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
No, that's not at all what I was talking about. Adding an implicit search path is just going to be confusing. It requires additional options:
* Something like -fallback_artwork NAME that will make that artwork get loaded if there is no internal layout for the driver and no external artwork for the driver
* Something like -override_artwork NAME that will force loading specified artwork, overriding internal layout and external artwork for the driver

Then if you want generic artwork for horizontal games as a fallback, you add "fallback_artwork horizontal" to your horizontal.ini (or whatever it's called these days), etc.

#110566 - 08/10/17 06:24 AM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Ok, no problem. smile So far the changes were intended to make the internal and external artwork selection consistent. I will have a look at adding these options as well. Any other remarks/suggestions?

#110567 - 08/10/17 01:40 PM Re: Generic bezel [Re: Vas Crabb]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Originally Posted by Vas Crabb

* Something like -fallback_artwork NAME that will make that artwork get loaded if there is no internal layout for the driver and no external artwork for the driver


In accordance with the current implementation, there's always an internal layout for the driver, assuming no game uses more than 4 screens. It could be a fall back in case no external artwork exists, but the user would need to make sure that the fallback artwork matches the screen setup (number of screens, orientation, etc.), since that information is not directly available in the artwork itself.

Your thoughts?

#110568 - 08/10/17 01:45 PM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
There's a difference between internal layouts for drivers (these come from MCFG_DEFAULT_LAYOUT or GAMEL) and the default layouts for for screen count/orientation.

#110569 - 08/10/17 02:00 PM Re: Generic bezel [Re: Vas Crabb]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Originally Posted by Vas Crabb
There's a difference between internal layouts for drivers (these come from MCFG_DEFAULT_LAYOUT or GAMEL) and the default layouts for for screen count/orientation.


Ok, then I'll use that as the base for this option. Thanks for the information. smile

Btw: kudos on the well structured code; so far it's been relatively easy to work on this issue.

#110570 - 08/10/17 02:34 PM Re: Generic bezel [Re: phulshof]  
Joined: Mar 2001
Posts: 15,773
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,773
USA
Yeah, structure's been a long time coming to that code, but Vas and Nathan have done great work getting it banged out.

#110579 - 08/11/17 11:26 AM Re: Generic bezel [Re: Vas Crabb]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Originally Posted by Vas Crabb

* Something like -override_artwork NAME that will force loading specified artwork, overriding internal layout and external artwork for the driver


Should in this case the default internal layouts for horizont/vertical still be loaded as well (if number of screens = 1)?

#110598 - 08/14/17 01:13 PM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
My current status:
- If -override_artwork set: load override artwork, and return when successful
- Load explicit file, return when single file is set (UNCHANGED)
- Load driver name (UNCHANGED)
- Load parent driver (UNCHANGED, but moved up; e.g. internal neogeo layout had preference over parent artwork)
- Load parent of parent (will find neogeo for clone of neogeo games)
- For single screen: load horizont or vertical
- Load internal default views (UNCHANGED)
- If -fallback_artwork set, and no artwork found yet: load fallback artwork
- For single screen: load internal horizont or vertical (UNCHANGED)
- If no layout has been found, load internal defaults based on number of screens (0, 2, 3, 4) (UNCHANGED)

Any thoughts?

#110599 - 08/14/17 01:32 PM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
Take out the load horizont or vertical - that's not helpful. If someone wants that kind of behaviour they can specify -fallback_artwork in horizontal.ini or vertical.ini. Consider something like intlc44/intlc440 where you'll lose the switch/LED panel if you do that, rendering it completely unusable. Also, the gamblers (slots/poker) very much benefit from illuminated, clickable buttons. I already said this earlier in the thread. Also, you're probably going to want to make the -fallback_artwork option fall through if it can't find a view that makes all screens visible. Otherwise it's going to render housemnq etc. unplayable.

#110602 - 08/15/17 09:18 AM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Ok, if horizontal/vertical can be handled via the .ini files that's fine by me. I just wanted the option to have similar behavior for external and internal layouts.

In the current code, none of the artwork checks if the layout matches the game's layout. I understand that you would like to have that added for the fallback artwork though? That will be quite difficult I fear, especially since some games may have multiple screens, but those screens may be meant to be separated to prevent players from seeing the other players' cards/stones/etc. I'm not aware of any flags that would handle this. I will need to give this some serious thoughts, and a list of games that might cause problems would be helpful in that regard, so I can test how each game reacts, and if incorrect see how it can be corrected. I will certainly have a look at the games already mentioned.

#110603 - 08/15/17 09:31 AM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
Also, loading external artwork for parent before loading internal artwork for game will screw up gamblers - often the lamp assignments are different in clones. Internal artwork supplied by driver should be preferred over external artwork for parent. It's very important to ensure it won't do something stupid or surprising in a bad way by default. Software should not be surprising - it should be straightforward. Anything that makes it in any way likely to start in an unusable state is not acceptable.

#110604 - 08/15/17 04:21 PM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Under the conditions you stated though, fallback artwork for e.g. NeoGeo games will never be loaded since there's an internal layout defined for NeoGeo, and fallback artwork should only be loaded when no internal or external artwork is found. Is that what you intend?

#110607 - 08/16/17 12:58 AM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
Well, tell me a way to make it work that won't render systems completely unusable. I don't want to have to be fielding support for this if it's done in a way where the default behaviour makes stuff hard to use.

That aside, yes, due to the 304/320 thing, you really do need a special layout for NeoGeo and a generic bezel won't cut it.

#110608 - 08/16/17 06:36 AM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
I understand, and agree, though a fallback NeoGeo layout would do the trick. I'll give it some more thought; at least now I know how to get things working, so next is figuring out how I WANT things working. smile I'll be back...

Last edited by phulshof; 08/16/17 08:37 AM.
#110795 - 09/15/17 09:45 AM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Proposal:
- If -override_artwork set: load override artwork, and return when successful
- Load explicit file, return when single file is set (UNCHANGED)
- Load driver name (UNCHANGED)
- Load internal default views (UNCHANGED)
- Load parent driver (UNCHANGED)
- Load parent of parent (will find neogeo for clone of neogeo games)
- If -fallback_artwork set: load fallback artwork
- For single screen: load internal horizont or vertical (UNCHANGED)
- If no layout has been found, load internal defaults based on number of screens (0, 2, 3, 4) (UNCHANGED)

#110796 - 09/15/17 01:59 PM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
Yeah, that would probably cover most cases.

#110797 - 09/15/17 02:57 PM Re: Generic bezel [Re: phulshof]  
Joined: Mar 2001
Posts: 15,773
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,773
USA
I'd change:
- Load parent driver (UNCHANGED)
- Load parent of parent (will find neogeo for clone of neogeo games)

to:
- Load top-level parent driver or BIOS set

That's less KiddieGeo specific and will work better in cases of systems with BIOS sets.

#110798 - 09/15/17 03:31 PM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
That's effectively the same thing - BIOS set is implemented as parent-of-parent, you can only go two parents deep before you trigger a validation error.

#111359 - 11/24/17 08:55 AM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Ok, quick question: what's the best way to get this added to the MAME code? Should I fork the code, update it, and send a pull request? I'm not familiar with the way the MAME community works these days.

#111363 - 11/24/17 06:29 PM Re: Generic bezel [Re: phulshof]  
Joined: Oct 2006
Posts: 931
Stiletto Offline
Senior Member
Stiletto  Offline
Senior Member

Joined: Oct 2006
Posts: 931
Originally Posted by phulshof
Ok, quick question: what's the best way to get this added to the MAME code? Should I fork the code, update it, and send a pull request? I'm not familiar with the way the MAME community works these days.


Yep, that is the best way. http://wiki.mamedev.org/index.php?title=Submitting_Source_Code

#111517 - 12/06/17 04:35 PM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Ok, I think I've got something ready. Since this is my first time on the MAME project, is anyone willing to have a look at it, and perhaps give it a go?

#111522 - 12/06/17 10:41 PM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
Have you made a pull request we can look at?

#111527 - 12/07/17 09:41 AM Re: Generic bezel [Re: Vas Crabb]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Originally Posted by Vas Crabb
Have you made a pull request we can look at?


No, not yet. Since this is to be my first contribution I figure I'd want someone to look at the code first before dirtying the check-in log with changes I need to do based on feedback. I've tried to maintain the coding style, and use the functions I could find, but it's not unlikely that some things might be done in a simpler way using functions I'm not aware of. If it's your preference though, I could check the code into github, and do a pull request in stead.

#111528 - 12/07/17 10:58 AM Re: Generic bezel [Re: phulshof]  
Joined: Apr 2005
Posts: 536
Darkstar Offline
Senior Member
Darkstar  Offline
Senior Member

Joined: Apr 2005
Posts: 536
GERMANY
Usually things like coding style etc. can be addressed after the pull request has been made. You can update it or cancel it and do a fresh one, everyone can look at it and comment on it, etc.

#111529 - 12/07/17 12:58 PM Re: Generic bezel [Re: phulshof]  
Joined: Mar 2001
Posts: 15,773
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,773
USA
It's not dirtying, that's what pull requests are for smile

#111547 - 12/08/17 08:02 AM Re: Generic bezel [Re: R. Belmont]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Ok, the pull request has been generated. Feel free to let me know how I can improve my work. smile

#111609 - 12/11/17 07:25 PM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Should games for which an internal layout has been defined be able to use fallback artwork? In other words, should fallback artwork be loaded if:
1. No artwork has been found.
2. No artwork other than an internal layout has been found?

#111620 - 12/12/17 01:54 PM Re: Generic bezel [Re: phulshof]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
If internal artwork is defined, fallback artwork should at most generate additional views, not completely replace the internal artwork. Otherwise something like intlc440 will become unusable since it depends heavily on the clickable switches and blinkenlights. If the user can't select one of the views from the internal when they have fallback artwork set, it will just lead to frustration.

#111621 - 12/12/17 04:44 PM Re: Generic bezel [Re: Vas Crabb]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Originally Posted by Vas Crabb
If internal artwork is defined, fallback artwork should at most generate additional views, not completely replace the internal artwork. Otherwise something like intlc440 will become unusable since it depends heavily on the clickable switches and blinkenlights. If the user can't select one of the views from the internal when they have fallback artwork set, it will just lead to frustration.


That's clear, and already implemented as internal artwork has preference over fallback artwork. I will change the code to only load fallback artwork when no artwork other than internal artwork has been found. I'll have a look at how to update a pull request or drop the current one, and create a new one otherwise.

#111622 - 12/12/17 05:57 PM Re: Generic bezel [Re: phulshof]  
Joined: Sep 2014
Posts: 79
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 79
Netherlands
Another quick question: In the current code, built-in layouts are not loaded for 0 and 2 screens when artwork has already been found, but are loaded for 1 and >= 3 screens. Why is that exactly?

Page 1 of 4 1 2 3 4

Who's Online Now
1 registered members (nerd4gw), 13 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,453
Posts109,711
Members4,766
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.053s Queries: 14 (0.011s) Memory: 5.2693 MB (Peak: 5.6565 MB) Zlib enabled. Server Time: 2017-12-13 09:05:12 UTC