gemot encubed  

Go Back   gemot encubed > Gemot > Technical Issues

Technical Issues For bug reports, problem solving, and help running Japanese software.

Reply
 
Thread Tools Display Modes
  #1  
Old 2006-03-03, 07:44
Rasqual Twilight
Guest
 
Posts: n/a
Default PS2 CLANNAD: Voice files /MRG[KO] HED[OK] NAM[OK]/ WIP 0.8

I tried reversing the file formats from the DVD to extract voice files.
Here are the fruits of my research so far.



HED and NAM are completely reversed, they are relatively easy to figure out.

As for the MRG, I'm having quite a few problems with raw size (sometimes it overflows pad size) and the mysterious bytes after the sampling rate.
If anyone dosn't mind taking a look... (It would help if you had the DVD handy, though)

Edit 0.8
Fixed: rawlen is probably uncompressed size.
Fixed details on variable-length zone.



References:
http://www.smallnews.net/azuco/column/cri.htm
http://www1.mplayerhq.hu/cgi-bin/cvs...cvsroot=FFMpeg
http://www.halleyscometsoftware.com/in_cube.html
http://ku-www.ss.titech.ac.jp/~yatsushi/adx.html

http://www.ayashii.com/mizuiro/tools/ (adx2wav)
http://www.dekazeta.net/index.php?ac...details&f_id=1 (DKZ Studio editor, can play adx files)
Reply With Quote
  #2  
Old 2006-03-03, 14:52
zalas zalas is offline
 
 
Join Date: Feb 2004
Location: fushigi misuterii
Posts: 1,831
Send a message via ICQ to zalas
Default

HED, NAM, MRG... sounds like exactly the file system Baldr Force PS2 was using. There are some really funny offset/size things with those headers which I could never figure out the reason for. Maybe it had something to do with the way the stuff is memory mapped...
__________________
~Yoda is waiting in the air~ | HAVEN
Reply With Quote
  #3  
Old 2006-03-04, 03:51
Haeleth's Avatar
Haeleth Haeleth is offline
Ex-boss
 
Join Date: Mar 2003
Location: England
Posts: 2,106
Default Re: PS2 CLANNAD: Voice files /MRG[KO] HED[OK] NAM[OK]/ WIP 0

Quote:
Originally Posted by Rasqual Twilight
As for the MRG, I'm having quite a few problems with raw size (sometimes it overflows pad size) and the mysterious bytes after the sampling rate.
Looking at your notes, it looks like this is indeed likely to be compressed using the same algorithm as the scenario data. The "raw size" would then actually be the decompressed size. If you run the first mysterious byte through f(x) = (x >> 1) + 1, does the result correspond roughly to the number of plain bytes before the next mysterious byte?
Reply With Quote
  #4  
Old 2006-03-04, 10:40
Rasqual Twilight
Guest
 
Posts: n/a
Default

Quote:
Note: opened an Subversion repository for this mini-project:
http://opensvn.csie.org/rasqual/clannad/
Uhmmm the formula is not correct, but it's my fault for not providing enough samples to see there are quite a few exceptions.
Of all the 20000 files in voice.mrg, there are 26 ones which have a variable part of 8-10 bytes, while the norm is 11 bytes.


@VARSZ 8 #C5140164 PADSZ= 18432 @501620736 EXTSZ= 17109 OFF 23 MYST[0901 0306 0012 0CB3 2863 MBS5a[29]
@VARSZ 8 #B4260032 PADSZ= 2048 @184678400 EXTSZ= 16643 OFF 23 MYST[0901 0306 0012 0C2B 2863 MBS5a[29]
@VARSZ 8 #B4270062 PADSZ= 2048 @205950976 EXTSZ= 16643 OFF 23 MYST[0901 0306 0012 0C2B 2863 MBS5a[29]
@VARSZ 8 #C4220060 PADSZ= 18432 @383385600 EXTSZ= 17020 OFF 23 MYST[0901 0306 0012 0CB7 2863 MBS5a[29]
@VARSZ 8 #C4210076 PADSZ= 18432 @377446400 EXTSZ= 17171 OFF 23 MYST[0901 0306 0012 0CD3 2863 MBS5a[29]
@VARSZ 8 #B5010354 PADSZ= 18432 @272742400 EXTSZ= 17150 OFF 23 MYST[0901 0306 0012 0C6F 2863 MBS5a[29]
@VARSZ 8 #B4280458 PADSZ= 2048 @222971904 EXTSZ= 16643 OFF 23 MYST[0901 0306 0012 0C2B 2863 MBS5a[29]
@VARSZ 8 #B4280676 PADSZ= 2048 @227710976 EXTSZ= 16643 OFF 23 MYST[0901 0306 0012 0C2B 2863 MBS5a[29]
@VARSZ 8 #C5140048 PADSZ= 18432 @499714048 EXTSZ= 17288 OFF 23 MYST[0901 0306 0012 0CB3 2863 MBS5a[29]

@VARSZ 9 #A4220342 PADSZ= 94208 @ 57686016 EXTSZ= 92786 OFF 31 MYST[0004 0600 1205 010C 7F28 MBS5a[63]
@VARSZ 9 #B4270314 PADSZ= 24576 @210626560 EXTSZ= 23131 OFF 23 MYST[0E00 1203 0600 120C B728 MBS5a[63]
@VARSZ 9 #B4270240 PADSZ= 24576 @209291264 EXTSZ= 23131 OFF 23 MYST[0E00 1203 0600 120C B728 MBS5a[63]
@VARSZ 9 #C4220014 PADSZ= 12288 @382552064 EXTSZ= 11866 OFF 23 MYST[1202 1203 0600 120C 2728 MBS5a[63]
@VARSZ 9 #C5140812 PADSZ= 12288 @514959360 EXTSZ= 11839 OFF 23 MYST[1202 1203 0600 120C BB28 MBS5a[63]
@VARSZ 9 #B4300074 PADSZ= 12288 @247140352 EXTSZ= 11780 OFF 23 MYST[1202 1203 0600 120C BF28 MBS5a[63]
@VARSZ 9 #B4300156 PADSZ= 12288 @248655872 EXTSZ= 11780 OFF 23 MYST[1202 1203 0600 120C BF28 MBS5a[63]

