| manipulating the layer 2 |
|
Forum Index - SMW Hacking - General SMW Hacking Help - manipulating the layer 2 |
|
Pages: 1  |
|
|
|
| Posted on 2010-06-14 11:51:39 AM |
Link | Quote |
|
Well, the title says all, how can I make the layer 2 move? Like carol
|
|
| Posted on 2010-06-14 11:57:26 AM |
Link | Quote |
|
|
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.
|
|
| Posted on 2010-06-14 03:55:05 PM |
Link | Quote |
|
|
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
|
|
| Posted on 2010-06-14 04:59:30 PM |
Link | Quote |
|
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?
|
|
| Posted on 2010-06-14 06:45:25 PM |
Link | Quote |
|
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. |
|
| Posted on 2010-06-15 01:20:47 AM |
Link | Quote |
|
|
What level uses Layer 2 in this way?
|
|
| Posted on 2010-06-15 10:09:09 AM |
Link | Quote |
|
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:
CodeREP #$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.
|
|
| Posted on 2010-06-15 12:15:54 PM |
Link | Quote |
|
|
WOW, thanks!! But can I use this code with levelASM from ersanio?
|
|
| Posted on 2010-06-15 12:46:43 PM |
Link | Quote |
|
|
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.
|
|
| Posted on 2010-06-15 03:16:22 PM |
Link | Quote |
|
|
Ok, technically it works, but the layer 2 moves ONE PIXEL!!
|
|
| Posted on 2010-06-15 03:48:09 PM |
Link | Quote |
|
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:
CodeREP #$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.
|
|
| Posted on 2010-06-15 04:19:19 PM |
Link | Quote |
|
|
Ok, it works but it doesn't run every frame! Only when level loads! I'm puting this code on level105, main!
|
|
| Posted on 2010-06-15 04:43:31 PM |
Link | Quote |
|
|
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?
|
|
| Posted on 2010-06-15 05:01:01 PM |
Link | Quote |
|
Yes, I'm sure!! Here is a screenshoot:

Did I forget anything?
|
|
| Posted on 2010-06-15 05:09:02 PM |
Link | Quote |
|
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...
|
|
| Posted on 2010-06-15 05:47:18 PM |
Link | Quote |
|
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?
|
|
| Posted on 2010-06-15 08:15:50 PM |
Link | Quote |
|
|
Umm... what bug? I'm not seeing anything going wrong...
|
|
| Posted on 2010-06-16 01:35:05 AM |
Link | Quote |
|
|
The Horizontal Scrolling.
|
|
| Posted on 2010-06-16 11:45:07 AM |
Link | Quote |
|
|
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.
|
|
| Posted on 2010-06-16 05:21:04 PM |
Link | Quote |
|
|
I DISABLE both vertical and horizontal scroll..
|
|
|
Pages: 1  |
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - manipulating the layer 2 |