Subject: xml_normalize_string() bogusly escapes UTF-8
Various parts of MAME have recently been changed to support UTF-8
strings, so I thought I'd test out using a UTF-8 driver name for the
Sam Coupe driver in MESS, just to see if anything breaks. Most things
do seem to work well - the name is correctly drawn in the UI etc. One
thing that doesn't work properly is the output from -listxml: "Sam
Coupe" becomes "Sam Coupé" - each UTF-8 byte is
individually escaped, resulting in two gibberish characters instead of
the correct character.
The culprit here is xml_normalize_string() in src/lib/util/xmlfile.c -
the code converts any high-bit byte to an XML escape, which is totally
bogus for any encoding but ISO-8859-1 because XML escapes are defined
as Unicode codepoints regardless of the document encoding.
Fortunately, this is very simple to fix - in fact, it is sufficient
just to remove the escaping code and pass through the UTF-8 bytes
directly, because UTF-8 is mandated as the default encoding in the XML
standard.[1] The attached patch does this.
This should be a pretty safe change since as far as I can tell nothing
in MAME or MESS currently triggers this code (that is, the string "&#"
does not occur in the -listxml output of either). One potentially
negative effect is that the ASCII controls which are illegal in XML
(0x00-0x19 excepting line breaks and tabs) would no longer be escaped.
However, I can't imagine why you would want any in a string destined
for -listxml, so IMO that would be a problem elsewhere in the code and
having XML parsers barf on it would be desirable.
-Justin Kerk
* save state support for FD1094 chips
* improved graphics in athena
* improved sound balance in armedf
* derived refresh rate for toaplan1 games
* improved sound balance in tmnt games
* derived clocks for suprridr
* tweaked xmen visible area
* derived clocks and refresh rate in twin16 driver
I cleaned up the Machine usage in the osd/windows files and added the
running_machine parameter where possible.
I didn't add it to osd_wait_for_debugger() yet, but I would make
sense to have it.
Subject: change for cpunum_set_irq_callback() callback function
This patch adds the running_machine* parameter to the function passed
into cpunum_set_irq_callback() and adds the IRQ_CALLBACK macro for
the callback function.
Subject: Update for "Euro League (bootleg)"
Hello,
some tiny updates for the driver wc90b.c :
-Added dumps for all GALs on the PCB
-Removed the second YM2203, it isn't present on the bootleg boards
-Changed the clocks according to the oscilators found on the board,
the previous speeds were measured on a goal92 PCB, not using a real "Euro League" PCB.
-Added a new osc to xtal.h
If you need any info about this update, please mail me.
Regards: ClawGrip (Tomas Garcia-Meras)
--
Also merged memory maps [Aaron Giles]
only remaining form is the one that takes a pointer parameter.
Added macros for STATE_PRESAVE and STATE_POSTLOAD to define common
functions. Added machine parameter to these functions.
Updated all drivers and CPU/sound cores to use the new macros
and consolidate on the single function type. As a result pushed
the machine parameter through a few initialization stacks.
Removed unnecessary postload callbacks which only marked all tiles
dirty, since this is done automatically by the tilemap engine.