We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

UberASM Tool

From SnesLab
Revision as of 07:38, 28 April 2023 by Jeffythedragonslayer (talk | contribs) (→‎Features: linkify SA-1)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

UberASM Tool is a tool made for inserting custom ASM code on levels, overworld, game modes, status bar and global without needing a patch. Originally inspired on edit1754's LevelASM Tool, p4plus2's uberASM patch and Akaginite's levelASM tool plus also has a few ideas from p4plus2's GPS block inserter tool and Romi's Sprite Tool.

The tool targets both easy insertion and robust ASM condition, ideal from beginners to advanced users interested in inserting ASM snippets for Super Mario World. Although the tool currently only support the classic Mario game for SNES, there's plans for expanding it to other games.

Features

  • Level ASM (INIT/MAIN/NMI/LOAD)
  • Overworld ASM (INIT/MAIN/NMI/LOAD)
  • Game mode ASM (INIT/MAIN/NMI)
  • Global code ASM (INIT/MAIN/NMI)
  • Status bar code (MAIN)
  • Shared library with binary support
  • Macro and defines library
  • Automatic multiple banks support
  • Automatic patching and cleaning
  • Native SA-1 support
  • Friendly list with various settings
  • LM Restore System signature
  • Easily editable source code.

How it works

UberASM Tool works by inserting hooks on the game engine on the most common spots, which people used to frequently edit to insert their own ASM patches. Because there was no control over them, most of the time it caused memory conflicts, either by modifying the same game spot or close spots, being it a risk for crashing the game or triggering undefined behavior. With the popularization of simple code snippets for inserting local game gimmicks or visual effects per level-basis, the LevelASM patch was created by BMF54123 for allowing to custom code get inserted without having to the coder having to insert his own hook. They are also called labels, since you declare them using labels on the .asm file.

The basic hooks inserted on the game are the following:

  • INIT - runs whenever a certain game mode is initializing. Useful for initializing variables or running run-once codes.
  • MAIN - runs every frame when a certain game mode is active. Useful for monitoring and real-time codes.
  • NMI - runs during the V-Blank period. Useful for visual update codes, which includes PPU and VRAM updates.
  • LOAD - exclusive for level modes, it runs before the INIT label and before the level gets loaded, useful for setting up level flags and conditional Map16 on SMW.
  • LOADED - runs when loading was finished.
  • DONE - runs when a frame is done.