Welcome Guest [Log In] [Register]
Welcome to Maco. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Decompile NDS Image Files; Not .NCGR or whatever
Topic Started: Jul 11 2013, 02:53 AM (4,308 Views)
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
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.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
Flotonic
Member Avatar
Administrator
[ *  *  * ]
Do you know the format of the file to convert?
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
Flotonic
Jul 11 2013, 04:58 PM
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.
Offline Profile Quote Post Goto Top
 
Flotonic
Member Avatar
Administrator
[ *  *  * ]
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.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
Flotonic
Jul 12 2013, 11:16 AM
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.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
When opened in Notepad, the file looks like this:

Code:
 
 +  (
  $     < $#+ (++
<< #(##+&&!!!####&!#99++!!!!!!!!!!!!!!CCC!!&#3 !!&+$###&&+CCCCCCCCCCCC       CCCCCC+   *(  CCC+&&&##+&&&#++++!##!!!########&&&&&&&&&####&#####&&&&++++CCCC C&+(&&+(3CCCCCCCCCCCCC      CCCCC +!!#!!!#++&CCCCCCCC!!!!!!!!!!!!!!!!!!!!CC!!!!##!!!!!!####&&&C&+( &+
+    < $#++&+
<< #(##+&&!!!++%!......!$$$$$$$99++!!!!!!!!!!!!++++++++........$$$$$$$$CCC!!&#3 !!&+$#!!&&+$%+CCC+&&&##+&&&%#++&%%!%%%%!!!%)&&*/%%!&-+%-&###%%%%%%&&&)&&!%%-%+%-%CCCC C&+(&&+#(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*
$;$66 9$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$;$99699699699969966999669996669966666 9;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=WKKKTSKCCCC C&+(%&+#(!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
99 99(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;9 6 6*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%!!!.!%&!+SP CP&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;b 9b >d 9iaidobceenidqeopqnniebceeidpoepqaniccccennieoeppiaibebceinibpeopopppppppqrvvvvvvopppppppqrrvvvvvopppppppqrrvvvvvooppppppqrrvvvvvpppoeecbvvrrqpoepppooecbvvrrqppeppppoeccvvrrqqpeppppoeecvvvrrqpobbiiidceinnbbciaccodnbnbcdnndicebiiidbbbiinbecoinc$66<><66<><66>><9*><<<*$><<>6>><<><66$<><66<>>66<>*9*<<<>$><<>>6gngjnmajhngiliiaihiijkgnjjjamhjghkmllshklttuuwgjhkllsshmltuuuwgjkmmlsskmstuuwwjhkmllssklttuuwwstttttsswwwwwwwusttttsslwwwwwwwutttttsslwwwwwwuutttttsslwwwwwwuulmkhjmiutslktilmkjjmautsmmsilkhhhhutlmlknmkhjkgttlksjain(99$ in99$ gn$9$j$9j;96ag9 ni> ii9 CCCC
 (+&##+&&(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;
<<; <<66 99$ 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`````````````````````
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
Arcaith
Member Avatar
Advanced Member
[ *  *  * ]
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~
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
Arcaith
Jul 13 2013, 08:00 PM
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.
Offline Profile Quote Post Goto Top
 
Flotonic
Member Avatar
Administrator
[ *  *  * ]
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:

Quote:
 
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.
Edited by Flotonic, Jul 16 2013, 02:43 PM.
Offline Profile Quote Post Goto Top
 
xdaniel
No Avatar
Advanced Member
[ *  *  * ]
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:

Posted Image
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
xdaniel
Jul 16 2013, 05:44 PM
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:

Posted Image
Seriously? All I had to do this whole time is open it in tile molester? Wow do I feel stupid. Yes that game.

What about the model texture files? (.tex or .ltex) how do I view those? Should I try to see the hex format on my own and check back with someone that can crack it to be editable correctly?

.chbg.bin files I believe are for title screens and such. Would figuring out compression methods be difficult? I think it may use lz compression (almost every compressed nds file does) I might try to decompress and run through tile molester later.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
xdaniel
No Avatar
Advanced Member
[ *  *  * ]
I didn't just open them in Tile Molester, tho - without actually poking around with a hex editor, I wouldn't have found the palettes, for example. Also, if you care about the tilemaps or whatever data there is after each file's palette, TM alone isn't going to cut it anyway.

As for .ltex files, those that don't start with the tag "LTEX" appear to have a header of 0x10 bytes, no idea about its format. I'm guessing it determines at least the texture's size. After that, at 0x10, there's the pixel indices, 8bpp linear format like .chbg tile data, but in a different order (in Tile Molester, "View" -> "Mode" -> "2-dimensional"). And after that, again, follows the palette, and again seemingly in BGR555 format, 256 colors. I'd imagine you can view and edit those all in TM. Now, the .ltex files with that "LTEX" tag have a different format, and while you can sorta look at them using TM, it's not a pretty (nor remotely useable) sight.

The .chbg.bin files begin with a 0x11 byte, which IIRC indicated an LZ-compressed file, yeah. You could try decompressing it with dsdecmp or somesuch, then I assume you can treat it like an uncompressed .chbg (two ASCII spaces, then tile count, etc.).
Edited by xdaniel, Jul 17 2013, 11:15 AM.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
xdaniel
Jul 17 2013, 11:14 AM
I didn't just open them in Tile Molester, tho - without actually poking around with a hex editor, I wouldn't have found the palettes, for example. Also, if you care about the tilemaps or whatever data there is after each file's palette, TM alone isn't going to cut it anyway.

As for .ltex files, those that don't start with the tag "LTEX" appear to have a header of 0x10 bytes, no idea about its format. I'm guessing it determines at least the texture's size. After that, at 0x10, there's the pixel indices, 8bpp linear format like .chbg tile data, but in a different order (in Tile Molester, "View" -> "Mode" -> "2-dimensional"). And after that, again, follows the palette, and again seemingly in BGR555 format, 256 colors. I'd imagine you can view and edit those all in TM. Now, the .ltex files with that "LTEX" tag have a different format, and while you can sorta look at them using TM, it's not a pretty (nor remotely useable) sight.

The .chbg.bin files begin with a 0x11 byte, which IIRC indicated an LZ-compressed file, yeah. You could try decompressing it with dsdecmp or somesuch, then I assume you can treat it like an uncompressed .chbg (two ASCII spaces, then tile count, etc.).
Ah I see. I have never used TM before, does it allow editing similar to crystltile?

I don't really care too much about tile order--that's a luxury I can live without. A long as I can see it an edit it I'm fine, I am pretty good at puzzles. As regards ltex, many are gross brown (seems like the only color in that game).

Now my biggest concern are the lmesh and level files. I don't mean to sound like I want you to do it for me (while that would be nice of you) I perfectly ok with learning on my own. I know for certain the lmesh files contain 3d model data. They do not contain animation information. What would it take to get an lmesh to be editable? Seeing as most companies don't write their own modeling program for one game, I assume they used a commercial file, possibly encrypted it, then renamed the extension. (anyone else remember quakes .pk3 that was actually a .zip renamed to pk3?)
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Other (Modding) · Next Topic »
Add Reply

As some of you may know, I have left the rom editing scene, never to return. I will be attending UNL. I will also be getting a job, so I will not have the time to run a community and make all of these projects.

I'm leaving you all in good hands. Sylux102, one of the best Maco staff members, will be carrying on in my stead. His forums are on Zelda64.net. Register there, since this website is archive only.

As for OoT 2D and Izou, I will be leaving those in the hands of GodsTurf's team, Lunar World. If you are fans of these projects, subscribe to them.