Banner
Views: 852,456,250
Time:
16 users online: AnEvilGhost, autisticsceptile1993,  BeeKaaaay, brickblock369, cherrybombr, deadworld2009, Ezek.The Square Remixer,  JamesD28, Lumy,  Maarfy, Mr. MS, pixelninetales, Sariel, Sokobansolver, TheJavabrew, Yoshimaster96 - Guests: 56 - Bots: 93 Users: 47,003 (2,526 active)
Latest: Audioholiker
Tip: Press F2 on the level editor to see sub-screen boundaries. This will help you avoid glitching Dragon Coins by putting them on the sub-screen boundaries.Not logged in.
uberasm for dummies
Forum Index - SMW Hacking - SMW Hacking Help - Tutorials - Old Tutorials - uberasm for dummies
Pages: « 1 2 »
"UberASM is a patch designed to be the successor of levelASM and OWASM. UberASM provides users with more hijacks and options, as well as making it easier for advanced ASMers to give users code that wouldn't work in ordinary levelASM. UberASM is designed to be fairly modular, and can be tweaked to suit the needs of the user. It is recommended to use Asar, but it is Xkas-compatible."

thats what p4 says on the description page. remove the lawyer-talk, and this is basically the definition:

"uberASM lets you easily insert ASM into your ROM. includes levelASM plus other stuff. use Asar"

note the last sentence. if you use xkas, you are a baka


to use it, patch asar_patch.asm to your rom. ignore the "hijacks" folder, you want to focus on the "code" folder; thats where your custom code goes. here's what the numerous files in the "code" folder do:

Code
gamemode_code		= basically, levelasm but with gamemodes instead of level number
			  note that this also allows you to make custom game modes.

gamemode_init_code	= basically, levelinit but with gamemodes instead of level number
			  (as in, this will run once when the gamemode first "loads")
			  also allows you to make custom game modes.

global_code		= code here will run every frame of the game, no matter what
			  (unless you break the game)

level_code		= this is levelasm. code here will run depending on the level number
			  you put the code under

level_init_code		= this is levelinit. code here will run once, when the level first
			  loads. only once. if you re-enter the level, then itll run again.

nmi_code		= code here runs during NMI. NMI is a time during rendering when you
			  are able to upload graphics, change colors onscreen safely, etc.
			  this almost always runs every frame (so its similar to global_code),
			  but you do not want to use it as global_code. NMI time is limited,
			  so you should only use it to upload stuff.

ow_code			= basically, levelasm but with submaps instead of level number

ow_init_code		= basically, levelinit but with submaps instead of level number
			  (as in, this will run once when the submap first "loads")
			  note: the main overworld counts as a submap.

statusbar_code		= this is similar to nmi_code, except this runs whenever the status
			  bar is onscreen, which means this is geared towards making changes
			  to the status bar (so, making your own counters and stuff)


there's also a sprites hijack. this does not have a file associated with it, because it works differently. it's meant to be used by custom sprites. here's how it works:

say you have a custom sprite, like some goomba that jumps. say you want to jump to some random address. the address can vary per-sprite-state or something. what you do is:

store the low byte of the address to !sprite_RAM,x
store the high byte of the address to !sprite_RAM+12,x
store the bank byte of the address to !sprite_RAM+24,x

and you're done. the hijack will jump to that address and you dont have to do anything.
(just make sure that the address ends in RTL)

!sprite_RAM is defined in asar_patch.asm as $7FAC80, but you can change it obviously

... chances are, you wont use the sprites hijack so dont worry too much about it.



I DUN WAN STATSBAR WOT

Note that you dont exactly have to patch, and therefore use, all the hijacks. in asar_patch.asm, you'll notice this near the top

;Hihack list
!level = !true
!OW = !true
!nmi = !true
!statusbar = !true
!global = !true
!sprite = !true
!gamemode = !true

set one of them to !false, and the hijack will not be enabled. simple. (just note that disabling global also disables sprite, but not vice versa)



