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
Site News

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


  

Author Topic: Artwork .lay files, how to place the marquee image. Help!  (Read 406 times)

0 Members and 1 Guest are viewing this topic.

Edglaf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 78
  • I want to build my own arcade controls!
Artwork .lay files, how to place the marquee image. Help!
« on: April 07, 2018, 12:53:38 pm »
After reading http://wiki.mamedev.org/index.php/LAY_File_Basics_-_Part_I and testing over and over again, i just can`t get a the marquee image properly positioned on a 16:3 cut LCD panel (2nd display). No matter how a tweak the x=*.* and y=*.* values the image will always be at the centre on the screen (thus partially invisible). Is ther a way? what am i doing wrong? This is my default.lay file I am testing with:

<mamelayout version="2">
   <element name="marquee">
      <image file="3wonders_marquee.png" />
   </element>
   
   
   <view name="Marquee_Only">
      <marquee element="marquee">
         <bounds x="0" y="0" width="16" height="3" />
      </marquee>
   </view>
   
   
</mamelayout>

Help please!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 6753
  • 2013 UCA Awardee
Re: Artwork .lay files, how to place the marquee image. Help!
« Reply #1 on: April 07, 2018, 11:39:53 pm »
I'm just spitballing here, but have you tried the other way of defining bounds?
Code: [Select]
<bounds left="0" top="0" right="16" bottom="3" />
Quote
You can control the bounds either by specifying left/top/right/bottom coordinates, or by specifying x/y/width/height coordinates. But only one or the other.

If that doesn't work, maybe the X/Y or left/top/right/bottom values shouldn't be set to "0".
Code: [Select]
    <?xml version="1.0"?>
    <mamelayout version="2">
        <view name="Cocktail">
            <screen index="0">
                <bounds left="-1.33333" top="0.0" right="0.0" bottom="1.0" />
            </screen>
            <screen index="0">
                <bounds left="0.01" top="0.0" right="1.34333" bottom="1.0" />
                <orientation rotate="180" />
            </screen>
        </view>
    </mamelayout>

http://wiki.mamedev.org/index.php/Layouts_and_Rendering_for_MAME_Artwork_System


Scott
« Last Edit: April 07, 2018, 11:47:23 pm by PL1 »

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 266
Re: Artwork .lay files, how to place the marquee image. Help!
« Reply #2 on: April 08, 2018, 03:08:38 am »
Elements will be centered on the screen unless they have some position relative to something else, such as the bounds of the view.
In other words, the bounds of the view would establish that the whole view is 16:9, and the bounds of the marquee establish the marquee's position and size.

For a simplified example, if you have the "top third" of the original display, you'd want
Code: [Select]
    <view name="Marquee_Only">
      <bounds x="0" y="0" width="16" height="9" />
      <marquee element="marquee">
         <bounds x="0" y="0" width="16" height="3" />
      </marquee>
   </view>

For the "bottom third", you'd want
Code: [Select]
    <view name="Marquee_Only">
      <bounds x="0" y="0" width="16" height="9" />
      <marquee element="marquee">
         <bounds x="0" y="6" width="16" height="3" />
      </marquee>
   </view>

My marquee monitor is a full monitor with a mat that splits the screen into two bordered sections. I can place elements in the top or bottom section using this method (with different numbers, of course). You only have one usable section, but the concept is the same.

Edglaf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 78
  • I want to build my own arcade controls!
Re: Artwork .lay files, how to place the marquee image. Help!
« Reply #3 on: April 08, 2018, 05:56:31 am »
That's right nexusmtz!

I had e-mailed to the expert Mr. Do and he has just replyed more or less the same.

This is what worked for me with a perfect fit:

<!-- marquee.lay -->

<mamelayout version="2">
   <element name="marquee">
      <image file="3wonders_marquee.png" />
   </element>
 
   
   <view name="Marquee_Only">
    <bounds x="0" y="0" width="1920" height="1080" />
      <marquee element="marquee">
         <bounds x="0" y="0" width="1920" height="360" />
      </marquee>
   </view>
 
 
</mamelayout>

The frame (first boundary to define the view area) seems to work for every nowadays regular LCD display. In the second boundaries line I just had to calculate the proportion in pixels, as the panel is cut only from the top 1/3 downwards. The horizontal parameter stays the same. Anyway, I could have saved the hazzle of calculating the proportions in terms of pixels. Just defining the bare proportion like Nexus did works exactly the same (16:9 and 16:3). It seems that mame will always to make the perfect stretch in pixels for you.

Thank you very much to both of you,

« Last Edit: April 08, 2018, 06:02:42 am by Edglaf »

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31