ROM Hack Help! .bclim files to .png?

Nyannurs

Well-Known Member
OP
Member
Joined
Aug 30, 2014
Messages
480
Trophies
0
XP
904
Country
Germany
Hi GBAtemp.

As most of you are aware, some over at the Homebrew subforum have been attempting to hack Badge Arcade. We've arrived at an error, however. The badge files are in the .bclim format, and up until now, we've found no solution to extract a .png out of it and repack it back into the .bclim.

Yes, we already attempted to do this with Kaphotics' tool, bclim2png, which can be found here: https://github.com/kwsch/png2bclim


Any ideas?
 

Nyannurs

Well-Known Member
OP
Member
Joined
Aug 30, 2014
Messages
480
Trophies
0
XP
904
Country
Germany
Said file has no bclim footer. Looks like its 16bpp.

Try creating a footer with a hex editor and see if it parses.
Fancy seeing you here. Thanks for the tip, I'll get on to working.

edit: I would have thought I'd find a tutorial online, but no luck. Didn't want to sound like an idiot, but I guess I will have to. How do I make a footer?
 
Last edited by Nyannurs,

Kaphotics

badc0ded
Member
Joined
Sep 10, 2010
Messages
612
Trophies
0
XP
626
Country
United States
Fancy seeing you here. Thanks for the tip, I'll get on to working.

edit: I would have thought I'd find a tutorial online, but no luck. Didn't want to sound like an idiot, but I guess I will have to. How do I make a footer?

4eBAGr3.png


result in pk3DS:
oclm4Wl.png


result in png2bclim (same):
YQ1fKU8.png


Obviously the footer I used may have not been the best fit, but you'd have to tweak it to maybe show up right. Who knows, maybe they have a custom color palette stored in the game files.
 
  • Like
Reactions: GolyBidoof

Nyannurs

Well-Known Member
OP
Member
Joined
Aug 30, 2014
Messages
480
Trophies
0
XP
904
Country
Germany
4eBAGr3.png


result in pk3DS:
oclm4Wl.png


result in png2bclim (same):
YQ1fKU8.png


Obviously the footer I used may have not been the best fit, but you'd have to tweak it to maybe show up right. Who knows, maybe they have a custom color palette stored in the game files.
Thank you!
 

Kaphotics

badc0ded
Member
Joined
Sep 10, 2010
Messages
612
Trophies
0
XP
626
Country
United States
Correct footer is as follows. Fileformat is 5.

Code:
43 4C 49 4D FF FE 14 00 00 00 02 02 28 20 00 00 
01 00 00 00 69 6D 61 67 10 00 00 00 28 00 28 00 
05 00 00 00 00 20 00 00

90kcVsM.png


For rebuilding just clip off the last 0x28 bytes of the file I guess.
 
  • Like
Reactions: GolyBidoof

GolyBidoof

Well-Known Member
Member
Joined
Apr 6, 2012
Messages
265
Trophies
1
XP
322
Country
Germany
Oh, and here I thought I was smart for figuring it out myself a while ago. Nice stuff man :)
While we're at it, is there any BCLIM specification in the internet? I have a few more files that share the similar fileformat, but they have less or more bytes (like one image I just dumped which has 0x300 bytes) and I don't know what bytes in the footer do I have to edit to make it work.
This is my file anyway, I added some kind of a footer but I have no idea what size it is.
https://dropfile.to/wvAl9
Oops, forgot to call you, @Kaphotics
 
Last edited by GolyBidoof,

Kaphotics

badc0ded
Member
Joined
Sep 10, 2010
Messages
612
Trophies
0
XP
626
Country
United States
Oh, and here I thought I was smart for figuring it out myself a while ago. Nice stuff man :)
While we're at it, is there any BCLIM specification in the internet? I have a few more files that share the similar fileformat, but they have less or more bytes (like one image I just dumped which has 0x300 bytes) and I don't know what bytes in the footer do I have to edit to make it work.
This is my file anyway, I added some kind of a footer but I have no idea what size it is.
https://dropfile.to/wvAl9
Oops, forgot to call you, @Kaphotics
https://github.com/kwsch/png2bclim/blob/master/png2bclim/Form1.cs#L879

That one is odd, probably isn't a bclim since there's 384 pixels (3*2^7), which isn't an even*even dimension.

Should also investigate if the method of dumping to obtain these files may have an error...?
 
Last edited by Kaphotics,
  • Like
Reactions: GolyBidoof

GolyBidoof

Well-Known Member
Member
Joined
Apr 6, 2012
Messages
265
Trophies
1
XP
322
Country
Germany
It turned out that all the BCLIM files are 8192 bytes in there after all, just sometimes the files look as if they are about to end, but they don't until 0x2000 bytes are over.
Thanks for the documentation, will surely come in handy :)
 

Reserved

Well-Known Member
Member
Joined
Mar 14, 2015
Messages
217
Trophies
0
Age
30
XP
227
Country
United States
I'm still lost ;w;

Whenever I put the .bclim file I provided you into png2bclim, it gives me an "Invalid FileFormat" error. I tried setting the BCLIM Output Format as ETC1 and tried both Square/Rectangle options, yet nothing would load the file and give the .png file I need. Did you use the same program, or the pk3DS one (although I think they're the same, idk)?

I'm terrible at working with 3DS stuff, lol. pls halp<3
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.