In the default.lay the x,y,width,height values have to be modified with the hoffset, hstretch, voffset and vstretch values of the digdug.cfg
Only the values in the <view></view> element between
<screen></screen>
<overlay></overlay>
<backdrop></backdrop>
The values between <bezel></bezel> must remain untouched
digdug.cfg:
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="digdug">
<video>
<screen index="0" hoffset="0.004000" hstretch="0.580000" voffset="0.008000" vstretch="0.678000" />
</video>
<counters>
<coins index="0" number="49" />
</counters>
<input>
<port tag=":DSWA" type="DIPSWITCH" mask="192" defvalue="128" value="192" />
</input>
</system>
</mameconfig>
This is the calculation:
new_width = old_width*vstretch
new_height = old_height*hstretch
new_x = ((old_width-new_width)/2)-(old_width*voffset)+old_x
new_y = ((old_height-new_height)/2)+(old_height*hoffset)
default.lay:
<!-- digdug.lay -->
<mamelayout version="2">
<element name="bezel">
<image file="digdug_bezel.png" />
</element>
<element name="bezel_alt1">
<image file="digdug_bezel_alt1.png" />
</element>
<element name="bezel_alt2">
<image file="digdug_bezel_alt2.png" />
</element>
<element name="screen_bezel">
<image file="vert_screen_bezel.png" />
</element>
<element name="screen_mask">
<image file="vert_screen_mask.png" />
</element>
<view name="Cab Artwork">
<screen index="0">
<bounds x="555" y="0" width="810" height="1080" />
</screen>
<overlay element="screen_mask">
<bounds x="554" y="0" width="812" height="1080" />
</overlay>
<backdrop element="screen_bezel">
<bounds x="518" y="0" width="884" height="1080" />
</backdrop>
<bezel element="bezel">
<bounds x="0" y="0" width="1920" height="1080" />
</bezel>
</view>
<view name="No Monitor Screen (alt1)">
<screen index="0">
<bounds x="555" y="0" width="810" height="1080" />
</screen>
<overlay element="screen_mask">
<bounds x="554" y="0" width="812" height="1080" />
</overlay>
<backdrop element="screen_bezel">
<bounds x="518" y="0" width="884" height="1080" />
</backdrop>
<bezel element="bezel_alt1">
<bounds x="0" y="0" width="1920" height="1080" />
</bezel>
</view>
<view name="Unused (alt2)">
<screen index="0">
<bounds x="555" y="0" width="810" height="1080" />
</screen>
<overlay element="screen_mask">
<bounds x="554" y="0" width="812" height="1080" />
</overlay>
<backdrop element="screen_bezel">
<bounds x="518" y="0" width="884" height="1080" />
</backdrop>
<bezel element="bezel_alt2">
<bounds x="0" y="0" width="1920" height="1080" />
</bezel>
</view>
</mamelayout>
The result should look like this:
<view name=“Cab Artwork”>
<screen index=“0”>
<bounds x=“679” y=“231” width=“549” height=“626” />
</screen>
<overlay element=“screen_mask”>
<bounds x=“678” y=“231” width=“551” height=“626” />
</overlay>
<backdrop element=“screen_bezel”>
<bounds x=“653” y=“231” width=“599” height=“626” />
</backdrop>
<bezel element=“bezel”>
<bounds x=“0” y=“0” width=“1920” height=“1080” />
</bezel>
</view>