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: Any experts on .lay files ( artwork)???  (Read 3735 times)

0 Members and 1 Guest are viewing this topic.

garnerb350

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 892
  • Last login:May 09, 2019, 09:36:49 pm
  • Crowded elevators smell different to midgets...
    • Hyperspin
Any experts on .lay files ( artwork)???
« on: May 19, 2009, 01:54:06 pm »
Has anyone here ever ADDED artwork to their lay file? I made a generic bezel for my vertical games...and i was wanting to add it to the orignal .lay file and zip folder with the rest of the orginal artwork...
“If first you don't succeed, then skydiving definitely isn't for you..." ~ Jack Handy

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Any experts on .lay files ( artwork)???
« Reply #1 on: May 19, 2009, 02:15:38 pm »
It's pretty straight forward, here is an example of a .lay file generated by CPWizard.

Code: [Select]
<?xml version="1.0"?>
<mamelayout version="2">
  <element name="CP">
    <image file="1943.png" />
  </element>
  <element name="Bezel">
    <image file="Bezel.png" />
  </element>
  <view name="Hide CP">
    <screen index="0">
      <bounds left="140" top="0" right="500" bottom="480" />
    </screen>
    <bezel element="Bezel">
      <bounds left="0" top="0" right="640" bottom="480" />
    </bezel>
  </view>
  <view name="Show CP">
    <screen index="0">
      <bounds left="140" top="0" right="500" bottom="480" />
    </screen>
    <bezel element="Bezel">
      <bounds left="0" top="0" right="640" bottom="480" />
    </bezel>
    <bezel element="CP">
      <bounds left="0" top="0" right="640" bottom="480" />
    </bezel>
  </view>
</mamelayout>

This will add two menu items, namely "Show CP" and "Hide CP". The Bezel.png is overlayed over the top of the Mame screen while the Bezel is a 640x480 image that has a 140 pixel bezel on each side. So following this you can add or remove elements to overlay on the screen. Then just place everything into a zip file in the artwork folder and name it the same as the ROM.

garnerb350

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 892
  • Last login:May 09, 2019, 09:36:49 pm
  • Crowded elevators smell different to midgets...
    • Hyperspin
Re: Any experts on .lay files ( artwork)???
« Reply #2 on: May 19, 2009, 02:41:28 pm »
ok.... :dunno ( me = noob)
say for example...
Here is the generic lay.file...

<!-- bezel.lay -->

<mamelayout version="2">
   <element name="bezel">
      <image file="mame.png" />
   </element>

   <view name="Bezel Artwork">
      <screen index="0">
         <bounds left="140" top="0" right="500" bottom="480" />
      </screen>
      <bezel element="bezel">
         <bounds left="0" top="0" right="640" bottom="480" />
      </bezel>
   </view>
</mamelayout>

Ok...now here is the orginal .lay file for say 1943....

<!-- 1943.lay -->

<mamelayout version="2">
   <element name="bezel">
      <image file="1943.png" />
   </element>
   <view name="Upright_Artwork">
      <screen index="0">
         <bounds x="1017" y="663" width="1950" height="2600" />
      </screen>
      <bezel element="bezel">
         <bounds x="0" y="0" width="4000" height="3969" />
      </bezel>
   </view>
</mamelayout>

What and where does the exact "paste-ing" go? I want to make it where whoever can make the choice of what bezel to use....
I'm sorry for being a dumba%%...I'm not thinking straight today...
« Last Edit: May 19, 2009, 02:51:14 pm by garnerb350 »
“If first you don't succeed, then skydiving definitely isn't for you..." ~ Jack Handy

garnerb350

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 892
  • Last login:May 09, 2019, 09:36:49 pm
  • Crowded elevators smell different to midgets...
    • Hyperspin
Re: Any experts on .lay files ( artwork)???
« Reply #3 on: May 19, 2009, 03:00:45 pm »
Would this be right?

<!-- 1943.lay -->

<mamelayout version="2">
   <element name="bezel">
      <image file="1943.png" />
   </element>
        <element name="bezel">
      <image file="mame.png" />

   </element>
   <view name="Upright_Artwork">
      <screen index="0">
         <bounds x="1017" y="663" width="1950" height="2600" />
      </screen>
      <bezel element="bezel">
         <bounds x="0" y="0" width="4000" height="3969" />
      </bezel>
   </view>
   <view name="Bezel Artwork">
           <screen index="0">
                <bounds left="140" top="0" right="500" bottom="480" />
      </screen>
      <bezel element="bezel">
                <bounds left="0" top="0" right="640" bottom="480" />
      </bezel>
   </view>

</mamelayout>

What i pasted was in bold....? Would that be correct what i did?
“If first you don't succeed, then skydiving definitely isn't for you..." ~ Jack Handy

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Any experts on .lay files ( artwork)???
« Reply #4 on: May 19, 2009, 03:03:27 pm »
You can't have two elements with the same name.

<mamelayout version="2">
   <element name="bezel1">
      <image file="1943.png" />
   </element>
   <element name="bezel2">
      <image file="mame.png" />
   </element>
     <view name="Upright_Artwork">
      <screen index="0">
         <bounds x="1017" y="663" width="1950" height="2600" />
      </screen>
      <bezel element="bezel1">
         <bounds x="0" y="0" width="4000" height="3969" />
      </bezel>
   </view>
   <view name="Bezel Artwork">
      <screen index="0">
         <bounds left="140" top="0" right="500" bottom="480" />
      </screen>
      <bezel element="bezel2">
         <bounds left="0" top="0" right="640" bottom="480" />
      </bezel>
   </view>
</mamelayout>
« Last Edit: May 19, 2009, 03:05:17 pm by headkaze »

garnerb350

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 892
  • Last login:May 09, 2019, 09:36:49 pm
  • Crowded elevators smell different to midgets...
    • Hyperspin
Re: Any experts on .lay files ( artwork)???
« Reply #5 on: May 19, 2009, 03:14:25 pm »
 :banghead:

Why didnt I see that?

ok...so the "element name" is what we will see on the video options section when we hit tab on mame...correct? or is it "view name"?...

"image file" is the actual file you have?

I need to home and eat my wheaties...
seeing all this and the repetition of elements/screen/etc...is giving me a headache...
“If first you don't succeed, then skydiving definitely isn't for you..." ~ Jack Handy

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Any experts on .lay files ( artwork)???
« Reply #6 on: May 19, 2009, 03:53:50 pm »
ok...so the "element name" is what we will see on the video options section when we hit tab on mame...correct? or is it "view name"?...

"image file" is the actual file you have?

"element name" is just an internal name to link the image to the view
"view name" is what is displayed in the Mame menu
"image file" is the .png file overlayed on Mame's display