News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - llm

#91
Quote from: Daniel3D on July 13, 2022, 09:15:43 AM
I extracted them all from Mario's, boxing and stunts.

you talking about instruments like its is totally clear how the instrument-data is structured - i thought that isn't clear?

zapper wrote he knows that from the instrument-data block

QuoteColumns (decimal offset)
      300..339: not tested
      343: change pattern (decimal values: 15-31-47)
      344: change pattern (decimal values: 15-22-28-82)
      346: change pitch (decimal values: 3-5-7)
      352:   fadein
      356: fadeout
      358: change pattern (decimal values: 0-6)

how do you see 77 unique instruments in these bytes? i just don't understand were a instrument begins or ends, what is the byte-size of one instrument in the VCE files?
#92
Quote from: Daniel3D on July 12, 2022, 11:30:20 PM
4D boxing has many of the same instruments as stunts, but different coding.
So I made a test file with all instruments (77) to see if stunts can handle them and choose different ones than stunts to hear the sound.
Secondary objective is replacing music files for the Ferrari edition, to test the possibility it is convenient to have all instruments.

how do you know that there are 77 instruments available?
and how are these mappend in the instrument bytes?
zapper knows some of the bytes - do you know more?
#93
just ask if you need a special feature in vce_dump - the dirty cpp code is ease extendible to even dirtier style :)
#94
Quote from: Daniel3D on July 12, 2022, 05:18:39 PM
Now I wonder if they just missed the right instruments.

or contained gaps, dirt or a different ordering, now its easier to check
you can even compare two vce-export folder if the titles with same name are equal etc.
#95
added export/import feature to my vce_dump tool

how to use:

vce_dump c:\temp\stunts\PCENG1.VCE

shows VCE content

vce_dump c:\temp\stunts\PCENG1.VCE e c:\temp\stunts\pceng1_vce

exports VCE content into the pceng1_vce folder - only the instrument data is exported in to title-named bin files
the rest information (header,offsets etc) is not needed for importing


pceng1_vce\
  BLOW.bin <- *.bin files containing the instrument-data block for each title
  BUMP.bin
  CRA2.bin
  CRAS.bin
  ENGI.bin
  order.txt <-- contains the ordering of the titles (the names are case insensitive if relevant) - gets read on import
  SCRA.bin
  SKI2.bin
  SKID.bin
  STAR.bin
  STOP.bin


vce_dump c:\temp\stunts\pceng1_vce\new_PCENG1.VCE i c:\temp\stunts\pceng1_vce

create a new_PCENG1.VCE in the pceng1_vce folder based on the order.txt and .bin files

without gaps/dirt but sorted offset table

a very small pocket knife for combining instrument data

just copy the wanted bin files with the correct titles in a folder + a order.txt with the ordering and then import :)
#96

3: ENGI ->
   Columns (decimal offset)
      300..339: not tested
      343: change pattern (decimal values: 15-31-47)
      344: change pattern (decimal values: 15-22-28-82)
      346: change pitch (decimal values: 3-5-7)
      352:   fadein
      356: fadeout
      358: change pattern (decimal values: 0-6)


count that for every instrument-data-block (a' 100 bytes)?
so the 300 offsets is seen from block a 0 offset

the absolute offsets in the file can be easily splitted into logical instrument-data-blocks
(im currently writing a short tool that extracts the instrument blocks and combines these blocks again in VCE a file)

"extract" creates a info-file with the names and order of the instruments-blocks and a single instrument-data-block for each title
"combine" reads such order file and creates a VCE using the datablock files - but without the gaps that sometimes occure


instrument-data block
      0: uint16 block-size - that is known
      2: uint16 unknown - that seems to be always 1
      4..39: not tested
      43: change pattern (decimal values: 15-31-47)
      44: change pattern (decimal values: 15-22-28-82)
      46: change pitch (decimal values: 3-5-7)
      52: fadein
      56: fadeout
      58: change pattern (decimal values: 0-6)


#97
the first uint16 is 0x5D or 0x64 = size of the data block, then comes a uint16 with 1 - some differences


ADENG1.VCE title. 'ENGI'

         xxxxx yyyy
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FE 00 0B 00 00 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 00 00 00 FF 7F 0F 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....@.*.........................
  0040:  00 00 00 00 00 07 0F 07 00 0F 16 00 03 00 01 00 00 00 0F 00 00 0F 00 00 00 00 01 00 00 03 00 00 ................................
  0060:  00 00 00 00                                                                                     ....

PCENG1.VCE title: 'ENGI'

         xxxxx yyyyy
  0000:  5D 00 01 00 00 00 00 00 00 00 00 00 14 00 06 00 00 00 00 00 00 00 00 00 00 00 1D 01 22 01 2C 01 ]...........................".,.
  0020:  2C 01 2C 01 2C 01 2C 01 02 00 00 00 FE 7F 5E 01 77 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ,.,.,.,.......^.w...............
  0040:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          .............................

