22 users online: Aclais,  Anorakun, ChromaTK, Cote de Boeuf, Dr. Gaspacho, Firstnamebutt, Freddyhack, Hidincuzimsmokin, JezJitzu, Joker13579, Kodak43121, marksands, MirrorReflect, pinguwahoo, rafaelfutbal,  Ringo, ShadowWolf515,  Shoujo, signature_steve, Sixcorby, yoshi3706, Zandro - Guests: 371 - Bots: 207
Users: 65,066 (2,333 active)
Latest user: ShadowWolf515

Sprite Scroll Fix

SMW Patches → Sprite Scroll Fix

Submission Details

Name: Sprite Scroll Fix
Author: HammerBrother
Version History: View
Tool: Asar
Requires Free Space: Yes
Bug Fix: Yes
Featured: No
Description: This patch fixes a bug where if you only clear out $7E1411 and/or $7E1412 and try to manually scroll the screen by incrementing or decrementing $7E1462 and/or $7E1464, sprites may fail to spawn or spawn on the side where the screen moves away from depending on how Mario is positioned to scroll the screen.
Tags: lorom needs remoderation sa-1 scroll
Comments: 7 (jump to comments)
Download 3.84 KiB | 852 downloads


Comments (7)

simon.caio Link
this patch changes me the spawning timings...
HammerBrother Author Link
This is how SMW handles spawning sprites:

This checks if Mario's X on-screen position is to the right or left of the “center” of the “static camera region” (which is $142A (2 bytes)), to determine the direction to spawn sprites.

And to load sprites onto the screen:

This patch modifies:
$00F728 to $00F72B - 4 bytes
$00F80C to $00F80F - 4 bytes
$00F713 to $00F717 - 5 bytes
$00F7F4 to $00F7F8 - 5 bytes

To detect a change of X position to determine direction. Thank goodness this works with the extended levels on LM v3+
HammerBrother Author Link
Sprites loading uses $55 to determine which side to spawn.
mjbg Link
i think it really fixed one problem i was having with a level
thank you!
HammerBrother Author Link
This is a type of bug that can only happen if you are in ASM hacking. That is why it is hard to find that bug.

I found this bug during the early development of the Mega Man scroll gates with sprites disappearing.
Von Fahrenheit Link
Moderator's note: A very... conditionally useful patch. It solves a bug I honestly didn't know existed, but if sprites despawning due to camera trickery is a problem in your hack, then this patch is for you!

Also big props to GreenHammerBro for taking the time to come up with fixes for all the little bugs in SMW.
DiscoTheBat From older version: Sprite scroll fix Link
This is some good fixing for the SMW engine. A fix is always welcome.