The rules have been updated, read them now: Rules!

Blizzard Arcade Collection .sprite archives

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
eisnerguy1
ultra-n00b
Posts: 7
Joined: Fri Jun 17, 2016 6:24 pm

Blizzard Arcade Collection .sprite archives

Post by eisnerguy1 » Sat Feb 20, 2021 5:43 am

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
http://www.mediafire.com/file/o3fr3n602 ... prite/file

User avatar
aspadm
advanced
Posts: 42
Joined: Wed Nov 25, 2015 8:43 pm
Has thanked: 10 times
Been thanked: 26 times

Re: Blizzard Arcade Collection .sprite archives

Post by aspadm » Sun Feb 21, 2021 7:28 pm

Looks like it is RIFF container (https://en.wikipedia.org/wiki/Resource_ ... 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.

eisnerguy1
ultra-n00b
Posts: 7
Joined: Fri Jun 17, 2016 6:24 pm

Re: Blizzard Arcade Collection .sprite archives

Post by eisnerguy1 » Wed Feb 24, 2021 4:56 am

That kinda makes sense. What program could I open and view img1 for example? Thanks!

User avatar
aspadm
advanced
Posts: 42
Joined: Wed Nov 25, 2015 8:43 pm
Has thanked: 10 times
Been thanked: 26 times

Re: Blizzard Arcade Collection .sprite archives

Post by aspadm » Wed Feb 24, 2021 8:30 pm

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

meta:
  id: img_raw
  file-extension: img_raw
  encoding: ascii
  endian: le
seq:
  - 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)
    res_img.save(name + ".png")

Post Reply