The UI in the SNES FFV game is generated by dimension values that draw the windows on the screen. The pointer movement is described by Before, After values that tell the pointer where to move to next in a list of choices. There are no arrays of the menu items, like in object-oriented programming languages; this is a minimal approach, like most of the early 1990s assembly programming done for the 65816 processor.

Some collected notes from the FFV hacking community about the menu windows are listed below. I’ll link to and eventually bring over some of my own notes from this site to supplment them and illustrate how the menu systems work when these values are changed.

Menu Menu Controls - C3/A300
============================
(Data Length)
80 00 

     IT IP CX CY U  D  L  R
----------------------------	 
(Submenus)
(00) 01 03 B8 12 07 01 08 00 
(01) 01 02 B8 22 00 02 08 01 
(02) 01 07 B8 3E 01 03 08 02 
(03) 01 08 B8 4E 02 04 08 03 
(04) 01 04 B8 5E 03 05 08 04 
(05) 01 05 B8 6E 04 06 08 05 
(06) 01 09 B8 7E 05 07 08 06 
(07) 01 0B B8 8E 06 00 08 07
 
(Row) 
(08) 02 01 08 27 0B 09 08 00 
(09) 02 02 08 57 08 0A 09 00 
(0A) 02 03 08 87 09 0B 0A 00 
(0B) 02 04 08 B7 0A 08 0B 00 

(0C) 03 01 08 27 0F 0D 0F 0D 
(0D) 03 02 08 57 0C 0E 0C 0E 
(0E) 03 03 08 87 0D 0F 0D 0F 
(0F) 03 04 08 B7 0E 0C 0E 0C

Menu Menu Controls - C3/A300
============================
(Data Length) 
B0 00 
 
(00) 04 01 08 5A 03 01 00 00 
(01) 04 02 08 6E 00 02 01 01 
(02) 04 03 08 82 01 03 02 02 
(03) 04 04 08 A2 02 03 03 03 

(04) 05 01 58 44 12 06 14 05 
(05) 05 02 A0 44 12 07 04 06 
(06) 05 03 58 50 04 08 05 07 
(07) 05 04 A0 50 05 09 06 08 
(08) 05 05 58 5C 06 0A 07 09 
(09) 05 06 A0 5C 07 0B 08 0A 
(0A) 05 07 58 68 08 0C 09 0B 
(0B) 05 08 A0 68 09 0D 0A 0C 
(0C) 05 09 58 74 0A 0E 0B 0D 
(0D) 05 0A A0 74 0B 0F 0C 0E 
(0E) 05 0B 58 80 0C 10 0D 0F 
(0F) 05 0C A0 80 0D 11 0E 10 
(10) 05 0D 58 8C 0E 13 0F 11 
(11) 05 0E A0 8C 0F 13 10 15 

(12) 80 02 00 00 00 00 00 00 
(13) 80 01 00 00 00 00 00 00 
(14) 80 04 00 00 00 00 00 00 
(15) 80 03 00 00 00 00 00 00 

(16) B8 00 06 01 14 48 0F 07 
(17) 16 01 06 02 30 48 10 08

Item Menu Controls - C3/A73C
============================
(Data Length)
18 01

(Use/Sort/Rare)
     IT IP CX CY U  D  L  R
----------------------------	 
(00) 0F 01 40 10 00 00 00 02 
(01) 0F 02 58 10 01 01 00 02
(02) 0F 03 70 10 02 02 00 03 
(03) 0F 04 A8 10 03 03 02 03 

(Item List)
     IT IP CX CY U  D  L  R
----------------------------	 
(04) 10 01 08 4E 1A 06 20 05 
(05) 10 02 78 4E 1A 07 04 06
(06) 10 03 08 5A 04 08 05 07 
(07) 10 04 78 5A 05 09 06 08
(08) 10 05 08 66 06 0A 07 09 
(09) 10 06 78 66 07 0B 08 0A
(0A) 10 07 08 72 08 0C 09 0B 
(0B) 10 08 78 72 09 0D 0A 0C
(0C) 10 09 08 7E 0A 0E 0B 0D 
(0D) 10 0A 78 7E 0B 0F 0C 0E
(0E) 10 0B 08 8A 0C 10 0D 0F 
(0F) 10 0C 78 8A 0D 11 0E 10 
(10) 10 0D 08 96 0E 12 0F 11 
(11) 10 0E 78 96 0F 13 10 12 
(12) 10 0F 08 A2 10 14 11 13 
(13) 10 10 78 A2 11 15 12 14 
(14) 10 11 08 AE 12 16 13 15 
(15) 10 12 78 AE 13 17 14 16 
(16) 10 13 08 BA 14 18 15 17 
(17) 10 14 78 BA 15 19 16 18
(18) 10 15 08 C6 16 1B 17 19 
(19) 10 16 78 C6 17 1B 18 21 

