Difference between revisions of "FF7/Memory Structures"

From Final Fantasy Inside
< FF7
Jump to navigation Jump to search
my_wiki>BukTop
m (1 revision imported)
m (2 revisions imported)
 
(No difference)

Latest revision as of 05:19, 23 May 2019

Global Memory bank

This is a structure of significant size that holds over 2500 DWords related to the global situation. These range from logs to screen resolutions to sound handlers. Documenting this is a very difficult task as it is accessed all over the executable code and usually passed to other functions as pointers. As such this list is likely to change a lot and some of it might start off completely wrong. This only applies to the PC version and possibly only v1.02 of the '98 release.

Memory pointer Initial Value Function
0x000 1
0x004 "APP.LOG" Log file name
0x00C Current bits per pixel
0x030 Related to time (elapsed time?)
0x038 Related to time (start-up time?)
0x058 hInstance passed to the WinMain function as the result of a GetModuleHandle(0) call on startup.
0x05C Window handler pointer created from a CreateWindowEx call
0x848 0 Width of border on left and right
0x84C 0 Height of border on top and bottom
0x850 640 Display's width in pixels
0x854 480 Display's height in pixels
0x858 [0x850] - [0x848] Display's top left X coordinate in pixels
0x85C [0x854] - [0x84C] Display's top left Y coordinate in pixels
0x934 Method used in redrawing screen
0x954 640 Application's width in pixels
0x958 480 Application's height in pixels
0x95C Requested bits per pixel (should match [0x00C])
0x99C 90.0
0x9A0 5.0 (then changed to 125.0
0x9A4 2000.0 (then changed to 50000.0)
0x9B0 0 Seed for randomizing function (current time is used if value is 0)
0x9B4 "DEFAULT" Process Name
0x9B8 "DEFAULT CLASS" Equally un-inventive process class name.
0x9F0 0x4089C5 Library access function. Will load all LGP archives.
0x9F4 0x676605 If passed argument is 0 this function sets it to 1
0x9F8 0x408FA6 "Main" function called first when a game is loaded or started
0x9FC 0x4090C7 Function called when a game is quit via menu (PC only?)
0xA00 0x4090E6 Event Driver pointer
0xA28 0x409CF2 Function to set up window for playing a movie file
0xA2C 0x409D66 CD Check function to make sure correct disc is present