Is there any way to check the Dip Switch Settings of an inpu

Archive of the old message board

Moderator: Chad

Locked
Grand Master Peter

Is there any way to check the Dip Switch Settings of an inpu

Post by Grand Master Peter » Tue Nov 20, 2001 12:30 pm

In other words, how do you guys verify the settings of someone's *.inp file, only by experience (or is there another way)?
<p>

Thanks in advance! :)

--
tehkan@powersrike.net

Brian McLean

Post by Brian McLean » Tue Nov 20, 2001 12:30 pm

Yes and no. I really should wait for Ben Jos' more authoritative
answer, but the basic idea is that the dips are encoded into every
frame of an .inp file. Someone can look at the source for a game's
driver and determine what 'proper' (default in most cases) settings
would be recorded as. Then it's just a matter of verifying that
the .inp in question matches up with it. The editors use a tool that
assists in tournament games. For most of the games, however, stuff
like that is usually spotted by experience with the game or just
really obvious sort of things like having the wrong number of lives.

<p>

The MAME Olympiad movie rocks, by the way. As does Ms. Pac-Man's
singing performance.

<p>

Brian McLean

--
bmclean84@hotmail.com

Grand Master Peter

Post by Grand Master Peter » Wed Nov 21, 2001 12:30 pm

Thanks for the info and the comments! :P
By the way, is this "assisting tool" available for everyone, or is it
strictly used by the people who verify the input files?

<p>

Thanks again! (and sorry for mispelling my email address in my
previous message)

--
tehkan@powerstrike.net

Brian McLean

Post by Brian McLean » Wed Nov 21, 2001 12:30 pm

The dip checkers, slowdown analyzers and such are a jealously kept
secret within the editors. :) Actually, I don't think they give it
out to the general public or even us confirmers in most cases (there
are two tiers of 'verifiers', the confirmers who can only say that a
score plays back correctly and the editors who have the power to
change other players' scores).

<p>

Brian McLean

--
bmclean84@hotmail.com

Ben Jos Walbeehm

Post by Ben Jos Walbeehm » Wed Nov 21, 2001 12:30 pm

The DIP switch checker is usually updated for tournaments and
distributed to all judges. It is not reserved for editors only.
However, it is far from being an overall checker. Yes, Brian is
correct, you can look at the source code to find out how the DIP
switches are stored in the .inp. The bad parts: (1) The overall .inp
format has changed at least three times, (2) there are 3000+ games in
MAME, and (3) The DIP switch parts of game drivers are changed every
now and then, so if you know which bit corresponds to which DIP
switch for a given version of MAME, that does not mean it's the same
bit in a different version of MAME, even regardless of whether the
two versions use the same format as mentioned in (1) . Is anybody
volunteering to MANUALLY add support for 5000+ combinations of MAME
versions and games to the checker?

<p>

Also, the checker at this point is written in a way to see if the
correct settings are used. Most of the time when there is a
tournament, I look at what the required settings for each game in
that tournament are and then manually add each game to the checker.
Then it can be used to compare the settings of SOME PARTICULAR
VERSION of MAME (so not just any version) of a given .inp to the
required settings for that game.

<p>

So, again, it's not a one size fits all utility. Actually, it's a one
size fits only a handful utility, with by far the majority being
unsupported. So most of the time when I want to see which DIP
switches were used in some recording, I can't even use it and have to
revert to using a hex editor and reading the source code of the game
driver...

<p>

Cheers,
Ben Jos.

--
walbeehm@walbeehm.com

smame@Team2ch

Post by smame@Team2ch » Thu Nov 22, 2001 12:30 pm

It is easy to show dip switch changes.
for mame 0.56, go to inptport.c and add this to line 1641.

<p>

in = Machine->input_ports;
in++;
port = 0;
while (in->type != IPT_END && port < MAX_INPUT_PORTS)
{
while (in->type != IPT_END && in->type != IPT_PORT)
{
if ((in->type & ~IPF_MASK) == IPT_DIPSWITCH_NAME)
{
in->default_value =
(in->default_value & ~in->mask) | (input_port_value[port] &
in->mask);
}
in++;
}
port++;
if (in->type == IPT_PORT) in++;
}

--
smame@mameworld.net

Grand Master Peter

Post by Grand Master Peter » Fri Nov 23, 2001 12:30 pm

The idea is quite logic and finding patterns that correspond to the
same or different dip switch settings of a specific game was easier
than I first thought! :)

<p>

Thanks to everyone!

--
tehkan@powerstrike.net

Locked