Difference between revisions of "BCSV"

From Deep Sea Knowledge
Jump to navigation Jump to search
(Updated header offset info)
(Clarification on field data)
Line 1: Line 1:
Information on BCSV files
+
BCSV, known as '''B'''inary '''CSV''', stores information relating to general content in a compact CSV format
  
All information is from Animal Crossing: New Horizons
+
== General ==
  
== General ==
+
All information in this document is from Animal Crossing: New Horizons
  
BCSV files contain a list of content blocks. The header contains metadata for each content block
+
BCSV files contain a header which defines the number of entries, the size of each entry block, and the fields each entry has, followed by a number of entries with context-specific data
  
 
== Header ==
 
== Header ==
 +
 +
The header contains
  
 
{|class="wikitable"
 
{|class="wikitable"
Line 13: Line 15:
 
! Offset !! Size !! Description
 
! Offset !! Size !! Description
 
|-
 
|-
| 0x00 || 0x4 || Number of content blocks
+
| 0x00 || 0x4 || Entry count
 
|-
 
|-
| 0x04 || 0x4 || Content block size
+
| 0x04 || 0x4 || Entry size
 
|-
 
|-
| 0x08 || 0x2 || Number of offsets
+
| 0x08 || 0x2 || Field count
 
|-
 
|-
 
| 0x0A || 0x2 || Always '''0x0101'''
 
| 0x0A || 0x2 || Always '''0x0101'''
Line 23: Line 25:
 
| 0x0C || 0x4 || '''VSCB''' Magic
 
| 0x0C || 0x4 || '''VSCB''' Magic
 
|-
 
|-
| 0x10 || 0xC || Unknown
+
| 0x10 || 0x2 || Always '''0x1027'''
 +
|-
 +
| 0x12 || 0xA || Padding
 
|-
 
|-
| 0x1C || 0x8*Number of offsets || Offset list
+
| 0x1C || 0x8*Field count || Fields
 
|}
 
|}
  
== Offsets ==
+
== Fields ==
  
Offsets in the header are made up of two fields
+
The fields are defined in the header as 2 sections; a data identifier and the relative offset in each entry
  
 
{|class="wikitable"
 
{|class="wikitable"
Line 38: Line 42:
 
| 0x00 || 0x4 || Data identifier
 
| 0x00 || 0x4 || Data identifier
 
|-
 
|-
| 0x04 || 0x4 || Offset relative to content block
+
| 0x04 || 0x4 || Offset
 
|}
 
|}
  
 
The data identifier determines what type of data the offset is pointing to. The meaning behind each identifier seems to rely on the context of the files content, generally, with only a small number of identifiers being reused in multiple files. In AC:NH there is a total 2048 unique identifiers, with only 191 being reused in multiple files. For a list of all identifiers in AC:NH and the files they are used in, see here https://pastebin.com/KnbnD1r8
 
The data identifier determines what type of data the offset is pointing to. The meaning behind each identifier seems to rely on the context of the files content, generally, with only a small number of identifiers being reused in multiple files. In AC:NH there is a total 2048 unique identifiers, with only 191 being reused in multiple files. For a list of all identifiers in AC:NH and the files they are used in, see here https://pastebin.com/KnbnD1r8
  
== Content Block ==
+
== Entries ==
  
Content blocks always begin with their offset relative to the file start, and then contain the blocks data
+
Entries always begin with their offset relative to the file start, and then contain the blocks data. Nearly every file seems to contain a field with type `0x54607054`, which is always a unique int16 for each entry, though the location of this field is not always the same
  
 
{|class="wikitable"
 
{|class="wikitable"
Line 53: Line 57:
 
| 0x00 || 0x4 || Offset relative to file start
 
| 0x00 || 0x4 || Offset relative to file start
 
|-
 
|-
| 0x04 || || Content block data
+
| 0x04 || || Entry data
 
|}
 
|}
  
 
[[Category:File formats]]
 
[[Category:File formats]]

Revision as of 13:54, 29 March 2020

BCSV, known as Binary CSV, stores information relating to general content in a compact CSV format

General

All information in this document is from Animal Crossing: New Horizons

BCSV files contain a header which defines the number of entries, the size of each entry block, and the fields each entry has, followed by a number of entries with context-specific data

Header

The header contains

Offset Size Description
0x00 0x4 Entry count
0x04 0x4 Entry size
0x08 0x2 Field count
0x0A 0x2 Always 0x0101
0x0C 0x4 VSCB Magic
0x10 0x2 Always 0x1027
0x12 0xA Padding
0x1C 0x8*Field count Fields

Fields

The fields are defined in the header as 2 sections; a data identifier and the relative offset in each entry

Offset Size Description
0x00 0x4 Data identifier
0x04 0x4 Offset

The data identifier determines what type of data the offset is pointing to. The meaning behind each identifier seems to rely on the context of the files content, generally, with only a small number of identifiers being reused in multiple files. In AC:NH there is a total 2048 unique identifiers, with only 191 being reused in multiple files. For a list of all identifiers in AC:NH and the files they are used in, see here https://pastebin.com/KnbnD1r8

Entries

Entries always begin with their offset relative to the file start, and then contain the blocks data. Nearly every file seems to contain a field with type `0x54607054`, which is always a unique int16 for each entry, though the location of this field is not always the same

Offset Size Description
0x00 0x4 Offset relative to file start
0x04 Entry data