2021-07-11 08:46:50 PM | Last edited 2021-09-13 04:26:48 PM by KevinM
(you can also check the GitHub repository
tl;dr this is a rewrite of
's Retry patch in (mostly) UberASM form, which aims at making the patch more compatible with other resources as well as adding additional features.
I've released this during C3, but I'll put it here as well so people can find it more easily (at least until I submit it). I'll also post changes and whatnot. Feel free to use this thread to report feedback, bugs, etc.
v0.2.7: fixed a bug that could cause some sprites on screen to disappear on rare occasions while the prompt was active.
v0.2.6: fixed a bug in layer 2 levels and made infinite lives a sublevel-dependent setting.
v0.2.5: added support for ObjecTool's Custom Normal Objects alongside Retry's custom midway bars.
v0.2.4: Fixed bug that would prevent the Game Over music from playing, fixed a compatibility issue with the VWF Dialogues patch and optimized the NMI routine a bit.
v0.2.3: Fixed a rare issue that could happen with LM v3.0+ and implemented some speed optimizations to the code.
v0.2.2: Added an option to replace "Mario" with "DEATHS" in the status bar, like the standalone Death Counter patch. Also fixed an issue that caused the level's music to restart when custom codes called $00F606 in consecutive frames.
v0.2.1: Fixed a bug that caused the prompt's sound effects to not play. v0.2: C3 release.
Here's the copy-paste of the C3 thread, with a more detailed explanation (thanks
for sending the source to me
C3 thread: Show/Hide
Most of you are probably familiar with the
, you know, the one used in every Kaizo hack to not make you waste years of your life waiting to restart a level? Well, a few months ago I had a thought: how hard would it be to remake it, but using UberASM instead? As it turns out, fairly hard but possible.
So, my design goals with this project were the following:
Use as few hijacks as possible: these are usually what makes a patch incompatible with other resources, which is fairly common in case of Retry.
Include all the features from all Retry versions (official, KLDC baserom version,
's version, my KLDC version) and add more. Players/hackers who are already familiar with those should feel like it's mostly the same patch, but with a new dress. dtothefourth Make the code less intimidating to understand and edit.
A summary of the features included from the original/modified Retry patch:
Compatible with LoROM as well as SA-1. It should also be compatible with already existing resources that were made to be compatible with Retry (for example, Individual DC Save patch).
Different death options: instant respawn, "retry/exit" prompt respawn, vanilla death sequence, that can be changed on a sublevel basis.
Counterbreak options: reset powerup, Yoshi, coins, etc. on death and on overworld load, useful for Kaizo hacks or collabs.
Infinite lives option. A must-have for Kaizo hacks.
Multiple midways system: ability to have more than one midway per level/sublevel. Each sublevel's entrance can be set as a checkpoint, or you can use the custom midway object to have as many midways as you want.
(the more custom midways you have, the more RAM needed, by default it's 8 per sublevel) SRAM expansion feature: Retry will save its checkpoints to SRAM, and you can use this to save your own stuff as well (as an alternative to the SRAM/BW-RAM Plus patch).
Retry Prompt customization: you can customize the prompt by removing the "Exit" option, or the black box, or move it around. Useful to let the player see what's on the screen without obstructing their view.
Compatible with a lot more resources than before, thanks to the reduced amount of hijacks (14 instead of 40+). Important mentions are: message box patches (for example Message Box Expansion), death routine patches (idk, haven't tried any lol), start+select patches (Start+Select Advanced), NMI patches (although lx5 mostly solved that issue in 2.06b), and more (Easy Mode 7 patch comes to mind).
The SRAM expansion patch is SA-1 compatible as well (saves to BWRAM instead of SRAM, of course). No need to use BW-RAM Plus to save Retry's checkpoints anymore! Also, similarly to SRAM/BW-RAM Plus, it uses a "defaults" table to initialize the SRAM on new file load with the values you want (original Retry just resets everything to 0 instead).
Some of the global options can be controlled with RAM addresses. For example, you can turn on/off the prompt "Exit" option or black box with it, or change the prompt position, or change from instant respawn to prompt on the fly. This can be useful for collabs (maybe someone wants the default prompt, while someone else wants the unobtrusive version) or to let the player choose which respawn option they want (with some in-game menu or something).
Made the "reset RNG" option sublevel dependent. Original Retry always resets the RNG, so you can have consistent behaviors when respawning, but sometimes this can be undesirable (for example, in bosses). Now you can set some sublevels to not have the RNG reset.
Added a table to turn on SFX echo on a sublevel basis. This was ported over from the KLDC baserom Retry.
New options to make respawning even faster. One lets you have the prompt but skip the "Mario jumps up" phase of the death animation, making the prompt appear instantly. The other largely decreases the time the level takes to fadein/fadeout, saving 1-2 seconds for each death.
Added a death counter. Since Retry mostly involves around dying, it made sense to integrate the death counter patch into it. You can optionally display it on the status bar or on the Overworld border.
Easy to integrate Retry's multiple checkpoint system with custom midway blocks/sprites. There's a specific address you can use to set a checkpoint for the current level, and optionally to set which entrance the checkpoint will redirect to (similarly to Retry's custom midway object).
Added a SFX when getting a checkpoint on room entrance. This is useful to let the player know they just got an "invisible" checkpoint. You can turn this off if undesired.
Added a "save the game when getting a checkpoint" option, similarly to hacks like
Not Dracula's Castle. Be wary of not softlocking a player's save file, though : ) (make sure all levels are beatable from any checkpoint). Added a bunch of more "extra" routines that run in specific moments of the game, useful for coders. Besides the ones from OG Retry (one called when dying and one when respawning), there's also routines called when loading/saving the game, one when getting a normal checkpoint and a room checkpoint, and one called at the very end of gamemode 14 (just before music code runs).
Some bugs from the original Retry that have been fixed:
Sprites will behave consistently when respawning in a level with a pipe entrance. In vanilla, during a pipe entrance sprites won't move if you came from a pipe, while they will move if you came from a door. OG Retry made this inconsistent on respawn, making sprites always move in either case.
Sprites won't disappear when the Retry prompt shows up. This was often noticeable when dying while a bounce block sprite was spawned.
When using SA-1 or PIXI's 255 sprites per level feature, their sprite index table will be reset properly when using more than 128 in a level (OG Retry only reset the first 128 entries).
Other QOL additions:
It's now easy to change which tiles in SP1/2 the prompt will use. Before you had to edit a few tables that used different formats, and also change some values in the code itself so it was kind of a pain. Now you just need to edit some defines. This is useful if you have other resources that dynamically upload tiles in SP1/2 (e.g. 32x32 tilemap patch, sprite status bar, etc.). Also, the prompt will use less space in the GFX file, since it uses (almost) exclusively 8x8 OAM tiles instead of 16x16. This is especially true if disabling the "Exit" option or the black box: with both disabled, only 5 tiles will be used.
The code is split in multiple modules and (mostly) commented, to make understanding it and editing it friendlier. No more scouring around a single huge file trying to find what you need. Also Retry's RAM now uses sane naming (for example, !ram_is_respawning rather than !freeram+5).
At first setting it up might seem hard, mostly because there's a lot of files to insert with UberASM. The "how_to_insert" file guides you through it, and after the initial setup, using it is as simple as just editing the settings you want and running UberASM Tool (note that the hijacks are applied automatically when running the tool). If you need to remove it from your ROM, simply delete the files from the UberASM folder and list.txt, run the tool, then patch the included "retry_unpatch" file with Asar.
This is an early C3 release, although all the features that I planned to add are implemented. Only things missing right now are:
Finish the documentation: some things are missing, most notably the "ObjecTool integration" doc, and also currently the docs are all over the place. I plan on writing a proper readme and organizing everything better.
Check for compatibility with some resources like the latest SA-1 v1.40 (should work fine, I just haven't checked yet), lx5's Custom Powerups,
lx5's DSS (it should work fine with the instant respawn option, while the prompt probably breaks. I may try to make them work together at some point) [turns out the Retry prompt already works fine with DSS, you just need to change the tile numbers in settings.asm to avoid overlaps], No Overworld UberASM, Co-Op patch for Retry, etc. Fix any bugs that might come up in the meantime. Speaking of, if you think you found a bug, let me know here or by DMs.
I need to mention a few special people who helped a lot:
: while not directly helping me, he made the original Retry patch, without which I couldn't have made this. worldpeace
: for providing integration with many resources to OG Retry 2.06b, and also for the BW-RAM Plus patch. lx5 which I stole the code from
, Abdu , BabaYegha and FYRE150 : for beta testing the patch, reporting and providing feedback and suggestions. margot Screenshots
I wanted to make a single showcase video, but it proved to require too much processing power for my potato pc. So here's some gifs instead:
2021-07-14 01:06:26 PM
Small update (v0.2.2): added an option to replace "Mario" with "DEATHS" in the status bar. Made sense to add since the standalone Death Counter patch does this too. I didn't add it to the OW too since it's easy enough to edit the border with Lunar Magic's layer 3 editor.
2021-07-17 05:12:52 PM
Small update (v0.2.3): fixed a rare issue that could happen when using Lunar Magic 3.0+, in case the routine at $03BCDC wasn't installed yet. Changed settings.asm file formatting to be a bit easier to navigate through. Added some speed optimizations to the code.
Additionally I tested it with lx5's Dynamic Spriteset System and both instant respawn and the prompt work fine with it. If using the prompt, you just need to change the tile numbers used by the letters in settings.asm to some empty spots in SP1/SP2 (DSS frees up a lot of tiles there so it should be an easy process).
2021-08-18 04:50:18 PM | Last edited 2021-08-18 05:04:58 PM by KevinM
Update v0.2.4: fixed a couple minor bugs regarding game over and VWF dialogues (thanks
for reporting them!) and optimized the NMI routine a bit.
2021-08-20 07:33:59 PM
Update v0.2.5: finally added full support for ObjecTool! Now, if you want to use both Retry's custom midway bars and other custom objects from ObjecTool, you can, just make sure to follow the instructions in the "objectool_info.txt" file. Additionally, differently from the original Retry, only Custom Normal Object numbers 00-51 will be reserved for the custom midways, meaning that you can still use 52-FF with ObjecTool (+ all the extended objects, of course).
2021-08-22 09:00:27 PM
Update v0.2.6: fixed a bug that could happen in layer 2 levels, where sometimes Mario would interact in weird ways (and often die) with the layer 2 on the first frame after respawning. Also, changed the infinite lives option to a sublevel-specific table, so you can have both levels with finite and infinite lives, which could be useful for hacks or collabs that feature levels of varying style/difficulty.
2021-09-13 04:27:56 PM
Update v0.2.7: this small update just fixes an issue where the Retry prompt would cause sprites to disappear, in case the end of the OAM table was filled. Thanks to
for reporting it!
Forum Index - SMW Hacking - Resource & Tool Releases - UberASM Retry System (+ Multiple Checkpoints) v0.2.7