Troubleshooting


Q: When the Retry prompt shows up, some sprites on the screen become glitched! How do I fix that?

A: This probably means that you have some other patch that dynamically uploads GFX to the sprite area (for example, 32x32 Mario patch or Custom Powerups patch). The fix is to change what tiles in the sprite area are used by the Retry prompt graphics. See Retry Prompt Tilemap for more details.


Q: After inserting Retry, I get a black screen when dying and retrying in a level! What's going on?

A: The first time you apply Retry to your hack, you need to start from a fresh save file (don't load a save file or save state that you created before inserting Retry).


Q: After inserting Retry, when I enter a level from the Overworld I get sent to the bonus game! What's going on?

A: See previous answer. Also, this might happen with previous Retry versions if forgetting to insert some of the gamemode files.


Q: I applied a FG gradient code, and it appears above the Retry prompt as well!

A: You need to make a slight edit to the HDMA code. You should see something like this:

LDA #$17
STA $212C
LDA #$00
STA $212E

Change that to:

LDA #$17
STA $212C
LDA #$17	;<- change here
STA $212E

Q: I'm making the music in a level fade out using the following code (with AddmusicK) but the music doesn't reload when dying!

LDA #$FF
STA $1DFB|!addr

A: You want to also store #$FF to $0DDA, like this:

LDA #$FF
STA $1DFB|!addr
STA $0DDA|!addr	;<- change here

Q: When dying after getting the goal post or beating a boss, the music doesn't restart when respawning!

A: One common cause for this is a bug with AddmusicK that happens when you change certain songs to #$00 in the asm/tweaks.asm (or asm/UserDefines.asm) file, specifically: !Miss, !BossClear, !StageClear, !Keyhole or !IrisOut (maybe also !SwitchPalace, !RescueEgg and !StaffRoll). This can cause issues like the one mentioned here or the P-Switch/Star timers acting weirdly when activated

To fix this, open AMK's asm/SNES/patch.asm file and remove all instances of codes like this:

CMP !SongThatYouChangedTo0
BEQ Something

For example, if you changed !IrisOut to #$00, then you'd remove these codes (you can CTRL+F !IrisOut to find all instances in the file):

CMP !IrisOut
BEQ ++
CMP !IrisOut
BEQ LevelEndMusicChange
CMP !IrisOut
BEQ Okay

Run AddmusicK after applying the changes and the issue should be fixed.

Another cause for the music not resetting can be using a "local" song as the goal music (i.e. a song that causes a freeze when loaded mid level). This can be fixed by making a slight edit in AMK's asm/SNES/patch.asm. Find the part that looks like this:

    LDA !MusicMir           ; |
    CMP !MusicBackup        ; |
    BNE ++              ; |
    STA !CurrentSong        ; |
    STA !MusicBackup        ; |
    JMP SPCNormal           ; |
++                  ; /
    LDA !MusicMir
    STA !CurrentSong
    STA !MusicBackup

and change it to this:

    LDA !MusicMir           ; |
    CMP !MusicBackup        ; |
    BNE ++              ; |
    STA !CurrentSong        ; |
    STA !MusicBackup        ; |
    JMP SPCNormal           ; |
++                  ; /
    LDA !MusicMir
    STA !CurrentSong
    LDY $1493|!SA1Addr2 ;<- add this
    BNE +               ;<- add this
    STA !MusicBackup
+                       ;<- add this

Q: I'm using the "Single Screen" UberASM code, and sprites keep moving while Mario is dead!

A: To fix, add this code at the very start of the Single Screen's main code:

    LDA $71
    CMP #$09
    BNE +
    RTL
+

Q: I use a custom midway block/sprite, but it doesn't seem to work!

By default Retry only works with the vanilla midway tile, but it's fairly straightforward to make it work with your own blocks/sprites. Retry has a specific RAM address that can be used to set the midway in the current level (according to the checkpoint setting in retry_config/settings_local.asm). The address is !retry_ram_set_checkpoint to have it always available in sprites/blocks, you can copy the contents of "ram.asm" into PIXI's asm/sa1def.asm, GPS's defines.asm and UberASM Tool's other/macro_library.asm.

The system works as follows: if you set the low byte (!retry_ram_set_checkpoint) to #$00, it will trigger the current level's midway. If the checkpoint table for this sublevel is 0, it means it will give you the midway for the main level. While if it's 2 or 3, it will give you the midway for the current sublevel.

You can also set a completely custom entrance for the checkpoint, similarly to how Retry's custom midway objects work. To do this, you need to set the entire 16 bit address (!retry_ram_set_checkpoint and !retry_ram_set_checkpoint+1) to the entrance value you want to use. This value follows the format of $7E19B8 and $7E19D8 (where $7E19B8 should go in the first byte of the address, $7E19D8 in the second). For more info, check those addresses in SMWCentral's RAM Map. In practice, your midway block sprite should have a piece of code like this, to set the vanilla midway:

LDA #$01
STA $13CE

To add multiple midway support, you'd just need to add this after it:

LDA #$00
STA !retry_ram_set_checkpoint

To make the midway take you to an arbitrary entrance, you need to set a different value depending on what entrance it is. For example, to make it use secondary exit number $0169, you'd use this code:

REP #$20
LDA #$0169	; Secondary exit number.
ORA #$0200	; Set the "secondary exit" bit in the high byte (like $7E19D8).
STA !retry_ram_set_checkpoint
SEP #$20

Additionally, you can also reset the current level's checkpoint by setting !retry_ram_set_checkpoint to #$80. This will respawn Mario in the current level's main entrance when dying.


Q: I'm using !prompt_freeze = 0 to make sprites move while Mario is dead, but it also causes autoscrollers to keep going. How do I stop them?

A: Vanilla autoscrollers should already stop when dying with this options turned on, while custom autoscrollers need to be handled on a case-by-case basis by adding a check for Mario's state. This is usually simple to fix by adding a code like this at the beginning of your custom autoscroller's main code:

    LDA $71
    CMP #$09
    BNE .run
    RTL
.run:

(if your autoscroller code is in a routine that ends with RTS, use RTS instead of RTL before .run).


Q: I'm using the SRAM table to save lives/coins/powerup/item box/bonus stars/score, but they reset to the default when I load a file! What do I do?

Saving these is slightly tricky since the original game resets them when creating or loading a save file. Luckily it should be an easy fix: for each one that you want to save, there's a hex edit you can apply to fix it (to apply them, copy those you need to a new file, save it as a .asm file, then patch it with Asar).


Q: I'm using the SRAM table to save moons/dragon coins, but they reset when I get a game over! What do I do?

This issue can also be fixed with a simple hex edit. With these the moons/dragon coins should reset to the state they were on the last save (or stay the same if you put them under .not_game_over in the SRAM table).