Página académica del Colegio Nacional



Comunidad y Foros de discusión
No estás autentificado

< Último hilo   Siguiente hilo ><<  1    2  >> Nuevo Tema  Publicar una respuesta
Autor: Asunto: POP1 Music extraction thread

Miembro normal





Envíos: 11
Registrado: 7/5/2003
Status: Desconectado

  publicado el 26/5/2003 en 17:47
I'm ChrML, only that I couldn't get logged into this forum.
Finally (after 30 min more researching) I got the midi files in MIDISND1.DAT extracted. Actually, it was really simple. Getting them back into the file is not hard either. Just paste it back over the file in a hex editor, and change the filesize DWORD on the top to the new size. Here are all midi files in MIDISND1.DAT:

http:\\www.thps3cu.com\files\MIDISND1.zip

I'll create an editor for it later. Enjoy these files in the mean time.

 
Reply With Quote Visit User's Homepage

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 26/5/2003 en 20:38
Really cool! If you do an editor, please use pascal or c, so we can make a TPU or LIB unit and include them in both: the PV4 editor and the Sound editor (I'll find the way).

Had you studied the internal MID format to find the way to convert them into .MID?

That's really cool!!!




 
Reply With Quote

Moderador




Envíos: 15
Registrado: 2/5/2003
Status: Desconectado

  publicado el 27/5/2003 en 07:31
Oh, maybe I should have mentioned this earlier: I got a mail, stating how to crack the "digisnd.dat". It is at least readable as raw data (for example in coolplayer). It shouldn't be too hard to crack this one too
 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 27/5/2003 en 16:04
Cool! so

Digisnd?.dat are wav
Midisnd?.dat are mid

Can you explain a bit more about the file separators?

 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 7/5/2003
Status: Desconectado

  publicado el 28/5/2003 en 05:39
Actually, it was real simple to extract them, since all mid files starts with the same two bytes. That makes it easy as hell. I'll make an editor, but shall I compile it as a DLL? I think a DLL is best. Are you able to get a DLL into the princed.exe file?
 
Reply With Quote

Moderador




Envíos: 15
Registrado: 2/5/2003
Status: Desconectado

  publicado el 28/5/2003 en 07:37
Well, I think Princed will eventually be open source, so it'd be nice if you could just send the C++ - source.

But one question: how are the midi-files separated? Are the two bytes you were talking about the real separators? And is the file size indicated in the beginning of the file, or are there other checksums? I'm asking this because I'm cracking the DISISND*.DAT files, and there may be some same mechanisms.

 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 28/5/2003 en 11:53
For Tammo Jan: He said DLL because he uses Delphi.

For ChrML: If you make a dll, please send the sources also, so we can translate the language into C.

 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 7/5/2003
Status: Desconectado

  publicado el 28/5/2003 en 13:20
I checked, and there aren't any similar file seperators in DIGISND1.DAT. Why not just make a wav file, and search for the first bytes in it?
 
Reply With Quote

Miembro normal



Envíos: 16
Registrado: 3/5/2003
Status: Desconectado

  publicado el 28/5/2003 en 13:38
Within midisnd1.dat & midisnd2.dat
the individual midi's start the the letters
MThd
so all you need to do is use a program like ultra edit
and select from the first MThd through till JUST BEFORE the next midi begins (before the next MThd) and put it in a separate file
and rename it *.mid.

MThd**********CODE******MThd************
...........................................|separate here
..........................................*next midi starts*
and so on

OH and thanks ChrML for letting us know.
I extracted the midi's from midisnd2.dat for my amusment

 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 7/5/2003
Status: Desconectado

  publicado el 28/5/2003 en 17:45
That's just what I did on MIDISND1.DAT. Extract MIDISND2.DAT you, since I'm to lazy, lol. I'll code an extractor, and a rebuilder later.
 
Reply With Quote

No registrado


  publicado el 29/5/2003 en 11:18
Mt32snd?.dat are also midi's
 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 29/5/2003 en 12:32
what game are you talking about?
 
Reply With Quote

Moderador




Envíos: 15
Registrado: 2/5/2003
Status: Desconectado

  publicado el 29/5/2003 en 17:11
I think he's talking about Prince of Persia In some newer versions, there are special midi's included for the Roland MT.
 
Reply With Quote

Miembro normal



Envíos: 11
Registrado: 7/5/2003
Status: Desconectado

  publicado el 30/5/2003 en 16:53
OK, now I've created a .DAT compiler for midi files, but...
Now I have a biiiig problem. The new files that get's into the .DAT must be at the same filesize. The solutions are:
1) Must me kept at the same size (nearly impossible)
2)We must find a way to change the pointer (the pointer isn't in the .dat)

 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 30/5/2003 en 19:08
You are ignoring the first 8 bytes in the file, they are very important, and the validation is there.

The first 2 bytes are a dword value x
The second 2 bytes are allways 0
The third group of 2 bytes in a dword value y

where x+y=size of the file!!!!

Take a look:
midisnd2:
B6 47 00 00 32 00 8F 02
x= (B6 47) = 18358
y= (32 00) = 50
x+y=18408

midisnd1:
16 24 00 00 82 00 34 02
x= (16 24) = 9238
y= (82 00) = 130
x+y=9368

I have to study a bit more about the fourth group of 2 bytes, but I think the dword value it has something to do with the next mid size.

Knowing that you can keep on working in the compressor with out any problem

 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 2/6/2003 en 16:06
byte number 7 is checksum, byte number 8 is 02 allways.

checksum works like that: the sum of all the bytes modulo 256 must be the same (Tammo Jan said this value was 0).

If the sum is not the same value as before, then you must change the checksum character to do that. The two bytes before MThd are header bytes too, so the first is the checksum of the next file and the second is allways 02.

 
Reply With Quote

Moderador




Envíos: 15
Registrado: 2/5/2003
Status: Desconectado

  publicado el 2/6/2003 en 16:24
Not 256, but 255 :-)
 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 2/6/2003 en 18:19
