- --
Viewing Issue Advanced Details
[ Jump to Notes ]
ID | Category [?] | Severity [?] | Reproducibility | Date Submitted | Last Update |
---|---|---|---|---|---|
03142 | DIP/Input | Major | Always | May 4, 2009, 10:39 | Dec 28, 2009, 10:26 |
Tester | mahlemiut | View Status | Public | Platform | MAME (Official Binary) |
Assigned To | Resolution | Fixed | OS | ||
Status [?] | Resolved | Driver | |||
Version | 0.131 | Fixed in Version | 0.136 | Build | Normal |
Fixed in Git Commit | Github Pull Request # | ||||
Summary | 03142: All drivers using PORT_CHANGED callbacks: Input port callback functions are not triggered correctly during INP playback. | ||||
Description | When playing back INPs in MAME or MESS from drivers that use PORT_CHANGED callback functions, they are not triggered by input from the INP file. Instead, they are still triggered by normal input. For example, in Zaxxon, you can insert coins while recording, as normal. But on playback of the resulting INP, coins are not registered unless you again press 5. No normal inputs should be accepted during INP playback. | ||||
Steps To Reproduce |
Record an INP (use mame zaxxon -record test.inp). When emulation starts, insert a few coins, and exit MAME. Playback the INP again (use mame zaxxon -playback test.inp). You will not see any coins inserted, as you would expect. You can insert coins during playback by pressing 5, which should not happen. |
||||
Additional Information | This behaviour was first noted in the MESS Amiga driver, where the keyboard doesn't appear to work on INP playback. I believe it was determined that the keyboard inputs are recorded in the INP file, just not used on playback. It was initially thought to be local to that driver, until I tested the Neo Geo Pocket driver, which did the same with just the power button (other controls worked fine on playback). The power button input was the only input with a PORT_CHANGED callback, which pretty much confirmed these callbacks as not working on INP playback correctly. I checked through the current MAME source, and found 28 drivers that use these callbacks, mostly for coin inputs. I tested both Zaxxon and Ladybug to confirm for sure that it is a MAME issue. | ||||
Github Commit | |||||
Flags | |||||
Regression Version | 0.125u3 | ||||
Affected Sets / Systems | All drivers using PORT_CHANGED callbacks | ||||
Attached Files
|
inputport-281209.diff (835 bytes) Dec 28, 2009, 01:48 [Show Content] [Hide Content]diff -Nru base0135/src/emu/inptport.c mame0135s/src/emu/inptport.c --- base0135/src/emu/inptport.c 2009-12-28 14:27:36.000000000 +1300 +++ mame0135s/src/emu/inptport.c 2009-12-28 14:24:52.000000000 +1300 @@ -2084,6 +2084,10 @@ mess_input_port_update_hook(machine, port, &port->state->digital); #endif /* MESS */ + /* handle playback/record */ + playback_port(port); + record_port(port); + /* call device line changed handlers */ newvalue = input_port_read_direct(port); for (device_field = port->state->writedevicelist; device_field; device_field = device_field->next) @@ -2101,13 +2105,6 @@ } } - /* handle playback/record */ - for (port = machine->portlist.head; port != NULL; port = port->next) - { - playback_port(port); - record_port(port); - } - profiler_mark_end(); } | ||||
Relationships
There are no relationship linked to this issue. |
Notes
4
No.04315
Tafoid Administrator
May 4, 2009, 13:53
edited on: May 4, 2009, 13:54 |
Good catch. Using Ladybug and Zaxxon, I confirmed the behavior. I also narrowed down regression to 0.125u3.Added a PORT_CUSTOM for the eeprom bit reading. Updated several |
---|---|
No.05228
mahlemiut Developer
Dec 1, 2009, 21:18
|
Changes to the input port system in 0.135u2 haven't affected this bug. |
No.05330
mahlemiut Developer
Dec 28, 2009, 01:51
|
Attached a potential fix. Seems to work for Zaxxon and Ladybug. Hopefully it doesn't cause any major issues (just seems too easy for something that has been around for the past 10 releases) Have yet to test it in MESS, will do that now. |
No.05334
etabeta Developer
Dec 28, 2009, 10:25
|
your patch has been accepted |