FF7/Menu Module

From Final Fantasy Inside
< FF7
Revision as of 22:56, 19 March 2005 by my_wiki>Synergy Blades
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Contents

Menu Overview

Important Files

PSX Version PC Version
/MENU/*.MNU /DATA/MENU/MENU_US.LGP
/INIT/WINDOW.BIN /DATA/KERNEL/WINDOW.BIN

The menu module is probably the second most powerful module in the game. From here you can set a multitude of environment variables and view character records directly. It's really more of a master variable controller than the "select-o-thing" it appears to be.

Because the menu can have some rather fancy and complicated management features, it also can be placed in "Tutorial mode". This mode, when called from the field module will "play" prerecorded menu selections for the player.

Another major function of the menu system is the ability to save your game. This is probably the most powerful and vital part as the Menu has access to every single variable in the system, excluding the script temporary variables.

The Menu module is actually a collection of 13 modules, to which 4 can be called from the field scripting language. The 13 are called Begin, Party, Item, Magic, Eqip, Stat, Change, Limit, Config, Form, Save, Name, and Shop.

Menu Initialization

Menu has the incredible honor of being initialized right after the kernel. It is also the only module that keeps permanent data in VRAM for other modules to access. In the case of the PSX version, the graphics are loaded out of /INIT/WINDOW.BIN. This is a BIN-GZIP archive described in the Kernel section of this document. WINDOW.BIN has the following format.

Offset Length Description
0x0000 6 bytes Header [0x4827208200]
0x0006 1062 bytes Static Menu textures
0x2754 3034 bytes Font texture
0x332E 163 bytes Unknown

After initialization, the first Menu module ran is "Begin" The following is a picture of "Begin" in VRAM. Things to note is the font and static menu textures from /INIT/WINNDOW.BIN are highlighted in the lower right hand corner.

 

The following is an expanded picture of the textures from the PC version. The PSX version only differs in texture size and the way the buttons are displayed.

 

To better see what each section is, here is an annotated version with the more obvious textures labeled.

 

This is never banked out, however small parts are overwritten and cashed for a while when Battle is loaded, but are overwritten again when menu is loaded. The large blank spot under the menu text is for the Japanese characters that were removed in the non-Japanese version of the game. This spot is unused in these versions.

Menu Modules

The 13 Modules are displayed like the following.

Begin

This is the begin menu.

 

This is a screen form the "save" module. Begin initializes the menu system and calls save to load a game or to start the game.

Party

 

This is the menu you see when you manually enter the menu system. Things to note is the empty box in the lower screen shows what location you are in. Debug rooms have no name most of the time.

Item

This is the item menu.

 

Magic

This is the magic menu.

 

Both magic and summon are accessed in the same module.

Equip

The equip menu is a little strange.

 

Equip and Materia are in the same module.

Status

This is the status menu.

 

Change

 

Also known as "Order", this is the simplest and smallest of all the menu modules, it just changes the order of the party, it uses the party screen as a background.

Limit

This is the limit menu.

 

Config

 

This is where a good deal of environment variables can be changed.

Form

This is also known as the PHS screen.

 

Form can also be called when you need to make a two or three teams of people.

Save

The all important save screen.

 

To save time, this will only load the first 80 bytes of each save as a preview. It allows a quick look without having to load the whole memory card, which can take upward of a minute. This is also responsible for loading games too, when called from "Begin".

Name

This is the naming screen.

 

If you try and use the same name screen twice in a game, you will loose your old name and will be overwritten with the default one.

Shop

This is your typical shop.

 

You can, of course, sell items from this module as well.

Calling the various menus

The PSX version keeps the menu modules contained in a .MNU file. The PC version has the menu code internal to the executable. The highlighted modules can be called with the MENU script command. The MENU command always takes a first argument of 00. The second argument is the Menu ID number, and the third is the argument.

Module Name PSX Filename Menu ID Number Argument
Begin /MENU/BGINMENU.MNU N/A N/A
Party /MENU/PATYMENU.MNU 0x09 0x00
Item /MENU/ITEMMENU.MNU N/A N/A
Magic /MENU/MGICMENU.MNU N/A N/A
Equip /MENU/EQIPMENU.MNU N/A N/A
Status /MENU/STATMENU.MNU N/A N/A
Change /MENU/CHNGMENU.MNU N/A N/A
Limit /MENU/LIMTMENU.MNU N/A N/A
Config /MENU/CNFGMENU.MNU N/A N/A
Form /MENU/FORMMENU.MNU 0x07 0x00 - Make a party of 3
0x01 - Split into 3 groups
0x02 - Split into 2 groups
Save /MENU/SAVEMENU.MNU 0x0E 0x00
Name /MENU/NAMEMENU.MNU 0x06 0x00 - Cloud
0x01 - Barret
0x02 - Tifa
0x03 - Aerith
0x04 - Red XII
0x05 - Yuffie
0x06 - Cait Sith
0x07 - Vincent
0x08 - Cid
0x09 - Chocobo
Shop /MENU/SHOPMENU.MNU 0x08 (0x00-0xFF) Shop Number

Menu dependencies

On the PSX, Menu dependencies are kept in two different directories. The window dressing textures that stay in memory are found in /INIT/WINDOW.BIN and stored as a BIN-GZIP archive. In the MENU directory, some MNU files contain TIM files appended at the end that are displayed when they are loaded. Two of them, PARTYMENU.MNU and FORMMENU.MNU, externally reference TIM files on the disk as they share these resources. SAVEMENU.MNU also externally references the memory card ports.

The PC version has the MNU files internal to the executable and only have external resources. These are kept within the MENU_US.LGP file. The PC version has textures in two different sizes to support the two resolutions the game runs in. The following is a table of the menu resources and where they are located in both the PC and PSX version.

Picture Description Low Resolution
PC Filename
High Resolution
PC Filename
PSX Location (in
/MENU unless noted)
TIM Offset
Cloud Avatar CLOUD_L.TEX CLOUD.TEX CLOUD.TIM N/A
Barret Avatar BARRE_L.TEX BARRE.TEX BARRE.TIM N/A
Tifa Avatar TIFA_L.TEX TIFA.TEX TIFA.TIM N/A
Cloud Avatar CLOUD_L.TEX CLOUD.TEX CLOUD.TIM N/A
Aeris Avatar EARITH_L.TEX EARITH.TEX EARITH.TIM N/A
Red XIII Avatar RED_L.TEX RED.TEX RED.TIM N/A
Yuffie Avatar YUFI_L.TEX YUFI.TEX YUFI.TIM N/A
Cait Sith Avatar KETC_L.TEX KETC.TEX KETC.TIM N/A
Vincent Avatar BINS_L.TEX BINS.TEX BINS.TIM N/A
Cid Avatar CIDO_L.TEX CIDO.TEX CIDO_L.TIM N/A
Young Cloud Avatar PCLOUD_L.TEX PCLOUD.TEX PCLOUD.TIM N/A
Sephiroth Avatar PCEFI_L.TEX PCEFI.TEX PCEFI.TIM N/A
Chocobo Avatar CHOCO_L.TEX CHOCO.TEX CHOCO.TIM N/A
Placeholder Avatar N/A N/A KALI.TIM N/A
Cloud Avatar CLOUD_L.TEX CLOUD.TEX NAMEMENU.MNU 0x1E7C
Barret Avatar BARRE_L.TEX BARRE.TEX NAMEMENU.MNU 0x29A0
Tifa Avatar TIFA_L.TEX TIFA.TEX NAMEMENU.MNU 0x34C4
Aeris Avatar EARITH_L.TEX EARITH.TEX NAMEMENU.MNU 0x3FE8
Red XIII Avatar RED_L.TEX RED.TEX NAMEMENU.MNU 0x4B0C
Yuffie Avatar YUFI_L.TEX YUFI.TEX NAMEMENU.MNU 0x5630
Cait Sith Avatar KETC_L.TEX KETC.TEX NAMEMENU.MNU 0x6154
Vincent Avatar BINS_L.TEX BINS.TEX NAMEMENU.MNU 0x6C78
Cid Avatar CIDO_L.TEX CIDO.TEX NAMEMENU.MNU 0x779C
Chocobo Avatar CHOCO_L.TEX CHOCO.TEX NAMEMENU.MNU 0x82C0
Load screen background BUSTER.TEX N/A SAVEMENU.MNU 0x4EDC
Save Icon 1 N/A N/A SAVEMENU.MNU 0xF4F4
Save Icon 2 N/A N/A SAVEMENU.MNU 0xF502
Save Icon 3 N/A N/A SAVEMENU.MNU 0xF8F8
Save Icon 4 N/A N/A SAVEMENU.MNU 0xFCEE
Save Icon 5 N/A N/A SAVEMENU.MNU 0x100E4
Save Icon 6 N/A N/A SAVEMENU.MNU 0x104DA
Save Icon 7 N/A N/A SAVEMENU.MNU 0x108DA
Save Icon 8 N/A N/A SAVEMENU.MNU 0x10CC6
Save Icon 9 N/A N/A SAVEMENU.MNU 0x110BC
Save Icon 10 N/A N/A SAVEMENU.MNU 0x114B2
Save Icon 11 N/A N/A SAVEMENU.MNU 0x118A8
Save Icon 12 N/A N/A SAVEMENU.MNU 0x11C9E
Save Icon 13 N/A N/A SAVEMENU.MNU 0x12094
Save Icon 14 N/A N/A SAVEMENU.MNU 0x1248A
Save Icon 15 N/A N/A SAVEMENU.MNU 0x12880
Coin command ZENI.TEX ZENI_H.TEX ITEMMENU.MNU 0x3890
Window Dressings BTL_WIN_H.TEX BTL_WIN_A_H.TEX /INIT/WINDOW.BIN 0x0006
  BTL_WIN_B_H.TEX
  BTL_WIN_C_H.TEX
  BTL_WIN_D_H.TEX
BTL_WIN_L.TEX BTL_WIN_A_L.TEX
  BTL_WIN_B_L.TEX
  BTL_WIN_C_L.TEX
  BTL_WIN_D_L.TEX
Menu Font USFONT_L.TEX USFONT_A_L.TEX /INIT/WINDOW.BIN 0x2754
  USFONT_B_L.TEX
USFONT_H.TEX USFONT_A_H.TEX
  USFONT_B_H.TEX

The Save Game format

To do