So...
checksum:=0;
for i:=1 to midiLenght do
begin
checksum:=checksum+ord(array);
end;
checksum:=255-(checksum mod 256);

 
Reply With Quote

No registrado


  publicado el 4/6/2003 en 19:04
quote:
You are ignoring the first 8 bytes in the file, they are very important, and the validation is there.

The first 2 bytes are a dword value x
The second 2 bytes are allways 0
The third group of 2 bytes in a dword value y

where x+y=size of the file!!!!


I haven't seen it anywhere, but I think you all know this already:
x is the offset of the header
y is the length of the header
the header gives information about the filesize and offset of all the midis (and other filetypes) in the file and something else that I don't know yet.

At least, this goes for my PC version of Prince of Persia v1.3 (cheat parameter is improved in this version).

-- Frenkel

 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 5/6/2003 en 01:35
I've discovered the whole sound (midi and wave) and graphics .dat file structure.

All Prince of Persia Dat files are indexed, even levels.dat.

I'll make an extractor for all the formats now I know how the index works.

XX XX is the offset of the index. YY YY is 8*a+2, where a is the number of files in the file. in the index there is AA AA that is the number a, the 8 bytes for each file, those bytes are: QQ QQ WW WW 00 00 EE EE, where QQ QQ is the id, WW WW is the file offset and EE EE is the file size. That explains the wasted bytes in PG, the problem with the headers in wave files and the deterministic bytes at the end of levels.dat.

 
Reply With Quote

Moderador




Envíos: 15
Registrado: 2/5/2003
Status: Desconectado

  publicado el 5/6/2003 en 07:13
Great!!!
 
Reply With Quote

Moderador




Envíos: 15
Registrado: 2/5/2003
Status: Desconectado

  publicado el 5/6/2003 en 07:24
Oh but you have some bits left, since YY=8*a+2, the last three bits don't have any meaning. Could they be for something else, or are they part of the following bytes?
 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 5/6/2003 en 14:58
where exactly?
 
Reply With Quote

Moderador




Envíos: 15
Registrado: 2/5/2003
Status: Desconectado

  publicado el 5/6/2003 en 20:03
Well, in the file format, I was just responding to your post here, I haven't looked at the bytes myself...
 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 7/6/2003 en 05:00
Ohhh sorry I didn't get what you tried to say

well, I need the mail explaining how to crack the digisnd, or the wav specifications digisnd is using, or at least a wav file extracted from the game (so I can see the wav spefications).

quote:
Oh, maybe I should have mentioned this earlier: I got a mail, stating how to crack the "digisnd.dat". It is at least readable as raw data (for example in coolplayer). It shouldn't be too hard to crack this one too


Please resend this mail. The extractor goes very good, now it can read any pop1 dat file and determine whatever there is inside. Extracts bitmaps, palettes, midis, raw waves, levels, and lots of things we don't know yet what are they used for (game scripts suggested ChrML, and I hope he is right, but I'm afraid prince.exe was detected as an image file).

 
Reply With Quote

Moderador




Envíos: 15
Registrado: 2/5/2003
Status: Desconectado

  publicado el 7/6/2003 en 13:25
I don't know the wav specification, but it should be traceable on the internet. The mail I have only stated that digisnd1.dat could be opened in Goldwave. It then only reads raw audio, which fits. The sound files are 8 bit, mono, unsigned, and 11025 Hz. I hope that helps...
 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 7/6/2003 en 14:32
quote:
The sound files are 8 bit, mono, unsigned, and 11025 Hz.


that is exactly what I needed

 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 9/6/2003 en 15:58
Well, PR (PG & PS) now extracts wav files, in wav format, so you can play prince of persia sounds in winamp! The same with midis.

But the best of all: The resource compiler works!!! My friend Pi (who helped in wav header figuring out) played a melody in his electronic organ and then exported it as midi, after that I compiled a new digisnd2.dat using PR with the new melody. And it worked!!!!

See here the new midisnd2.dat we made

[Editado el 9/6/2003 por poirot]

 
Reply With Quote

PV3 Coder




Envíos: 184
Registrado: 24/10/2002
Status: Desconectado

  publicado el 13/6/2003 en 11:13
Well... PS is 100% figured out, PR does extract and compress midi and wav, so let's move to the PR development & testing thread.

[Editado el 13/6/2003 por poirot]

 
Reply With Quote

Newbie



Envíos: 1
Registrado: 29/8/2003
Status: Desconectado

  publicado el 29/8/2003 en 22:00
quote:
I'm ChrML, only that I couldn't get logged into this forum.
Finally (after 30 min more researching) I got the midi files in MIDISND1.DAT extracted. Actually, it was really simple. Getting them back into the file is not hard either. Just paste it back over the file in a hex editor, and change the filesize DWORD on the top to the new size. Here are all midi files in MIDISND1.DAT:

http:\\www.thps3cu.com\files\MIDISND1.zip

I'll create an editor for it later. Enjoy these files in the mean time.


Actually there are 16 files in midisnd1 so you are missing one in your zip-file. You are missing de file after "Shadow.mff" this is the 8th file in midisnd1.

 
Reply With Quote
<<  1    2  >> Nuevo Tema    Publicar una respuesta


Powered by XForum 1.6n by Trollix Software
original script by xmb


 
  All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2002 by me. Web site engine code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Página Generada en: 0.571 Segundos