(Scroll Up/Down)
(1A) 86 02 00 00 00 00 00 00 
(1B) 86 01 00 00 00 00 00 00

(Submenu - Player Select)
(1C) 1E 01 08 60 1F 1D 1C 1C 
(1D) 1E 02 08 80 1C 1E 1D 1D
(1E) 1E 03 08 A0 1D 1F 1E 1E 
(1F) 1E 04 08 C0 1E 1C 1F 1F

(Scroll Right/Left)
(20) 86 04 00 00 00 00 00 00 
(21) 86 03 00 00 00 00 00 00

(Weapon Equip Info)
(22) 24 01 00 00 22 22 22 22

Equip Menu Controls - C3/A4EE
============================
(Data Length)
A8 00

()
     IT IP CX CY U  D  L  R
----------------------------	 
(00) 07 01 38 1F 04 01 04 01 
(01) 07 02 38 2B 00 02 00 02 
(02) 07 03 38 3B 01 03 01 03 
(03) 07 04 38 47 02 04 02 04 
(04) 07 05 38 53 03 00 03 00

() 
      IT IP CX CY U  D  L  R
----------------------------	 
(05) 08 04 08 0F 05 05 09 06 
(06) 08 01 30 0F 06 06 05 07 
(07) 08 03 68 0F 07 07 06 08 
(08) 08 02 90 0F 08 08 07 09 
(09) 08 05 C8 0F 09 09 08 05 

(Item List)
     IT IP CX CY U  D  L  R
----------------------------	 
(0A) 09 01 00 67 13 0B 13 0B 
(0B) 09 02 00 73 0A 0C 0A 0C 
(0C) 09 03 00 7F 0B 0D 0B 0D 
(0D) 09 04 00 8B 0C 0E 0C 0E 
(0E) 09 05 00 97 0D 0F 0D 0F 
(0F) 09 06 00 A3 0E 10 0E 10 
(10) 09 07 00 AF 0F 11 0F 11 
(11) 09 08 00 BB 10 12 10 12 
(12) 09 09 00 C7 11 14 11 14 

()
     IT IP CX CY U  D  L  R
----------------------------	 
(13) 83 02 00 00 00 00 00 00 
(14) 83 01 00 00 00 00 00 00

Changes in FF5r-IC

Initial changes to the Magic Menu made to FF5r-IC:

Offset End    Size  Type IPS Offset IPS End  IPS Size 
------ ------ ----- ID   00000000   00000004 5        
03A885~03A889 5     PAT  00000005   0000000E 10
00 05 05 12 00
       
03B44B~03B44B 1     PAT  0000000F   00000014 6        
07

03B489~03B489 1     PAT  00000015   0000001A 6
00

Follow up small change:

Offset End    Size  Type IPS Offset IPS End  IPS Size 
------ ------ ----- ID   00000000   00000004 5        
03B43D~03B43D 1     PAT  00000005   0000000A 6
0D

The changes made by patch files are readable with IPSPeek

I couldn’t waste time tracking down what I did weeks ago in my own notes, so I just scrutinized the archived patch files and pasted their edits above.

The initial changes to the Magic Menu rearranged the options: removing “Sword” which has no entries in the IC romhack; moving Blue/Lore above Esper, to be the entry right after Time.

Comparison to original FFV rom:

FFV

image.png

FF5r-IC

image.png

So basically, the bytes that are changed to the values above make these menu edits.

What I’ve been told by players is that the menu still has a small flaw— the cursor will move down to the empty entry below Song, still. So the goal is to make one final edit to the menu drawing logic that will fix this action: the cursor ought to loop when moving down from Song back to the top option, White.

The only thing that needs to happen, iirc, is to change the “Before” value for the “White” entry. Right now it’s pointing to the numbered list space below “Song”, but it ought to point to entry $06 (or maybe $07). Looking at the rom in the area where those earlier changes happened, I can hopefully find the value that needs to get swapped to $06 or $07. The final list item would be number $06 or $07 I think, so I’m going to look for that value in the code around the bytes at $03A885 ~ $03B43D… Doing this in Mesen while the game is actually running is the best approach, bc I can unpause the game and see the change in real time and verify if it does what I want.

<aside> ➡️

ESC pauses in Mesen, and the Ctrl+M hotkey opens the Memory Viewer. Editing PRG ROM is the way to change the core game code.

</aside>

Also, one change in the initial patch offers the value $07, so this is worth experimenting with first, because I’m expecting to need to change that value $06. I’ll try it with $00 to see what happens.

image.png