Moderator: sylux102

Decompile NDS Image Files

sylux102
Advanced Member
sylux102
Advanced Member
Joined: 5:15 PM - Jun 09, 2013

7:53 AM - Jul 11, 2013 #1

Some of you may have heard of core ds. It was alright and I have completely decompiled the rom. This is possibly the easiest ds game to hack, it uses .txt files for text (yes notepad opens them correctly) and .mat files to indicate materials. However the problem is the 3d model files and graphics files. The models are in .lmesh format, so I'm not sure if it's a .mesh with lz compression or what. Also, the graphic files are in two formats : .chbg and .chbg.bin . I have no idea how to open these. Every other file is editable with wordpad/notepad except for these. Levels are a different story altogether. If someone knows how to reverse engineer these file types or can figure them out somehow, I may be able to put together a quick mod in my time spent away from my OoT mod.

I would like to convert them to png or bmp if possible. I have found a file for an image that is mostly black save some white letters on it. I also have a true color screenshot (from desmume) of that exact image, +correct ds screen dimensions. The chbg is much shorter in hex than the png. If needed I can email the two files for comparison. Just want a little commandline program is all.
Last edited by sylux102 on 7:59 AM - Jul 11, 2013, edited 1 time in total.
A sword wields no strength unless the hand that holds it has courage.
Quote
Like
Share

Flotonic
Advanced Member
Flotonic
Advanced Member
Joined: 2:40 PM - Nov 22, 2012

9:58 PM - Jul 11, 2013 #2

Do you know the format of the file to convert?
Quote
Like
Share

sylux102
Advanced Member
sylux102
Advanced Member
Joined: 5:15 PM - Jun 09, 2013

2:25 AM - Jul 12, 2013 #3

Flotonic wrote: Do you know the format of the file to convert?
Well I know what I'm converting to (.png or .bmp) but not what I'm converting from (.chbg). I have no idea what made that file. It was developed by the Polish studio NoWay Studios.
A sword wields no strength unless the hand that holds it has courage.
Quote
Like
Share

Flotonic
Advanced Member
Flotonic
Advanced Member
Joined: 2:40 PM - Nov 22, 2012

4:16 PM - Jul 12, 2013 #4

If the format is not available anywhere, it may be up to you to figure it out. If you can provide me with the format and one of the files, I should be able to write a converter.
Quote
Like
Share

sylux102
Advanced Member
sylux102
Advanced Member
Joined: 5:15 PM - Jun 09, 2013

5:08 PM - Jul 12, 2013 #5

Flotonic wrote: If the format is not available anywhere, it may be up to you to figure it out. If you can provide me with the format and one of the files, I should be able to write a converter.
How do I find the format? I know the file is uncompressed, so that's a little helpful. I also have a dump of exactly what the file looks like when loaded in game. Do I have to reverse engineer the file and figure out the algorithm that made it?
A sword wields no strength unless the hand that holds it has courage.
Quote
Like
Share

sylux102
Advanced Member
sylux102
Advanced Member
Joined: 5:15 PM - Jun 09, 2013

8:30 PM - Jul 12, 2013 #6

When opened in Notepad, the file looks like this:

