User Tools

Site Tools


cache_structure

Cache Structure

RomVault stores all information about scanned and datted files in the RomVault Cache. This cache file is essentially a highly optimized database that includes filenames, sizes, hashes, modified timestamps, and pertinent flags to track various ROM statuses.

This page is for low level debugging reference only. You should never need to look at the cache contents in a hex editor, but if you do the tables below help to explain the cache structure. This page is under construction and should not be considered comprehensive.

RomVault 3.5.x Cache

Example Offset (h) Size (bytes) Name Description Example HEX Values Explanation
Header Section
0x00000000 4 Cache Version Version of the internal cache database 02000000 Version 2, used with RV 3.5.x
0x00000004 4 File Flags Flags for tree and DAT structure 00400400 Has tree, has children
0x00000008 1 File Name Length + file name 00 Not applicable
0x00000009 1 Found File Name Length + found file name 00 Not applicable
0x0000000A 8 File Modify Time Last modified time in ticks, little endian 0000000000000000 Not applicable
0x00000012 1 DAT Status Flag for DAT status 00 In DAT, collected
0x00000013 1 Got Status Flag for Got status 00 Not Got
0x00000014 1 Tree Expanded Boolean flag for directory expanded in tree 01 Always expanded
0x00000015 1 Tree Selected Flag for tree selection 01 Always selected
0x00000016 4 Child Count Number of children 03000000 3 directories: RomRoot + 2 ToSorts
… (end of cache) 4 File Status Status of the file / group 00000000
File Type 1 - Directory without DATs
0x0000001A 1 Child Type Flag for file type 01 Directory
0x0000001B 4 File Flags Flags for tree and DAT structure 00400400 Has tree, has children
0x0000001F varies File Name Length + file name 08526F6D5661756C
74
8 characters + “RomVault”
0x00000028 varies Found File Name Length + found file name 00 Not applicable
0x00000029 8 File Modify Time Last modified time in ticks, little endian 0000000000000000 Not applicable
0x00000031 1 DAT Status Flag for DAT status 00 In DAT, collected
0x00000032 1 Got Status Flag for Got status 01 Got
0x00000033 1 Tree Expanded Boolean flag for directory expanded in tree 01 Expanded
0x00000034 1 Tree Selected Flag for tree selection 00 Not selected
0x00000035 4 Child Count Number of children 01000000 1 child
… (end of group) 4 File Status Status of the file / group 00000000
File Type 1 - Directory with DATs
0x00000039 1 Child Type Flag for file type 01 Directory
0x0000003A 4 File Flags Flags for tree and DAT structure 00400600 Has tree, has dir DAT, has children
0x0000003E varies File Name Length + file name 034D4941 3 characters + “MIA”
0x00000042 varies Found File Name Length + found file name 00 Not applicable
0x00000043 8 File Modify Time Last modified time in ticks, little endian 0000000000000000 Not applicable
0x0000004B 1 DAT Status Flag for DAT status 00 In DAT, collected
0x0000004C 1 Got Status Flag for Got status 01 Got
0x0000004D 1 Tree Expanded Boolean flag for directory expanded in tree 01 Expanded
0x0000004E 1 Tree Selected Flag for tree selection 00 Not selected
0x0000004F 4 DAT Count Number of DATs in the directory 02000000 2 DATs
0x00000053 8 DAT Modify Time Last modified time in ticks, little endian 0016C6FEFDC0DA08 638034494360000000 ticks
0x0000005B 1 DAT Rules Flags for DAT rules applied 05 AutoAddDirectory, MultiDatOverride
0x0000005C 1 DAT Attribute Count Number of DAT attributes 07 7 attributes
0x0000005D 1 DAT Attribute ID Flag for Dat attribute 01 DatName
0x0000005E varies DAT Attribute Value Length + attribute value 094D616D6D61204D
4941
9 characters + “Mamma MIA”
0x00000068 1 DAT Attribute ID Flag for Dat attribute 02 DatRootFullName
0x00000069 varies DAT Attribute Value Length + attribute value 19446174526F6F74
5C4D49415C4D616D
6D612D4D49412E64
6174
19 characters + “DatRoot\MIA\Mamma-MIA.dat”
0x00000083 1 DAT Attribute ID Flag for Dat attribute 03 RootDir
0x00000084 varies DAT Attribute Value Length + attribute value 094D616D6D612D4D
4941
9 characters + “Mamma-MIA”
0x0000008E 1 DAT Attribute ID Flag for Dat attribute 04 Description
0x0000008F varies DAT Attribute Value Length + attribute value 1C496E2074686520
4441542D4D697373
696E6720696E2041
6374696F6E
28 characters + “In the DAT-Missing in Action”
0x000000AC 1 DAT Attribute ID Flag for Dat attribute 06 Version
0x000000AD varies DAT Attribute Value Length + attribute value 034D4941 3 characters + “MIA”
0x000000B1 1 DAT Attribute ID Flag for Dat attribute 08 Author
0x000000B2 varies DAT Attribute Value Length + attribute value 084461745661756C
74
8 characters + “DatVault”
0x000000BB 1 DAT Attribute ID Flag for Dat attribute 0B URL
0x000000BC varies DAT Attribute Value Length + attribute value 107777772E646174
7661756C742E636F
6D
16 characters + “www.datvault.com
0x000000CD 4 Child Count 4E000000 78 children
… (end of group) 4 File Status Status of the file / group 00000000
File Type 1 - Directory within a DAT
0x000000D1 1 Child Type Flag for file type 01 Directory
0x000000D2 4 File Flags Flags for tree and DAT structure 00400600 Has tree, has dir DAT, has children
0x000000D6 varies File Name Length + file name 25456D754172632D
436F6D6D6F646F72
65203634202D2043
442D524F4D2C2044
56442D524F4D
37 characters + “EmuArc-Commodore 64 - CD-ROM, DVD-ROM”
0x000000FC varies Found File Name Length + found file name 00 Not applicable
0x000000FD 8 File Modify Time Last modified time in ticks, little endian 0000000000000000 Not applicable
0x00000105 4 DAT Index Index number 00000000 Index 0
0x00000109 1 DAT Status Flag for DAT status 00 In DAT, collect
0x0000010A 1 Got Status Flag for Got status 00 Not Got
0x0000010B 1 Tree Expanded Boolean flag for directory expanded in tree 01 Expanded
0x0000010C 1 Tree Selected Flag for tree selection 00 Not selected
0x0000010D 4 Child Count Number of DATs in the directory 01000000 1 child of the directory
… (end of group) 4 File Status Status of the file / group 00000000
File Type 2 - ZIP Archive
0x00000111 1 Child Type Flag for file type 02 ZIP archive
0x00000112 4 File Flags Flags for tree and DAT structure 00800500 Has game, has DAT, has children
0x00000116 varies File Name Length + file name 1E54686520434420
47616D6573205061
636B20284575726F
7065292E7A6970
30 characters + “The CD Games Pack (Europe).zip”
0x00000135 varies Found File Name Length + found file name 00 Not applicable
0x00000136 8 File Modify Time Last modified time in ticks, little endian 0000000000000000 Not applicable
0x0000013E 4 DAT Index Index number 00000000 Index 0
0x00000142 1 DAT Status Flag for DAT status 00 In DAT, collect
0x00000143 1 Got Status Flag for Got status 00 Not Got
0x00000144 1 ZIP Status Flag for ZIP status 00 None
0x00000145 1 Game Attribute Count Number of game attributes 01 1 attribute
0x00000146 1 Game Attribute ID Flag for Game attribute 01 Description
0x00000147 varies Game Attribute Value Length + attribute value 1A54686520434420
47616D6573205061
636B20284575726F
706529
26 characters + “The CD Games Pack (Europe)”
0x00000162 4 Child Count Number of children 25000000 37 children
… (end of group) 4 File Status Status of the file / group 00000000
File Type 5 - File In ZIP
0x00000166 1 Child Type Flag for file type 02 File in ZIP
0x00000167 4 File Flags Flags for tree and DAT structure 0F000100 Size, CRC, SHA1, MD5, HasDat
0x0000016B varies File Name Length + file name 125363616E732F64
736330303133392E
6A7067
18 characters + “Scans/dsc00139.jpg”
0x0000017E varies Found File Name Length + found file name 00 Not applicable
0x0000017F 8 File Modify Time Last modified time in ticks, little endian 0000000000000000 Not applicable
0x00000187 4 DAT Index Index number 00000000 Index 0
0x0000018B 1 DAT Status Flag for DAT status 05 In DAT, MIA
0x0000018C 1 Got Status Flag for Got status 00 Not Got
0x0000018D 8 Size File size in bytes 0ECB470000000000 4705038 bytes
0x00000195 5 CRC Bytes + CRC32 hash 04CD81D84C “04” + CRC32
0x0000019A 21 SHA1 Bytes + SHA1 hash 207FF61CFF0659DE
E1F269C7E3A2E18B
9567979F84
“20” + SHA1
0x000001AF 16 MD5 Bytes + MD5 hash 16D491169D7CB4DA
414208465B0027BD
21
“16” + MD5
0x000001C0 4 File Status Flags for file status 1E000000 SizeFromDAT, CRCFromDAT, SHA1FromDAT, MD5FromDAT
… (end of group) 4 File Status Status of the file / group 00000000
End of Cache

