Language…
18 users online: anonimzwx, codfish1002, Danik2343, DanMario24YT,  Deeke, Golden Yoshi,  Gonzales555, Heitor Porfirio, iamtheratio, imamelia, Irondill, Knight of Time, koffe190, LightAligns, ModernKiwi, MorrieTheMagpie, TheOrangeToad, xxxblackangel2208xxx - Guests: 286 - Bots: 245
Users: 64,795 (2,375 active)
Latest user: mathew

Center Scroll 3.4

SMW Patches → Center Scroll 3.4

This file is obsolete. The latest version is Center Scroll 3.5. For other versions, check the version history.

Submission Details

Name: Center Scroll 3.4
Authors: HammerBrother, Thomas
Added:
Version History: View
Tool: Asar
Requires Free Space: Yes
Bug Fix: No
Featured: No
Description: This patch reduces the width of the "static camera region" (the range where the screen doesn't scroll left or right by the player) to a single pixel, removes the auto "look ahead" feature in smw and makes the screen always centered with the player (ignoring L/R scrolling, but still has the reduced "static camera region").

Update: Added a newer version (with the old version in case you want it) that makes the screen tightly follow Mario vertically (the vertical scroll area is also reduced to a single line) when you set the vertical scroll to "vertical scroll at will". This is more ASM-flexible. See readme for details. And also allow the bottom 16x16 row to be seen (both).

Another update: Also include a non-instant-scroll to prevent player-warp glitches.

v3.2 update: Fixed a crash on vertical levels due to a hijack at $00F77B.

v3.3 fixed a missing SA-1 [|!addr] at line 324, which caused the screen shaking issue (or snapping scroll on Bsnes+) on SA-1 vertical levels when using the non-instant scroll.

v3.4 fixed a broken compatibility with LM v3.20 and v3.21.

Github: https://github.com/GhbSmwc/SMW_CenterScroll
Tags: lorom sa-1 screen scroll scrolling
Comments: 52 (jump to comments)
Download 8.05 KiB | 259 downloads

Screenshots

View all

Comments (52)

AyGaAlPa Link
There's an issue with the Reznor Boss Battle, and Ludwig Von Koopa Boss battle. Simply Mario appears in other unknow place and die, or teleport back to OW. Exist one way to fix it?
NeptuneNeon Link
is there an uberASM version of this patch? I'd like to use this but only for one level
 Kevin Link
Tested with: Lunar Magic 3.20, asar 1.71, SA-1 1.32, Snes9x 1.60. Works fine, so accepted.
This update didn't change anything in the code but fixed an issue with Lunar Magic 3.20 and 3.21 (a certain code was changed in 3.20 so an hijack has to be moved in this patch). Note that this version is not compatible with earlier versions of LM (<= 3.11). If you need it, you can grab Center Scroll 3.3 from the version history.
HammerBrother Author From older version: Center Scroll 3.3 Link
Originally posted by Hayashi Neru
This patch causes problems when used on Lunar Magic 3.2X version.


While the game doesn't necessarily crash, upon testing, my knowledge so far:
-The scroll line position is off.

It appears that FuSoYa have moved the code that initializes the BG position and scroll line.

EDIT: issue is fixed. See release here.
Hayashi Neru From older version: Center Scroll 3.3 Link
This patch causes problems when used on Lunar Magic 3.2X version.
AuraDee From older version: Center Scroll 3.3 Link
Tested with Asar v1.71, BSNES v112, LM 3.11, SA-1 v1.32. Works as intended, accepted.
HammerBrother Author From older version: Center Scroll 3.1 Link
Originally posted by Wolfguy423
all i want is an easy to use file that fixes the broken screen scroll. i have no idea how to write code or write patches or any of that stuff at all.


Use this tool, drag the file onto the console window (after opening asar.exe), and hit ENTER, then do the same with the ROM, then enter.

Note: due to a discovered bug someone reported, this version crashes on vertical levels. Consider using this one instead.
Wolfguy423 From older version: Center Scroll 3.1 Link
all i want is an easy to use file that fixes the broken screen scroll. i have no idea how to write code or write patches or any of that stuff at all.
Wolfguy423 From older version: Center Scroll 3.1 Link
Originally posted by HammerBrother

Uh, it's a patch, not an uberasm code. You only use uberasm to write your own code that sets the scroll lines position.[/quote


i have to write my own code to get this to work?

Tag (div) was not closed.
Tag (div) was not closed.
Wolfguy423 From older version: Center Scroll 3.1 Link
OK how do i use it...? having to learn everything the hard way cuz everyone thinks this stuff is no brainer.
HammerBrother Author From older version: Center Scroll 3.1 Link
Originally posted by Wolfguy423
so i got this error when applying this asm:
CenterScroll.asm: error: Missing load/init/main/nmi label.


Uh, it's a patch, not an uberasm code. You only use uberasm to write your own code that sets the scroll lines position.
Wolfguy423 From older version: Center Scroll 3.1 Link
so i got this error when applying this asm:
CenterScroll.asm: error: Missing load/init/main/nmi label.
HammerBrother Author From older version: Center Scroll 3.1 Link
Originally posted by tjb0607
This seems to cause crashing on vertical levels. Tried with lunar magic versions 3.00 and 3.11 on a fresh rom.


It seems a new hijack appeared on $00F77B.
tjb0607 From older version: Center Scroll 3.1 Link
This seems to cause crashing on vertical levels. Tried with lunar magic versions 3.00 and 3.11 on a fresh rom.
Madeline From older version: Center Scroll 3.1 Link
Originally posted by GreenHammerBro
Originally posted by Madeline
Having an issue with the camera violently shaking after applying the patch. I set it up just as directed.


What define setting are you using?


Actually, I got it working not long after I commented.
HammerBrother Author From older version: Center Scroll 3.1 Link
Originally posted by Madeline
Having an issue with the camera violently shaking after applying the patch. I set it up just as directed.


What define setting are you using?
Madeline From older version: Center Scroll 3.1 Link
Having an issue with the camera violently shaking after applying the patch. I set it up just as directed.
Kazzzy From older version: Center Scroll 3.1 Link
Very nice patch. ∑:) Would love to see an UberASM version!!
HammerBrother Author From older version: Center Scroll 3.1 Link
Originally posted by TheLucraftTeam
i got this error:
centerscroll.asm:84: error: (E5158): Assertion failed: Hijack for Horizontal Scroll Fix from Lunar Magic not detected! [assert read1($009708) == $22,"Hijack for Horizontal Scroll Fix from Lunar Magic not detected!"]
please help


