andrebrait / 1g1r-romset-generator

A small utility that uses No-Intro DATs to generate 1G1R ROM sets
GNU General Public License v3.0
213 stars 20 forks source link

Weird rom selection #45

Closed DaniGS89 closed 1 year ago

DaniGS89 commented 1 year ago

I am using the generator with that arguments: python .\generate.py -r SPA,MEX,ARG,EUR,USA,JAP -l es --no-all --all-regions --no-unlicensed -d .\prueba.dat

The tool is selecting Extreme Skate Adventure (Europe) (Fr,De) instead of Extreme Skate Adventure (USA, Europe). The DAT contains this games:

    <game name="Extreme Skate Adventure (USA, Europe)">
        <description>Extreme Skate Adventure (USA, Europe)</description>
        <release name="Extreme Skate Adventure (USA, Europe)" region="EUR"/>
        <rom name="Extreme Skate Adventure (USA, Europe).gba" size="8388608" crc="ad7bb7c8" md5="08d2fe71572e3537f2e7d7c08dab5707" sha1="92a587c8775cbed8f402e6e42d9c05ebe547607e"/>
    </game>
    <game name="Extreme Skate Adventure (Europe) (Fr,De)" cloneof="Extreme Skate Adventure (USA, Europe)">
        <description>Extreme Skate Adventure (Europe) (Fr,De)</description>
        <release name="Extreme Skate Adventure (Europe) (Fr,De)" region="FRA"/>
        <release name="Extreme Skate Adventure (Europe) (Fr,De)" region="GER"/>
        <rom name="Extreme Skate Adventure (Europe) (Fr,De).gba" size="8388608" crc="58594ae9" md5="f2b1c6f30bd79859dc75ac2c8abee538" sha1="d213a7f6b5268bea068d7b3ec3436360e77b29ac"/>
    </game>

Why is picking the one with regions FRA and GER instead of the one with the region EUR?

prueba.zip

andrebrait commented 1 year ago

It's probably parsing Europe from the ROM's name and making it eligible.

The weirdest part to me is that you selected Spanish as a language and that ROM still got selected, even though it's clearly not Spanish.

andrebrait commented 1 year ago

I guess since neither have Spanish, it just went with the one that has more languages. Could you add "en" to the list of languages and see if that makes the other one be selected?

DaniGS89 commented 1 year ago

Yes it worked adding en to the languages. But i dont know why, because it is not in the rom name, i guess its because assumes USA is en language?

andrebrait commented 1 year ago

Yes it worked adding en to the languages. But i dont know why, because it is not in the rom name, i guess its because assumes USA is en language?

Yes, exactly. One big thing about this tool is that it tries to overcome the fact DAT files are horribly incomplete. It will parse regions from the Game names too, as well as make certain assumptions (e.g. that a game with JAP region has jp language).

In case there's a tie (e.g. both variations are from regions you selected, in the same order, and none of them have the language es you selected) it'll untie by other criteria, such as the number of languages supported. That's why the other entry was preferred. Neither of them fit your criteria for sorting any better, in the tool's view, but one of them did have more languages than the other.

DaniGS89 commented 1 year ago

Perfect, question solved :). I see you are doing another tool DATROMTool. How is it going? Thanks

andrebrait commented 1 year ago

Slow. I had to do a couple extra things on a library I used in it, but now I should be able to resume it.

It already works, but I haven't written documentation on how to use it yet.