News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: (Zelda TP, Zelda WW Gamecube)How can I decompress arc to bmg?  (Read 4988 times)

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
(Zelda TP, Zelda WW Gamecube)How can I decompress arc to bmg?
« on: October 10, 2014, 01:28:20 pm »
Shit I waste a whole day. Im looking for a tool decompress arc to bmg. Finally I found this tool pack: szstools at http://www.amnoid.de/gc/  Which contain rarcdump.exe and yaz0dec.exe
I also found this txt http://zelda64rus.ucoz.ru/_fr/0/tp_iso_file_ind.txt  it said "bmgres.arc (Yaz0 than rarcdump to get zel_00.bmg (script) and zel_unit.bmg (table of strings)"
I open readme in szstools
"At first, run
> gcmdump supermariosunshine.gcm
to extract the files from the gcm disk image to your harddrive.

Then, copy "yaz0dec.exe" and "rarcdump.exe" into the "data" and "data/scene" subdirs of your supermariosunshine.gcm_dir. In these directories, run
> for %i in (*.szs) do yaz0dec "%i"
> for %i in (*.rarc) do rarcdump "%i"
to first unpack all szs files and then extract them from the .rarc files (the above commands work with WinXP cmd.exe, for Win98 you may have to modify the syntax)."
My folder \root\res\Msgus just contain
bmgres.arc
bmgres1.arc
bmgres2.arc
...
So I just copy "yaz0dec.exe" and "rarcdump.exe" to \root\res\Msgus and run them.
They returned new empty folder (if success it were contain .bmg files). Why? I properly follow the readme, even I try not to type szs line (because my folder doesnt have .szs files), change (*.rarc) to (*.arc) (because my files are .arc not .rarc)...
Meh. I can't coutinue myseft  :banghead:, I need some help  :'(. Who did work with those 2 games or know how to decompress arc to bmg please teach me  :(. Thank you very much.  ;D

FAST6191

  • Hero Member
  • *****
  • Posts: 2427
    • View Profile
Re: (Zelda TP, Zelda WW Gamecube)How can I decompress arc to bmg?
« Reply #1 on: October 10, 2014, 02:00:25 pm »
It sounds like you would better off knowing what the steps are doing

yaz0 is a type of compression that was commonly seen on the Gamecube and Wii. http://www.amnoid.de/gc/yaz0.txt and http://wiki.tockdom.com/wiki/YAZ0_%28File_Format%29 has some more.

arc is a type of archive format also seen on the same, and which also formed the basis of the NARC/CARC format seen on the DS.

BMG is a text format seen on the GC and Wii, and also has a related format that is also called BMG seen in a few games on the DS.

arc archives can be compressed with yaz0 but the basic rarcdump tool can not handle this, fortunately yaz0dec can decompress this and provide you with a normal arc file.
The following part
"> for %i in (*.szs) do yaz0dec "%i"
> for %i in (*.rarc) do rarcdump "%i""

That is a batch file, however it makes use of the more complex scripting aspects ( http://www.csie.ntu.edu.tw/~r92092/ref/win32/win32scripting.html ) of the command line to do what it does ( http://technet.microsoft.com/en-us/library/cc755694%28v=ws.10%29.aspx ).

The first command attempts to run yaz0dec on all .szs files, as you have none it does nothing and removing it will also still leave you with yaz0 compressed files.
The second command attempts to unpack the rarc files in the folder.

Neither in that state will do much for you. What you want to do is first run the yaz0dec program on your arc file(s) and then run the rarcdump tool on the results of that.

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (Zelda TP, Zelda WW Gamecube)How can I decompress arc to bmg?
« Reply #2 on: October 10, 2014, 10:05:23 pm »
I drag bmgres.arc to yaz0dec.exe, the result is bmgres.arc 0.rarc
I drag bmgres.arc 0.rarc to rarcdump.exe, the result is bmgres.arc 0.rarc_dir folder which contains \bmgres\zel_00.bmg and zel_unit.bmg.
Hah. Yesterday I search all the way on the internet but cant solve this. I should ask you instead.
OK thank you. Now I can work with bmg files. :D
Ops. I forgot. After I edit zel_00.bmg and zel_unit.bmg how can I compress them to bmgres.arc?

FAST6191

  • Hero Member
  • *****
  • Posts: 2427
    • View Profile
Re: (Zelda TP, Zelda WW Gamecube)How can I decompress arc to bmg?
« Reply #3 on: October 11, 2014, 06:55:30 am »
That might get more tricky.

First have you increased or shrank any of the text lengths inside the BMG file? If so then first you have to sort that. If you have used something like the BMG editor from http://wiki.tockdom.com/wiki/CTools_Pack it should have done it for you but if you just used a hex editor then you get to fix it. http://wiibrew.org/wiki/BMG_files and http://wiki.tockdom.com/wiki/BMG_%28File_Format%29 has some of the formatting if you are doing that.

You will then need to get the files back inside an arc/rarc archive. I have not tested the GC/Wii stuff but the later posts on http://www.emutalk.net/archive/index.php/t-49534.html would appear to have some, downloads for a few of them still seem to be working too. If you have java on a machine you might also like https://github.com/Chrisliebaer/TriangleUtil

Depending upon the hack and the hacker not everybody will recompress a file that has been decompressed, however this is not necessarily trivial and yaz0 compression is available in general and supposedly on the TriangleUtil stuff I linked in the previous part. I am not sure what else there is though and I have to run shortly so you may have to do the search bit.

vanngoctien

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: (Zelda TP, Zelda WW Gamecube)How can I decompress arc to bmg?
« Reply #4 on: October 11, 2014, 11:13:29 pm »
Hi dude. Uhm what can I say. The BMG files are my friend's problem, my friend edits them, I just handle how to decompress ARC to get BMG files and how to recompress them to ARC again and after that I insert those new ARC to new ISO. Yep, thats all my works, I dont work with BMG, sorry the post before I said I did work with them but what I meant is "we".
I dont know how DS/N64 files will ought to, but when I have BMG files from my friend I google and find this tool: Lunaboy RARC Tools. Link download:
http://shedevr.org.ru/zelda64rus/tools/Lunaboy_RARC_Tools.zip
It can compress bmg bmc things to arc. I insert that new arc to new iso and it runs fine. :) It is not that much complex, isn't it?
I dont have much experience about hacking game, I just can say, he could increase, or decrease text length or whatever he did with those BMG but that tool can still can compress them well. That is a tool which very useful for compressing ARC, atleast with Gamecube files.
But of course, you have much experience and I thankyou for your helps. :) Good day, sir.