Results 1 to 10 of 10
  1. #1
    EmuTalk Member
    Join Date
    Oct 2005
    Posts
    7

    Starfox Adventures ZLB?

    Does anyone have any info on this? Looking through my Starfox Adventures ROM, there's several files that have a .zlb extension, and have one or more ZLB markers/headers in the files (some only have a .bin extension instead of .zlb). I've been googling for information related to this for a couple days, and it's been mostly fruitless so far.

    At first, I thought it migh t've been some kind of packfile/compression marker. After googling for a bit, I found that ZBL is short for Zero-Length Body, which is basically a control packet with an empty L2PT header. After looking over the specs though, it doesn't seem to be valid as the "version" is set to 0, and the specs say it must be 2. It also says a ZLB is a control packet, yet the control bit is off.



    Scoping out the data reveals that each of these ZLB "blocks" starts with:
    "ZLB\0" (the letters Z, L, B, and a NULL byte) 0x00 0x00 0x00 0x01

    From here, things start getting funky. According to this output, the further along you follow the data, the more likely it is to not be identical. Early on, it appears to be uniform and patterned in some way. About 16 bytes out, it appears mostly "random", however, some blocks remain identical for several more bytes (and by several, I mean around 32 more bytes or so). I see nothing indicating the length of these headers, or how to decode the individual blocks.

    At this point, I have no real idea of where to go to figuring out this format. If anyone has any clues or information about what this might be, I'd love to hear.


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    Gekko Developer ShizZy's Avatar
    Join Date
    Feb 2005
    Location
    RI, USA
    Posts
    760
    Sounds like some sort of archive format, but I could be wrong.
    ~ShizZy

    6Bit.net Emulation & Gaming | Forums
    Gekko GameCube Emulator

  3. #3
    EmuTalk Member
    Join Date
    Oct 2005
    Posts
    7
    Doesn't seem very likely. This one file (called TEX0.bin) has 225 "blocks", and the average length is 616 bytes per. The longest one is about 3,132 bytes long (both including the possible header). If these are textures, they'd have to be awefully small.

  4. #4
    Gekko Developer ShizZy's Avatar
    Join Date
    Feb 2005
    Location
    RI, USA
    Posts
    760
    Compression?
    ~ShizZy

    6Bit.net Emulation & Gaming | Forums
    Gekko GameCube Emulator

  5. #5
    EmuTalk Member
    Join Date
    Oct 2005
    Posts
    7
    Rather likely, since some of the files with a .zlb extension and can have only one ZLB block. It'd have to be a generic form though, since this is used quite a bit. I thought it might be zlib compression (zlb, zlib..), but I wouldn't know how to try to decode it as such.

  6. #6
    Gekko Developer ShizZy's Avatar
    Join Date
    Feb 2005
    Location
    RI, USA
    Posts
    760
    Probably some variation of LZMA, like yaz0.
    ~ShizZy

    6Bit.net Emulation & Gaming | Forums
    Gekko GameCube Emulator

  7. #7
    EmuTalk Member
    Join Date
    Oct 2005
    Posts
    7
    Interesting possiblity. Though I wouldn't even know how to start trying to decode it without knowing what the decoded data is supposed to look like.

  8. #8
    EmuTalk Member thakis's Avatar
    Join Date
    Feb 2005
    Posts
    159
    First four bytes are 'ZLB\0', next four probably block version (always 0 0 0 1?), then four bytes which are probably the size of the block if uncompressed, then four bytes which are the size of the block as-is (it's compressed 99% sure), then that many bytes follow (the block data). The block is padded with zeros to a 32byte boundary, then the next block starts.

    Probably zlib compression, but might be something different.

    This is very interesting...

    ps: data that looks "random" is most certainly compressed in general.

  9. #9
    EmuTalk Member
    Join Date
    Oct 2005
    Posts
    7
    Here's two examples of what I've been able to decipher. The first is taken from a file called TEX0.bin, and the other from TEX1.bin:
    Code:
    ZLB found at 0000:0000 (1)
    - 00 00 00 01 (1)
    - 00 00 01 00 (256)
    - 00 00 00 6d (109)
    - 58 85 63 60 (1485136736)
    * -1 extra bytes at EOB!
    
    ZLB found at 0000:0000 (1)
    - 00 00 00 01 (1)
    - 00 00 01 00 (256)
    - 00 00 00 6d (109)
    - 58 85 63 60 (1485136736)
    * 22143 extra bytes at EOB!
    The ZLB block is not always at a 32-byte boundary. I find ZLB blocks starting at offsets: 0000:11b4, 000:3ecc (these are just two examples, there's more blocks that start on 4 and 12 byte boundaries). Could be a 4-byte boundary.

    The next is always a big-endian 32-bit integer 1. At first, I thought the next appeared to be the uncompressed size of the block and the following 4 bytes might be the compressed size, but testing shows that the number sometimes over-shoots the beginning of the next block, or can be too short.

    PS: they are not always 256 and 109, but it's interesting that two different files start out identical, except the second file's first block simply has a lot more bytes on it before the second ZLB block starts. After that, they don't seem to match up as well. The second file is, overall, much bigger than the first.

    The following two bytes are always 0x58 0x85. Sometimes you can see a small pattern between blocks from this point , but the "farther out" into the block that you go, the less of a pattern you can find.

    I'm not quite sure what this board's policy is about posting select files from a game, but I'd go on the side of caution and assume it's not allowed. If any of you happen to have the game and can get at those files though, I attached the source for the program I'm currently using to "read" the blocks.
    Attached Files Attached Files
    Last edited by KCat; October 28th, 2005 at 23:30.

  10. #10
    EmuTalk Member thakis's Avatar
    Join Date
    Feb 2005
    Posts
    159
    ZLB blocks don't always start on 32byte boundaries, but they seem to be always padded to a 32byte boundary (if you start counting at the "Z" of ZLB).

Similar Threads

  1. Any of you chaps play Starfox Adventures?
    By Allnatural in forum Gaming
    Replies: 6
    Last Post: October 25th, 2005, 05:11
  2. Starfox 64 (or lylat wars) problems.
    By Edgeways in forum 1964
    Replies: 2
    Last Post: July 28th, 2004, 18:10
  3. Starfox 2 vs Starfox 64
    By petronius79 in forum Screenshots
    Replies: 15
    Last Post: July 31st, 2003, 21:33
  4. Starfox 64
    By IceFlow2 in forum Project64
    Replies: 17
    Last Post: July 29th, 2003, 13:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •