<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=BCSV_%28File_Format%29</id>
	<title>BCSV (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=BCSV_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=BCSV_(File_Format)&amp;action=history"/>
	<updated>2026-04-07T20:34:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=BCSV_(File_Format)&amp;diff=75&amp;oldid=prev</id>
		<title>Wexos: Imported from avsys wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=BCSV_(File_Format)&amp;diff=75&amp;oldid=prev"/>
		<updated>2024-05-01T17:04:31Z</updated>

		<summary type="html">&lt;p&gt;Imported from avsys wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;BCSV&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;inary &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;omma &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;eperated &amp;#039;&amp;#039;&amp;#039;V&amp;#039;&amp;#039;&amp;#039;alues) is a simple format for storing data tables. It is used a lot in [[Super Mario Galaxy]] and [[Super Mario Galaxy 2]]. The data is represented by rows, and the data is described by the columns.&lt;br /&gt;
&lt;br /&gt;
= File Format =&lt;br /&gt;
== Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Number of rows&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Number of columns&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Data offset&amp;#039;&amp;#039;&amp;#039;. Points to the row data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Row data size&amp;#039;&amp;#039;&amp;#039;. Size of the data of each row.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Column ==&lt;br /&gt;
After the header comes all the columns. Each has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Name hash&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Mask&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Row offset&amp;#039;&amp;#039;&amp;#039;. Offset into each row which specify the data for this field. To get the actual data, if valid, first mask the data, then shift it right.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Byte || &amp;#039;&amp;#039;&amp;#039;Shift&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Byte || &amp;#039;&amp;#039;&amp;#039;Data type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || 32-bit signed integer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Float || 32-bit floating-point number.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || UInt32 || 32-bit unsigned integer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || 16-bit signed integer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Byte || 8-bit unsigned integer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || String || 32-bit offset, relative to the start of the string table, which points to a Shift JIS encoded null-terminated string.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Hash ===&lt;br /&gt;
A list of known hashes can be found [[BCSV (File Format)/Hash List|here]] respectively [https://github.com/Arisotura/Whitehole/blob/release_v1.0/src/Resources/KnownFieldNames.txt here]. The hash algorithm is demonstrated by the following C# code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public static uint CalculateHash(string Name)&lt;br /&gt;
{&lt;br /&gt;
  ushort Hash = 0;&lt;br /&gt;
&lt;br /&gt;
  for (int i = 0; i &amp;lt; Name.Length; i++)&lt;br /&gt;
  {&lt;br /&gt;
    Hash *= 0x1F;&lt;br /&gt;
    Hash += Name[i];&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return Hash;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Row ==&lt;br /&gt;
The rows consist of data. The data is specified by the [[#Column|columns]]. The string table comes after all row entries.&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
The following tools can handle BCSV files:&lt;br /&gt;
* Whitehole, by StapleButter&lt;br /&gt;
&lt;br /&gt;
[[Category:Super Mario Galaxy File Formats]]&lt;/div&gt;</summary>
		<author><name>Wexos</name></author>
	</entry>
</feed>