GRC SNK

Textures, recreate headers, conversions, algorithms and parsing of image files
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

GRC SNK

Post by aluigi »

This is a pseudo-recompressor of the GRC files used in the SNK games (reference http://randomselect.piiym.net/forum/ind ... pic=5539.0).
It's a simple RLE algorithm, the "compressed" file will be bigger than the original:

Code: Select all

log MEMORY_FILE 0 0
get SIZE asize
for i = 0 < SIZE
    get TMP byte
    if TMP >= 0xc0
        put 0xc1 byte MEMORY_FILE
    endif
    put TMP byte MEMORY_FILE
next i
get SIZE asize MEMORY_FILE
get NAME filename
string NAME -= "_uncompressed"
log NAME 0 SIZE MEMORY_FILE