Enums

Enum Name Description Cache Value
DatData DatName DAT header: <name> tag 01
DatRootFullName Full DATRoot path with DAT filename 02
RootDir DAT header <rootdir> tag 03
Description DAT header: <description> tag 04
Category DAT header: <category> tag 05
Version DAT header: <version> tag 06
Date DAT header: <date> tag 07
Author DAT header: <author> tag 08
Email DAT header: <email> tag 09
HomePage DAT header: <homepage> tag 10
URL DAT header: <url> tag 11
FileType 12
MergeType 13
SuperDat 14
DirSetup 15
Header 16
SubDirType 17
DatStatus InDatCollect The file is in the DAT and collected 00
InDatMerged The file is in the DAT but merged 01
InDatBad The file is in the DAT but its corrupt 02
NotInDat The file is not in the DAT 03
InToSort The file is in a ToSort directory 04
InDatMIA The file is in the DAT but MIA 05
FileType Unknown ??? 00
Dir The item is a directory 01
Zip The item is a ZIP file 02
SevenZip The item is a 7z file 03
File The item is a file 04
ZipFile The item is a file within a ZIP archive 05
SevenZipFile The item is a file within a 7z archive 06
GotStatus NotGot The file is missing 00
Got The file is present 01
Corrupt The file is corrupt 02
FileLocked The file is locked 03
HeaderFileType Nothing No header 00
ZIP ZIP archive 01
GZ GZip archive 02
SevenZip 7z archive 03
RAR RAR archive 04
CHD CHD file 05
A7800 Atari 7800 06
Lynx Atari Lynx 07
NES Nintendo Entertainment System 08
FDS Nintendo Famicom Disk System 09
PCE NEC PC Engine 0A
PSID Commodore 64 SID (Sound Interface Device) Audio 0B
SNES Super Nintendo Entertainment System 0C
SPC SNES Audio 0D
HeaderMask ???
Required ???
TreeSelect Unselected The tree branch is selected 00
Selected The tree branch is unselected 01
Locked The tree branch is locked in read-only mode 02
ZipStatus None ??? 00
TrrntZip TorrentZip or RV7Z 01
ExtraData ??? 02
Trrnt7Zip Torrent7Zip 03
cache_structure.txt · Last modified: 2022/11/24 14:30 by johnsanc