Banner
The Old-School Level Design Contest ends in
9 DAYS, 19 HOURS, 47 MINUTES AND 4 SECONDS
Views: 892,295,685
Time:
24 users online: AmazingChest, Big Brawler, Cheolpeoduck, chickaDEE Magazine, Copyright, cozyduck, Darkguii, DasFueller,  Eevee, h.carrell, K.T.B., lx5, Magikey, Miscalc, Mr. MS, Panicdream1, Powerbomb26, quietmason, simon.caio, SJandCharlieTheCat,  Slash Man, Spedinja, SpoodahBro,  XenonZed - Guests: 67 - Bots: 130 Users: 50,064 (2,328 active)
Latest: gratianne
Tip: Ask the author for permission before extracting any resources, such as graphics, music, or ASM from a hack or other non-public source (such as SPC files).
Not logged in.
Uberasm: Using multiple patches for the same level.
Forum Index - SMW Hacking - SMW Hacking Help - Uberasm: Using multiple patches for the same level.
Pages: « 1 » Link



So just recently, I learned about how to insert HDMA as a asm patch rather than a sprite file. That also means whatever level I want to apply any hdma patch in has to not be used. Is there a way I can use two patches in the same level? (for example, an HDMA patch and a layer 3 translucent patch)

--------------------
LinksTwitter | Discord Server | YouTube | Steam | Twitch
You just have to combine the two into one .asm file. I'm not sure there's any other way.

--------------------
pfp by sadcolor


Other solution: use the library folder.

Just stick the ASM codes you want in there. Then, make a new ASM file in the Level folder, and write it like this:

Code
init:
	JSL codeA_init
	JSL codeB_init
	; ...
	RTL

main:
	JSL codeA_main
	JSL codeB_main
	; ...
	RTL

...where codeA/codeB/etc. are the names of the ASM files you put in the library folder.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer



So I tried to insert it like this
Code
init:
	JSL HDMA-SunsetSky1.asm
	JSL autowalking.asm.asm
	RTL

main:
	JSL HDMA-SunsetSky1.asm.asm
	JSL autowalking.asm.asm
	RTL

This is wrong for sure because UberASM shows it as an error. Did I put it in right?

--------------------
LinksTwitter | Discord Server | YouTube | Steam | Twitch


Don't include the .asm, and you should still have the _init and _main.

Basically, if your file tree is set up like this:
Code
uberasm/
 ├── level/
 |    └── LevelCode.asm
 └── library/
      ├── HDMASunsetSky1.asm
      └── autowalking.asm

Then you write LevelCode.asm like this:

Code
init:
	JSL HDMASunsetSky1_init
	JSL autowalking_init
	RTL

main:
	JSL HDMASunsetSky1_main
	JSL autowalking_main
	RTL

If either of these don't actually have an "init" section, though, then remove the call to that (so if "autowalking.asm" doesn't have an init section, remove the "JSL autowalking_init" line).
(same idea in cases where they don't actually have a "main", although these two files sound like they should)

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Also remove the "-" in "HDMA-SunsetSky.asm" and all label references to it or it'll just throw invalid label name errors at you.

So just
Code
init:
	JSL HDMASunsetSky1_init
	JSL autowalking_init
	RTL

main:
	JSL HDMASunsetSky1_main
	JSL autowalking_main
	RTL

but replace the name of the file itself as well.

Quote
(same idea in cases where they don't actually have a "main", although these two files sound like they should)

Unless it's parallax or otherwise animated HDMA it usually just has an init part.



Huh. Well once again, thank you people for helping me solve another problem. Do expect me to come with more problems though because I'm an asm dummy. #smw{@_@}

--------------------
LinksTwitter | Discord Server | YouTube | Steam | Twitch
Originally posted by Thomas
Other solution: use the library folder.

Just stick the ASM codes you want in there. Then, make a new ASM file in the Level folder, and write it like this:

Code
init:
	JSL codeA_init
	JSL codeB_init
	; ...
	RTL

main:
	JSL codeA_main
	JSL codeB_main
	; ...
	RTL

...where codeA/codeB/etc. are the names of the ASM files you put in the library folder.
Code
init:
	JSL reloadRoom_init
	JSL Lightning2_init
	RTL

main:
	JSL reloadRoom1_main
	JSL Lightning21_main

	RTL



I would like to have its 2 code for level 105 but it doesn't work because file list I can only put 1 code how can I do it?
here is my list.txt

Code
; Level list. Valid values: 000-1FF.
level:
105             Lightning2.asm             
106             reloadRoom.asm                   
I have been putting some thought on this lately... I think adding some simple support for UberASM Tool doing that automatically for you would be much better. I have addressed it here and if someone would like to suggest an approach for the tool automatically doing it I would appreciate it! :D

But basically for now what you will need to do @yygdrasil is putting both Lightning2.asm and reloadRoom.asm on the library folder and save that code you have posted as "lighting_and_reloadroom.asm" and then add just that ASM file.

--------------------
GitHub - Twitter - YouTube - SnesLab Discord
Wow It worked! Thanks Thomas!
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Uberasm: Using multiple patches for the same level.

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