Banner
Views: 235,864,920
Time: 2013-05-19 08:07:24 AM
18 users online: Counterfeit, Damned, o Doopy Buckride, DrkSephy, EddyCartoon, everest700, Kazeshin, levelengine, o RPG Hacker, ShUriK KiD, o Tahixham, Torchkas, o Undy, WeegeeBen, WhiteYoshiEgg, Wiimeiser, X-cniS, yoshiguy978 - Guests: 29 - Bots: 15Users: 22,840 (1,289 active)
Latest: neagix
Tip: Avoid "item babysitting". Do not force the player to drag P-Switches or springboards all around the level. This is not fun, nor does it make for interesting "puzzles".
manipulating the layer 2
Forum Index - SMW Hacking - General SMW Hacking Help - manipulating the layer 2
Pages: « 1 »
Well, the title says all, how can I make the layer 2 move? Like carol :D
To make layer 2 move, Go into Special Commands and Genarators then go near the bottom. There are a whole bunch of Layer 2 moving things. Select one and place it at the top of the level, then test it. Keep messing around until you found one you like.
Ok, I think I created this topic in the wrong area .. I need a code that handles the layer 2 as well as Carol does. I'm sure that the manipulations that carol is in layer 2 are not the same as SMW. Carol uses ASM. I was wondering THIS ASM code, you know? Sorry for the mistakes in grammar .. I used google translator to translate
Trust me, Google Translate is not what you want to use...

Also, we don't know what sort of Layer 2 manipulation you want to use. Carol use Layer 2 a ton, so what exactly do you want?
I need the code that "moves" the layer 2, the X and Y speed I can change. I have tried some RAMs but they don't work

$7E:001E 2 bytes Hardware mirror Layer 2 X position. Mirror of $210F.
$7E:0020 2 bytes Hardware mirror Layer 2 Y position. Mirror of $2110.

(I don't try these mirror RAMs)

$7E:1466 2 bytes Misc. Layer 2 X position(level)

I use this code for move the layer 2

INC $SomeLayer2Ram

Is this correct? If not, what's the code?

Once again, sorry by the grammar errors, I haven't used google translator but I'm brazilian...

Last edited on 2010-06-14 06:45:50 PM by undefinied3.
What level uses Layer 2 in this way?
Yes, you have the right idea, you do want to manipulate those RAM addresses, although, there are a couple of snags:

-You have to be in 16-bit mode in order to properly manipulate those addresses.
-Incrementing the Y-position for anything will cause it to, counter-intuitively, go down.

So here would be some valid code to make layer 2 move up and to the right each frame:

Code
REP #$20 INC $1E DEC $20 SEP #$20


Also, there is no value for the 'speed' of layer 2. You could use a sprite to do that, but that's rather complicated for Basic SMW hacking.
WOW, thanks!! But can I use this code with levelASM from ersanio?
Sure, you can use it from pretty much anywhere as long as the direct page hasn't been changed, but nobody ever does that, ever.
Ok, technically it works, but the layer 2 moves ONE PIXEL!!
Uh... yeah, it'll only move one pixel per frame...

If you want it to do more than that, you'll want to do this:

Code
REP #$20 LDA $1E CLC ADC #$0005 STA $1E LDA $20 SEC SBC #$0005 STA $20 SEP #$20


This, when run every frame, will move layer 2 five pixels up and five pixels to the right each frame.
Ok, it works but it doesn't run every frame! Only when level loads! I'm puting this code on level105, main!
Are you sure you put it in main? All your symptoms point straight at the fact that you stuck it in init instead. Could you re-check your files just in case?
Yes, I'm sure!! Here is a screenshoot:



Did I forget anything?
Um... wow. I'm not sure what's going on...

Maybe you could try changing $1E with $1466 and $20 with $1468? If that doesn't work, then I'm totally stumped...
Doesn't work... BUT... I DO IT!!! BUUTT... there's a bug.. See the video:

<object style="height: 344px; width: 425px"><param name="movie" value="http://www.youtube.com/v/b9M-t6H0iDU"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/b9M-t6H0iDU" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></object>


I use these RAMs:

$7E:1462 2 bytes Misc. Layer 1 X position (level) (16-bit)
$7E:1464 2 bytes Misc. Layer 1 Y position (level) (16-bit)

I just change the RAMs from your code.. How can I fix that?

Umm... what bug? I'm not seeing anything going wrong...
The Horizontal Scrolling.
Try editing the horizant scroll settings with the fish or lakitu button (can't remember) in LM in the desired level. Play around until it works.
I DISABLE both vertical and horizontal scroll..
Pages: « 1 »
Forum Index - SMW Hacking - General SMW Hacking Help - manipulating the layer 2

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

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 29

Menu