MTENG1.VCE 'ENGI'

  0000:  5D 00 01 00 00 00 00 00 00 00 00 00 00 04 3C 00 0C 00 18 00 00 00 00 00 00 00 00 00 2C 01 2C 01 ].............<.............,.,.
  0020:  2C 01 2C 01 2C 01 2C 01 00 00 00 00 FE 7F B9 00 5A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ,.,.,.,.........Z...............
  0040:  00 00 00 11 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          ......@......................

TDENG1.VCE 'ENGI'

  0000:  5D 00 01 00 00 00 00 00 00 00 00 00 06 00 05 6D E8 00 00 00 00 00 00 00 00 03 00 00 FF 0F FF 0F ]..............m................
  0020:  00 00 00 00 00 00 33 03 02 00 00 00 FE 7F 17 00 3B 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 ......3.........;...............
  0040:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          .............................
 
   
#98
i think that the "samples" are device orientated - that means the instrument-data for pc, adlib or MT32 sound is completely differenly encoded
in a more direct form for the sound driver - only a guess

#99
the VCE handling in restunts is in seg027.asm

function:
  init_audio_resources
    parameter:
       var_titlptr - for the title string
       arg_vcefileptr - for the VCE file content (i think)
  audioresource_find
  audio_map_song_instruments
  audio_map_song_tracks
  load_voice_file <--

  this one seg008.asm loads the file + title - best candidate for a detailed analysis :)
     file_load_audiores
#100
Quote from: Daniel3D on July 10, 2022, 07:37:50 PM
If you remove the corrupted chunk in stressed and replace it with a good one, stressed will update the offsets automatically.

i can't find the coed place in stressed were the VCE file gets rewritten - do you use the raw edit? that just seems to write the bytes that gets loaded to the file - no re-ordering or setting of the offset-table - but im not a stressed pro :)
#101
Quote from: Cas on July 11, 2022, 06:08:23 AM
Yes, I gave a look at a few of these VCE files and it's true that the first dword does not seem to have a logical value.