This patch modifies LM code due to LM hijack relating to scrolling the screen to load layer 1 tiles as well as level loading to make sure the static cam region is centered properly.

Make sure you're using LM v3.03 or higher. As the code jumped from $009708 have been changed.
TheLucraftTeam From older version: Center Scroll 3.1 Link
i got this error:
centerscroll.asm:84: error: (E5158): Assertion failed: Hijack for Horizontal Scroll Fix from Lunar Magic not detected! [assert read1($009708) == $22,"Hijack for Horizontal Scroll Fix from Lunar Magic not detected!"]
please help
I don't know a good name. From older version: Center Scroll 3.1 Link
Is this customisable to make the region >1 pixel?
chineesmw From older version: Center Scroll 3.1 Link
Crashes 8MB SA-1 ROM
AuraDee From older version: Center Scroll 3.1 Link
Tested with:
Asar v1.71, Lunar Magic v3.02 (checking if it still works with the previous), Lunar Magic v3.03, SA-1 Pack v1.31, Snes9x v1.55

Works without issue.
HammerBrother Author From older version: Center Scroll 3.1 Link
Fixed a crashing issue that LM 3.03 changed the freespace code that jumped from $009708.
HammerBrother Author From older version: Center Scroll 3.0 Link
@Daizo Dee Von and Flat5Games

What version of Asar are you using? I never experienced issues.
Daizo Dee Von From older version: Center Scroll 3.0 Link
I'm getting the same error as well.
Flat5Games From older version: Center Scroll 3.0 Link
I am getting this error when trying to add patch:

centerscroll.asm:120: error: Unknown function. [if and(equal(0,0),notequal(0,0))]

Any idea why this is happening?
 Major Flare From older version: Center Scroll 3.0 Link
Worked fine with LM 3.01. Since in my tests I could not detect any bugs enough to warrant a removal, I'll accept this one.
TheLucraftTeam From older version: Center Scroll 2.2 Link
how about a parallax scrolling
Luxuriosa From older version: Center Scroll 2.2 Link
CenterScrollAdvanced.asm:47: error: Assertion failed: Save at least one level in lunar magic! [assert read1($00F6E4) == $5C,"Save at least one level in lunar magic!"]
CenterScrollAdvanced.asm:70: error: SNES address $8D000C doesn't map to ROM [nop #6]

? I have saved a level in lunar magic and have free ram in that area... Any help?
hash From older version: Center Scroll 2.2 Link
Can this patch be used on a per-level basis? Perhaps with UberASM? I have a level that requires vertical scroll at will, and with vanilla camera effects works great, but with this patch because the camera follows mario, some sprites get despawned when they go off screen.

EDIT: Or perhaps if possible have the effects of this patch be incorporated into a block that activates the centered camera for the duration of the level, then reverts back when the level finishes or when a 'revert camera' block is touched.
ExE Boss From older version: Center Scroll 2.2 Link
Edit 2: Scratch all that, you just need to put this in the code:
Code
org $05D708+4+2
	db $D0			;>Update lowest Layer 2 Y position on loading levels


