Views: 19,854,990 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
03-29-24 07:48 AM |
Guest: |
0 users reading BCSV format | 1 bot |
Main - Trash - BCSV format | Hide post layouts | Thread closed |
Arisotura |
| |||||||||||||||||||||||||||||||||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 59/9016 EXP: 56054950 Next: 432694 Since: 07-03-12 From: in a box Last post: 57 days ago Last view: 16 days ago |
BCSV is a data format that is used a lot in SMG games. It is used to store all the level data, collision data, and lots of other things.
BCSV files can be seen like database tables. They define a number of fields, and then entries (rows) that contain values for the fields defined. Given their important usage in SMG games, modifying BCSV files is a key part in SMG hacking. BCSV files start with a header that is 16 bytes long:
[source=c#] public static uint FieldNameToHash(string field) { uint ret = 0; foreach (char ch in field) { ret *= 0x1F; ret += ch; } return ret; }[/source] For a list of known field names, you can look here: https://github.com/Mega-Mario/Whitehole/blob/master/src/Resources/KnownFieldNames.txt The fields are then followed by the data section. The size of the data section should equal to Entry_size*Number_of_entries. The data section is then followed by the strings section. Each entry in the data section is parsed accordingly to the fields defined: * for types 0 and 3, a 32-bit value is read. The value is then ANDed with the bitmask and shifted right by the shift amount. * for type 4, a 16-bit value is read. The value is then ANDed with the bitmask and shifted right by the shift amount. * for type 5, a 8-bit value is read. The value is then ANDed with the bitmask and shifted right by the shift amount. * for type 2, a single-precision float is read. The bitmask and shift aren't used. (note: according to Treeki, floats aren't type-dependent, however from what I've seen they always use type 2) * for type 6, a 32-bit value is read and used as an offset into the strings section to read the actual string. The bitmask and shift aren't used. The string is encoded in Shift-JIS. If I missed anything, feel free to let me know ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 456/9016 EXP: 56054950 Next: 432694 Since: 07-03-12 From: in a box Last post: 57 days ago Last view: 16 days ago |
Main - Trash - BCSV format | Hide post layouts | Thread closed |
Page rendered in 0.026 seconds. (2048KB of memory used) MySQL - queries: 28, rows: 196/196, time: 0.009 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |