Views: 993,996,264
10 users online: Construct101, dacin, Gamet2004, JezJitzu, katun24, Kusrry, radum, Rykon-V73, underway, Vic Rattlehead - Guests: 52 - Bots: 221 Users: 54,500 (2,073 active)
Latest: achilesx
Tip: There's a fine line between difficult and unfair - avoid the latter.
Not logged in.
Details for Autoscroll ($1411) + L/R Softlock Fix
SMW Patches - Autoscroll ($1411) + L/R Softlock Fix Link - Show random
File Name: Autoscroll ($1411) + L/R Softlock Fix
Authors: Telinc1
Tool: Asar
Requires Free Space: Yes
Bug Fix: Yes
Featured: No
Description: This patch fixes the bug where the game softlocks if $1411 (horizontal scrolling flag) is cleared (i.e. horizontal scrolling is disabled) while the screen is being scrolled with L/R. An infamous example of this scenario is scrolling an auto-scroll generator on screen with L/R (which is what the patch was originally made to fix).

Of course, spontaneously setting $1411 during a level can still result in a glitchy mess if the screen has to scroll (or rather, snap) too much to catch up. This is vanilla behavior and it's not what this patch intends to fix.

For the curious (technical information): This issue seems to stem from the routine at $00CDDD, which handles horizontal scrolling. One of the things it does is write $13FD (L/R scrolling flag) to $9D (sprites locked flag), then jump to another part of the routine which handles L/R scrolling if $13FD is set. If $1411 is clear, the routine will return prematurely. This usually fine, however unsetting the flag after sprites have been locked will prevent the game from updating scrolling, which will mean L/R scrolling will hang and keep sprites locked, which ends up practically softlocking the game. This was fixed by resetting L/R scrolling and unlocking sprites if they're locked, the screen is being L/R scrolled, and horizontal scrolling is disabled (all at the same time).
Tags: lorom, sa-1, screen, screen scrolling
Download: Download - 366 bytes
Tested with: Asar v1.71; SA-1 v1.32; Lunar Magic 3.04; snes9x 1.60
This patch is up to the standards and requires no remoderation.
Posted by:  Erik - | Link
Eh muito bugado
Posted by: IHATE.COM - | Link
Interesting fix, since I never use L and R I never found this bug. Good work!
Posted by: lx5 - | Link
Originally posted by GreenHammerBro
Does this unlocks $9D every frame? That could cause glitches with other ASMs that temporally locks $9D.

No, it doesn't, at least not all the time. It only unlocks $9D it if
$9D and $13FD are set and if $1411 is clear (the softlock happens when sprites are locked and L/R scroll is happening with horizontal movement turned off, the only instance I can think of where that's true is if you scroll an autoscroller on the screen with L/R).
Posted by:  Telinc1 - | Link
Does this unlocks $9D every frame? That could cause glitches with other ASMs that temporally locks $9D.
Posted by: HammerBrother - | Link

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2022 - SMW Central
Legal Information - Privacy Policy - Link To Us


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy
  • sm64romhacks