Getting Started with MAME on macOS - Part 6 - Simple ROM Verification

Guide Emulators by sky

Logo de MAME

Back to our series of articles on MAME for macOS. In the article 4, we saw how to use command lines to check your ROMs. Today we'll go a bit further as I will explain how to read the results of this command and some tips to find the ROMs.


1/ Explanation of the verifyroms action

As we saw previously, the verifyroms action allows you to check if a ROM is properly compliant with what MAME expects. With the successive updates of MAME that can affect the functioning of a ROM, this command becomes crucial.

Moreover, if you have installed SDLMAME and MAME via brew, knowing that the latter is often behind by one (or several) version(s), you might get different results depending on the application used, when checking recently modified ROMs.

Let's review how to check a ROM with MAME via Homebrew.

mame -verifyroms sf2

and let's look at the 4 possible results

romset sf2 is good
1 romsets found, 1 were OK.

This is the best possible result, the one we expect for all of your ROMs.
The ROM as it is, is compatible with the current version of MAME.

romset sf2 is bad
...
1 romsets found, 0 were OK.

Here it's worse. MAME considers your ROM as invalid and won't even launch it. If you want to play this game, you'll need to update it.

romset sf2 is best available
...
1 romsets found, 1 were OK.

This result isn't as bad as it seems. Some elements of the ROM are not good. However, there is no correct version available for these elements and MAME knows it.

The application will allow you to launch the game, but you should know that there may be issues with it.

Finally, if you run the command on a non-existent ROM

mame -verifyroms pouet

you will get the result

No matching systems found for 'pouet'


2/ Decoding a verification with a "bad" result

When MAME verifies a ROM, it checks all the contained elements one by one. It will indicate all the problems present in the ROM.

In order, it will check the presence of the element. In case of a failure, it will indicate

sf2cems6b   : ms6_gal20v8a.u104 (343 bytes) - NOT FOUND

A large NOT FOUND at the end of the line indicates that the element is therefore missing.
Next, it will check the length of the element, a quick way to know if the element has changed. Again, with a problem, we will have

sf2hf       : ioc1.ic7 (260 bytes) - INCORRECT LENGTH: 279 bytes

Here, it is the INCORRECT LENGTH that signals the bad news. Just before, in parentheses, you have the expected size by MAME and at the end of the line the weight of your element. As you can see here, it differs.

Finally, the element may be present and of the correct length, but its content may not be correct. To check this, MAME performs a checksum on the elements and compares them to the ones it expects.

Here is what the error looks like

swa         : 315-5711.bin (8192 bytes) - INCORRECT CHECKSUM:
EXPECTED: CRC(c5ddb8fc) SHA1(9e21d3a07ffa315e0139483b664e3fa283ef4e06) BAD_DUMP
  FOUND: CRC(22affe54)

The term INCORRECT CHECKSUM clearly indicates an error in the checksum, while the two following lines give the found and expected checksums.

If you want MAME to run your ROM, you will need to fix the errors, either by finding another ROM without defects, or by replacing only the defective elements. I will explain how to do this a bit later in the article.


3/ Retrieving ROMs

Obviously, the most legal way to retrieve ROMs is to create the dumps yourself. In reality, this is not feasible! Finding arcade cabinets is increasingly difficult, they are becoming rarer, and some no longer even exist.

The solution is therefore to find the ROMs of the games you wish to play on the Internet. Many sites offer ROMs for free access; you will need to find them.

The first idea is to find the files via their names. Thus, to search for the game "Street Fighter 2", whose code is "sf2", I recommend searching for "mame sf2.zip".

This solution should return dozens of results.

For a collector, it is possible to have a ROM that is incorrect, one you are unfamiliar with, and that you cannot find via its filename. The solution may be to find it via the game's (or BIOS) title that is hidden behind it.

To find the exact title, you will need to run the command with the action listfull, replacing the name of the ROM you are searching for, of course.

mame -listfull sf2

The result gives something like

Name:             Description:
sf2               "Street Fighter II: The World Warrior (World 910522)"

Now, to perform my search, I can try the query 'mame "Street Fighter II: The World Warrior (World 910522)"'.

Once the ROM is retrieved, place it in your ROMs folder and don't forget to run a verification again. Indeed, some sites provide old versions of the ROMs, a version different from your MAME, or even defective versions.