@VARSZ 10 #C5030196 PADSZ= 59392 @451622912 EXTSZ= 58061 OFF 27 MYST[0002 0212 0306 0012 0CBB MBS5a[28]
@VARSZ 10 #C5130102 PADSZ= 59392 @497846272 EXTSZ= 57837 OFF 27 MYST[0002 0212 0306 0012 0CD3 MBS5a[28]
@VARSZ 10 #D5050270 PADSZ= 59392 @654340096 EXTSZ= 58145 OFF 27 MYST[0002 0212 0306 0012 0CC7 MBS5a[28]
@VARSZ 10 #C5030080 PADSZ= 69632 @449148928 EXTSZ= 69271 OFF 27 MYST[0003 0503 0306 0012 0CC7 MBS5a[28]
@VARSZ 10 #C5030048 PADSZ= 69632 @448526336 EXTSZ= 69271 OFF 27 MYST[0003 0503 0306 0012 0CC7 MBS5a[28]
@VARSZ 10 #D5050304 PADSZ= 69632 @655769600 EXTSZ= 69253 OFF 27 MYST[0003 0612 0306 0012 0C5F MBS5a[28]
@VARSZ 10 #B4280414 PADSZ= 69632 @221939712 EXTSZ= 69458 OFF 27 MYST[0003 0612 0306 0012 0CBF MBS5a[28]
@VARSZ 10 #B4280818 PADSZ= 94208 @230909952 EXTSZ= 93833 OFF 27 MYST[0004 0A12 0306 0012 0CB7 MBS5a[28]
@VARSZ 10 #D4290248 PADSZ= 94208 @607279104 EXTSZ= 94154 OFF 27 MYST[0004 0A12 0306 0012 0CC3 MBS5a[28]
@VARSZ 10 #C5140042 PADSZ= 24576 @499605504 EXTSZ= 23132 OFF 23 MYST[0502 0003 0600 0502 08B7 MBS5a[28]

(OFF is the byte just after MZX0<uncompressed size>.4B/either 17/1B/1F maybe it's the decomp method but I'm not sure.)


Tell me if you manage to find any logical rule here...
In voice.MRG, there are exactly
  • 4 1202's
  • 2 0E00's
  • 9 0901's
  • 1 0502
  • 1055 0004's
  • 2556 0003's
  • 4980 0002's
* Except for MYST[0004 0600 1205 010C 7F28], 06 00 is always prefixed with 03
* Except for MYST[0502 0003 0600 0502 08B7] and [0004 0600 1205 010C 7F28], 06 00 is always followed by 12 0C
* 120C is followed by one unknown byte and the (c)CRI sig.
* Do not have 120C:
MYST[0004 0600 1205 010C 7F28] (LEN=9)
MYST[0002 1200 0306 0005 0208] (LEN=11) (B4300300/B4300644)
MYST[0502 0003 0600 0502 08B7] (LEN=10)
Reply With Quote
  #5  
Old 2006-03-04, 13:23
Rasqual Twilight
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by zalas
HED, NAM, MRG... sounds like exactly the file system Baldr Force PS2 was using. There are some really funny offset/size things with those headers which I could never figure out the reason for. Maybe it had something to do with the way the stuff is memory mapped...
If it has video files called "BALD_ADV.PSS", "BALD_HKK.PSS", ""BALD_NEK.PSS"", it's probably the same company who did the porting (Interchannel?)
Reply With Quote
  #6  
Old 2006-04-11, 09:04
quinmantha quinmantha is offline
Visitor
 
Join Date: Apr 2006
Posts: 1
Default

i know another group of people r also trying to extract voice files from clannad. may i give them the stuff u got here?
Reply With Quote
  #7  
Old 2006-04-12, 04:41
Haeleth's Avatar
Haeleth Haeleth is offline
Ex-boss
 
Join Date: Mar 2003
Location: England
Posts: 2,106
Default

This is a public forum -- if you think information that's been posted here will be useful for someone, then I don't see how anyone could object to you telling them about it. :)

And let us know if they get anywhere, please!
Reply With Quote
  #8  
Old 2006-04-16, 05:05
Haeleth's Avatar
Haeleth Haeleth is offline
Ex-boss
 
Join Date: Mar 2003
Location: England
Posts: 2,106
Default

One 258氏 has released a voice patch -- see http://forums.haeleth.net/viewtopic.php?t=503&start=24 for his announcement here.
Reply With Quote
  #9  
Old 2006-04-16, 19:02
Rasqual Twilight
Guest
 
Posts: n/a
Default

OMG, they rule.

Quote:
Code:
int decode_mzx&#40;unsigned char *src,unsigned char *dst&#41;
I think (I hope) you should be able to uncompress the game scripts with this as well.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AIR PS2 Voice Patch prnoct90 General Discussion 0 2012-08-17 01:12
Trouble installing the Kanon PS2 voice patch KoiNoDensetsu Technical Issues 2 2009-08-12 19:57
Clannad PS2 Leo_Otaku Technical Issues 6 2007-06-07 06:57
CLANNAD PS2 mr.aufziehvogel General Discussion 73 2006-05-12 20:40
voice files? voicepatch Technical Issues 1 2004-09-23 09:52


All times are GMT -8. The time now is 16:07.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.