its called "reportedSize" in stressed source code (https://github.com/dstien/gameformats/blob/9827f7c1a88db5bf92f1ac9e752bb3f14bd378b3/stunts/stressed/src/app/resource.cpp#L69)

if (reportedSize != fileSize) {
      quint8 compType = reportedSize & STPK_PASSES_MASK;
      ...


but that does also not give a clear logical results ... maybe its just ignored - its time to analyse the VCE reader code in restunts :)


#102
Quote from: Daniel3D on July 10, 2022, 11:18:30 PM
The 100 bits are sound samples, and I am searching for a way to analyze it or visualize it. I came upon the article below.

100 bytes or 800 bits
#103
@CAS

the VCE file toplogy is 100% clear and easy - there is a count for the instrument-data-blocks and all the Instrument-data-blocks are (with my testfiles) of the same size and also got its size included as first field of the data that makes it easy to "calculate" the gaps between the offsets etc. (only occuring in one file so far)
the gaps are just filled full with 0xFF/0x77 that have definitly no relevance for the sound, its easy to get the instrument-data blocks for the specific title

only the content of the instrument-data is unclear (got no documentation or something)

another "problem" (not a big one) is that "lenFile" field (first field in file-header) which is always <= filesize
i have no idea what that field is used for or how it gets calculated
it seem not to follow any regularity trying to calculate it from filesize, headersize, tablesizes combinations.
#104
no its very consistent

the offset table of some VCEs can leave gaps between instrument-data-chunks - every bytes block that is not located by the offset-table is dirt which is not needed (like unadressed memory)

can maybe happen if the tools that were used to create the files allowed insert/remove/delete or something

the ADENG1.VCE from Mario is the only file i've found so far that contains also in between the instrument-data-chunks unused blocks
that means the instrument-data offsets are not consecutive but there are just unused space

so copying data from one file with gaps into a file without gaps will just don't work

but its very easy to write a tool that allows a clean recreation/merging of VCE file content, as long as we find out how this lenFile field gets its value (i don't think is the file length or something - maybe last size...)

do someone know if the chunks get only addressed by the 4 byte name or is the position (logical nr, not fileoffset) in the chunk-table relevant?


file: F:\projects\fun\dos_games_rev\stunts_drvs_tests\vce_dump\test\mario\adeng1.vce, size: 1784 bytes
  lenFile: 1784
  numInstruments: 14
-->header-size: 118
  title
    [0] = BLOW
    [1] = BUMP
    [2] = CRAS
    [3] = CRs2
    [4] = FORM
    [5] = INDY
    [6] = MODD
    [7] = PRTO
    [8] = SCRA
    [9] = SKID
    [10] = SPNT
    [11] = STAR
    [12] = STOK
    [13] = STOP
  offInst
    [0]: 300
    [1]: 600
    [2]: 700
    [3]: 1566
    [4]: 1466
    [5]: 1266
    [6]: 1366
    [7]: 1166
    [8]: 500
    [9]: 400
    [10]: 1066
    [11]: 100
    [12]: 200
    [13]: 0
offsets always advancing: no
  Instr
    [0] lenInst: 100 (0x64)
    [1] lenInst: 100 (0x64)
    [2] lenInst: 100 (0x64)
    [3] lenInst: 100 (0x64)
    [4] lenInst: 100 (0x64)
    [5] lenInst: 100 (0x64)
    [6] lenInst: 100 (0x64)
    [7] lenInst: 100 (0x64)
    [8] lenInst: 100 (0x64)
    [9] lenInst: 100 (0x64)
    [10] lenInst: 100 (0x64)
    [11] lenInst: 100 (0x64)
    [12] lenInst: 100 (0x64)
    [13] lenInst: 100 (0x64)
expected-offset 100
given-offset 100

expected-offset 200
given-offset 200

expected-offset 300
given-offset 300

expected-offset 400
given-offset 400

expected-offset 500
given-offset 500

expected-offset 600
given-offset 600

expected-offset 700
given-offset 700

expected-offset 800
given-offset 1066
GAP
  0000:  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ...

expected-offset 1166
given-offset 1166

expected-offset 1266
given-offset 1266

expected-offset 1366
given-offset 1366

expected-offset 1466
given-offset 1466

expected-offset 1566
given-offset 1566

Instrument data
[0]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FE 00 00 7F E1 00 00 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 19 00 00 00 19 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
  0040:  00 02 00 00 00 06 0F 00 00 00 00 00 00 00 00 00 00 00 0F 04 0E 04 00 00 00 00 00 00 00 00 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[1]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 00 03 00 7F EF 00 00 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 80 00 00 0F 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
  0040:  00 02 00 00 00 04 07 08 0F 04 00 00 00 00 00 01 01 00 09 00 02 07 00 00 01 00 00 00 00 00 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[2]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FC 00 00 0C C7 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 16 00 00 00 16 00 00 01 00 00 FF 7F 01 00 01 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 ................................
  0040:  00 00 00 00 00 07 0A 00 00 01 00 00 03 00 00 00 00 00 0A 0F 00 03 01 00 07 01 00 01 00 00 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[3]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FC 00 00 0C C9 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 16 00 00 00 16 00 00 01 00 00 FF 7F 01 00 01 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 ................................
  0040:  00 00 00 00 00 07 0A 00 00 01 00 00 03 00 00 00 00 00 0A 0F 00 03 01 00 07 01 00 01 00 00 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[4]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FA 00 0B 00 00 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 00 00 00 FF 7F 0F 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....@.*.........................
  0040:  00 00 00 00 00 07 0F 07 00 0F 16 00 03 00 01 00 00 00 0F 00 00 0F 02 00 00 00 01 00 00 03 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[5]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FA 00 0B 00 00 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 1F 00 00 22 21 AC FF 00 00 00 00 02 85 00 00 00 00 00 00 00 00 00 00 ....@.*....."!..................
  0040:  00 00 00 00 00 FF 0F 07 00 0F 1C 00 04 00 01 00 00 03 0F 00 00 0F 03 00 05 00 01 00 00 03 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[6]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FA 00 0B 00 00 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 00 00 00 FF 7F 0F 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....@.*.........................
  0040:  00 00 00 00 00 07 0F 07 00 0F 16 00 03 00 01 00 00 00 0F 00 00 0F 02 00 00 00 01 00 00 03 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[7]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FE 00 0B 00 00 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 1F 00 00 22 21 AC FF 00 00 00 00 02 85 00 00 00 00 00 00 00 00 00 00 ....@.*....."!..................
  0040:  00 00 00 00 00 FF 0F 07 00 0F 16 00 03 00 01 00 00 02 0F 00 00 0F 02 00 00 00 01 00 00 03 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[8]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FC 00 00 0C C9 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 01 00 00 00 01 00 01 00 00 FF 7F 01 00 01 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 ................................
  0040:  00 00 00 00 00 06 0F 00 00 00 00 00 00 00 00 00 00 00 0F 0F 00 00 06 00 01 01 00 01 01 00 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[9]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FC 00 00 7F 00 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 00 00 00 FF 7F 05 00 06 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 ....@.*.........................
  0040:  00 00 00 00 01 06 0F 07 00 0D 00 00 04 00 01 00 00 03 0F 00 00 0F 07 00 04 00 01 01 01 00 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[10]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FE 00 0B 00 00 17 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 1F 00 00 22 21 AC FF 00 00 00 00 02 85 00 00 00 00 00 00 00 00 00 00 ....@.*....."!..................
  0040:  00 00 00 00 00 FF 0F 07 00 0F 16 00 03 00 01 00 00 01 0F 00 00 0F 02 00 05 00 01 00 00 03 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[11]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FC 00 00 7F C9 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 01 00 00 FF 7F 01 00 01 00 00 00 03 91 00 00 FF 7F 02 00 03 0A 07 00 ....@.*.........................
  0040:  00 00 00 00 00 02 0F 07 00 0D 00 00 04 00 01 00 00 03 0F 00 00 05 07 00 04 00 01 01 01 01 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[12]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FE 00 0B 00 00 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 00 00 00 FF 7F 0F 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ....@.*.........................
  0040:  00 00 00 00 00 07 0F 07 00 0F 16 00 03 00 01 00 00 00 0F 00 00 0F 02 00 00 00 01 00 00 03 00 00 ................................
  0060:  00 00 00 00                                                                                     ....
[13]
  0000:  64 00 01 00 00 00 00 00 00 00 00 00 FC 00 00 7F C9 00 02 00 00 00 00 00 00 00 00 00 00 0F 00 0F d...............................
  0020:  00 0F 00 06 40 0B 2A 00 90 01 00 00 FF 7F 01 00 01 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 ....@.*.........................
  0040:  00 00 00 00 00 02 0F 07 00 04 00 00 04 00 01 00 00 03 0F 00 00 05 07 00 04 00 01 01 01 01 00 00 ................................
  0060:  00 00 00 00                                                                                     ....


attached is version 0.2 of the vce_dump tool + source
#105
i've wrote a small vce dump tool that reads the header and instrument data + printing (i've got no detailed information about the instrument data - so just printed a hex dump)

https://pastebin.com/e2xJ5S2s

QuoteThe files are a bit messy with crap behind the last chunk that is total rubbish and can be removed without trouble.

this chunk stuff can also happen in between because the offsets to the instrument data is not always gap-free

TODOs:
-understand the lenFile field
-more details for the instrument data output
-understand the last chunk - not crashing if that is revemoved does not mean its correct or error free to do it :)

VS2017 cpp exe attached + source