Skip to content

Instantly share code, notes, and snippets.

@ccawley2011
Created June 15, 2016 17:13
Show Gist options
  • Save ccawley2011/29d292f7c7e1e403a054656e13c3e07a to your computer and use it in GitHub Desktop.
Save ccawley2011/29d292f7c7e1e403a054656e13c3e07a to your computer and use it in GitHub Desktop.
QuickBMS script to unpack .dat files in Sonic Adventure DX
# Sonic Adventure DX .dat unpacker
# By Cameron Cawley
# Based on information from https://info.sonicretro.org/SCHG:Sonic_Adventure_DX:_PC/Sound_Editing/Sound_Effects#Format
getdstring IDSTR 16
set ID04 binary "archive V2.2\0\0\0"
set ID10 binary = "archive V2.DMZ\0"
if IDSTR == ID04
elif IDSTR == ID10
else
cleanexit
endif
get COUNT long
set POSITION long 20
for i = 0 < COUNT
get NAMEPTR long
get OFFSET long
get SIZE long
savepos POSITION
goto NAMEPTR
getct NAME string 0
goto POSITION
log NAME OFFSET SIZE
next i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment