Page 1 of 1

Blizzard Arcade Collection .sprite archives

Posted: Sat Feb 20, 2021 5:43 am
by eisnerguy1
So, I'm trying to extract files from a .sprite archive. In the Blizzard Arcade Collection, there are 7 of these types of files. I'm guessing these include the borders and other graphics from the 3 games (as I've looked through everything else and couldn't find those graphics): The Lost Vikings, Rock N Roll Racing & Blackthorne. When viewed in a hex editor, the files start with this:

Code: Select all

RIFFvc. SPRTsprs
If someone could take a look at this archive, that would be fantastic ... prite/file

Re: Blizzard Arcade Collection .sprite archives

Posted: Sun Feb 21, 2021 7:28 pm
by aspadm
Looks like it is RIFF container ( ... ile_Format)
Inside 1 "sprs" section (252 bytes) and 1 list section named "IMGS" with 4 subfiles inside. This 4 subfiles has signature "IMG fmt L".

You can extract this data by this offsets:
"sprs": 0x14, 252 bytes
img1: 0x124, 377746 bytes
img2: 0x5c4be, 393998 bytes
img3: 0xbc7d4, 1914054 bytes
img4: 0x28fca2, 2054912 bytes.

Hope that helps.

Re: Blizzard Arcade Collection .sprite archives

Posted: Wed Feb 24, 2021 4:56 am
by eisnerguy1
That kinda makes sense. What program could I open and view img1 for example? Thanks!

Re: Blizzard Arcade Collection .sprite archives

Posted: Wed Feb 24, 2021 8:30 pm
by aspadm
This is custom format. I think that there must be a lot of variations inside.
In your example file 4 images that looks like a cover of the "Rock N' Roll Racing" cartridge/disc.
If you are familiar with Kaitai Struct and python, you can extract it using this format description:

Code: Select all

  id: img_raw
  file-extension: img_raw
  encoding: ascii
  endian: le
  - id: magic
    contents: "IMG fmt L\0\0\0"
  - id: data_name
    type: str
    terminator: 0
  - id: unk_fill
    size: 54
    # repeats 0xfe
  - id: unk_data
    type: u4
  - id: compression
    contents: "lz4 "
  - id: width
    type: u2
  - id: height
    type: u2
  - id: data_magic
    contents: "data"
  - id: data_len
    type: u4
  - id: compressed
    size: data_len

Code: Select all

from img_raw import ImgRaw
import lz4.block as lb
from PIL import Image
import sys

if __name__ == "__main__":
    name = sys.argv[1]
    img = ImgRaw.from_file(name)

    res = lb.decompress(img.compressed, uncompressed_size=img.width * img.height * 4)

    res_img = Image.frombytes("RGBA", (img.width, img.height), res) + ".png")