"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:
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
!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.