MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

AWJ
Reged: 03/08/05
Posts: 936
Loc: Ottawa, Ontario
Send PM
Re: Adding new versions of games to drivers
08/31/07 02:39 AM


> I've noticed that in my original hangon.zip, the filenames don't match what's in the
> source, yet the zip still works. I presume the driver reads the CRC/SHA1 code rather
> than the actual filename, or am I way off?
> Also, is the CRC/SHA1 obtained when the files are zipped or is this calcualated in a
> different way?

Yes, MAME will identify ROMs by their hashes if the names don't match. CRC32 is part of the ZIP standard; any program that manipulates ZIP files should be able to tell you the CRC32 hash of a file. SHA1 hashes can be calculated using GNU sha1sum--Google "sha1sum.exe" and you should find a link to a Windows binary in the first page of results.

> Would it just be a matter of dropping in the appropriate rom names and CRC's into the
> driver or could there be more to it than this?
> The two hex numbers after the rom name in the driver, I know what the second number
> is (I think it's the same as the number the programmer displayed when it had read and
> written the rom to a file - 32768k (8000 hex))? How is the first number determined,
> is it a memory region?

To add a new clone set to MAME, you need to do just three things (assuming the clone is identical hardware-wise to its parent, which should be the case for your version of Hang On)

First, you need to add the ROM definitions. Because your board is a newer ROM revision, you're going to make it the parent and make the older set that's already in MAME a clone. Copy & paste the entire hangon ROM definition--everything from ROM_START( hangon ) to ROM_END. In the first (top) copy, change the appropriate ROM names and hashes to those from your board--e.g. replace epr-6918.ic22 with epr-6918a.ic22. You don't have to change the two hex numbers that come after the ROM name--those are the loading offset and the size of the ROM, and they'll be the same for your ROMs as for the originals. In the second (bottom) copy, just change ROM_START( hangon ) to ROM_START( hangon1 )--this is the old set that you're relegating from parent to clone, so you have to rename it.

Second, you need to add a game definition. At the very bottom of the driver file, copy and paste the line beginning with GAME( 1985, hangon,.... Again, the first copy is going to be your version--change the description (the part in quote marks) from "Hang-On" to something like "Hang-On (Rev A)" The second copy is the older version which you've renamed. Change the first hangon to hangon1, and the 0 after it to hangon. This makes "hangon1" into a clone of "hangon". Leave the rest of the "hangon"'s in the line alone.

Finally, you need to add the game definition to src/mame/mamedriv.c as well. Find the line that begins with DRIVER( hangon ), copy and paste it, and replace hangon with hangon1 in the second copy.

Once you've done these three things, rebuild MAME completely (make clean and then make) and if you've done everything right, your ROM set should be recognized!







Entire thread
Subject Posted by Posted on
* Adding new versions of games to drivers tb2000 08/31/07 12:43 AM
. * Re: Adding new versions of games to drivers AWJ  08/31/07 02:39 AM
. * Re: Adding new versions of games to drivers tb2000  08/31/07 01:04 PM
. * Re: Adding new versions of games to drivers AWJ  09/01/07 07:00 AM
. * Re: Adding new versions of games to drivers Haze  09/01/07 12:41 PM
. * Re: Adding new versions of games to drivers tb2000  09/01/07 01:15 PM
. * Re: Adding new versions of games to drivers Haze  09/01/07 01:20 PM
. * Re: Adding new versions of games to drivers Vas Crabb  09/01/07 01:11 PM
. * Re: Adding new versions of games to drivers tb2000  09/01/07 01:18 PM
. * Re: Adding new versions of games to drivers Haze  09/01/07 01:16 PM
. * Re: Adding new versions of games to drivers Vas Crabb  09/01/07 02:36 PM
. * Re: Adding new versions of games to drivers Haze  09/01/07 03:18 PM
. * Re: Adding new versions of games to drivers tb2000  09/01/07 03:58 PM
. * Re: Adding new versions of games to drivers Vas Crabb  09/01/07 03:39 PM
. * Re: Adding new versions of games to drivers StilettoAdministrator  09/05/07 06:37 AM
. * Re: Adding new versions of games to drivers R. Belmont  09/01/07 07:16 PM
. * Re: Adding new versions of games to drivers tb2000  09/01/07 10:25 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 102 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 4367