Page 1 of 1

Super Mario Bros Demo Out of Sync

Posted: Thu Feb 11, 2021 3:54 pm
by fenderc01
I wasn't sure if this was an issue with accuracy in the NES core or not, so I figured I would bring it up. I couldn't find anyone else mentioning this issue...

I am on the latest NES core (NES_20210210.rbf) and running SMB (Super Mario Bros. (World) (HVC-SM).nes; CRC:393A432F).

When first booting up the game, the demo that plays gets out of sync after Mario gets the mushroom. After it returns to the title screen and runs again, the demo plays fine without getting out of sync. It seems to alternate between working correctly and not working correctly.

Has it always been like this and I've just never noticed?

Re: Super Mario Bros Demo Out of Sync

Posted: Fri Feb 12, 2021 11:22 am
by retrorepair
How do you mean "out of sync"?

Re: Super Mario Bros Demo Out of Sync

Posted: Fri Feb 12, 2021 12:18 pm
by vibes
The demo always plays out of sync, even on real hardware, for the first run. Then it plays in sync for subsequent runs.

Re: Super Mario Bros Demo Out of Sync

Posted: Fri Feb 12, 2021 2:12 pm
by lupin3rd
I think we need clarity on what "out of sync" means. For example, does audio not line up with video (e.g. Mario jumps, but sound plays early/late)? Or does out of sync mean that the demo is not starting/stopping at the same place on each run? Please provide a technical explanation of what specifically is out of sync in this instance.

Re: Super Mario Bros Demo Out of Sync

Posted: Fri Feb 12, 2021 5:03 pm
by fenderc01
Out of sync means the demo doesn't play as expected, but if what vibes says is true, then it's not an issue. I've just never noticed it before until playing it on MiSTer.
vibes wrote: Fri Feb 12, 2021 12:18 pm The demo always plays out of sync, even on real hardware, for the first run. Then it plays in sync for subsequent runs.
EDIT:
I found a couple videos to demonstrate. I know they're not from MiSTer, but they show what I'm talking about.

What I expected to see:
https://www.youtube.com/watch?v=-jOwKnzWQu0

What I see the first time:
https://www.youtube.com/watch?v=KeZCtI0XuwM

Re: Super Mario Bros Demo Out of Sync

Posted: Fri Feb 12, 2021 9:22 pm
by aberu
Watching the videos, yup this is expected and happens on original hardware.

Also the videos aren't great examples as they both appear to be from different software emulators I think. At least the first one is (it's from FCEUX, but thankfully FCEUX is highly accurate at least).

Re: Super Mario Bros Demo Out of Sync

Posted: Fri Feb 12, 2021 10:16 pm
by fenderc01
Just verified the behavior on original hardware. How did I not remember this?

Re: Super Mario Bros Demo Out of Sync

Posted: Sat Feb 13, 2021 2:29 am
by vibes
Sorry retrorepair and lupin3rd for not explaining. I was on my phone and hurried to answer the OP's question.

The OP fenderc01 put some great videos of the issue in the thread, but for an explanation in text:

Basically, Mario 1 plays a little demo on the title screen if you don't push any buttons. But due to a bug, that demo plays incorrectly the 1st time it plays (and some other times, too). When Mario gets the mushroom in the demo, the timing of the recorded controller inputs messes up, causing the rest of the demo to play out incorrectly. It's an issue that definitely happens in real hardware.

That bug was fixed in the Super Mario All-Stars version of the game, where the demo plays correctly every time.