- What is UberASM?
- UberASM Tool is the latest incarnation of the old LevelASM patch. It allows for the insertion of special code that runs on specific levels or with specific timing, i.e. running constantly during
Level
106
only, once during any level load, while on the overworld, just before the title screen, etc. - How do I make an UberASM code run during every level?
- UberASMTool can make code run during different game modes and loading a resource during game mode 14 will run it in every level. To do this use the gamemode: portion of UberASMTool's list.txt. Add your resource to the lines there for game mode 14, for example: "14 MyResource.asm" (ensuring this .asm file is in the gamemode folder).
- Can I make multiple UberASM codes run at the same time?
- Yes, this is supported by a "library" feature in UberASMTool. Say you want to merge two level ASM files: fileA.asm and fileB.asm and the contents of each of these files might look a bit like this:
Code; fileA.asm ; fileB.asm init: init: ;code 1 ;code 3 main: main: ;code 2 ;code 4 nmi: ;code 5
Note the presence of the "init", "main", and "nmi" labels in each file (you may also see a "load" label in some other resources). Not all UberASM codes will contain all four of these (as seen here, fileB contains the "nmi" label while fileA does not), but it's important you pay attention to which of the four are actually included in each file.
Next, make a new .asm file, its name is unimportant but for our example we'll call it combinedFile.asm. This new file should contain the following:
Codemacro call_library(i) PHB LDA.b #<i>>>16 PHA PLB JSL <i> PLB endmacro init: %call_library(fileA_init) %call_library(fileB_init) RTL main: %call_library(fileA_main) %call_library(fileB_main) RTL nmi: JSL fileB_nmi RTL
The first part of this combined file is a macro to ensure UberASMTool puts a given resource into the appropriate bank without causing issues. This is not needed in most situations but it is included to make sure there are no problems. (Note: it is not needed for nmi code).
Next, for each of those four labels outline earlier in each resource, we add a reference to that label preceded by the file name of the resource and an underscore. Only do this for the labels that actually exist; note that there is no reference to a "fileA_nmi" label, since that does not exist.
Now, place this combinedFile.asm file in the level folder, and place both fileA.asm and fileB.asm in the library folder of UberASMTool. Next, configure list.txt to insert combinedFile.asm in the level of your choice (for example: "105 combinedFile.asm" will insert it into level 105) and, then run UberASMTool. All codes 1-5 will now execute as needed in your level.
This same library process works for all other categories of code (Game Mode, Overworld, etc.) and can call several files at once. Files can also be called across multiple combined files. - Why does Mario go crazy when I enter Yoshi's Island 1?
- By default UberASM Tool includes test code that deliberately increments Mario's power-up state in
Level
105
. Simply remove the call to this code from list.txt. You may freely delete test.asm and test2.asm in the level folder, the tool doesn't use them for anything.
Frequently Asked Questions
Don't worry, we all need to start somewhere—if you're a beginner and still need to find your way around, chances are the F.A.Q. will answer a lot of the questions you may have. Before asking in the forums, it's wise to check this page first!
If you have suggestions for the F.A.Q., feel free to contact a staff member.
UberASM
- Main
SMW Hacking
- Getting Started
- Level Editing
- Level Entrances and Exits
- Map16
- Overworld Editing
- Title Screen/Credits
- Graphics
- Music
- Patches
- Sprites
- Blocks
- UberASM
- Backups and Transferring Data
- Errors
- Technical Fixes and Helpful Tips
YI Hacking
- Getting Started
- Level Entrances and Exits
- Graphics
- Text Editing
- Sprite/Item Memory
- Sprite Issues
- ROM/RAM Maps
- Errors and Technical Fixes
- Other Resources
General ROM Hacking
- ASM
- Emulators and ROMs
- Hex
- BPS Files
SMW Central
- Forums
- Discord
- Layouts and Profiles
- Submissions
- User Accounts
- Ban Appeals
- Social Media
- Miscellaneous
- Glossary!