Important information: this site is currently scheduled to go offline indefinitely by end of the year.
G-Force "bin" & "000" files
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: G-Force "bin" & "000" files
Code: Select all
# G-Force
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
open FDDE "bin" 0
set EXT string ""
string EXT += 0 # work-around because quickbms consider it a number
string EXT += 0
string EXT += 0
open FDDE EXT 1
get DUMMY long
get BINSZ long
get FILES long
get DUMMY long
get DUMMY_OFF long
math NAME_OFF = FILES
math NAME_OFF *= 4
math NAME_OFF += 16
math NAME_OFF += DUMMY_OFF
math NAME_SIZE = BINSZ
math NAME_SIZE -= NAME_OFF
log MEMORY_FILE NAME_OFF NAME_SIZE
set INIT_ROT long 0xea
for i = 0 < FILES
get SIZE long
getdstring DUMMY 16
get OFFSET long
get DUMMY long
savepos NAME_OFF MEMORY_FILE
set j long INIT_ROT
do
getvarchr CHR MEMORY_FILE NAME_OFF
math CHR -= j
math CHR &= 0xff
putvarchr MEMORY_FILE NAME_OFF CHR
math NAME_OFF += 1
math j += 1
while CHR != 0
math INIT_ROT += 1
get NAME string MEMORY_FILE
log NAME OFFSET SIZE 1
next i