Skip to content

Instantly share code, notes, and snippets.

@ccawley2011
Created June 15, 2016 17:17
Show Gist options
  • Save ccawley2011/d601d7873b14fa6f6121494a843a5141 to your computer and use it in GitHub Desktop.
Save ccawley2011/d601d7873b14fa6f6121494a843a5141 to your computer and use it in GitHub Desktop.
QuickBMS script to unpack SC2000.DAT in Sim City 2000
# Sim City 2000 SC2000.DAT unpacker
# By Cameron Cawley
getdstring NAME 12
get OFFSET long
math COUNT = OFFSET
math COUNT /= 16
for i = 1 <= COUNT
getdstring NEXTNAME 12
get NEXTOFFSET long
if i = COUNT
get NEXTOFFSET asize
endif
math SIZE = NEXTOFFSET
math SIZE -= OFFSET
log NAME OFFSET SIZE
set NAME = NEXTNAME
set OFFSET = NEXTOFFSET
next i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment