vpinball / pinmame

PinMAME - Pinball Multiple Arcade Machine Emulator
https://www.vpforums.org
Other
180 stars 50 forks source link

mm_109c: Medieval Madness (and possibly afm_1.13b) - Solenoids not triggering. #226

Closed MrBlaschke closed 6 months ago

MrBlaschke commented 7 months ago

Hi all. With the latest version of VPinMAME (VPinMAME-sc-3.6-833-f79bcf9-win-x64 and VPinMAME-sc-3.6-833-f79bcf9-win-x86) some solenoids are not triggering. The draw bridge in Medieval Madness is not opening on the 2nd attach wave. (Confirmed by JPSalas and me) The Shield in Attack from Mars is not lowering (this is not confirmed by someone else at the moment)

The Medieval Madness Draw Bridge opens correctly with VPinMAME 3.5!

I started a thread in VPForums and JPSalas tested it: https://www.vpforums.org/index.php?showtopic=53030

I hope you guys can fix this.

P.S. Btw - love your work!

toxieainc commented 7 months ago

@vbousquet for vis

nkvoll commented 7 months ago

Sharing this and hoping this can help any troubleshooting/bugfix: I've found this fix to solve it: https://github.com/Nicals/vpx-standalone-scripts/commit/f8bc117b3acc169759d529ff0c4f1baaa74b3918 linked from https://vpuniverse.com/files/file/9784-medieval-madness-mod-nfozzy-fleep-sounds-lut-11/page/5/?tab=comments#comment-62345. The commit message indicates there might be an issue with the table and Controller.GetMech.

francisdb commented 6 months ago

More info on what that branch was fixing at: https://github.com/jsm174/vpx-standalone-scripts/pull/129

jsm174 commented 6 months ago

Hello, I do not believe this issue and the one referenced above are related.

mm had an internal mech inside of pinmame to handle the bridge, and libpinmame literally had a bug that had the offsets incorrect.

https://github.com/vpinball/pinmame/commit/e4f1a214bdfe5cfe305c258d6739178858d15175

toxieainc commented 6 months ago

@MrBlaschke Is this still an issue with the latest VPM builds?

superblobster commented 6 months ago

I thought it was fixed in latest but I was wrong. It's actually random. Some games were fine, but sometimes the drawbrige stopped responding after 1-2 hits even during the first wave.

Loadedweapon commented 6 months ago

yes I can confirm after working on this table for days that after the first castle destroyed then the bridge never drops again

Nicals commented 6 months ago

The castle on MM seems to correctly work with #237 fix

vbousquet commented 6 months ago

Just had a look and the table existing script seems just wrong to me. On PinMame side, you have a Mech that goes from 0 to 499, up and down position being between 10-490 and 240-260, but the script does not use this value as is, but use this value to guess a bridge pos. It used to work (maybe by guess and try ?). Latest change in PinMame slightly changed the timing (to be more correct) and this broke it. Still, the fix should be on the table script, not PinMame (for example with the proposed fix by jsm or by really using the PinMame which has no bug as far as I can tell).

toxieainc commented 6 months ago

@Loadedweapon Can you please verify the fix as you're actually working on it?

Loadedweapon commented 6 months ago

yes what he linked worked.. '**** ' DRAW BRIDGE '****

Dim dbpos ' Keeps track of the bridge position. Dim drawBridgeIsClosed drawBridgeIsClosed = True

Sub SolDrawBridge(enabled) If Enabled AND drawBridgeIsClosed Then dbpos = 1 dbridge.enabled = 1 PlaySound SoundFX("Bridge_Move", DOFGear), -1, 0.1, AudioPan(braket) , 0, 0, 1, AudioPan(braket) DOF 104, DOFOn end If If Enabled AND NOT drawBridgeIsClosed Then dbpos = 2 dbridge.enabled = 1 PlaySound SoundFX("Bridge_Move", DOFGear), -1, 0.1, AudioPan(braket) , 0, 0, 1, AudioPan(braket) DOF 104, DOFOn End If End Sub

