Scrabble SCRABBLE.DAT
-
- Posts: 161
- Joined: Sat Dec 13, 2014 1:01 am
Re: Scrabble SCRABBLE.DAT
Interesting format! It's a bit tricky to extract from (it has weird chunks) but it was fun to figure out and write the script
I also made a script for extracted .wad files. I'm not sure if it would be better to merge this with the original script?
Code: Select all
# Scrabble SCRABBLE.DAT
#
# Written by puggsoy
# script for QuickBMS http://quickbms.aluigi.org
idstring "\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00"
get DUMMY long
get DUMMY long
get DUMMY long
get FILES long
set CHOFF 0
savepos CURROFF
math CURROFF -= 4
goto CURROFF
for i = 0 < FILES
if CHOFF >= 0x800
savepos CURROFF
math CURROFF += 0x130
goto CURROFF
set CHOFF 0
endif
get DUMMY long
callfunction EXTRACT 1
math CHOFF += 0x20
next i
startfunction EXTRACT
getdstring NAME 0x10
get OFFSET long
math OFFSET *= 0x930
math OFFSET += 0x18
get SIZE long
get CHUNK_NUM long
set LEFT SIZE
log MEMORY_FILE 0 0
append
for j = 0 < CHUNK_NUM
log MEMORY_FILE OFFSET 0x800
math OFFSET += 0x930
next j
append
log NAME 0 SIZE MEMORY_FILE
endfunction
I also made a script for extracted .wad files. I'm not sure if it would be better to merge this with the original script?
Code: Select all
# Scrabble .wad
#
# Written by puggsoy
# script for QuickBMS http://quickbms.aluigi.org
get FILES long
for i = 1 <= FILES
getdstring NAME 0x0C
get OFFSET long
if i == FILES
get NEXT_OFF asize
else
savepos TEMP
getdstring DUMMY 0x0C
get NEXT_OFF long
goto TEMP
endif
set SIZE NEXT_OFF
math SIZE -= OFFSET
log NAME OFFSET SIZE
next i