Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
02542 DIP/Input Minor Always Oct 13, 2008, 23:25 Nov 3, 2008, 10:02
Tester amameuser View Status Public Platform MAME (Self-compiled)
Assigned To aaron Resolution Fixed OS Windows XP/Vista 32-bit
Status [?] Resolved Driver
Version 0.127u8 Fixed in Version 0.128u3 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 02542: ghoulsu: Doesn't remove the original port when replacing it with a conditional port
Description Using PORT_MODIFY should allow a driver to replace overlaping entries in the original definition with new values.

However the following scenarios show, that this only works if the modified port doesn't have a condition attached to it.

Original port with no condition -> Modified port with no condition -> Pass, port replaced

Original port with condition -> Modified port with no condition -> Pass, port replaced

Original port with no condition -> Modified port with condition -> Fail, duplicate port added

Original port with condition -> Modified port with condition -> Fail duplicate port added

If the modified port has a condition, it is added without removing the original, causing a duplicate entry that is not picked up by the validity checks.
Steps To Reproduce Start ghoulsu, select dip switches in the interface and observe that the following ports are duplicated:

Difficulty -> SW(B) 1,2,3 [Modified]
Difficulty -> SW(B) 1,2,3 [Original]

Unused -> SW(B) 4 [Original]
Unused -> SW(B) 4 [Modified]

Bonus Life -> SW(B) 5,6 [Modified]
Bonus Life -> SW(B) 5,6 [Original]

Coin A -> SW(A) 1,2,3 [Modified]
Coin A -> SW(A) 1,2,3 [Original]

Coin B -> SW(A) 4,5,6 [Modified]
Coin B -> SW(A) 4,5,6 [Original]

Change Game Mode from Game to Test and observe that the following ports are now duplicated:

Starting Weapon -> SW(B) 1,2,3 [Modified]
Difficulty -> SW(B) 1,2,3 [Original]

Unused -> SW(B) 4 [Original]
Armor on New Life -> SW(B) 4,5,6 [Modified]
Bonus Life -> SW(B) 5,6 [Original]

Starting Level -> SW(A) 1,2,3,4 [Modified]
Coin A -> SW(A) 1,2,3 [Original]
Invulnerability -> SW(A) 5 [Modified]
Slow Motion -> SW(A) 6 [Modified]
Coin B -> SW(A) 4,5,6 [Original]

This can be seen more clearly in the attached screen shots where red is the original port inherited from ghouls and green is the modified port from ghouslu, the red ports should not be present.
Additional Information
Github Commit
Flags
Regression Version 0.127u1
Affected Sets / Systems ghoulsu
Attached Files
png file icon ghoulsu_game.png (50,125 bytes) Oct 13, 2008, 23:25
png file icon ghoulsu_test.png (50,015 bytes) Oct 13, 2008, 23:26
Relationships
child of 02544Resolvedaaron Dip Condition / Port Include limitation 
Notes
2
User avatar
No.02830
Tafoid
Administrator
Oct 14, 2008, 00:04
edited on: Oct 14, 2008, 00:06
Definite issues with the DIPs as they stand now. Confirmed and regression version found.
User avatar
No.02835
etabeta
Developer
Oct 14, 2008, 05:37
This is not an issue with ghoulsu, but in the way the core handles PORT_INCLUDE & PORT_CONDITION. I filed a bug report for the core issue (see 02544).

A workaround is not to use PORT_INCLUDE from ghouls (defining a standalone set of inputs for ghoulsu), but I'd prefer to see if Aaron can fix it in the core before submitting a diff which only fixes this single test case