Banner
The Overworld Design Contest ends in
8 DAYS, 7 HOURS, 14 MINUTES AND 46 SECONDS
Views: 905,186,603
Time:
18 users online:  AmperSam,  Anorakun, catboyjeremie, DanielFMonteiro, edgar, Galactic Spear, gohkeen, Hwailaluta, Jead, JonnyManjiro, mmBeefStew, NerDose, pakkie, qantuum, SkyeLondon18,  Teows, TheBiob, Tio Ruffles - Guests: 66 - Bots: 139 Users: 50,746 (2,085 active)
Latest: RayOrSomething
Tip: Use ledge tiles (Act as: 100) before and after slopes. Using solid tiles (Act as 130) makes Mario lose speed while running on the slope.”
Not logged in.
Level ASM code help.
Forum Index - SMW Hacking - SMW Hacking Help - Level ASM code help.
Pages: « 1 » Link
How to insert this code:?
LDA $7FFFCC
BEQ MAIN
RETURN RTL
MAIN LDA $1F32
AND #$40
BEQ RETURN
LDA #$01
STA $7FFFCC

LDA #$60
STA $9A
LDA #$00
STA $9B
LDA #$10
STA $98
LDA #$01
STA $99
PHP
REP #$30
LDA.W #$0A22
STA $03
JSL $2E8DF0
PLP

LDA #$20
STA $98
PHP
REP #$30
LDA.W #$0A44
STA $03
JSL $2E8DF0
PLP

LDA #$30
STA $98
PHP
REP #$30
LDA.W #$0A54
STA $03
JSL $2E8DF0
PLP

LDA #$40
STA $98
PHP
REP #$30
LDA.W #$0BA3
STA $03
JSL $2E8DF0
PLP

LDA #$70
STA $9A
PHP
REP #$30
LDA.W #$0A22
STA $03
JSL $2E8DF0
PLP

LDA #$20
STA $98
PHP
REP #$30
LDA.W #$0A4B
STA $03
JSL $2E8DF0
PLP

LDA #$30
STA $98
PHP
REP #$30
LDA.W #$0A5B
STA $03
JSL $2E8DF0
PLP

LDA #$40
STA $98
PHP
REP #$30
LDA.W #$0BB9
STA $03
JSL $2E8DF0
PLP

RTL
This is for Brutal mario sprite but i don't know how to insert this.
LevelASM is pretty straightforward. Do note that not all codes will work. The actual code for the levels goes into one of two files: Levelcode.asm or Levelinitcode.asm. You go to levelcode.asm if you want the code to run for the entire level. Go to levelinitcode.asm if you want the code to only run once the level starts. Scroll down to a level and insert the code. Take levelcode.asm for instance:

level105:
(code)
RTS

After you're done, insert level.asm and nothing else. That should be everything. Just make sure you set up some freespace.

--------------------
Edit: My postcount went up by 1!
This not works.
Change all instances of RTL to RTS . It also JSL's to something in $2E8DF0 which you probably don't have (unless you do have what it needs to JSL there)

But wait, you said this was part of a sprite's code. than why did you take that part out. it needs to be in the sprite.
I change my layout every 4-5 months
with the code your trying to insert being a sprite, you should need sprite tool and the rest of the sprites files instead of just the code.
The sprite activate if layer2 is some scroll up.
levelASM assembles with xkas, convert the code to xkas (using 1024's ASM converter) before pasting it in the level's code otherwise it won't assemble properly.

Also, I'm pretty sure you will have to insert some blocks and sprites for it too, I'm not sure what $7FFFCC is or what routine $$2E8DF is but the code uses them so it looks like it's required.
This not works in level or levelinitcode files.
Having that file that you have, Luigi, I can tell you that it's never that easy. There seem to be some undocumented patches in BM, especially mirrors for important visual functions. Blocks are not properly associated with the LevelASM. Without intimate knowledge of how BM is organized you're basically looking at code that can tell you HOW, but never really be inserted. It's a lot more work than just inserting things. It's the RIGHT things in the RIGHT places in the RIGHT order. No thanks! :(
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Level ASM code help.

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

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks