<Help> open undefined file (without extension)

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Februarysn0w, Jan 27, 2015.

  1. Februarysn0w
    OP

    Februarysn0w School Idol Festival

    Member
    1,202
    518
    Oct 31, 2014
    Mino city Osaka
    Hello.
    Do you know what is the file extension? how can I open or edit this file?
    the file come with Monster Hunter 4G (JPN) rom.

    sample file
    *deleted illegal file*

    Please help me.
    Thank you.
    Best Regard
     
  2. Nagato

    Nagato GBAtemp Advanced Fan

    Member
    531
    509
    Jul 15, 2011
    United States
    It's an image with ETC1 image data inside.

    The 2 bytes at 0x07 are the width, the 2 bytes at 0x09 are the height. The image data starts at 0x14. Don't know about the rest of the header.

    [​IMG]

    I can probably code up a quick tool to handle the file based on this spec but I don't know if it'll work all the time.
     
    Februarysn0w likes this.
  3. Februarysn0w
    OP

    Februarysn0w School Idol Festival

    Member
    1,202
    518
    Oct 31, 2014
    Mino city Osaka
    Thank you so much. I'm waiting for your tool release. Very very thank you.
     
  4. Nagato

    Nagato GBAtemp Advanced Fan

    Member
    531
    509
    Jul 15, 2011
    United States
    Requires Python 2.7. I don't know if it'll work for any of the other files but it works for this particular one.

    Here's the code: https://gist.github.com/polaris-/516218c68c4cd4974e10
    Download this EXE and put it in the same folder with the .py file when you run it: https://github.com/polaris-/ctpktool/releases/download/v1.1/ctpktool.zip

    To use it, type "python tex2ctpk.py (filename).bin" such as "python tex2ctpk.py ui_guild_01_ID.bin".

    Just a small note: Change the filename to something with an extension, like ui_guild_01_ID.bin or anything. That way ctpktool can create the folder without erroring because the name is already taken by the file.

    Edit: Just for anyone who might read this in the future. It generates a (probably slightly invalid) CTPK file out of the image data so my other program, ctpktool, can do the heavy lifting like decompressing the image data and saving it to PNG.
     
    Februarysn0w likes this.
  5. Februarysn0w
    OP

    Februarysn0w School Idol Festival

    Member
    1,202
    518
    Oct 31, 2014
    Mino city Osaka
    Thank you so much. I'm very grateful your help.