Viewing Issue Advanced Details Jump to Notes ] docastle.cpp
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
01704 Gameplay Minor Always Apr 17, 2008, 13:21 Jun 25, 2017, 18:20
Tester Machone View Status Public Platform MAME (Self-compiled)
Assigned To Resolution Fixed OS
Status [?] Resolved   Driver docastle.cpp
Version 0.124u3 Fixed in Version Build C2D
Summary 01704: dorunrun, dorunrun2, dorunrunc, dorunrunca, spiero: Game starts with 5 lives regardless of dip settings
Description These games start with the player having 5 lives even if the dipswitch is set to '3'. Resetting via the F3 key cures this, but the problem reappears when MAME is quit and then restarted.
Steps To Reproduce
Additional Information
Regression Version 0.124u3
Affected Sets / Systems dorunrun, dorunrun2, dorunrunc, dorunrunca, spiero
Attached Files

- Relationships
related to 01021Confirmed dorunrun2: Side-by-side test. 

-  Notes
User avatar
Apr 17, 2008, 14:15
Confirmed the issue.
User avatar
(Senior Tester)
Sep 8, 2009, 18:18
In MAME 0.124u3 the refrech rate was changed in drivers\docastle.c line 611 from


If you set it back to 60Hz the games shows 3x 'Lives' again. I think the 3x Z80 CPUs
of the games needs a high interleave (MDRV_QUANTUM_PERFECT_CPU) or something else
to ensure correct working of the service mode/dipswitch settings.
User avatar
(Senior Tester)
Sep 8, 2009, 19:54
IIRC Nicola documented that there is a race condition between the CPUs on startup and even with 'perfect interleave' things can happen in the wrong order.

Any slight adjustments in anything that could affect the timing are always liable to reintroduce this bug, I'd be surprised if it doesn't even manifest itself on some PCBs if the clocks are on the lower/higher end of their tolerance levels.

There are many ways it can be fixed (slightly slowing down one of the cpus for example) .. Quite what the right way is, I don't know.
User avatar
Jan 4, 2014, 19:42
the symptom is fixed now, but i think the real cause is in mame/machine/docastle.c
This should be fixed properly when our Z80 core supports mid-instruction WAIT.
User avatar
(Senior Tester)
Jan 14, 2014, 18:23
Should this be marked fixed if it's only a symptomatic fix? I'm going to change this to Acknowledged/Suspended per hap's note; it shouldn't be Resolved/Fixed until it actually is.
User avatar
Jan 14, 2014, 23:29
It's not even fixed symptomatically. After hap's most recent changes, the dipswitches now work on the first boot, but don't work after you soft reset. It's the opposite of before, but still broken.
User avatar
(Senior Tester)
Jan 15, 2014, 14:54
Well, as this is waiting on a feature implementation (Z80 core mid-instruction WAIT) I'm going to leave it Acknowledged/Suspended, since any "fix" other than the proper one isn't going to be a proper fix.
User avatar
Jun 25, 2017, 18:20
The live DIP setting is properly working now.