Home Gallery Resources The Team Rules chat Login Register
Pages:  1 2 3 [4] 5 6 7 ... 9
Author Topic: - — File Parsing Boot Camp — - (Some file structures added)  (Read 37140 times)
0 Members and 1 Guest are viewing this topic.
pikazz
Heroic Kitten
**
Offline Offline

Posts: 2286


Machinimator!

  • Awards Renowned Hacker Pin Collector Good Citizen Helping Hand

  • View Profile Awards
    « Reply #45 on: January 25, 2012, 03:40:43 AM »


    okay, here we go with the header of the REFF file

    First Header:
    0x00 (4) REFF, the type file
    0x04 (2) always FE FF,  unknown. possible Fileidex/id ect
    0x06 (2) unknown, always 00 07
    0x08 (4) How big the file is
    0x0C (2) unknown, think it's a jump to "next REFF header"
    0x0E (2) possible ID

    Second Header:
    0x00 (4) REFF, the type file again!
    0x04 (4) how big the file is again but 18 shorter
    0x08 (4) offset to the special "String Table Link section!" or how big this header is, often set as 18.
    0x0C (4) unknown
    0x10 (4) unknown
    0x14 (2) unknown, always set on 6

    String Table Link Section:
    this is hard to write since it's pretty messed up D:
    first it's the REFF name example "purin" or "yoshi",
    after the name the "String Table Link Section" length and after that it's how many entries it is in.

    then it's using that follow on the rest of the REFF part/names ect.
    First it's the "sections" name example "PtcPurinKorogaru", after that it's the offset (This offset + the beginning of STLS (30) = the offset!)
    and after it its how big the file are (Offset before + this offset  = how big that file is)

    and repeat on every "file"/entries


    « Last Edit: January 25, 2012, 04:02:12 AM by pikazz » Logged

    Stupid Tinypic :C

    DSX8
    Stage/Character Importer
    Never Gonna Give You Up
    *
    Offline Offline

    Posts: 9288


    meow~

  • Awards Good Citizen >9000 King for a Day Heart Container

  • View Profile Awards
    « Reply #46 on: January 25, 2012, 03:42:16 AM »


    okay, here we go with the header of the REFF file

    First Header:
    0x00 (4) REFF, the type file
    0x04 (2) always FE FF,  unknown. possible Fileidex/id ect
    0x06 (2) unknown, always 00 07
    0x08 (4) How big the file is
    0x0C (2) unknown, think it's a jump to "next REFF header"
    0x0E (2) possible ID

    Second Header:
    0x00 (4) REFF, the type file again!
    0x04 (4) how big the file is again but 18 shorter
    0x08 (4) offset to the special "String Table Link section!" or how big this header is, often set as 18.
    0x0C (4) unknown
    0x10 (4) unknown
    0x14 (2) unknown, always set on 6

    String Table Link Section:
    this is hard to write since it's pretty messed up  Kirby Dance
    first it's the REFF name example "purin" or "yoshi",
    after the name the "String Table Link Section" length and after that it's how many entries it is in.

    then it's using that follow on the rest of the REFF part/names ect.
    First it's the "sections" name example "PtcPurinKorogaru", after that it's the offset (This offset + the beginning of STLS (28) = the offset!)
    and after it its how big the file are (Offset before + this offset  = how big that file is)

    and repeat on every "file"/entries

    hmm... but how exactly does it work with the REFT files?
    Logged

    Follow me on facebook and Twitter!!!
    https://www.facebook.com/DMNSLYRX8              https://twitter.com/Demonslayerx8

    3DS Friend Code: 0705-6436-8834              NNID: Demonslayerx8              PSN: Demonslayerx8



    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Pin Collector Good Citizen Helping Hand

  • View Profile Awards
    « Reply #47 on: January 25, 2012, 03:46:45 AM »


    hmm... but how exactly does it work with the REFT files?
    cause REFT using the "same" method in the header, I looked between those 2 and saw no diffirens xD

    but exactly how they are "connected" are still a mistery, I believe it's EFLS file that connecting those 2 together or REFF holding it in deeper :/
    Logged

    Stupid Tinypic :C

    DSX8
    Stage/Character Importer
    Never Gonna Give You Up
    *
    Offline Offline

    Posts: 9288


    meow~

  • Awards Good Citizen >9000 King for a Day Heart Container

  • View Profile Awards
    « Reply #48 on: January 25, 2012, 03:48:20 AM »


    cause REFT using the "same" method in the header, I looked between those 2 and saw no diffirens xD

    but exactly how they are "connected" are still a mistery, I believe it's EFLS file that connecting those 2 together or REFF holding it in deeper :/
    well u did say its a big mess.... hmm Im srs here
    Logged

    Follow me on facebook and Twitter!!!
    https://www.facebook.com/DMNSLYRX8              https://twitter.com/Demonslayerx8

    3DS Friend Code: 0705-6436-8834              NNID: Demonslayerx8              PSN: Demonslayerx8



    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Pin Collector Good Citizen Helping Hand

  • View Profile Awards
    « Reply #49 on: January 25, 2012, 04:06:43 AM »


    well u did say its a big mess.... hmm Im srs here

    this is what I meant:

    Blackbox: REFFs name
    Greenbox: how big the "entries" is in STLS
    Bluebox: How many entries

    Redbox: the REFF sections name
    purplebox: Offset to it
    pinkbox: how big the REFF section/entrie is

    and repeat on each entrie with Redbox, PurpleBox and Pinkbox

    EDIT: I found out how the REFF is connected with each other Happy Face but I haven't found out the offset or something like that lol.
    I am still cuseious houw REFF and REFT are connected

    EDIT2: allI know how the REFF and REFT are connected is that REFF entrie having the REFT name in it if it using them Im srs here
    « Last Edit: January 25, 2012, 04:33:19 AM by pikazz » Logged

    Stupid Tinypic :C

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #50 on: January 25, 2012, 04:39:18 AM »


    you know...
    I do have an REFT template released on Brawl Imports...
    (I think it needs a small update though)
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #51 on: January 25, 2012, 04:43:33 AM »


    cause REFT using the "same" method in the header, I looked between those 2 and saw no diffirens xD

    but exactly how they are "connected" are still a mistery, I believe it's EFLS file that connecting those 2 together or REFF holding it in deeper :/
    sry for D-Post...

    all I can say is I've seen REFT image names in the REFF file...

    I've also noticed a small hex patteren in one of the datas...
    (I'll have to find it again) X(
    but it follows a count exactly
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Pin Collector Good Citizen Helping Hand

  • View Profile Awards
    « Reply #52 on: January 25, 2012, 04:45:01 AM »


    you know... I do have an REFT template released on Brawl Imports... (I think it needs a small update though)
    I know but it wasn't wrote like this I did.
    also, I started before Xiggah gave me the link to it D:
    Logged

    Stupid Tinypic :C

    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #53 on: January 25, 2012, 04:50:31 AM »


    btw...

    I found out what the '0xFEFF' ment...

    FEFF = little endian
    FFFF = big endian
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    pikazz
    Heroic Kitten
    **
    Offline Offline

    Posts: 2286


    Machinimator!

  • Awards Renowned Hacker Pin Collector Good Citizen Helping Hand

  • View Profile Awards
    « Reply #54 on: January 25, 2012, 05:27:52 AM »


    btw... I found out what the '0xFEFF' ment... FEFF = little endian FFFF = big endian
    that's good :3

    update: I found out that "Unk6" in the REFFs entries is frames!
    I am 95% sure!
    Logged

    Stupid Tinypic :C

    Eternal Yoshi
    Heroic Kitten
    **
    Offline Offline

    Posts: 2425


    Boss? Is that you?

  • Awards KCMM Old Timer Super Saiyan Topic Active Contributor Former PMDT

  • View Profile Awards
    « Reply #55 on: January 25, 2012, 04:58:15 PM »


    I'll join the party so I can complete the Event Match and Classic mode formats.

    Also stuff from MGS2.
    Event Match format
    Code:
    Header Size - 0x50

    0x08 = Match Type(Value is at 2 for Coin event match)
    0x0C = Time Limit
    0x1F = Stage ID
    0x38 = Game Speed
    0x3C = Camera Shaking control
    0x46 = Music ID

    PlayerData Size = 0x38
    ---------------------------------
    0x00  = byte CharacterID
    0x01  = byte Status (Normal,Metal,Invisible,BEEP?)
    0x04  = float Size(Scaling)
    0x08  = Team Flag
    0x0C  = ?????(Easy)
    0x0F  = Offense Ratio(Easy)
    0x11  = Defense Ratio(Easy)
    0x14  = Stock count(Easy)
    0x18  = Starting Damage(Easy)
    0x1B  = ?????(Normal)
    0x1D  = Offense Ratio(Normal)
    0x1F  = Defense Ratio(Normal)
    0x22  = Stock count(Normal)
    0x26  = Starting Damage(Normal)
    0x28  = ?????(Hard)
    0x2B  = Offense Ratio(Hard)
    0x2D  = Defense Ratio(Hard)
    0x30  = Stock count(Hard)
    0x34  = Starting Damage(Hard)

    http://www.smashboards.com/showthread.php?t=288062
    « Last Edit: January 25, 2012, 05:04:27 PM by Eternal Yoshi » Logged


    BlackJax96
    Brawl Mod God
    Moderator
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #56 on: January 25, 2012, 05:04:45 PM »


    You guys... REFT and REFF rebuilding is COMPLETE.
    All I need figured out is the actual DATA contained in the REFF. Not the string relocation offsets. Just the data.
    REFT is 100% rebuildable, but the texture importer needs a few tweaks to work right with it. I've replaced Peach's hearts with stars as a test and it looked fine in BB, but they appeared swizzled in-game.
    Logged

    Eternal Yoshi
    Heroic Kitten
    **
    Offline Offline

    Posts: 2425


    Boss? Is that you?

  • Awards KCMM Old Timer Super Saiyan Topic Active Contributor Former PMDT

  • View Profile Awards
    « Reply #57 on: January 25, 2012, 05:23:53 PM »


    That's good to know. Now we can focus on other things, like SHP0 and the event match files.

    For the most part, All that remains for the event matches is part of the header which dictates success and failure conditions.

    For those who don't have a memo, You can edit Event Matches in MiscData[6] via common2.pac ONLY WITH TABUU.
    Logged


    Xiggah
    Supreme Kitten
    ********
    Offline Offline

    Posts: 648

  • Awards Super Saiyan Topic Heart Container

  • View Profile WWW Awards
    « Reply #58 on: January 25, 2012, 06:31:44 PM »


    Event Matches sounds like a nice thing to edit. I think I could find a few nice things in Event files if I get any good at file parsing.

    Oh, and would anyone be interested if I posted the file structures of files already defined from Brawlbox? BJ made them nice and readable in the source code.
    Logged


    DarkPikachu
    Angel Kitten
    ***
    Offline Offline

    Posts: 3069


    complexity == fun

  • Awards Super Saiyan Topic Heart Container KCMM Veteran Tutorial Writer

  • View Profile Awards
    « Reply #59 on: January 25, 2012, 07:54:59 PM »


    Event Matches sounds like a nice thing to edit. I think I could find a few nice things in Event files if I get any good at file parsing.

    Oh, and would anyone be interested if I posted the file structures of files already defined from Brawlbox? BJ made them nice and readable in the source code.
    go for it Grin

    actually, it'd be real helpful Smiley
    Logged


    Quote: Friedslick6
    you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
    But the coolest part was that you didn't stop working on it despite that.

    Quote: Internet Explorer
    you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

    quote: Greg
    You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

    Pages:  1 2 3 [4] 5 6 7 ... 9
    Print
    Jump to: