Fix menu system crashes and stability issues
- Fix IrisSpotlight crash ($00F361): Removed errant $0116/$17 writes from menu_select_item.asm that corrupted VRAM upload index - Fix journal stack corruption: Added missing PHB in Journal_CountUnlocked - Fix P register mismatches: Added SEP #$30 to Menu_RefreshQuestScreen, Menu_ScrollFrom, Menu_DrawRingPrompt - Fix MagicBag crashes: Fixed data bank corruption in error path, fixed uninitialized Y register in cursor movement - Relocate StoryState from volatile $7C to SRAM $7EF39E - Add bounds checking to HouseTag_Main jump table - Use long addressing (.l) for SRAM access in custom_tag.asm 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -119,7 +119,7 @@ Menu_ItemNames:
|
||||
dw "MIRROR_OF_TIME "
|
||||
dw "____BOTTLE____ "
|
||||
dw "___OCARINA____ "
|
||||
dw "_SECRET_TOME__ "
|
||||
dw "TOME__L:REVEAL__"
|
||||
dw "___SOMARIA____ "
|
||||
dw "_FISHING_ROD__ "
|
||||
dw "_ROCS_FEATHER_ "
|
||||
@@ -423,7 +423,7 @@ Menu_DrawSelect:
|
||||
|
||||
.loop
|
||||
LDA.w SelectItemTXT, X : STA.w $1194, X
|
||||
DEX #2 : BPL .loop
|
||||
DEX : DEX : BPL .loop
|
||||
|
||||
RTS
|
||||
}
|
||||
@@ -437,7 +437,7 @@ Menu_DrawQuestStatus:
|
||||
|
||||
.loop
|
||||
LDA.w QuestStatusTXT, X : STA.w $1194, X
|
||||
DEX #2 : BPL .loop
|
||||
DEX : DEX : BPL .loop
|
||||
|
||||
RTS
|
||||
}
|
||||
@@ -528,3 +528,16 @@ Menu_DrawCharacterName:
|
||||
LDA.w #$1D : BRA .write_to_screen
|
||||
}
|
||||
|
||||
|
||||
Menu_DrawRingPrompt:
|
||||
{
|
||||
REP #$30
|
||||
LDX.w #$0E
|
||||
|
||||
.loop
|
||||
LDA.w RingPromptTXT, X : STA.w $1254, X
|
||||
DEX : DEX : BPL .loop
|
||||
|
||||
SEP #$30 ; Restore 8-bit mode before return
|
||||
RTS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user