sebdel / mra-tools-c

39 stars 13 forks source link

Attributes for dips #69

Closed jotego closed 4 years ago

jotego commented 4 years ago

I am thinking of adding another attribute for dip switches: coin. This will serve to define coin related switches. This can serve to hide them in the OSD in MiSTer, or to ommit them in the ARC, which is my main purpose.

Check the example where coin="yes" is defined in a couple of places. As you see these are very long strings with little value for us.

    <switches default="FF,FF" base=10>
        <!-- DSW1 -->
        <dip name="Coinage" bits="0,3" ids="Free Play,4 Coins/3 Credits,4 Coins/1 Credit,3 Coins/4 Credits,3 Coins/2 Credits,3 Coins/1 Credit,2 Coins/5 Credits,2 Coins/3 Credits,2 Coins/1 Credit,1 Coin/7 Credits,1 Coin/6 Credits,1 Coin/5 Credits,1 Coin/4 Credits,1 Coin/3 Credits,1 Coin/2 Credits,1 Coin/1 Credit" coin="yes"></dip>
        <dip name="Coinage affects" bits="4" ids="Coin B,Coin A" coin="yes"></dip>
        <dip name="Demo Sounds" bits="5" ids="On,Off"></dip>
        <dip name="Service Mode" bits="6" ids="On,Off"></dip>
        <dip name="Flip Screen" bits="7" ids="On,Off"></dip>
        <!-- DSW2 -->
        <dip name="Lives" bits="8,9" ids="7,5,4,3"></dip>
        <dip name="Cabinet" bits="10" ids="Upright,Cocktail"></dip>
        <dip name="Bonus Life" bits="11,12" ids="30K and 80K Only,20K and 80K Only,30K 80K Every 80K,20K 70K Every 70K"></dip>
        <dip name="Difficulty" bits="13,14" ids="Very Difficult,Difficult,Easy,Normal"></dip>
        <dip name="Unused" bits="15" ids="On,Off"></dip>
    </switches>

If you are ok with it I'll make a PR when I'm ready

sorgelig commented 4 years ago

Too much attention to basically meaningless option. Actually, all you need is to hardcode (in default field) 1 coin/1 credit.

There is another option if you really want to have some options for coins: MRA has values option. So in ids you list few ids like "1c/1cr,1c/2cr,1c/3cr" and reflect them in values. So OSD will have only 3 options for coinage. This is how i did for several arcades having many useless coin options.

sorgelig commented 4 years ago

here is example from Ponpoko arcade:

 <dip bits="24,27" name="Coinage" ids="3c/1cr,2c/1cr,1c/1cr,1c/2cr" values="4,2,1,3"/>

as you see coinage uses 4 bits, but i've added only 4 options.

Similar in Sky Skipper:

 <dip bits="0,3"  name="Coinage" ids="1c/1cr,1c/2cr,1c/3cr,Free Play" values="0,9,5,15"/> 
sorgelig commented 4 years ago

what is base=10?

jotego commented 4 years ago

For MiST I think it is ok with a hard coded value. But MiSTer users want all the juice! And the MiSTer OSD is wider so we can afford it. MiSTer can ignore the coin or maybe have a low-clutter OSD option that get rid of these items. base=10 is used by MiST to offset all DIP bits. Because MiST only has the 32-bit status word and it must be shared. With base=xx the same DIP definitions can be used for both MiST and MiSTer and the numbers will just get shifted by the mra tool. MiSTer can ignore this attribute.

sorgelig commented 4 years ago

But MiSTer users want all the juice!

No one will cry if not all coin options will be available. Those who wants useless options, can always modify MRA for their liking.

jotego commented 4 years ago

I ran a poll on Twitter: imagen We need to support all DIPs even if there is a mechanism to hide some. I'm dropping the coin="yes" proposal as I think we can just parse the DIP name as it will usually be "Coin A" or "Coinage" so it's easy to filter if we want to.