Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

EarthBound/Window statistics table: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
 
m (Xkeeper moved page EarthBound:Window statistics table to EarthBound/Window statistics table: normalize subpages and titles)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{infobox table|name=Window statistics table|game=[[EarthBound]]|start=0x008650|end=0x0088DF|numentries=8 (0x08)|entrylength=82 bytes (0x52)|totallength=656 bytes (0x290)}}
{{subpage|game=EarthBound:RAM map}}
 
{{infobox table|name=Window statistics table
|game=EarthBound
|loc=RAM
|start=0x008650
|end=0x0088DF
|numentries=8 (0x08)
|entrylength=82 bytes (0x52)
|totallength=656 bytes (0x290)}}
The '''window statistics table''' stores information about currently open windows.
{{clear}}
{{clear}}
The '''window statistics''' table stores information about currently open windows.
=Format=
=Format=


==Unknown==
==Unknown==
{{table el|len=4 bytes (0x4)
|loc=0 (0x00)
|valrange=Unknown}}


* '''Length:''' 4 bytes (0x4)
* '''[[Offset]] within entry:''' 0 (0x00)
* '''[[Range of values]]''': Unknown


==Position in window existence table==
==Position in window existence table==


* '''Length:''' 2 bytes (0x2)
{{table el|len=2 bytes (0x2)
* '''[[Offset]] within entry:''' 4 (0x04)
|loc=4 (0x04)
* '''[[Range of values]]''': Number of an entry in the [[EarthBound:Window existence table|window existence table]]
|valrange=Number of an entry in the [[EarthBound:Window existence table|window existence table]]}}
 


==Top left corner X-coordinate==
==Top left corner X-coordinate==
{{table el|len=2 bytes (0x2)
|loc=6 (0x06)
|valrange=Absolute screen position, 8 [[Pixels per unit|ppu]]}}


* '''Length:''' 2 bytes (0x2)
* '''[[Offset]] within entry:''' 6 (0x06)
* '''[[Range of values]]''': Absolute screen position, 8 [[Pixels per unit|ppu]]


==Top left corner Y-coordinate==
==Top left corner Y-coordinate==
{{table el|len=2 bytes (0x2)
|loc=8 (0x08)
|valrange=Absolute screen position, 8 [[Pixels per unit|ppu]]}}


* '''Length:''' 2 bytes (0x2)
* '''[[Offset]] within entry:''' 8 (0x08)
* '''[[Range of values]]''': Absolute screen position, 8 [[Pixels per unit|ppu]]


==Box width==
==Box width==
{{table el|len=2 bytes (0x2)
|loc=10 (0x0A)
|valrange=Length in 8 [[Pixels per unit|ppu]] units}}


* '''Length:''' 2 bytes (0x2)
* '''[[Offset]] within entry:''' 10 (0x0A)
* '''[[Range of values]]''': Length in 8 [[Pixels per unit|ppu]] units


==Box height==
==Box height==
{{table el|len=2 bytes (0x2)
|loc=12 (0x0C)
|valrange=Height in 8 [[Pixels per unit|ppu]] units}}


* '''Length:''' 2 bytes (0x2)
* '''[[Offset]] within entry:''' 12 (0x0C)
* '''[[Range of values]]''': Height in 8 [[Pixels per unit|ppu]] units


==X-coordinate of text-drawing cursor==
==X-coordinate of text-drawing cursor==
{{table el|len=2 bytes (0x2)
|loc=14 (0x0E)
|valrange=Pixels from top-left corner (?)}}


* '''Length:''' 2 bytes (0x2)
* '''[[Offset]] within entry:''' 14 (0x0E)
* '''[[Range of values]]''': Pixels from top-left corner (?)


==Y-coordinate of text-drawing cursor==
==Y-coordinate of text-drawing cursor==
{{table el|len=2 bytes (0x2)
|loc=16 (0x10)
|valrange=Pixels from top-left corner (?)}}


* '''Length:''' 2 bytes (0x2)
* '''[[Offset]] within entry:''' 16 (0x10)
* '''[[Range of values]]''': Pixels from top-left corner (?)


==Unknown==
==Unknown==
{{table el|len=2 bytes (0x2)
|loc=18 (0x12)
|valrange=Unknown}}


* '''Length:''' 2 bytes (0x2)
* '''[[Offset]] within entry:''' 18 (0x12)
* '''[[Range of values]]''': Unknown


==Unknown (does bizarre things to text)==
==Unknown (does bizarre things to text)==
{{table el|len=1 byte (0x1)
|loc=19 (0x13)
|valrange=Unknown}}


* '''Length:''' 1 byte (0x1)
* '''[[Offset]] within entry:''' 19 (0x13)
* '''[[Range of values]]''': Unknown


==Font==
==Font==
{{table el|len=1 byte (0x1)
|loc=20 (0x14)
|valrange=0x00 - 0x04, other values glitch}}


* '''Length:''' 1 byte (0x1)
* '''[[Offset]] within entry:''' 20 (0x14)
* '''[[Range of values]]''': 0x00 - 0x04, other values glitch


