Overview of the project & Glossary of terms - Cxbx-Reloaded/XbSymbolDatabase GitHub Wiki

Overview

XbSymbolDatabase was established in 2018 to allow third-party projects to scan the symbols through APIs than keep the OOVPA database inside Cxbx-Reloaded repository. We had rebuilt OOVPA database into cleaner library collection to research from. There are some methods to improvise the database which we haven't implemented yet.

XbSymbolDatabase is not meant as a front-end, since it is design to be a library.

TODO: Need document of original OOVPA history

Glossary of terms used in this project:

Xbox Development Kit (XDK)

A package full of resources (documentation, tools, source code, etc.) as once distributed by Microsoft to Xbox developers.

Xbox Executable (XBE)

A binary file containing all code for a piece of software that can be run on the Xbox.

An XBE file is generated using a compiler toolchain of either an XDK or an Open Source alternative (like OpenXDK and nxdk).

Library

A binary object file distributed with an XDK, containing Symbols - code and data needed for specific tasks.

Libraries are linked (inserted) into XBE files.

Older XDKs contained Libraries with different versions.

Later XDKs used only one Version for all it's contained Libraries.

Version

A four-digit number, indicating the release number of a Library (also all of the Symbols originating from it)

Location

A unique memory address with contents of an XBE loaded into memory, ready for execution or read/write access.

Symbol

A unique label, indicating either a Global or a Function.

Global

A piece of data, uniquely identified by a Symbol. (thus, Globals are a subset of all Symbols)

Function

A piece of code, uniquely identified by a Symbol. (thus, Functions are a subset of all Symbols)

XRef

Cross-referenced Symbol Location from within a Function.

OOVPA

OOVPA stands for "Optimized (Offset, Value)-Pair Array". A data structure used as a 'thumbprint' for searching for the Location of a Function.

Symbol detection

A method that tries to find Symbol Locations in an XBE, in the case of Cxbx using OOVPA's.

AliasOovpa

An alternative OOVPA, used when a Patch may also be applied to another OOVPA 'thumbprint.'

This is mainly used for XBE's generated with LTCG which mangles Function contents somewhat.

LTCG

An optimizing linking technique sometimes used when compiling XBE's, resulting in faster code.

This results in slight deviations in the way Functions are represented in the XBE.

This makes Function detection unreliable, resulting in unused Patches, and emulation errors.

Name

A string used for debugging, associated with a combination of a Symbol (via an Oovpa) and Version.

In some cases expanded with additional information.