nbla000
Posts: 4
Joined: Fri Aug 14, 2020 4:58 pm

Artworks and large images problem...

Hi,

I wish to fix a problem in my hangon artwork with animated elements for the rideon version, it will be in the Mr. Do MAME IN-GAME ARTWORK page but until then you may temporary download here.

For the bike rotation I use an element and defstate/state parameters with 25 FullHD images 1920x1080

Code: Select all

<element name="rideon_background" defstate="0x10">
	<image file="hangon_rideon_right_12.png" state="0x4" />
	<image file="hangon_rideon_right_11.png" state="0x5" />
	<image file="hangon_rideon_right_10.png" state="0x6" />
	<image file="hangon_rideon_right_9.png" state="0x7" />
	<image file="hangon_rideon_right_8.png" state="0x8" />
	<image file="hangon_rideon_right_7.png" state="0x9" />
	<image file="hangon_rideon_right_6.png" state="0xa" />
	<image file="hangon_rideon_right_5.png" state="0xb" />
	<image file="hangon_rideon_right_4.png" state="0xc" />
	<image file="hangon_rideon_right_3.png" state="0xd" />
	<image file="hangon_rideon_right_2.png" state="0xe" />
	<image file="hangon_rideon_right_1.png" state="0xf" />
	<image file="hangon_rideon_center.png" state="0x10" />
	<image file="hangon_rideon_left_1.png" state="0x11" />
	<image file="hangon_rideon_left_2.png" state="0x12" />
	<image file="hangon_rideon_left_3.png" state="0x13" />
	<image file="hangon_rideon_left_4.png" state="0x14" />
	<image file="hangon_rideon_left_5.png" state="0x15" />
	<image file="hangon_rideon_left_6.png" state="0x16" />
	<image file="hangon_rideon_left_7.png" state="0x17" />
	<image file="hangon_rideon_left_8.png" state="0x18" />
	<image file="hangon_rideon_left_9.png" state="0x19" />
	<image file="hangon_rideon_left_10.png" state="0x1a" />
	<image file="hangon_rideon_left_11.png" state="0x1b" />
	<image file="hangon_rideon_left_12.png" state="0x1c" />
</element>

And of course I use this element in a specific view:

Code: Select all

<bezel element="rideon_background" inputtag="ADC0" inputmask="0xf8" inputraw="1">
	<bounds x="0" y="0" width="1920" height="1080" />
</bezel>

Yes, I know you discourage the use of the <bezel> tag but there is another problem with new system that I will explain in another thread... ;)

The problem is that, by using a view with the element "rideon_background", when you turn left or right for the first time, the emulation slows down and images of the current state take a while to be displayed, once you have fully turned (left and right) there is no problems, emulation is ok and images are quickly displayed even if I use another view with the same element.

It seems to me that once Mame loads an image for the first time it cache the image in memory so the next time that it should be displayed is fast but there is a way from artwork .lay file to cache images before it will displayed?

Mr. Do suggested me a workaround found on another forum that works but for elements without state only, not in my case :-(
When I use this workaround for multi state image elements it caches just the last image ("hangon_rideon_left_12.png" in my case) and the problem remains substantially the same since I have other 24 images to cache... and it still remain a workaround not a standard solution so it may not work in the future.

So there is a way "official or not" to cache images with multiple state parameters? if not could be implementable?

thanks again for your work.

Return to “MAME Discussion”