Language…
21 users online: alviiiN, brickblock369, Children's Digest 1950-2009, DetectiveZvarri, Freitasth, Green Jerry, GrenCarret, h.carrell, HammerBrother, Hammerer, JetWing34, karinou, Khastvrokg, Lumy, NikSik1, OEO6, rosysunrise_, Shizuma, some_aimless_matter, TheKazooBloccGosh, VLSkoot - Guests: 115 - Bots: 201
Users: 57,121 (2,259 active)
Latest user: Notsammyr

Optimize 1F0

SMW Patches → Optimize 1F0

Submission Details

Name: Optimize 1F0
Author: Fernap
Added:
Tool: Asar
Requires Free Space: Yes
Bug Fix: No
Featured: No
Description: This patch optimizes SMW's handling of interaction of sprites with 1F0 (in fact, all of 1D8-1FF) tiles, mitigating the chance for slowdown. This patch should be SA-1 compatible, but you're much less likely to really need to worry about it in that case.

The screenshots below are in a stock lorom without fastrom enabled, along with the CPU meter patch for a visual indication. The star on the left shows approximately how far into the frame the SNES has gotten to before SMW has finished processing for that frame.

The first shot is a baseline before any sprites have landed. The second shot is without the optimize patch (the star on the left has wrapped back to the top of the screen, indicating a significant amount of slowdown). The last shot is with this patch applied. There's no slowdown nominally, but spikes can occur when the screen is scrolling, and other factors may introduce some (like the No More Sprite Tile Limits patch, layer 2, sprite buoyancy, etc.).
Tags: lorom optimize sa-1 slowdown
Comments: 6 (jump to comments)
Download 690 bytes | 69 downloads

Screenshots

View all

Comments (6)

 Burning Loaf Link
Tested with:
* SA-1 Pack 1.40
* Asar 1.81
* Lunar Magic 3.33
* Mesen-S 0.4.0
 Fernap Author Link
Originally posted by TheKazooBloccGosh
Huh, I just found a different behavior:
I'm using this asm for a block:

[...]

makes that it teleports to the top of that block and then acts as 1F0. With the patch, the teleport behavior doesn't work anymore... (it still act as 1F0)
Could you please fix it?


Can you get me the full block (feel free to stash it in your filebin temporarily or DM me on discord if you want) and describe the setup with the sprite? Which sprite is it and how does it touch the block to get inside of it? Thanks.
TheKazooBloccGosh Link
Here is the zip file containing the asm block, the test levels: without and with the 1F0 patch to compare.
TheKazooBloccGosh Link
Huh, I just found a different behavior:
I'm using this asm for a block:

Code
; Map16: #$130 ; Very important! [1]

LDA #$F0	; \ Make this block act like block #$01F0.
STA $1693|!addr	; |
LDY #$01	; /


When a sprite on 1F0 goes inside that block, the map16 setting [1]
makes that it teleports to the top of that block and then acts as 1F0. With the patch, the teleport behavior doesn't work anymore... (it still act as 1F0)
Could you please fix it?
HammerBrother Link
I noticed this with the ground grinder (not the line-guided one) with these tiles.
anonymousbl00dlust Link
I am so glad this is finally fixed, thank you for this important contribution