Main structures

Note! In no way this listing is complete. If you found any other used structure, contact me and I'll get you developers password to add info here.

Offset structures

GH1 use amazing amounts of standard and non-standard offset tables.
Mostly they are used in non-standard jmp or switch statements.
Some in special functions that coll other functions according to special code.


OffTable1 - Simple one. Used in many offset tables

 struc (sizeof=0x8)
   code:           .long ?
   offset:         .long ?                 ! address of implementation function
 OffTable1       

OffTable2 - more complicated. Used in menu related things.

 struc  (sizeof=0xC)
   menu_item_num:         .long ?
   offset_to_realization: .long ?           ! offset (00000000)
   menu_item_return:      .long ?
 OffTable2       

Menu related

struc_icons_tab - Used in icons collections (in quick menus, etc)

 struc ! (sizeof=0x4)
   code:           .word ?                 ! code or value
   icon_num:       .word ?                 ! number of icon string
 struc_icons_tab 

Yes, all icons are actually stored as strings, similar to text messages.
String can contain one icon, icon and mask, or many icons in a row.


Panasonic uses quite strange approach to menus.
Having icon and text listed as separate items in the list, for example.
Or using same list for different menus.

struc_sub_menu - Used in various submenus.

 struc ! (sizeof=0x10)
   num:            .word ?           ! menu item number
   icon_str_num:   .word ?
   flag1:          .long ?           ! 2=it is icon
                                        ! 4=text of menu item
   offs:           .long ?           ! offset (00000000)
   flag2:          .long ?

struc_sub_menu


struc_menu - Similar to previous, but is used for menus.
submenu will be 0, if this is ordinary item.

 struc ! (sizeof=0x8)
   icon_str_num:   .word ?
   entry_type:     .word ?                 ! 0=id;2=icon;4=text
   submenu:        .long ?                 !

struc_menu


struct_menu_selection - Another part of funny approach.
Lists consisting of such elements are used to form actual menus (using lists of menu items, of course).
Most of such lists actually reside in RAM, contrary to menu items lists.

You can look at examples (such lists names start with Mst_ prefix) to understand how it works.

 struc ! (sizeof=0x8)
   value:          .word ?
   value_state:    .byte ?                 ! 1-invisible;2-disabled;3-enabled
   value_type2:    .byte ?
   submenus:       .long ?                 !
 struct_menu_selection

Service menu related

struct_serv_items - Structure used in simple text based service menus.

 struc ! (sizeof=0x10)
   Num:            .long ?
   Text:           .long ?                 ! offset (00000000)
   Code1:          .long ?
   Unk:            .long ?

struct_serv_items


>> Discuss hacks at Personal-View.com


Page last modified on February 10, 2011, at 05:46 AM