Sweep Unit Problem

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Sweep Unit Problem
by on (#1037)
i have a problem with sweep unit i have noticed it in Super Mario Bros.

Im Currently emulating only square1 and square2 and it seems smario uses as music for level 1 (those level that are not underground) square 1 and 2, but for level 2 (those level that are underground) use only square 2, but still uses square1 for the "jumping" effect, all this of course concerned to sweep unit.

Well, my problem is that in "underground" levels, when i jump it seems the sweep unit (sqr1) correctly change the freq. but at the end of the jump sound (when it must finish) its still changing the freq. It seems smario dont disable the sweep unit when the jump finish. I know its my emulator problem and not rom problem.

What could it be? :roll:

by on (#1041)
I don't know what the jump sound uses to stop, but if it's not by direct volume control then it could be disabled by the volume envelope, length counter, or $4015.

Could be that it's supposed to keep sweeping, just that it'd normally be silenced by that point.

by on (#1605)
If the jump sound in SMB continues even after the jump should stop, check your implementation of auto-silencing on the frequency slide unit. Remember, whenever the frequency slide direction for the sound channel is set to 0 (upward), the sound output should be halted if the next frequency slide delta would move the 11-bit frequency value above $7FF. This part of Brad Taylor's documentation must be implemented to avoid hanging sounds in SMB.

Also, when a sound channel is shut down via setting the corresponding bit low in $4015, the length counter for that sound channel must be set to zero. If this is not done, it will also result in hanging notes in SMB.

- Josh