SOM1 GIB ME CODEE WAT DO

chill bro. 90% of the time, code just goes into level_code.asm. dont worry about any of the other files (you dont even need to patch them, like i specified above). if it's a simple HDMA gradient, then it can go into level_init_code.asm.



comment if still confused.
Originally posted by Ladida
to use it, patch asar_patch.asm to your rom.


This is what has been driving me insane for weeks. It's the very thing that's keeping me from moving forward. WHAT THE FRICK DOES "PATCHING A PATCH" MEAN? THAT DOESN'T TELL ME ANYTHING!#ab{>:}

At least BTSD was far more straight forward... will somebody please walk me through how to apply a patch; and how it differs from inserting a block into a ROM? I can't move forward until I at least understand that much.
Type the name of your rom (or the path to it if it's not in the same folder), then type the name of your patch (hopefully in the same folder).
More detailed version of what the above poster said:

1: Have your ROM and the patch (duh). Their filenames can't have spaces in their name.
2: Open Asar.exe.
3: Type in the patch name (and its filepath first if it's in another folder), then type in the ROM name.
4: Hit Enter.

If it's patched successfully, then close Asar and test the ROM. If it crashes, something went wrong and you should ask for help.

EDIT: Did I really just put 'freespace' and 'Asar' in the same sentence?

--------------------
Usually inactive/procrastinating on a hack idea.
Ok, dear MonkeyMan, I advice you kindly to ignore both previous replies.
Why, because even if GloriousWater gave you some deteiled information, the fact that he tells you to open asar and set freespace is...


Anyway, for the purpose of uberASM, all you have to do is have your ROM and asar.exe in the uberASM folder (the one with the code and hijack folder in it).
Then, you just open asar and type:

asar_patch.asm <hit enter>
YOURROMNAME.smc <hit ender>
<hit enter again, after it tells you "inserted without problems">

If you want a tutorial for something, check the tutorial list first.
It links you to 4 seperate "how to patch" tutorials
1, 2, 3, 4

--------------------
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Originally posted by MonkeyMan
Originally posted by Ladida
to use it, patch asar_patch.asm to your rom.


This is what has been driving me insane for weeks. It's the very thing that's keeping me from moving forward. WHAT THE FRICK DOES "PATCHING A PATCH" MEAN? THAT DOESN'T TELL ME ANYTHING!#ab{>:}

At least BTSD was far more straight forward... will somebody please walk me through how to apply a patch; and how it differs from inserting a block into a ROM? I can't move forward until I at least understand that much.

welp there goes my dummy-proof guide

mods plz delete the thread, i have failed #smw{T_T}
Originally posted by Ladida
mods plz delete the thread, i have failed #smw{T_T}


No, don't do that. It's not your fault I don't know how to use patches. This tutorial assumes the user already knows how to use patches. Nothing wrong with that#ab{;)}


Hadron-edit: fixed quote tag
Originally posted by JackTheSpades
Anyway, for the purpose of uberASM, all you have to do is have your ROM and asar.exe in the uberASM folder (the one with the code and hijack folder in it).


Do you mean you need to have a copy of your .smc file in TWO DIFFERENT locations of your ROM directory?
depends on how you choose to organize your stuff

sample setup:

Code
\hack folder
	\code
		level_code.asm
		etc
	\ExGraphics
		etc
	\Graphics
		etc
	\hijacks
		etc
	asar.exe
	asar_patch.asm
	hackname.smc
	etc


(i actually have asar as system variable so i dont have to copy it everywhere)
Originally posted by JackTheSpades
Anyway, for the purpose of uberASM, all you have to do is have your ROM and asar.exe in the uberASM folder (the one with the code and hijack folder in it).
Then, you just open asar and type:

asar_patch.asm <hit enter>
YOURROMNAME.smc <hit ender>
<hit enter again, after it tells you "inserted without problems">


If you're using Xkas, you do this in the cmd.exe after setting free space:

Xkas.exe PATCH_TITLE.asm ROM_TITLE.smc

But how does asar work without you specifying the PATCH_TITLE.asm?
Originally posted by MonkeyMan
But how does asar work without you specifying the PATCH_TITLE.asm?

What? You type <name of patch>.asm, hit enter, then type <name of ROM>.smc.
Originally posted by MercuryPenny
Originally posted by MonkeyMan
But how does asar work without you specifying the PATCH_TITLE.asm?

What? You type <name of patch>.asm, hit enter, then type <name of ROM>.smc.


Oh, so if my patch was named Bob.asm, I would type "asar_Bob.asm"?
No, you would type "Bob.asm".
The reason for this confusion is that MercuryPenny is telling people to double click on Asar, while MonkeyMan is trying to call Asar through cmd (or a batch file or whatever, but cmd is the handler for batch files, so whatever).

With Asar, both methods work; with xkas, only cmd works. But neither of them will accept mixing the methods.

--------------------
<blm> zsnes users are the flatearthers of emulation
Originally posted by JackTheSpades
Anyway, for the purpose of uberASM, all you have to do is have your ROM and asar.exe in the uberASM folder (the one with the code and hijack folder in it).
Then, you just open asar and type:

asar_patch.asm <hit enter>
YOURROMNAME.smc <hit ender>
<hit enter again, after it tells you "inserted without problems">


That's good Jack, very good. I like! Can you give me some quick instructions like that on what to type into the cmd for inserting patches with xkas?
Back when I used xkas I just made a batch file.. here's how to do that using uberasm as the patch:
  • Open notepad.
  • Type xkas xkas_patch.asm YOURROMNAME.smc
  • Save it and under the "Save as type:" listbox change it to "All files."
  • Type applybatch.bat as the filename.
  • Double click on wherever you saved it. (Note that it must be the same place as xkas, your patch, and your ROM.


Man.. this thread is starting to look like how to use computers 101.. #ab{x_x}

e: Small error.

Give Mario some love?~
Originally posted by zkip
  • Type xkas asar_patch.asm YOURROMNAME.smc

Asar patches are not for xkas. You should type xkas xkas_patch.asm YOURROMNAME.smc if you want to use UberASM with xkas otherwise you get a error message.

--------------------
Okay, my layout looks ugly.
Originally posted by Ladida
"uberASM lets you easily insert ASM into your ROM. includes levelASM plus other stuff. use Asar"
note the last sentence. if you use xkas, you are a baka


DO NOT USE XKAS FOR UBERASM!

Why you ask?
I know there are lot's of hardcore xkas fans out there, who by all means do not want to use asar if it can be avoided.
However, THIS is not a case where you shoudl be picky about your assambler.
USE ASAR.
If you use asar, all you have to do is what I explained erlier.
If you use xkas, you have to do all the stuff zkip already told you PLUS, setting freespaces in the coresponding files and at the end you'll make a thread called:
"ROM corrupted after using uberASM".
Even funnier, you can't remove the code you inserted with xkas, whereas asar auto-replaces previously inserted code.

With that said:
USE ASAR

--------------------
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Believe me, that's what I've wanted to do all along, but I'm concerned with compatibility issues. I know that asar is much newer than old school xkas.

So can patches written with asm code (that's already designed to be inserted with xkas) be altered, so that the same asm code can be inserted with asar instead?
asar can insert xkas patches just fine.
all you have to do is add:

Code
;@xkas

in the very first line and asar will insert patches like xkas would.
Also, I don't know what you mean with "compatibility" problems.
If you mean, you don't know if it's save to use asar and xkas on the same ROM, then I don't think thats a problem.
At least I've never had any with doing that.

--------------------
Anime statistic on MyAnimeList:
400 animes completed ✓
6000 episodes completed ✓
100 Days completed ✓
... what even am I doing with my life?
Pages: « 1 2 »
Forum Index - SMW Hacking - SMW Hacking Help - Tutorials - Old Tutorials - uberasm for dummies

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

Copyright © 2005 - 2020 - 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