So far, it's quite basic and simple. Now here are my slightly more subtle tips that can help you.

If you have found a site that provides ROMs as you wish, do not hesitate to save its URL for later.

The next time you look for ROMs, if you want to search on this site, here is the search to perform on Google: "site:www.mon-super-site.com masuperrom.zip" replacing the site name and the ROM name. And of course, this also works by searching for the game title.

Second tip, here is a third way to find ROMs, by precisely searching for the version you want. Indeed, some sites provide the checksum of the different elements of a ROM.

To obtain the CRC of ROM elements, use the `listcrc` action

mame -listcrc sf2

You will get the list as follows

fe39ee33 sf2e_30g.11e            sf2        Street Fighter II: The World Warrior (World 910522)
fb92cd74 sf2e_37g.11f            sf2        Street Fighter II: The World Warrior (World 910522)
69a0a301 sf2e_31g.12e            sf2        Street Fighter II: The World Warrior (World 910522)
5e22db70 sf2e_38g.12f            sf2        Street Fighter II: The World Warrior (World 910522)
8bf9f1e5 sf2e_28g.9e             sf2        Street Fighter II: The World Warrior (World 910522)
626ef934 sf2e_35g.9f             sf2        Street Fighter II: The World Warrior (World 910522)
bb4af315 sf2_29b.10e             sf2        Street Fighter II: The World Warrior (World 910522)
c02a13eb sf2_36b.10f             sf2        Street Fighter II: The World Warrior (World 910522)
22c9cc8e sf2-5m.4a               sf2        Street Fighter II: The World Warrior (World 910522)
57213be8 sf2-7m.6a               sf2        Street Fighter II: The World Warrior (World 910522)
ba529b4f sf2-1m.3a               sf2        Street Fighter II: The World Warrior (World 910522)
4b1b33a8 sf2-3m.5a               sf2        Street Fighter II: The World Warrior (World 910522)
2c7e2229 sf2-6m.4c               sf2        Street Fighter II: The World Warrior (World 910522)
b5548f17 sf2-8m.6c               sf2        Street Fighter II: The World Warrior (World 910522)
14b84312 sf2-2m.3c               sf2        Street Fighter II: The World Warrior (World 910522)
5e9cd89a sf2-4m.5c               sf2        Street Fighter II: The World Warrior (World 910522)
994bfa58 sf2-13m.4d              sf2        Street Fighter II: The World Warrior (World 910522)
3e66ad9d sf2-15m.6d              sf2        Street Fighter II: The World Warrior (World 910522)
c1befaa8 sf2-9m.3d               sf2        Street Fighter II: The World Warrior (World 910522)
0627c831 sf2-11m.5d              sf2        Street Fighter II: The World Warrior (World 910522)
a4823a1b sf2_9.12a               sf2        Street Fighter II: The World Warrior (World 910522)
7f162009 sf2_18.11c              sf2        Street Fighter II: The World Warrior (World 910522)
beade53f sf2_19.12c              sf2
html
Street Fighter II: The World Warrior (World 910522)
eb122de7 buf1                    sf2        Street Fighter II: The World Warrior (World 910522)
59c7ee3b ioa1                    sf2        Street Fighter II: The World Warrior (World 910522)
f1129744 prg1                    sf2        Street Fighter II: The World Warrior (World 910522)
41dc73b9 rom1                    sf2        Street Fighter II: The World Warrior (World 910522)
84f4b2fe sou1                    sf2        Street Fighter II: The World Warrior (World 910522)
043309c5 stf29.1a                sf2        Street Fighter II: The World Warrior (World 910522)
3abc0700 iob1.11d                sf2        Street Fighter II: The World Warrior (World 910522)
0fbd9270 c632.ic1                sf2        Street Fighter II: The World Warrior (World 910522)

Now you just need to search online for the missing element in your ROM, along with its checksum.

Unfortunately, websites providing CRC checks are not very numerous. However, they tend to offer ROMs of better quality.

 

The next article in this series will be a direct continuation of this one as we will continue working on verifying the ROMs from our collection.

Related software

Reply on the forum

A question or a hands-on report? Open the discussion on the forum.

Reply on the forum