Author Topic: Tutorial for itoikenza: how to delete music from battle  (Read 2035 times)


itoikenza

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 89
  • Thank You! Danetta utunnels alfadorredux! prizvel
    • View Profile
    • YT!
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #1 on: November 13, 2017, 09:23:48 pm »
prizvel. can this be done to Danetta's Single.bin? i think there will be a conflict with disk 2 battles...

prizvel

  • Guru of Time
  • Guardian (+100)
  • *
  • Posts: 113
  • Our planet's dream is not over yet
    • View Profile
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #2 on: November 14, 2017, 03:03:24 am »
prizvel. can this be done to Danetta's Single.bin?
Yes, if you have tablefile from single.bin. In the PurpleCatTool folder is a table of the original disks. For mod disks need a new table.
i think there will be a conflict with disk 2 battles...
There will be no conflict. Just this procedure should be done for each disk separately

itoikenza

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 89
  • Thank You! Danetta utunnels alfadorredux! prizvel
    • View Profile
    • YT!
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #3 on: November 14, 2017, 06:17:32 am »
Is it easy to make a table file? Can i just look at the locations in an unmodded version? In a hex editor? Compare. Then change accordingly? btw, i don't have any free time to attempt this till friday... my day off from work!
« Last Edit: November 14, 2017, 06:20:20 am by itoikenza »

prizvel

  • Guru of Time
  • Guardian (+100)
  • *
  • Posts: 113
  • Our planet's dream is not over yet
    • View Profile
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #4 on: November 14, 2017, 11:54:13 am »
Quote
TOC
The Table of Contents (hereafter TOC) is literally the most important file to work with for purposes of Chrono Cross modification. It is essentially a giant pointer table that the game engine uses to determine where every file begins and ends, and occupies 12 sectors beginning at sector 24 (offset 0xc000 in an ISO, offset 0xdcc8 in a BIN).
The TOC entries have a four byte stride and can be presented thus:
SS SS FS BB
Where...
S = "Logical Sector"; 2.5-byte little-endian pointer indicating the sector boundary on which the file begins.
F = "Flag"; the first bit of this nybble will be set if and only if this TOC entry is a duplicate of the next real record.
BB = Number of zeroed buffer bytes between the end of the file and the next sector boundary, divided by 8.
For instance, the entry for file 0001 is 4E 01 00 F7. To find the starting location of this file in a CD image, we first reverse the first 2.5 bytes (yielding 0x0014e) then multiply the result by 2048 for an ISO image (= 0xa7000) or by 2354 for a BIN (= 0xbff3c, then add an additional 24 to account for the sector header, giving a final total of 0xbff54).
It is possible to write a program, but I'm not a programmer

alfadorredux

  • Entity
  • Mystical Knight (+700)
  • *
  • Posts: 746
  • Just a purple cat
    • View Profile
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #5 on: November 15, 2017, 08:25:57 pm »
The Purple Cat Tools table files aren't complicated. The tables for version 0.3 are just lists of [filename],[location in ISO]. For instance, let's look at the entry for file 0001:

0001.boot.cfg,0x000A7000

That tells us that the file is named "0001.boot.cfg", and it starts at byte 0x000A7000 in an ISO image of the game disc. The passage prizvel quotes above explains how to derive the 0x000A7000 from the disc's TOC, and where to find the TOC in a disc image. Creating a new disc table just requires a hex editor to view the TOC, a calculator that understands hex, and a lot of patience.  (I seem to remember that utunnels once managed to dump a disc for an entirely different Squaresoft PSX game using Purple Cat Tools and a custom table, a very long time ago.)

Version 0.4 of Purple Cat Tools doesn't even require the addresses, just a list of filenames, but I never really finished it, so some of the scripts are buggy.

itoikenza

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 89
  • Thank You! Danetta utunnels alfadorredux! prizvel
    • View Profile
    • YT!
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #6 on: November 15, 2017, 08:56:49 pm »
Wow, alfadorredux. i dismissed prizvel's post. Thanks. i have all day tomorrow to do this. Heck yeah! Sorry prizvel. you scared me when you said "not a programmer" Hex ediors and hex calculation is right up my alley. Look out for my "BattleThemeSameAsRoom.bin"!!!

prizvel

  • Guru of Time
  • Guardian (+100)
  • *
  • Posts: 113
  • Our planet's dream is not over yet
    • View Profile
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #7 on: November 16, 2017, 05:33:38 am »
In table ~5000 records. I do not thought that someone wants to do it manually. For my single disk, I used the script for Excel, but even with him it took me a long time

itoikenza

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 89
  • Thank You! Danetta utunnels alfadorredux! prizvel
    • View Profile
    • YT!
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #8 on: November 16, 2017, 06:52:38 am »
Haha! Yeah! i am getting ready to do it right now! Should be done by end of today!

prizvel

  • Guru of Time
  • Guardian (+100)
  • *
  • Posts: 113
  • Our planet's dream is not over yet
    • View Profile
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #9 on: November 16, 2017, 07:38:42 am »
Haha! Yeah! i am getting ready to do it right now! Should be done by end of today!
You're crazy) but if so, please upload the result))

itoikenza

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 89
  • Thank You! Danetta utunnels alfadorredux! prizvel
    • View Profile
    • YT!
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #10 on: November 16, 2017, 08:20:46 am »
Of Course. I will upload my mod. And Hey i know i am Crazy. But PurpleCatTools v0.3 is missing the .bat files. You used in the video.

prizvel

  • Guru of Time
  • Guardian (+100)
  • *
  • Posts: 113
  • Our planet's dream is not over yet
    • View Profile
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #11 on: November 16, 2017, 08:29:15 am »
PurpleCatTools v0.3 is missing the .bat files. You used in the video.
Yes, I wrote them myself, so in the video I show what is written in them.

itoikenza

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 89
  • Thank You! Danetta utunnels alfadorredux! prizvel
    • View Profile
    • YT!
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #12 on: November 16, 2017, 10:36:05 am »
Ok but you don't use "builder.bat" what is that?

Nevermind. I see where you rebuilt the image with "builder.bat" in the video.

UPDATE: Damn! my .img from an emu site is eff'd up. it doesn't have all the Same TOCs. i tried to look at that .img in a hex editor from the last 5617.out. but 5613 is different in my .img... i gotta use iso buster to make a good image of CC myself. but i forgot how. This is gonna have to wait till i get another day off! IT CANNOT BE THANKSGIVING!!!
« Last Edit: November 16, 2017, 06:46:37 pm by itoikenza »

alfadorredux

  • Entity
  • Mystical Knight (+700)
  • *
  • Posts: 746
  • Just a purple cat
    • View Profile
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #13 on: November 16, 2017, 08:13:45 pm »
Some thrashing around in disused corners of my hard drive found some old scripts that may be of use in TOC generation. In particular, the "test.pl" script inside the zip seems to be set up to generate a Purple Cat Tools 0.3 style TOC file from a .bin disc image. You'll need to replace the bit in line 3 that says [CD image file] with the actual name of your file, since I never set it up to take parameters. You may want to change the output filename in line 18 to something other than out_addrs_j.csv, too.

I don't even remember writing this, although I guess that isn't surprising after ~10 years. Good thing I'm a digital packrat, or it would have vanished a long time ago.

itoikenza

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 89
  • Thank You! Danetta utunnels alfadorredux! prizvel
    • View Profile
    • YT!
Re: Tutorial for itoikenza: how to delete music from battle
« Reply #14 on: November 18, 2017, 03:36:01 pm »
How do i use this exactly? A v0.3 .bat?