Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
02688 DIP/Input Major Always Nov 28, 2008, 11:33 Dec 4, 2008, 08:35
Tester mahlemiut View Status Public Platform MAME (Self-compiled)
Assigned To aaron Resolution Fixed OS Windows XP/Vista 32-bit
Status [?] Resolved Driver
Version 0.128 Fixed in Version 0.128u5 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 02688: DIP switch settings are not being stored in INP files.
Description Upon playing back a Xain'd Sleena INP from MARP, I noticed that the extend DIP switch settings did not match what was expected (MARP rules is to use extends at 30k/80k). Extend settings are displayed when you insert a credit, and in the past, DIP switch settings have been stored in the INP file, and are set as such on playback (DIP switches are input ports, too). Now they are just set to whatever is set in the game's .cfg - this causes playback to fail unless you can match the DIP switch settings that were used for recording.
I've tested this with WolfMAME 0.128, and standard MAME 0.126 and 0.127. The attached INP should work with standard MAME builds.
Steps To Reproduce Playback attached INP file (mame xsleena -playback xsleena.inp), and note the extend settings displayed when a coin is inserted. Then, change the extend setting in the DIP settings menu, and quit MAME. Next, playback the same INP file again, and you should see that the extend setting has changed when a coin is inserted.
Additional Information
Github Commit
Flags
Regression Version 0.124u2
Affected Sets / Systems
Attached Files
zip file icon dtr_xsleena_1473600_wolf128.zip (587,707 bytes) Nov 28, 2008, 11:33
Relationships
There are no relationship linked to this issue.
Notes
8
User avatar
No.03146
stephh
Developer
Nov 28, 2008, 16:03
AFAIK, .inp files are just supposed to be a "copy" of the various inputs pressed. This is then not surprising that Dip Switches settings (which belong to the .cfg files) aren't stored in them. I can't remember however when the Dip Switches were supposed to be stored in the .inp files.

Now if you change the settings when recording a file, these extra keys are also stored in the .inp file, and IMO, this is where the problem is. But to be honest, I don't understand why people don't change their settings first, exit MAME to save them, then record their files.
User avatar
No.03147
Haze
Senior Tester
Nov 28, 2008, 19:05
dipswitches are inputs, and should be stored..
User avatar
No.03148
stephh
Developer
Nov 29, 2008, 03:48
From docs/config.txt :

-playback / -pb <filename>

Specifies a file from which to play back a series of game inputs. This
feature does not work reliably for all games, but can be used to watch
a previously recorded game session from start to finish. In order to
make things consistent, you should only record and playback with all
configuration (.cfg), NVRAM (.nv), and memory card files deleted. The
default is NULL (no playback).

-record / -rec <filename>

Specifies a file to record all input from a game session. This can be
used to record a game session for later playback. This feature does
not work reliably for all games, but can be used to watch a previously
recorded game session from start to finish. In order to make things
consistent, you should only record and playback with all configuration
(.cfg), NVRAM (.nv), and memory card files deleted. The default is
NULL (no recording).

By reading this, it seems that .inp files only store keys pressed instead of inputs (and so Dip Switches) which belong to the .cfg files.
User avatar
No.03152
mahlemiut
Developer
Nov 29, 2008, 10:29
INP files have always basically recorded the state of all input ports, as defined in the driver's source from INPUT_PORT_START to INPUT_PORT_END - I'm sure you'll find DIP switches defined in there too.
User avatar
No.03153
Haze
Senior Tester
Nov 29, 2008, 13:40
"record all input from a game session"

dipswitches are inputs from a game session, they can be changed at any point, and are a physical input like any joystick, gun, mahjong panel etc.
User avatar
No.03159
Tafoid
Administrator
Nov 29, 2008, 19:29
edited on: Nov 29, 2008, 20:24
Confirming. I tried MAPPY and selected a new bonus structure (20k, 70k and every 70k) and saved .CFG (normal is 20k/70k only). Restarted with a -record and noticed it was still "every 70k" bonus structure (read from .cfg). I -playback that recording and it shows again, every 70k bonus. I deleted .mappy.cfg and then did -playback again. The bonus showed was not saved in the input file as the default 20/70k only was shown.

Regression testing tells me that when the rewrite happened in 0.124u2 is when this inability to save the DIP setting in the .INP file started.
User avatar
No.03174
stephh
Developer
Nov 30, 2008, 06:45
Well ... If the purpose is save everything between INPUT_PORT_START and INPUT_PORT_END, I don't see what the problems can be to also save the Dip Switches info. Now the question is why the Dip Switches aren't saved anymore (to produce smaller .inp files ?) and I think that only Aaron can answer that.
User avatar
No.03216
aaron
Developer
Dec 4, 2008, 08:35
Sadly, I had to break all existing INPs to make this work. On the plus side, I added built-in compression to the data since I was breaking things anyways.