Sub dbridge_timer() Select Case dbpos Case 1: 'bridge is going down drawbridgep.RotX = drawbridgep.Rotx - 1 DBdecal.rotx=DBdecal.rotx-1 braket.rotx=braket.rotx-1 If drawbridgep.RotX <= -90 Then DOF 104, DOFOff drawbridgep.RotX= -90 DBdecal.rotx=-90 braket.rotx=-90 Door1.isdropped = 1 BridgeRamp.collidable = 1 Ramp22.collidable = 0 Ramp002.collidable = 0 BW1.isdropped = 0 BW2.isdropped = 0 Me.Enabled = 0 drawBridgeIsClosed = False StopSound "Bridge_Move" PlaySound SoundFX("Bridge_Stop", 0),0, 0.1, AudioPan(braket) , 0, 0, 1, AudioPan(braket) End If

    Case 2:         'bridge is going up
        drawbridgep.RotX = drawbridgep.Rotx + 1
        DBdecal.rotx=DBdecal.rotx+1
        braket.rotx=braket.rotx+1
        If drawbridgep.RotX >= 0 Then
            DOF 104, DOFOff
            drawbridgep.RotX= 0
            DBdecal.rotx=0
            braket.rotx=0
            Door1.isdropped = 0
            BridgeRamp.collidable = 0
            Ramp22.collidable = 1
            Ramp002.collidable = 1
            BW1.isdropped = 1
            BW2.isdropped = 1
            Me.Enabled = 0
            drawBridgeIsClosed = True
            StopSound "Bridge_Move"
            PlaySound SoundFX("Bridge_Stop", 0),0, 0.1, AudioPan(braket) , 0, 0, 1, AudioPan(braket)
        End If
End Select

End Sub

lparsons commented 6 months ago

Apologies for adding to the noise here, but I'm slightly confused about the fix. Is a script update necessary, or should I use a "VPX standalone script", or is a new version of VPinMame the best fix?

Thanks to all of you for working on this. I just setup MM on my can and immediately ran into this issue. Thrilled to realize that you fine folks are already on it and have a fix. 😄

jsm174 commented 6 months ago

Fwiw, if you're using windows, there is no need to use anything in the "VPX standalone script" repo.

superblobster commented 6 months ago

Apologies for adding to the noise here, but I'm slightly confused about the fix. Is a script update necessary, or should I use a "VPX standalone script", or is a new version of VPinMame the best fix?

Thanks to all of you for working on this. I just setup MM on my can and immediately ran into this issue. Thrilled to realize that you fine folks are already on it and have a fix. 😄

Replace your table script with this one (I've done this and it works): https://github.com/Nicals/vpx-standalone-scripts/blob/f8bc117b3acc169759d529ff0c4f1baaa74b3918/1455577933_MedievalMadness_Upgrade(Real_Final)/1455577933_MedievalMadness_Upgrade(Real_Final).vbs

It's not fixed in vpinmame because evidently it's not a pinmame bug as vbousquet explained above.

WaRcLaWz commented 4 months ago

Thank you for linking me to this discussion! The modified script fixed the issue for me. :)

grantmgay commented 3 months ago

The modified script fixed the drawbridge for me, but the Castle Lock never opens. Which I assume is still a script issue, not a ROM issue.

However, the ROM seems to skip like a CD, almost like it's going to freeze, after every castle destroyed, and entering Multiball Madness. Same thing happens with both ROMs I've tried: mm_10, and mm_109c. This seems to be new behavior after upgrading pinmame.

I downloaded a fresh 109c in hopes mine was corrupt, but it still stutters.

killerrabbit33 commented 4 weeks ago

The modified script fixed the drawbridge for me, but the Castle Lock never opens. Which I assume is still a script issue, not a ROM issue.

I don't have the skipping problem, but the castle lock also doesn't work properly after the script modification (which does fix the drawbridge issue). It seems like it breaks if the ball goes through either side loop.