Moved graphics decoding to a new device interface class: device_gfx_interface.
The gfxdecode device is now a device that simply inherits this interface and
does nothing else. Devices that draw tilemaps or sprites using gfx_elements
should in time be updated to use this interface rather than connect to a
machine-global gfxdecode device. Updated toaplan_scu.c as an example (also
fixed off-by-one sprite alignment in twincobr and rallybik while I was at it).
gfx_elements are normally created in interface_post_start(), making it
possible to dynamically create or modify the graphics decoding info during
device_start() if you need to. On the other hand, if you need the gfx_elements
during device_start(), you can directly call decode_gfx() to create them early.
This interface also provides a standard and init-order-safe way to connect to
a palette device (similarly to how device_video_interface helps devices
connect to a screen), so it's handy for any device that does palettized
drawing even if it doesn't use gfx_elements. Updated k053250.c as an example
of this usage.
gfxdecode info entries can now reference shared RAM regions by tag as well as
ROM regions, automatically handle endianness, and have some other new
capabilities. Updated nemesis.c and pgm.c to showcase the new features.
Removed validate_display() (it was just a commented out stub already) since
its only function, checking that drivers don't have an ind16 screen without
a palette, is now done by screen_device::device_validity_check().
Updated obsolete comments about GFXLAYOUT_RAW (cps1.c hasn't used raw gfx for
years, and "to save memory" is no longer a good reason to use it)
runs properly now), added second external slot -cart2 (same functionality
as -cart1). Expansion ROM slots, which are handled as internal cart slot,
are now accessible via -cart3/-cart6 media switch, until they are converted
to proper slot devices. [Fabio Priuli]
firewave: "And here's a few MESS/core ones I overlooked yesterday:
s:\svn\mame\src\emu\cpu\dsp16\dsp16ops.inc(365) : warning C6316: Incorrect operator: tested expression is constant and non-zero. Use bitwise-and to determine whether bits are set.
s:\svn\mame\src\emu\cpu\es5510\es5510.c(608) : warning C6201: Index '255' is out of valid index range '0' to '254' for possibly stack allocated buffer 'is_written'.
s:\svn\mame\src\emu\cpu\es5510\es5510.c(608) : warning C6201: Index '255' is out of valid index range '0' to '254' for possibly stack allocated buffer 'is_read'.
s:\svn\mame\src\emu\cpu\es5510\es5510.c(609) : warning C6201: Index '255' is out of valid index range '0' to '254' for possibly stack allocated buffer 'name'.
s:\svn\mame\src\emu\cpu\es5510\es5510.c(666) : warning C6201: Index '255' is out of valid index range '0' to '254' for possibly stack allocated buffer 'name'.
s:\svn\mame\src\emu\cpu\m68000\m68kcpu.c(681) : warning C6314: Incorrect order of operations: bitwise-or has higher precedence than the conditional-expression operator. Add parentheses to clarify intent.
"