Jump to content
DerelictStudios Forums

kmx

Volcano Citizen
  • Content count

    25
  • Joined

  • Last visited

Community Reputation

0 Neutral

About kmx

  • Rank
    Private
  • Birthday 01/01/1985

Previous Fields

  • Country
    Poland

Contact Methods

  • Website URL
    http://
  • ICQ
    0
  1. Yes, soon ;) I'm busy with school atm, I'll release something next week!
  2. I will release a .dll library with header files for c++ and delphi pretty soon, right now I need to handle some special cases and also the Ambient/Music files.
  3. It's just a stream, no issues afaik. Btw, I live in Finland/Hel too :P
  4. Jonwil, what's your problem exactly? Why you never credit anyone? I've spent good few hours debugging that format, when you couldn't even find sample decoding function by yourself, and now you are posting my findings with zero credit to me (it's not the first time too). Good work. Anyway, I've made a decoder few days ago which makes a wave stream out of this data.
  5. Well I really meant the exact copy of the given code (I can hardly call retyped asm code of one function into C an "own implementation") and releasing it under GPL + crediting yourself as owner, is a bad thing to do. With file formats such as BIG, MIX etc, you dont have to look into the copyrighted code, disassemble the application to make the unpacker - its too simple. With decompression it's a bigger issue, and if it was a big-corp releasing OS GPL, reversed version of some others big-corp compressor, then lawsuit would be huge, trust me. EA is nice to you since it actually helps them, that's it - if they were losing some money over it they would sue you too, that's a fact.
  6. His code is released under the GPL. If you use his code, you have to open the source on your application. If you want to reimplement his code, you are free to do so, and you are under no obligation. You can't use the GPL to cover a method, but you can use it to cover a specific implementation. Just because what it does is reverse engineered does not change that he is the copyright owner of his code and can license it however he'd like. Wine is just a reverse engineering of the Win32 API, but it is licensed under the LGPL, which isn't quite as restrictive as the GPL, but it is still open source. Also: NO, you CAN'T release reverse-engineered code under GPL (crediting yourself as owner), it's simply illegal. Try doing that with something popular, something that could draw attention of the legal owners of the code - wish you good luck in court then.
  7. Due to lack of support, I'm leaving this forum... I mean - when you go into nick-picking at least do some research and look for all guys who worked on this. I find it disturbing that after doing contribution to literally all topics/formats here I wasnt credited even once heh, it's not like I'm whining - I don't really care that much. Bye
  8. It's all there in asm code, check the first post for offsets. The function first does the init stuff (fills the table pointed by param1 with curr_sample_ptr and curr_sample_count (param +34h / +38h), second param points to sound_data_ptr and sample_count (param2 +0 / +4). So its: -check if the init was alredy done (its run only once per sound stream) * init -take 10h and make Volume table -take 3Ch and go into loop, which uses MMX opcodes in order to produce proper sound sample (80h per channel * 2 = 200h)
  9. I didnt call it decryption in my last 2 posts, I called it "decoding" process, which means it's unpacking 0x4c into 2*0x80
  10. The function works like this: stream = array; init() { curr_sample_ptr = sound_data_ptr; curr_sample_num = sample_count; } decode_stream { init(); while curr_sample_num != 0 { stream.write(Decode_sample(curr_sample_num, curr_sample_ptr)) //stream actually does not exist in the *real world*, its just played in runtime, so to make proper decryption this must be implemented. stream.seek(0x200, from_current_pos) curr_sample_ptr+=0x4C curr_sample_num-=0x80 } } Decode_sample(curr_sample_num, curr_sample_ptr): array { sample = array[0x200] sample_ptr = 0 vol_array = CreateVolumeArray(curr_sample_ptr) //reads 0x10 bytes from ptr curr_sample_ptr += 0x10 sample_end = curr_sample_ptr + 0x3C While curr_sample_ptr != sample_end { sample[sample_ptr] = MMX_Extract_sample_qdword(vol_array * curr_sample_ptr[0]) curr_sample_ptr += 4 sample_ptr += 8 } return sample; } Sorry for the crap code, its super pseudo, anyway, in other words: input data from the file is divided into 0x4C byte blocks, each one of them is decoded into 0x200 byte blocks (2*80h left channel, 2*80h right channel). first 10h of each block is a multiplier which i called "volume", the rest, 0x3c is decoded into sample data. the number in the header which I called "sample count" is divided by 80h, which gives the real sample count (+1 from the mod 80h if !=0)
  11. Ok, a little update on sound files (those with 16 bytes header) 04 TAG 00/04 channels? BB80 khz 0000XXXX sample count 0000YYYY data size 0000XXXX sample count .. data Here's sample decoding function: Decode_sample: eax = sound info block [eax+34] = current block/sample data ptr [eax+38] = current block/sample number [ecx] = sound data ptr [ecx+4] = sound block/sample count 00886154: push ebx mov ebx, esp push ecx push ecx (...) ; mov data start ptr to edx mov edx, esi movaps xmm7, oword ptr [edi] movaps xmm6, oword ptr [edi+10h] ; add sample data size (3c) add edx, 3Ch mov edi, [ebp+var_18] sample_decode_loop:; CODE XREF: sub_886154+293j pxor mm0, mm0 ; mov data to mm0 punpcklbw mm0, qword ptr [esi] (decode...) ; mov decoded data to edi buf, xmm3=left, xmm5=right channel movlps qword ptr [edi+100h], xmm5 movhps qword ptr [edi+180h], xmm5 movlps qword ptr [edi], xmm3 movhps qword ptr [edi+80h], xmm3 add edi, 8 add esi, 4 ; check if done cmp esi, edx jnz loc_886345 ; sample decoded! 008863ED: emms (...) 0088659B: retn
  12. Would be nice if you actually credit all ppl who contributed in those findings, also I dont like the fact you're asking poeple to go open source whenever they use your C implementation of Ref decompression - you can't do that, since it was reverse engineered in the first place, and if you think my point is invalid, I will post my asm code, pasted into inline of the some C function - just my 2 cents. btw: update your post with this too: http://www.derelictstudios.net/forums/inde...pic=15020&st=20
  13. If you load any of those sound files, either normal or streams into program such as Sony Sound Forge 8, the program will tell you the predicted file size. In the program I've selected 48khz raw audio, 16bit PCM, 1 channel and starting offset 8 (or 0 for the streams) and the calculated raw data size matches perfectly! This means there is no compression used, however - it is not playable, so I'm pretty sure they've used some encryption on it.
  14. kmx

    My Work On C&c3 So Far

    Well' if you relly want a .dll use this one: http://www.ppmsite.com/downloads/big4decomp.rar
  15. there are 2 types of sound files there: 8byte header+data like: AudioFile:WIRadio_clicksA23 or just data, like: AmbientStream:AmbStream_YellowZone01_Temperate_5point1 They are all 16bit PCM... but they are encrypted or maybe some codec was used after all...
×