Code: Select all

  Ù                                                                úúúúúúúúúûûûûûûûúúúúúúúúúüüüüüüüúüúúúüüüúüúûúüüüúüúúúüüüúüüúüüüüúúúúúúúúûûûûûûûúúúúúúúúúüüüüüüüúüüüüýýüúüüüüýýüúüýýüýýüúüýýüýýüúúüüúüüýýúüüúüüýýúüüúüüýýúüüúüüýýúüüüüüüüúúúúúúúúúûûûûûûûúúúúúúúúüýýüýýüúüýýüýýüúüýýüýýüúüýýüýýüúüüüüüüüúúúúúúúúúûûûûûûûúúúúúúúúúúúúúúúúúúþþþþþþþúúúúúúúúúüüüüüüüúüúúúüüüúüúþúüüüúüúúúüüüúüüúüüüüúúúúúúúúþþþþþþþúúúúúúúúúüüüüüüüúüüüüýýüúüüüüýýüúüýýüýýüúüýýüýýüúúüüúüüúúúüüúüüúúúüüúüüúúúüüúüüúúúüüüüüüüúúúúúúúúúþþþþþþþúúúúúúúúüýýüýýüúüýýüýýüúüýýüýýüúüýýüýýüúüüüüüüüúúúúúúúúúþþþþþþþúúúúúúúúúúúúúúúúúúÿÿÿÿÿÿÿúúúúúúúúúüüüüüüüúüúúúüüüúüúÿúüüüúüúúúüüüúüüúüüüüúúúúúúúúÿÿÿÿÿÿÿúúúúúúúúúüüüüüüüúüüüüýýüúüüüüýýüúüúúüýýüúüúúüýýüúúüüúüüúúúüüúüüúúúüüúüüúúúüüúüüúúúüüüüüüüúúúúúúúúúÿÿÿÿÿÿÿúúúúúúúúüúúüýýüúüúúüýýüúüúúüýýüúüúúüýýüúüüüüüüüúúúúúúúúúÿÿÿÿÿÿÿúúúúúúúúúúúúúúúúúÿÿÿÿÿÿÿúúúúúúúúúüüüüüüüúüüüüúúüúüüüüúúüúüúúüúúüúüúúüúúüúüúúüúúüúüúúüúúüúüúúüúúüúüúúüúúüúüüüüüüüúúúúúúúúúÿÿÿÿÿÿÿúúúúúúúúú+(
    $    <$#+(++
<<#(##+&&!!!####&!#99++!!!!!!!!!!!!!!CCC!!&#3!!&+$###&&+CCCCCCCCCCCC		            CCCCCC+      *(  CCC+&&&##+&&&#++++!##!!!########&&&&&&&&&####&#####&&&&++++CCCCC&+(&&+(3CCCCCCCCCCCCC        CCCCC+!!#!!!#++&CCCCCCCC!!!!!!!!!!!!!!!!!!!!CC!!!!##!!!!!!####&&&C&+(&+
+  <$#++&+
<<#(##+&&!!!++%!......!$$$$$$$99++!!!!!!!!!!!!++++++++........$$$$$$$$CCC!!&#3!!&+$#!!&&+$%+CCC+&&&##+&&&%#++&%%!%%%%!!!%)&&*/%%!&-+%-&###%%%%%%&&&)&&!%%-%+%-%CCCCC&+(&&+#(3CCCCC+!!#!!!&&+%%&&&#--CCCCCCCC!!!!!!!!!!!!!!!!&&&&&&&&&&&&&&&&-----CC!!!!##!!!!!!%&&&&&+&0%%%0&!.C&+(&+
#&&++#C(+&
+&+CC!!!!##+!!!!!!####+$&&&%!!%,;CCCCCCCC!!!!!!!!!!!!!!!!&+!!!!!&CCCCC!!+#!!!#&++((><<<*>>(**>>*<#((((((+++++###((((((+++++++#(((####((((((

(*<<<><>>(**(((<<<<




9*<<>>>><<$**><<>

#((((((((((((((##((((((      
<<<<>>><<>*<<<<<<>*>>>*>*<<<<<>
++####(((((((((++++++++((((((++###((((((#3(
((((((>><+%))$+!(#/9(+%(((#()>>>>>>>99999999%#(+&$!$!$!>>>>>>>>99999999888($%%!$$$%>5!&#+&#!3&9999#$$$$%((#&&+!%((&/(((++8&%!&666!!!69%=&;;;0%/;;++&!%&6!!!696'&=+;/%0;;;/++8+(%&(((+&+%3%+&/A&&#&(+#!(++((+000++++++++++00000000!(((((!+%$$$$$!&&!!%+&&&&&+++'%!!!!'&+3$(
#(((>#>(<+(3#
(((((>((><+%!'%3&%99!#%3.+%;.$$$$$#(%&+++++++&&#!%%%%%&+$$$$$$8++####(((((****$9><>*>>$>><>*</*(<>*
CC($
<**>>><*>*(
9

<9<$<>><<<>>*><>*>>
>*<<<*><<<<<*>*>><<>*><<<>><>*

<<<<<<<><>*<<<>>>>>>*>><((!%&(#!#(#+(&&(#&&+(!(+!+!!!!%%!!###(!#!#!%%!!!##!(+(,0!&(&(!+##(##+((((((((################%!/!&&!+&%%%%++#,+><><&%=!#(&+&&(&#(>$<
<;6*
$;$669$9666<$96699><9699699*<*>966$$9*;(*9$$$;*;99*99$$*;6$$99$;<<>*<<<*><<<>*969$96$$69<<>**>*<>6***99**********$***6******>6699***9;******>;9(>**>**>*>;9***99$;$;99;$;99$$$$$$>$***$99;$9$$96>*********>>**>669;6999;66*6*>**$96*$999$;>>>>****;;;666**>><969>99<<>9$999996$$99$;<<>*<<<*><<<>*969$96$$69*$96*$999$;>>>>****;;;666**>><969>99<$9><999996((<>>**996(****>>>>;;;666*$*6999$;$996996996999699669996699966699666669;99$9<$9<9<99>99999$(($9;999$$$$;*$$*9*<>>99$($$$$996;6$(<  >  

*9****;9$(9->  C    >966**((@9*<CC*9*>*(
<  >$<

*<<*6$(*>><6999;;;(((99$(9;$;9$;(96><>(6(;$$$$(($99$9;((((($$(669($$;**$$$$$>>>*>>>*(((((((((((((((((((((((((**6(33(D(BEE(((((EEDDE(DIGGNIyyGEB$@9***3D(D(EEG(EE(D(DD(DD(IGOO;/@AAAAAAEE(EEEE(IGEyyIIEE(EDGG,$AAAAA@AAAAAAACCCCC(+&+&&(3&%%!###>&!.#+%=>+&!!!.8%!=)**(!.%%>>##/=!<>=%+#$8.!!!%&***)=!%CCC&&&##&&&+#++++#CCC&!!3#$+&!!###+&&99!!!!++!!!!!!!!!!<<
###!!!&&+##!%%%!!!!&&%!%0/<+#$#3!!%&+#88/%&<,(+&#&+&%!.+%.=
<<,+++&%!!..===%!!....==KKKNKNNN






99+&&%!!!!&++======...==....!NNKNNNKK







CCC!!%&+#..!%&+3$!&+K=.!&+
P.%+CCC+&&&%%%#++&&&%!!#+%&%!.#%K%%%%%%!%++&!=....==KC.!!!K

PK=KQ
ST
KKNWT%%%%%%%&+++++8..!..=!%=!%!.
=%QK=KP
R=WKKKTSKCCCCC&+(%&+#(!3%96669666966699699669996699969996999999999999999999969999$9*(<(9*>***9666699;$$(((6999$(6699$$(((999;$$((((;;;$6$$(###(((((#(((#(((((((((((((D((D((((((((((((((((D(((A,$$D($@AAA((((((((((((($@A@AAA@@@$$$$$$$A@/@(;@@@@@A@//@@@@@0'/!////@0/0@@@//0//A@0'7=7!/0==0)''/@@@@@0//@@/0/!/0//0'7'/0'7'7777/0/'77=!========='=!!!@@@@@@@@/00@/@000=00!/==7=/!=7=!!)'')!!7'77/'/====='''=!=!!'//#(((#&((#!=(+A/@+88,8;%&&,!!!-;==!799=.!0.(&=&8$$@/%+#%;++&&%-!!!==;00!.=997!&=&(+%/@$$#!#++;#%!&((.=%+(8@/88;8;##%%'&++;A!99997!09+!%%/$&$$$&((+&%!#+%&8&%!!-&;99999999$$$$$$$$.=)5>>>>$$99999999$$$$$$$$>>>>)%+$+&!;9999990+&$$$$$$&%PV+%P

+!QTT%P

&P
T(&.K+&!(+VTTTTTTT







TTTTTTTT







TTTTTTTTPC

=PWNT[T[&%.=====TTTTTTTT







TTTTTTTT







TTTTTTTT
RC


SNNNQSTT=.=KN[	
TWN=!&

=!+TTTR=%


C=%8TTTSK!+



K!+TTTTN!+



N!+&%.Q#+%=&!=R(&.RV=

%=RV%K

%=TT


PNQ

STTQNRTT


QNR

TTTVRVTT


C



TTTXRVTT







TTTTTTTT
QNP


QTRNRTTTX
RNQ


RTVRVTTTZ







TVRVTTTZ







TTTTTTTT.%+=%#K!&R=&
K%RK%(
N%(TN%(66996999999699966969>999
6<(*6*((3/($0$0((#!0000000(N[``(((++00000000########++++++++00000000(%``[####!/8!+8+9$$$9;6((#((((((D,$$A$A@@A/$A$@$$A$@AA@AAAA@AA$A@AAA$A@AA$8$A//@0//7$/@/7$@@///7/A@//@@/77@///7/@///77'7/@////'/7'''''!'777777777/7/7/7//7!=7!'!777''77'/7!')'777!====!7/7''''/7''''''''///////7////@/'!==-!!'!-777777!'777/'/=7==0==!!7//0770!''!7'''07!!'!=0/0'/N=7)!!=)77777'70777/7//@/@@==!77/07!=/=!''00'00/0=////7/N==='(+%=(&.&=&+%#=!&8&==+++(++&%..!+=&8&!=#==&+++&+.%+..=(!#%#%!(+#8((%!%&&&+&++(&++&(&**>>><*>*((#(((**>>><*>*+&&&&####(((&%!=NPW&!KNX#+.N!KC(!KS(!
&QT+&!TTTT[.#



P.#TTTTP.#



P!+TTTTQ!+



X!+TTTTR83===.%+,#=

#&=PX(+!

(8%PX+!N(&R!(







TTTRQXTT







TTTRQXTTPPP[N[PPTTTQ=RTT___.%=__++++&&







TXQXSTTV







TXPXTTTP[NNPPPNTR=QTTTR_=!=___)&++++
K%P=&
=P%(!+0(9999*
699>99
9999(99*
(99<0N($(0`$0`$/`3/$3+$;8$;8[&(((((((((((((((((((!(((((((((((((((((`!NN(![!N0((!300/$696$(#(#((((EDBD(((E($D$$y,$$(I(,$$$E,,$$$,,,$$$;AAAAAA$$$A8$@$$AA$/$$0=/A0$$8=N!7$$@/N@@'$A@00@/!$A//@//'@/''777)A///7/7777777//7==!=7!=7!=N=7!!/=====7=/=''N!/!/77/7@@@7!'77777/7//////7/@@@@/@7@@@===!///7N=N/=@@/N===7//0)===/@777000''////////@@//=0=!0//'!//!0//!'/'0@/@'!0'0///0/A/A'''07070070=7==!/@@A7@=!0=''='=00N0!==)'0=!==!=0/!!!=0@A/AA0@@'00'0'0'//'N==!=07/0@!!//!=////0N)=00//0N====//=!K0=K@@00/0//'0''00'0$>$**$*$9$;9969$$((99;$$$$((;$$;99(*>*>*;>*>****999;$<;*><<>*<<<9*><<69$966$$9$9$$9;*99*9*$$96;9>*<*66*9$$9*(;$$$;(+(((($$99$&&&8@<###-<>*<<<*><<<>*969$96$$69(((>**>*((*>*>;9***99$;(((((($;99;$(((((;99$$$$(($$>$***$99;$9$$9699*9969;966*6>
(6($(88$8;8;+/3/00(((80;+((8888(+;8(/3/3(((96;(((((,,,,,$,,,,,,$$$;,,,$$$A;,,,$$A;,,,$$@;,,$$A@/A,,$A@/A,$A@/7;$$A@//7@77///'@/''///!@/''//@'/7''/@@'/7''@@0077!@@''977/@=07@/'N@@/7//7/@/@7/////@7//7//@770/0@7/////707'0/070/0@='//00//////0////70////@////00A0///A7//0A00@0///A/0A/000A7//A/AA/00A00A00A00A00A/0A/0A/0A//A//A//A//A//A//0/@0/A/=0/=//@A/AAA/A'A00A00A0/A00A00@//A//A/0A//A//A7/A//A//@//A//A/0A//A//A/A@/AA/A00@//A/0A/0A//A/0A70A//A//@//A//A/0A//A//A00A//A//0N/A0/bcccddbibccaaidcbnicpaaadbbcceeoceoppqqrbcceooppeopqqrrraaaoooecccbrrrrqqpppppppoeevvvvrrqpbdddnbccoeeeinicbbbinipeeeini6$9$n$cd$$id;;id;id9$99966999996699$6$9$n$$g;;g;g$9ihhhgiiinnkkkinjjjnnamkkgjhhkklllstuuuuuhkmmlssslttuuuwwlmmkkhjguuuttslkssllmkhjwwuuutslniihhhjhkgjghijkshajCCCCC+%%!!++%!...&%!!!_QQQ.S

CCCCCCCC(((!!!!!!!!++++++++........!!!!!!!!QQQQQQQQ







CC!!!!%%%%&&+.=====.!..==...!QQQQQQQ_WTTTTTTQC&83!%&+
#P!%+W.&<$
>$6*$$$0((0(!!!![![0[+0K`&`/(0(((0((=0(((6[(0((([!((([!(((9%!((($;(#(((#(($(($(($$($#(;($(D(EGB(IGD((Iy@8@+8y!/00/0,,,;$O;8@A0,$80@,A8$$A$@='!==@@0N!==NA@//777/77///''/N77)0=N7=!'==07/77@07////@//0@@!!)/=!7!)0N!==70/@/@@0/'=/!@!A0=N==@N/N=00@/'!'0/0AAA@N=!N'0=0NN=N=0N70/0/000/0N0/=////N/!0//!N//N///0)//0AAA@AAA'==@//0N!===@'==/0//A0/@0=//@/0A!0A/0A!0=!0=0/0000/!0/AAAA$$@A=A!!A000N'!N0!=N/0/08//$//$//A@@A@@A@@////////////////A$$$$$$$N!0==$//==N0!0@!0$//A@/;0/$//$//@@@$@@$@0@//////0///////@$$$$$$$N=0====![==[=NN!//////0/$/0$/@$@@$/@$@@$//0@@//0@@$$$@@bnnibebandcqbnnibobandcqbnnibpbnndcqbnnibp(dindbrbceoopppoppqrrvvbeeoppppopqqrvvvcceoppppopqqrrvvcceoppppepqqrrvvpppppooevvvvrrqppppppooevvvvrrqpppppppoevvvvrrqppppppooevvvvrrqpcbbcinipecoinicbbcinipecpinicbbeinipecpiniccdeinipecpdniid9;id$$6;9id$$6;9id$$9id$$6id$$id$$nd$$EBBD(E(;(DyxIy(DDEEDBB(E(yD(yIxEDD(;;9g9;6$$i9;6$$g9$$i6$$g$$g$$g$$ginhjjnnalhkinhgjnnnlhminkgjnnnshmnnakgjnnilhmhkmlsttsltuuuwwwhkmlssttltuuuwwwhmmlssttltuuuwwwhmmlssttstuuwwwwsssslmmhwwwuuutsttsslmmkwwwwuutsttssllmkwwwwuutsttsslmmkwwwwuutsjmgjmtknjjlgajmuhiaghlgaagmuhiagjsgaagmujnai(#+.+#+!X+&!X&+!&&#+!X		3!_P_+%!!!#.P_P++++&!++&!&&+&%!&&&&&%!P__P_P_P!...!..=_P_P_P_P.




P=RSTTTTQ.QCCCCCP=XWWWWSPXP_[P_[P_K==KKKK=.PPPPPPPKCP%+SQ%
CP%+WP&X!&>_&+>!&<_&$($$*(0(N;0;00(``[0000000000000000[``=00000000((+(!(((0;9((((($;$$$$;9963,,333(3$A$$A@$A@,;;AA@//,$A@$AA@,$A@@,$A///@///////////@@////707/00/0/@@@@///@@@A////@A@A//@@A//0/0/0!0//0A0/@'@=/!'00/A0A/@/A'A/@/A0A@@A/A'A@@A/@@@0@@/@@@0@@A/@@////0/00AAAA@AAAAAA@AAAAAAA@AAAAAAA@AAA0/0///'/AAAAAA@$AAAAA$@$700'0'!'@/@/AAAAAA@AAA$$$$@$/0/0////$$$$$$$$$$$$$$$$00000000@@@AAAAAAAA$$$$$$$$0///////@$$$$$$$@$$$$$$$!0000000//A@AAAAAAA@$$$$$$$//0@@@$$@$$$$$$$0@@00'/////@AAAAAAA@AAAAAAA@$$$$$$$@$$$$$diaidpdindbrdiaidpdiaibriiaidpidaidqididoididpcceoppppeppqrrvvcceoppppoppqrrvvcceoopppoppqrrvvcceooppppppqrrvvppppppoevvvvrrqqppppppoevvvvvrqqppppppoevvvvvrqqppppppoevvvvvrqqccbcinipecodiiccbcdnipocobiiecbcdnipocebiiecbcbiipoeeciiib$$9nb$$9nb$$69nb$$96nb$$9ab$$9c$$c$$;***9*9*9*6;*9*9*9*6*9$$g9$$g96$$g69$$g9$$j9$$j$$j$$jnankgjnailhmnanhgjnagmkmaaihghaajmkmgjghhmklhmmlssttstuuwwwwkmllssttstuuwwwwkmmlssttstuuwwwwkmllstttstuuwwwwttssllkhwwwwuutsttsslmmhwwwuuutlttsslmmhwwwuuutlttsslmkhwwwuuttljsiagmujnnijtnnilugnnihsniilugninhmninstiagn!	


%W&&8%R&&8%+%%SW

8=
Q
++&







&&&%!&&+&%!+++&!+++!








Q


Q
Q&+&&&






P=VTTTTTQ=Q




P=RTTTTTQ.R




P
TTTTTTQQQQQQQQK%!!!.!%&!+SPCP&SQ&#CP+(W!+(>P+#(<8(**$**$**$**$**$**$**$**$69$$$$;;;$9699666993(3(3((3(((333,,(((3(((3$$A$AA$AA,$AA,$AAA;A@@/@@$;AAAAA$AAAAAA/@A@@@@AA@@A/@A@@A@/@A@@/@AA@@A@/@///@07@A$@@@@$@@$//A0A@@A/A'A@@A/A0A@@A/A'A@@A/A0A@@A0@=@'00//$'A/@@/$!A/$/@AAAA@AAAAAAA@AAAAAAA@AAAAAAA@AAAAA$A@AA$//@@/@@@AAAA@A$$AA/AA$A$$$$$@$A$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$@@@@@@/@$$$$$$@$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@@@@@@@@$$$$$$$$$$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$/@@@@@@@@$$$$$$$@$$$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$@@/@@@@@$$@$$$$$$$@$$$$$ibidenbaidp$abiic$abido$cnic$bcccc$banib$bnndceceeoppppopqrrvveceeopppqopqrrvvoceeopppqopqqrvvocceopppropqqrrvppppppoevvvvvrrqppppppoevvvvvrrqppppppoovvvvvrrqppppppoovvvvvrrqecbbbiipoeceiiecbbcinppecoinecbbciappecodbcecbbciaappocodinba$$$ba$;;*bn$;$*bn;;*dn;;>ccd;;>di;;>ii;*********>*>3*>*******>*3>*>*$$$aj*;;$aj*;;$ng*;;ng>;;ng>;;ih>;;ii*;iijjghakhklhgjhalhmlhgjhhhgilhmlanhgjhaimhmskmlsssttttuuwwwwkmlssttttuuuwwwwkmlssttttuuuwwwwmmlssttttuuwwwwwttsslmkhwwwuuttltssslmkhwwwuutslttsllmkhwwwuutsltssllmkhwwwuutsmkmngntsignmhngn$tmija$ljaj$thhhhj$sgaj$uhiag$(((((((*((((($96*$999$;##((((>>>>****;;;666+++8(((**>><969>((9(9(((<<>9$999996*$$*$$**$$*$$*$$$*$$$**$$$**$$(9;6;9$6;9$$9$$6$$6$$$$(EBBD(E((DyABOyEDG8(3;3,;3388,;(((3y(;,G(((3+8,I3;;;,$AAAAAA/A@0/AA0A/0@AAA@A@/AA;$AAA/@@8A;AA@800@A;;;@A/8888/08@A@@A@@00@////!!//@0!/@@///0@@/A@0/!=A@/0@!0!@@A00/!0!//!7@$0$=@A@!'=N/$/=0)/N@$/0@!8)@$0@$0!A0/A!0=!!N/8!!=00N0@=0=00=AA/AAA@@@/AAA//$$0AA//$$0@A0=00=!@A0N0!==0AA!0$!0@A=!0@==0/$$$$$$@$$$$$$$@$$$$$$$@$A$$$$$@$A$$$$$@$A$$$$$@$A$$$$$@$/@@@@@0@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$////////@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$0@//////$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$//0@////;dinid;dindbdiaidiiaibidid$idaid$nbaii$nbidpbceoppproppqrrvpcceopppqoppqrrvocceooppppopqrrveeceooppopopprrvpppppppovvvvvvrqpppppppovvvvvvrqpppppppovvvvvvrrpppppppovvvvvvrreecbcdniqpecebiieecbbbniqpoecciieecbbcniqpoecoinoecbdciaqppecodnid*ididnbnb;9*c;*ba$>bn$>*>$*>;*>*>6*>*>>*(>>$>*;>*>*6>*>*>*>>>*iiingngn*9;ja*;j>$aj>$ngaihgjkajkhmsgjghkhhklsjgjhkalhklthijhkimhmltmmlssttttuuwwwwwmllssttttuuwwwwwmlsssttttuuwwwwwmlssttttuuuwwwwwtsslmmhjwwuuutsmtsslmmhjwwuuutlltsslmkhhwwuuttlsssslmkhkwwuutsltsiag;ugnni;siniugniilniitiagn$kngn$lign$;C(+&
+&+CC%!!!!#%!!!..R!&&!!.RS%=CCCCCCCC=!!!!!!!+Q.!!!!!!=++=.!%!!!+##>9$>*9$>*$>*$>*$>***$>*>$>*<$$$9$$69$$69$$96$$9$$9$$$$;**9*9*9*6(((3(3((3(3(3,$$;;$$$$;$;,,;$$$$,$$$,$$$$$3$$,,,,,,,,,,,,,3,8;;$AA$AAAAAA$88;$;$A8;A,AA$8A$;A;$AAA$;A,AA8A$$,$;,;$;;A,AA@$0$/;$/@$0$/$$/8$0$/$$@@$0$/$$/$0$@$$@8$0$/$$@A,0$@$$@8$0$@$$///$$0A///@0AA@@@@/AAA@@@/AA$@@$$/AA@/$$0A@@$$0A//$$!@AA$$$$$@$A$$$$$@$A$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$/$$$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$@$$$$$$$/$$$$$$acni$cid;banibnnddiaidiaiiiaiidaicocceoppeqopqqrvbocceoopcqepqqrrdpcceoppbqeppqrrdpbceoopdqoopqrrppppppppvvvvvvrrppppppppvvvvvvvrppppppppvvvvvvvrppppppppvvvvvvvroeccbcinqppecebnoeccbbdnqqpocecioeecbbbirqpoeceiooecbdcirqppecoddi>ndi(>ndi*iidiidinb9nc$nba$><><><><6*><>*<<*<><*><<><><>6<><>*<*>*<*<<<*<>ng>(ni*iiiign9gn$ja$ajnhgjhmagmhmstaijgjkmahkklstjgjhkmmhklsthijhklnmhmltumlssttttuuwwwwwwmlssttttuuwwwwwwllssttttuuwwwwwwlsstttttuuwwwwwwtsllmkhmwwuutsmtssllmkhlwwuutlmusslmmhjlwuuutlmusslmkhjswuuttlmuhaja$kij$gaj;hnaginignniniiiain3#
(#((>((><+&!=RTX#8!K
Q&%=RTTQ+!K	

N&.RTTWQ=	



%RTTTTT%	




=!!%&&=!&+#K=.!%&&KK=.!%&+PPPPPPP_






TTTTTT
!





P%+(+((+(((>*$>*
$>*
$>*$<*$<*$<*<$<>>;$$$$$$$$$$$;;*;$*;;*;;>;;>;;>(;*((3(((((3,,;;3,;3,3;888;88;83;,$;AA;8A8;@+8/;,$;;A,;AAA,,;;/8,8A;0;8;;00;,/;A,0,@$$@/8=8!8@!A,/,@,,8;0,@,,@A/@,,8A0@,8A/88;0@8$$$$@$A!@@@/00/8@$$0AAA888A/A$$AAA@$$$AA$$@$$$A;$$@$,,;;$,8,,,$$$$$$@$//@@//0@$$$$$$@$$$$$$$@$$$$$$$@$$$,$$$@$,$,,,$@$,,,,,,@$$$$$$$$$////////$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$/$$$$$$$0///////@$$$$$$$@$$$$$$$@$$$$$$$@$$$$AAA@$$$$AA@$$$$$AA$$/$$$$$//0/////$$@$$$$$$$/$$$$$$$/$$$$$AA/AA$AAA/$$/$AA@;$idai;$nbai$$abn$;ci$9ban$9bcc$9dia99iiaiocceeopdppopqqriceceeopdepepqqribecceopccqeppqridocceooibqeppqrppppppppvvvvvvvrppppppppvvvvvvvvpppppppprvvvvvvvpppppppprvvvvvvvpoeccbcirqppecebpooccbbdrqppoeccpooecbbcrrqpoebopoeecbbcrrqppecenbnnndi99nidi99iiid99inib9bcccb$9iac9dnbn9<*<<(>*><$**><9>><9>><*9<><<9<*<<9>*<<$<>*<$<<*>9<>**<>>*<>>9<<><9<<*<9$<<*>9ng99nga99iia99in9gn9$jhhh9j9ngnhgjhmmgkhmstuijghkmmhhklstujgjhkmlgljklttuhgjhkmlimhmltuulsssttttuwwwwwwwlssttttsuwwwwwwwsssttttsuwwwwwwwsstttttsuwwwwwwwsslmkhhmwuutsllssllmkhkhwuutsmtmsllmkjmjuuutsmthslmmhjliuuutlkugngn$;ign$;aja$$ij;$ag9$hhhg9$ni9$aii99><+.=KKK8%.=(+&%+&(+(8NNQTTV.&=KR

_!+.KWTX.&!P
CK%%RTR!+%..T
&((((<>*$<>**$$<>*>$<>**6$<>**$<>**$<>**>$>*<$;(;$$$*;9*;*$>$>*>$*>;*>9*>6*>(>>*(>>(3(83,;338+8;888B/8+3(B38((3BB8(8;;,,;33,;08,;!!88;88B883,3,333,0+3,+033+,3,/8A0@8/AA80;0;A/+;;+8;,8;;,+8$;,8,,,;;,8,,;;,8/@88/888;,,A;$A,,;,,;,,,,,,@,,,,,,,@,,,,,,,@,@@@@@@0@38888$$$$$$$$,,,$$$$$,,,,,$$$@@@@@@@/,,,,,,,,,,,,,,,,,,,,,@$$$$$$$@$$$$$$$@$$$$AAA0/////0/@$,,$$;$@,,,,$$$@,,,,$AA@,,,,$@8$A/AAAA$$/$$$$$$$/AAAA//!0000'$A/AAAAA,$/$$$$$$/$AAAA0@@A@99ida;9$nda99$nba9$c*9ba<;9bn;9di$99diidpbceooidqeopqqiiecceeoidpoopqqnicccceoniepeppqaibecceoaibpeppqpppppppprvvvvvvvpppppppprvvvvvvvpppppppprrvvvvvvoppppppprrvvvvvvppoeccbcrrqqpoceppoeecbbvrqqpoecpppoecbbvrrqppecppooeccbvvrqqpocdnndi9biidi9biiideiinb$ciaacodnbncdnndiebiidi9**<<99>>99<><*99<><<99<><66>><96><6<>*9<<**9<>>9*<><99<<><99<><99<>>66<>69*><69nga9iiain$gnjanjinganiiajijgjhmmljkhlstuugjghkmllmhklttuuhgjhkmlslhmltuuuhgjhmmlskhmstuuwsstttttswwwwwwwwssttttsswwwwwwwwssttttsswwwwwwwustttttsswwwwwwwuslmkhjlnuuttlmtillmkhhmauutsmllillmkjkhuutsmsknlmmhjmguttlmtjain99gn$9;ga$99j$9j9*ag9;<ng9;ii99$()(A<>>**996_((0(((****>>>>;;;666>**
$>**

>**<**<**<<*<<***>$<>*>$;;$>(>*9$$><><><></*><>*<>*<*<*<<8B3338(3(3(3(33(338833(3333(33+B3+++3(388333;;883,8;,(8;3(8;,3(8(;(3(8(((;++3,+8((((;((((,;,,;,3,3388;8;33,,33((8888;;;;;;;@;;A8888888@,,,$888$A88$AA8$$8$$A/8888@/0A;;;,A$A0A@@A@AA/A88@A$@,$8A0A@8@0A80A;88//000/00!8,,A@;88++$99(id$99id$9$nb9$c99;b9b>d9iaidobceenidqeopqnniebceeidpoepqaniccccennieoeppiaibebceinibpeopopppppppqrvvvvvvopppppppqrrvvvvvopppppppqrrvvvvvooppppppqrrvvvvvpppoeecbvvrrqpoepppooecbvvrrqppeppppoeccvvrrqqpeppppoeecvvvrrqpobbiiidceinnbbciaccodnbnbcdnndicebiiidbbbiinbecoinc$66<><66<><66>><9*><<<*$><<>6>><<><66$<><66<>>66<>*9*<<<>$><<>>6gngjnmajhngiliiaihiijkgnjjjamhjghkmllshklttuuwgjhkllsshmltuuuwgjkmmlsskmstuuwwjhkmllssklttuuwwstttttsswwwwwwwusttttsslwwwwwwwutttttsslwwwwwwuutttttsslwwwwwwuulmkhjmiutslktilmkjjmautsmmsilkhhhhutlmlknmkhjkgttlksjain(99$in99$gn$9$j$9j;96ag9ni>ii9CCCC
(+&##+&&(3&+XX#&%%!!.==8+&%!=V!!.=KKR%.=KNW%!=KNPP.NRRVSTX#3K==.!!%%ZV=!%&+RRKK=.!!TWNK=.%&
PPNK=.TTSZRRN.CCC%&&&+##%%%&&&++#%&&++#<****<>**><>***><>**><>***>***>***>***;$;$$$$;$$$$999999999$99(9>*><>*><$**><9*><9>><*9<*<<9<*<<9>*<<$((((((((((((((((33((333(33(((3(((3(3(((((((((3((((((((8((((+3((((3+3(((8(((3(33,33,,333((3((333(((((33333,3,;,;;,3;3,;,,,,8,;3,((;,,8+,;8;8!/+,,8A;8;;;38,,;;3,8,,;+3,;38+x3;8;8;8;;
9i
$6n$$a$6$<6;<9<*9<<99dnidebcebaidpeopbaniebcccndpeepbaniccbcdiaieoepdcccccbcidaibpeoeoppppppqqrvvvvveoopppppqqrrvvvveopppppppqrrvvvveooppppppprrvvvvppppooecvvvrrqpppppppoeevvvvrqqppppppooevvvvrrqppppppooevvvvvrqqbbcinbocodindcbcdniioeeciincbbcinpecpinccbcibccpocobiin<<i$<d<>b>>ca*<<di$<cd<ib<><<<$><>><<*a<$n<i><gngkgiiailhgnaihgjnhmkjjjjgnlhmhhhgnkgjngmkmjhmmlsssmstuuuwwhkmmssstlstuuwwwhkmlssstltuuuwwwkkmlssttstuuwwwwtttttsslwwwwwuuuttttssllwwwwwwuuttttsllmwwwwwuuuttttsslmwwwwwuutmkhjmitslhtimkjgmatsmksnmhjjhatlmlkankhjhhhhhslkljiin9
gn6;
ja$$j$6$g;6<g9<i9*<n99<<3+&%#&!&!=%.K+%=KN&PZXW&PXRCPZXW.NRRC


=RXTTWR
NRC
X[NXPZTW[NPXPC
RN[CQWTTVP[




NNWTTWVP[



CRRNT
RWTTXQ
XN[X

RVXPN[WTZNQC[NR

K[QV
WTTNNK



K[`VWTT.%&#K!&#N=!&3PK.%+#PNK.8WXV!+(
CR!+WWXX!+(>***<<***><***><>**><>**><>**><>**><>**>99$9$99$9;*9<9;9$9999$9**<<99>><99<><*99<><<99<*<66>><96><6<>*(D(((((((33(3(((((((((((3((((((((((((((((((3(3(3(((((3((((33((((((((33(((3333338888x3B83BB0(((((3(((((8x33(((((B<9>>
$>$$>><><*69><<99nbnndebcabaidpcocniebcbnnioeediaicbbiiniceeidnidcbnbnibpcceoppppppqqrrvvvceopppppppqrrvvvceooppppopqqrvvvceeoppppopqqrrvvppppppoevvvvvrrqppppppoovvvvvrrqpppppppovvvvvvrrpppppppovvvvvvrrecbcbiipoeeeinecbbcinappocpdiieecbediiqpoeocinoecbbciaqppeepdiac*<bidiid9<ac;*bndinid<*jngii<9gn*;janjiignaghjhakmklakgjhaishmsikghkahmklthjjhkanskmstkmllssttttuuwwwwmllssstttuuuwwwwmllssttttuuwwwwwmlssstttuuuwwwwwtttssllmwwwwwuuttttsslmmwwwwuuuttttsslmkwwwwuuttttssllmkwwwwuutskhgkigsmhsijhhgmjlmklnaghjjjnglkmhiihghiiimhlgagnn9>a>$
>$$>><>96<>99<<>80.KN#+%.K(.((+%+#(P

RN[CQPZTW[NPXNR

X[NX=QXTTWR
%NQRC


+%KQRZST+%=KNP+%.KKWNQ	[NR

VXPN[WTZ
XNNX

RT
RWTSXR



CRQKTTSZRQN%
P[N=%+TWK=!%+#PNK.&3PK.N.+=%+%+#+#((<>**>
<>**>>>*>>>*><>>**><>**><>**><>>*>$99($99$96$96$996;9>$66<><66<><66>><96*><6<<*$><<>6>><(DDEEEG#B3((((3DE3(((33(338(3BBB33(((((3((((33BBB83BBB33(333333333(((3(((((((><9><><$><;>>>>6>>*99<<99abanicbbandpcbnaicbdinieeidnibbndnibeabnndccndocceoppppeppqrrvvbceoopppeopqrrvvbceeopppcopqqrrvbcceopppceppqrrvppppppppvvvvvvvrppppppppvvvvvvvrppppppppvvvvvvvvppppppppvvvvvvvvoeecbeinrqpoepbiooecbcbirqppoeodpoeccboirqqpoepbpooecbebrrqppeoeiac$ibnadi9naid$niacinbniadidnaid$janj9ii$gnajanjiignnmghkmjsklstjhjhklnlmmstuamghkmmgtklstugkjhkmlnmlmstuumlssttttuuwwwwwwlsssttttuuwwwwwwlsstttttuwwwwwwwssstttttuwwwwwwwttssllkhwwwuuutlttsslmkhwwwuuttltssllmkhwwwuutsmtsslmmkjwwuuutlmhgknjamhlnjjghngkkkanijjgiihmjgnghnjahlij9<><>$
<>$<><>6<>>99*<>>99<<$>$**$*$9$;9969$$(+&!KR(+.V8&%3+(99$$$$RRK!&+ZV.+!!&8++3(7A9$;99(((*>*>*;>*>****999;$<>>>><>>*><>>>><>>><>>><>>><>>><>>>96$$;$<6<9<*9<<9<<$<<>>>*<<$<(><><((((((((##*A(((((((((((((#&+###(((((((((((((((D(((D((((DDD((DD(D(<<
<<;$66$99

99

*;

>$**9baaic$dinie$iinib;idiib;nbnnd;cni;bcccbbceooppceopqrrvbbceeoppecopqqrreprvvzzzbcopqprrcbbceoopppppppppvvvvvvvvppppppppvvvvvvvvzzzzzzzzvvvvvvvvpppqpqppppoeccberrqqpoepppooecbevrrqppoozzzzvvvqvrrqrpoepppooecbinnacbinbnbiadiediaideinnabcdinbadddccccnajangiignnjaaajainhhhhinamjhhmmlgtklttuugkjhkllsmlmstuuumtwww{{{jkltutuwgjhkmlssssttttttwwwwwwwwssttttttwwwwwwww{{{{{{{{wwwwwwwwtttttttttsslmkhjwwuuttlkssllmkhjwwuutsmh{{{{wwwtwuutulmhsslmkhjgghnghmani$jgii$kjin;miagn;gnj;jhhhj;
<<;<<6699$99

;*

$>

66**CCC&!!3#$+&!!++&&&%%#+99!!!!++!!!!!!!!++%%!!.!..++&&%!.<<
(,88!!!!!!!%&&&%%%!!====KKKK==KK[PR;>%&88!%%&+#;KK==!+P=!&8<>>><<>><>><>><>>
<>>
<>>
<<><9>>
$>$$>><><*69><<99*<9<;*<*+>+>@#<<>##>#><A##+++&#&#&######+D#3#+######(((3(####(((((((((((3```````````````````P`P`````````````P`````````````````````P``````````````````````P`````````````````````
Last edited by sylux102 on 8:34 PM - Jul 12, 2013, edited 1 time in total.
A sword wields no strength unless the hand that holds it has courage.
Quote
Like
Share

Arcaith
Advanced Member
Arcaith
Advanced Member
Joined: 9:56 AM - Jun 25, 2013

1:00 AM - Jul 14, 2013 #7

Notepad won't be of any help if you're wanting to document the format, you'd need to look at it in hex using an editor like XVI32 or Hex Workshop. Especially since none of the file seems to be in plain text.
pantsu~
Quote
Like
Share

sylux102
Advanced Member
sylux102
Advanced Member
Joined: 5:15 PM - Jun 09, 2013

2:48 AM - Jul 14, 2013 #8

Arcaith wrote: Notepad won't be of any help if you're wanting to document the format, you'd need to look at it in hex using an editor like XVI32 or Hex Workshop. Especially since none of the file seems to be in plain text.
Well I already ha opened it in hxd and the ASCII side showed what I copied and pasted. Just used notepad to check if it was the same so I don't know. I heard somewhere that the first 60 bytes determine the file format, so idnk if that applies here or if that's totally wrong. I've never used a hex editor to reverse engineer a file before. And I've never done the latter before either. But there's always a first for everything I suppose.
A sword wields no strength unless the hand that holds it has courage.
Quote
Like
Share

Flotonic
Advanced Member
Flotonic
Advanced Member
Joined: 2:40 PM - Nov 22, 2012

7:42 PM - Jul 16, 2013 #9

The contents of the "hex" side of the hex editor are what are typically the most important when documenting file formats. A good example of this is the F3DZEX format:
wrote:Command Format
06 A1 B1 C1 00 A2 B2 C2 - Draws two triangles: one from points { A1, B2, C1 } and another from points { A2, B2, C2 }. Each point should be divided by two.
05 AA BB CC 00 00 00 00 - Draws one triangle from points { AA, BB, CC }. Each point should be divided by two.
In the above example, the hexadecimal representation of two commands is listed, followed by an explanation of what the command does. With image file formats, headers are common, which contain information about the type of image it is, the width of it, the height, and any other necessary information. For OoT, texture data is in a raw format and textures do not have headers. Instead, their widths, heights, and formats are determined by commands near the command that points to the texture. Hopefully this is not the case with the format that you want to convert.
Last edited by Flotonic on 7:43 PM - Jul 16, 2013, edited 1 time in total.
Quote
Like
Share

xdaniel
Advanced Member
xdaniel
Advanced Member
Joined: 12:02 AM - Mar 23, 2013

10:44 PM - Jul 16, 2013 #10

This game, right? http://en.wikipedia.org/wiki/C.O.R.E._%28video_game%29

.chbg files appear to always being with two ASCII spaces (0x20), followed by the tile count (2 bytes, swapped, so ex. 0xB302 -> 0x02B3, or 691 tiles). Starting at offset 0x04 begins the tile data, 8bpp linear format, for [tile count * 0x40] bytes, so ex. with 691 tiles, 691 * 0x40 = 0xACC0. Following the tile data comes the palette, seems like BGR555 format, 256 colors, thus [256 * 2] bytes long. After that, and to the end of the file, seems to follow the tilemap.

.chbg.bin files might be compressed, no idea about those.

Hope that'll get you started. Tile Molester screenshot:


Quote
Like
Share