In the bit inside the InitScrollPos label, the DEC instruction has to be replaced with the instruction to increment the accumulator by $0F instead, this is most noticeable when using Layer 2 V-Scroll: Constant.

I tried to use
Code
CLC
ADC #$0F

but it just didn’t work for some odd reason, whereas 15 INC instructions did.

Edit: This only has to be done when BG v-scroll start is C0, because the equivalent FG v-scroll is CF.
 Erik From older version: Center Scroll 2.2 Link
A lot of unoptimized code:
- You don't need to switch the data bank in the Advanced version, it'll be faster to do LDA.l label,x since you're only accessing one table in total.
- You don't need PHP/PLP in such small code range. Not only that, the code that requires the original processor flags is restored right at the before you even push.

Fun fact: readmes are supposed to be user friendly, not a wall of unrelated text that average user: a) Doesn't understand; b) Doesn't care about. If the moderator, which knows about these things, has problems understanding what it goes on about, don't you think it's a good indication to start either shortening them or at least including a separate quick guide?

But neither of those I ound removal worthy, and it works, so approved. I don't really like this kind of scrolling personally but some do.
HammerBrother Author From older version: Center Scroll 2.2 Link
Fixed the issue with layer 2 initial Y position when using constant Y scroll + both layer 1 and 2 at the lowest.
IronFoxGaming From older version: Center Scroll 2.1 Link
It's a lot like the Super Mario Land 2 camera. Nice.
HammerBrother Author From older version: Center Scroll 2.1 Link
Thanks!
DiscoTheBat From older version: Center Scroll 2.1 Link
A nice patch that changes how the camera works, it could allow for a different gameplay style. Good work!
Epic_Manky From older version: Center Scroll Link
It works perfectly, but it completely screws up MarioE's Wall Kick patch. That's not your fault, I'm just pointing it out.
HammerBrother Author From older version: Center Scroll Link
Hijack address note:
$00CDF6 to $00CE76, 00F72C to $00F758, $00F789 to $00F79B, and $00F810 to $00F8AA/$00F814 are skipped.
DiscoTheBat From older version: Center Scroll Link
It is a really good patch for certain gimmicks and game styles. To fix certain scroll issues, you need to download and use both Horizontal Scroll Fix and Vertical Scroll Fix. This issue isn't caused by the patch but by SMW engine itself.
HammerBrother Author From older version: Center Scroll Link
How does that happen, is it because it's past the last screen in the level?
DiscoTheBat From older version: Center Scroll Link
This patch does have a minor flaw that can be easily corrected, if you are at the sides of the screen, garbage tiles appear, to fix that, look and download Horizontal Scroll Fix.
HammerBrother Author From older version: Center Scroll Link
wait, you mean that the code AFTER jumping from $00F6E4 is not always in a fixed location? Dang it! Also, does gfx+2 patch happens if you use BG2 and BG3 after inserting exgfx?
Alcaro From older version: Center Scroll Link
This patch requires the gfx+2 patch to be installed at a very specific location. By default, the patch is inserted exactly there, but I suspect it's not if the ROM is expanded to 4MB.

Either way, fix your nonsensical requirements, GHB. Use assert read1($00F6E4) == $5C and org read3($00F6E5).

And double check the SA-1 support, you missed the assert there and I suspect you may have missed more.
Luigi_master1 From older version: Center Scroll Link
I am having the same problem as Mindevous. It will not work. I think it is the patch, not the actual rom.
Zeelef From older version: Center Scroll Link
Very useful for levels with walljumps !

Tip : With my ROM expanded to 2MB i had a message : Address out of bounds. So i expanded my ROM to 3MB and it worked perfectly :)

@Kaisaan it works only with "Vertical Scroll at Will" ;)
HammerBrother Author From older version: Center Scroll Link
@Mindevous

Did you save at least 1 level in LM?
 Aram From older version: Center Scroll Link
I get this error, and I don't know what I'm doing wrong:

Quote
Asar 1.36, by Alcaro
Enter patch name: CenterScroll.asm
Enter ROM name: ROM.smc
CenterScroll.asm:30: error: Assertion failed: Two possible problems: Save at least one level in lunar magic, or your rom is in a different format. [assert read4($00F6E4) == $1FB1A05C,"Two possible problems: Save at least one level in lunar magic, or your rom is in a different format."]
Errors were detected while assembling the patch. Assembling aborted. Your ROM has not been modified.
Press any key to continue . . .
JackTheSpades From older version: Center Scroll Link
Frankly, I have no idea what to use this for other than when in desperate need of 4 additional bytes of free RAM.
But whatever, good job I guess.
HammerBrother Author From older version: Center Scroll Link
It should still work, all it does is move the two scroll lines so that they are merged into 1 pixel.
Kaisaan From older version: Center Scroll Link
What if vertical scroll and/or horizontal scrolling is disabled for a level?