Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order for Dips in Mister/Mist #75

Open
eubrunosilva opened this issue May 11, 2020 · 7 comments
Open

Order for Dips in Mister/Mist #75

eubrunosilva opened this issue May 11, 2020 · 7 comments

Comments

@eubrunosilva
Copy link

Hi

another request... sorry :)

about the ids of the dips:
we must sort the ids of the dips by its value and not by its name.

giving an example for 1942:

	PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Lives ) )        PORT_DIPLOCATION("SWA:2,1")
	PORT_DIPSETTING(    0x80, "1" )
	PORT_DIPSETTING(    0x40, "2" )
	PORT_DIPSETTING(    0xc0, "3" )
	PORT_DIPSETTING(    0x00, "5" )

the dip will be:

<dip bits="6,7"   name="Lives"        ids="5,2,1,3"></dip>

in osd doesn't make much sense not having the lives sorted. whe should have something like this:

<dip bits="6,7"   name="Lives"        ids="1,2,4,5"></dip>

yes, I know that this doesn't work out of the box :)

So, in mister, we can change the sort order of ids for a "dip" having the values for each id.
you can see how in the end of this page:
https://github.com/MiSTer-devel/Main_MiSTer/wiki/Arcade-Roms#Dip-Switches

the "problem" here is mist that doesn't do this.

My question is:

  • its possible to have the mra with another order and values for each one like this example and the tool sort the ids by their value (like we have today) when it creates the arc?

Thanks :)

@sebdel
Copy link
Owner

sebdel commented May 12, 2020

Sure, but If I do anything at the ARC level it will break if it's not supported by the firmware. You need to get this implemented in the mist-firmware first (the ids/values lookup table I mean).

@eubrunosilva
Copy link
Author

hi
sorry for the late reply.

The goal here is:

  • have a mister mra sorted not by "value" (because it can)
  • mratool read the dips mra and if needed, sort the dip by value like mist firmware needs

Thanks

@sebdel
Copy link
Owner

sebdel commented May 15, 2020

I understand, but my point is that the mra has more informations than the arc file (the "ids" and "values" attributes).
In the ARC file, the order itself is the value. If I change the order, I break the core. You need a new feature in the ARC file, to encode "values" and "ids".

@gyurco, do you confirm?

@gyurco
Copy link
Contributor

gyurco commented May 15, 2020

Yes, the order is the value. Maybe the ids can be shuffled around according to values, which will make the OSD look not so nice, but at least it will work with the same MRA.

@eubrunosilva
Copy link
Author

hi all

I think i'm not been able to explain what i'm proposing :(

i will try again:
dips in mra for mister can have two ways:
1st

<dip bits="6,7"   name="Lives"        ids="5,2,1,3"></dip>

because ids are ordered by their value, mister/mist knows what value has each id and in osd we see 5,2,1,3

2nd

<dip bits="6,7"   name="Lives"        ids="1,2,3,5" values="0x80,0x40,0xc0,0x00"></dip>

because "values" are there, mister knows, for example, that id 1 represent value 0x80. In OSD we see 1,2,3,5

And we know that mist cant do this 2nd option. don't even know if it is possible to change the firmware to do this or not. My start point is that this isnt possible to do thru the firmware.

This 2nd option, at least for me, is the best choice to display dips "ids" in OSD in Mister.
And my point is that Mister should not "suffer" because mist can't do this (arc file is created with mister mra)
That's why my sugestion is the one i am trying to say:

  • create the mra with the 2nd option
  • mratool, before creating the arc, if values are present in dips, reorder the ids by value (like if mra had the 1st option there) and write the dip to arc with the ids "5,2,1,3"

don't know if the idea is more clear now?
Thanks

@gyurco
Copy link
Contributor

gyurco commented May 15, 2020

I wrote the same: the ids should be reordered in the ARC file according to values.

@eubrunosilva
Copy link
Author

ok sorry... must sleep more :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants