Home Page

Mac M1 - help adding new ROMs to XML

Posted By: ChrisKuta

Mac M1 - help adding new ROMs to XML - 07/18/18 04:19 AM

Hey

Sorry for the long first post smile

Have been using M1 mainly to listen to Pinball ROMs, my Dad and I are avid pinheads. I also have an interest in retro-emulators mostly using RetroPie on the Pi.

I've wanted to add a few new Pinball machines to M1 that are not in the default list, these are "Williams Pinball CVSD" machines. I tried a few times and thought it just wasn't going to work, however I managed to find the offsets in the MAME source code for the missing machines.

I am a bit confused about entries that include multiple lines for the same rom file eg. here is the XML for "Twilight Zone" which is included in M1.xml by default. Notice that rom tzu14.. has four lines. Is this basically loading the rom four times into a 524288 allocation? Also noting this all correctly adds up to the total 1572864. (3x 512k)

HTML
	<game name="tz_92" board="Williams Pinball CVSD">
		<description>Twilight Zone (9.2) (pinball)</description>
		<year>1995</year>
		<manufacturer>Bally</manufacturer>
		<m1data default="2" stop="0" min="1" max="255"/>
		<region type="cpu1" size="1572864">
			<rom name="tzu18_l2.rom" size="524288" crc="66575ec2" sha1="deceb56324ee9785946f5771f8cfbaf1b1d2c8bc" offset="0"/>
			<rom name="tzu15_l2.rom" size="524288" crc="389d2442" sha1="58a4bc7cc7a28b47c75d5c9bbf14abf34bd7a9e3" offset="80000"/>
			<rom name="tzu14_l2.rom" size="131072" crc="5a67bd56" sha1="98669fbfdc5793bcf09fe72c231e2b4fa2524cc5" offset="100000"/>
			<rom name="tzu14_l2.rom" size="131072" crc="5a67bd56" sha1="98669fbfdc5793bcf09fe72c231e2b4fa2524cc5" offset="120000"/>
			<rom name="tzu14_l2.rom" size="131072" crc="5a67bd56" sha1="98669fbfdc5793bcf09fe72c231e2b4fa2524cc5" offset="140000"/>
			<rom name="tzu14_l2.rom" size="131072" crc="5a67bd56" sha1="98669fbfdc5793bcf09fe72c231e2b4fa2524cc5" offset="160000"/>
		</region>
	</game>	

So I tried to get "White Water" working ("ww_l5") I found a snippet of source outlining the sound roms from https://github.com/mamedev/mame/blob/master/src/mame/drivers/wpc_flip2.cpp
Code
ROM_START(ww_l5)
	ROM_REGION(0x10000, "maincpu", ROMREGION_ERASEFF)
	ROM_REGION(0x80000, "code", 0)
	ROM_LOAD("wwatr_l5.rom", 0x00000, 0x80000, CRC(4eb1d233) SHA1(b4eda04221e11697a7c5924c37622221fe4a47d0))
	ROM_REGION(0x180000, "sound1",0)
	ROM_LOAD("ww_u14.l1", 0x000000, 0x80000, CRC(f3faa427) SHA1(fb0a266b80571b4717caa69f078b7e73e2866b6b))
	ROM_LOAD("ww_u15.l1", 0x080000, 0x40000, CRC(fe1ae71b) SHA1(8898a56866448728e7f81338ce8ad2e8cc6c7370))
	ROM_RELOAD( 0x080000 + 0x40000, 0x40000)
	ROM_LOAD("ww_u18.l1", 0x100000, 0x20000, CRC(6f483215) SHA1(03053a16c106ccc7aa5a1206eb1da3f5f05ed38f))
	ROM_RELOAD( 0x100000 + 0x20000, 0x20000)
	ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
	ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_END


Which I got working (although its not 100%) like this

HTML
	<game name="ww_l5" board="Williams Pinball CVSD">
		<description>White Water (l5) (pinball)</description>
		<year>1993</year>
		<manufacturer>Williams</manufacturer>
		<m1data default="0" stop="0" min="1" max="255"/>
		<region type="cpu1" size="1572864">
			<rom name="ww_u18.l1" size="131072" crc="6f483215" sha1="03053a16c106ccc7aa5a1206eb1da3f5f05ed38f" offset="0"/>
			<rom name="ww_u18.l1" size="131072" crc="6f483215" sha1="03053a16c106ccc7aa5a1206eb1da3f5f05ed38f" offset="20000"/>
			<rom name="ww_u18.l1" size="131072" crc="6f483215" sha1="03053a16c106ccc7aa5a1206eb1da3f5f05ed38f" offset="40000"/>
			<rom name="ww_u18.l1" size="131072" crc="6f483215" sha1="03053a16c106ccc7aa5a1206eb1da3f5f05ed38f" offset="60000"/>
			<rom name="ww_u15.l1" size="262144" crc="fe1ae71b" sha1="8898a56866448728e7f81338ce8ad2e8cc6c7370" offset="100000"/>
			<rom name="ww_u15.l1" size="262144" crc="fe1ae71b" sha1="8898a56866448728e7f81338ce8ad2e8cc6c7370" offset="140000"/>
			<rom name="ww_u14.l1" size="524288" crc="f3faa427" sha1="fb0a266b80571b4717caa69f078b7e73e2866b6b" offset="100000"/>
		</region>
	</game>


But I'm not sure what to do with the last offset as setting this looks like its overlapping (?).. Maybe I'm not understanding this correctly.. I'm assuming that we're basically concatenating the ROM files into one logical block from 0 to 1572864.. I'm sure I've just stuffed up the HEX.. but each time M1 reports out-of-bounds for ww_u14.l1?

This does work, but seems to have several issues.. any ideas?

Thanks
Chris
© 2020 Forums