The font being used to print text in this window.
The font being used to print text in this window.
Line 78: Line 87:
* 0x03 = Small Font #2 (has some glitching...)
* 0x03 = Small Font #2 (has some glitching...)
* 0x04 = Coffee Sequence
* 0x04 = Coffee Sequence


==Unknown==
==Unknown==
{{table el|len=2 bytes (0x2)
|loc=21 (0x15)
|valrange=Unknown}}


* '''Length:''' 2 bytes (0x2)
* '''[[Offset]] within entry:''' 21 (0x15)
* '''[[Range of values]]''': Unknown


==Control code variables==
==Control code variables==
{{table el|len=Unknown (likely the rest of the entry)
|loc=23 (0x17)
|valrange=Any values}}
==Window Title "Number"==
{{table el|len=1 byte
|loc=59 (0x3B)
|valrange=Any values, but usually low integers, in order}}
If this byte is zero, the window does not have a title. Otherwise, this seems to act as some kind of offset to a range of tiles to use for the title. Setting it to higher values will cause a window's title to be filled in with other window border tiles, rolling HP meter tiles, status affliction tiles, etc.
If multiple windows are assigned titles (via the function $C2:032B), the first one gets title number 01, the second gets title number 02, and so on. Changing a window's title number to the title number of another will cause its title to change to whatever initial part of the other window's title will fit in the space allocated for the current window's title. Remaining space gets filled with junk.
==Window Title String==
{{table el|len=Null-terminated, maximum length 22 bytes (0x16)
|loc=60 (0x3C)
|valrange=Null-terminated string}}
The window's actual title, as a null-terminated string. Note that changing this value directly does not change the window's title; it seems to only be cached here, and this space is read from to generate the tile sequence that forms the actual title. The function $C2:032B is used to actually set a window's title.


* '''Length:''' Unknown (likely the rest of the entry)
* '''[[Offset]] within entry:''' 23 (0x17)
* '''[[Range of values]]''': Any values


This data is used for storage and variables by the control code parser. This range starts with two two-byte words followed a single byte known respectively as '''working memory''', '''active memory''', and '''secondary memory''', though these names may not be the most accurate. Following these are two words and a byte again to and from which the working, active, and secondary memories can be copied. After these bytes, the rest of this entry seems to be used to store strings.
This data is used for storage and variables by the control code parser. This range starts with two two-byte words followed a single byte known respectively as '''working memory''', '''active memory''', and '''secondary memory''', though these names may not be the most accurate. Following these are two words and a byte again to and from which the working, active, and secondary memories can be copied. After these bytes, the rest of this entry seems to be used to store strings.
[[Category:EarthBound|Window statistics table]]

Latest revision as of 02:41, 24 January 2024

This is a sub-page of EarthBound.

Window statistics table
Game EarthBound
Start Address 0x008650
End Address 0x0088DF
# of Entries 8 (0x08)
Entry Length 82 bytes (0x52)
Total Length 656 bytes (0x290)
Back to the RAM map

The window statistics table stores information about currently open windows.

Format

Unknown


Position in window existence table


Top left corner X-coordinate


Top left corner Y-coordinate


Box width


Box height


X-coordinate of text-drawing cursor


Y-coordinate of text-drawing cursor


Unknown


Unknown (does bizarre things to text)


Font


The font being used to print text in this window.

  • 0x00 = Normal
  • 0x01 = Saturn
  • 0x02 = Small Font #1
  • 0x03 = Small Font #2 (has some glitching...)
  • 0x04 = Coffee Sequence


Unknown


Control code variables

  • Length: Unknown (likely the rest of the entry)
  • Offset within entry: 23 (0x17)
  • Range of values: Any values


Window Title "Number"

  • Length: 1 byte
  • Offset within entry: 59 (0x3B)
  • Range of values: Any values, but usually low integers, in order

If this byte is zero, the window does not have a title. Otherwise, this seems to act as some kind of offset to a range of tiles to use for the title. Setting it to higher values will cause a window's title to be filled in with other window border tiles, rolling HP meter tiles, status affliction tiles, etc.

If multiple windows are assigned titles (via the function $C2:032B), the first one gets title number 01, the second gets title number 02, and so on. Changing a window's title number to the title number of another will cause its title to change to whatever initial part of the other window's title will fit in the space allocated for the current window's title. Remaining space gets filled with junk.


Window Title String

  • Length: Null-terminated, maximum length 22 bytes (0x16)
  • Offset within entry: 60 (0x3C)
  • Range of values: Null-terminated string

The window's actual title, as a null-terminated string. Note that changing this value directly does not change the window's title; it seems to only be cached here, and this space is read from to generate the tile sequence that forms the actual title. The function $C2:032B is used to actually set a window's title.


This data is used for storage and variables by the control code parser. This range starts with two two-byte words followed a single byte known respectively as working memory, active memory, and secondary memory, though these names may not be the most accurate. Following these are two words and a byte again to and from which the working, active, and secondary memories can be copied. After these bytes, the rest of this entry seems to be used to store strings.