11 users online: Boosius, BoozeWash, brickblock369, CourtlyHades296, gui,  icrawfish, MorrieTheMagpie, Ringo, RZRider, SheikNorris, Soul - Guests: 94 - Bots: 176
Users: 62,850 (2,635 active)
Latest user: sheeptitan

Extended Sprite Despawn Range Fix

SMW Patches → Extended Sprite Despawn Range Fix

Submission Details

Name: Extended Sprite Despawn Range Fix
Author: HammerBrother
Tool: Asar
Requires Free Space: Yes
Bug Fix: Yes
Featured: No
Description: This patch modifies the despawn handling and OAM of most of the extended sprites so that they can safely go offscreen without issues:

-They disappear if the top-left part of the 16x16 bounding box of the sprite touches the left and top edges of the screen. This is very noticeable (and annoying) with the Hammer Brother's hammer if the Hammer Brother is near the top of the screen. Plus this patch lets you modify the boundaries (or range) on where they despawn.

-Some extended sprites like the Torpedo Ted arm wraps the screen due to simply writing #$00 or #$02 to $0420 as a whole byte rather than using bitwise operations to only write on bit 1 (%000000S0).

This all the extended sprite except the unused one (extended sprite $09). I do not know what this was intended for.

This patch requires the Extended No Sprite Tile Limits v3.1 patch.
Tags: despawn extended sprites lorom sa-1
Comments: 9 (jump to comments)
Download 5.49 KiB | 234 downloads


View all

Comments (9)

Dynamite Link
For anyone using this patch with Custom Powerups, be sure to edit 1C at Line 572 to whatever tile water bubbles are mapped to, else their graphics will appear glitched in-game. The code below shows what you'll need to rewrite.

		LDA #$1C
		STA $0202|!addr,y

For me, rewriting it to 38 worked since that's the default tile Custom Powerups rewrites the water bubbles to.
Heitor Porfirio Link
Does anyone know if any patch that is installed, if using FastROM, will have to convert some addresses to work with FastROM or can install normally?

SmashNcrab Link
Ran into an issue after installing this patch where touching water tiles (Map16 tiles: 0, 1, 2, & 3) crashes the game. Not sure what could be causing this
HammerBrother Author Link
What do you mean "touching water tiles"? Can you give me an example, like what sprite touching the water tiles?
Francium Link
Originally posted by HammerBrother
What do you mean "touching water tiles"? Can you give me an example, like what sprite touching the water tiles?

It seems to be caused by a bug in the beginning of the WaterBubble: code regarding stack.
The crash can easily be seen by entering the layer 3 water on level 102.
 MarioFanGamer Link
Me neither as I never had a crashed happen during moderation. And this was with and without PIXI installed.
 MarioFanGamer Link
Moderated with:
Edit: Added proper capitalisation and lorom tag.

It's certainly a very useful patch given that extended sprites in SMW are rather weird and their despawn range doesn't help. The only issues I've noticed is that the smoke sprite is broken in Reznor fights (they don't always appear if at all) as well as how Wiggler flowers don't spawn, though the latter is because of a bug in SMW and can be easily fixed with this patch (it would be nice if you included this fix with this patch, though).
HammerBrother Author Link
Ice Man Thank you! I tested after your suggestion and now all those bugs noted are gone. Updated the patch.
Ice Man Link
I'm not sure if this is the cause to your known bugs but you forgot to convert
!RAM_ExtOAMIndex = $1869
!RAM_ExtOAMIndex = $1869|!addr
since there is no other defines for that RAM anywhere else.