My experience with editing VCE files was, back in 2002, very basic. I had to use Microsoft EDIT (DOS aplication) to change some bytes of these files.
Using this EDIT app (EDIT.COM) that still remains in Windows Xp (system32 folder) I was able to get some "patterns" on ASCII bytes and discover some samples used by engine, skids, crash, and other sound that were used in game.
But I had to use EDIT with "open in binary" switch option to see byte values.
Getting it straight, on windows command prompt you write this:
edit /93 pceng1.vce <- for pc sound editing.
edit /100 adeng1.vce <- for ad sound editing.
Then you will see this: (for pc speaker)
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=7853;image)
Next I show what I had written in 2002 to explain what I had edit and its consequences:
(http://img341.imageshack.us/img341/5379/image1apu.png)(broken image link)
Note: above pictures show content files that were written by me. EDT file extension is not used on game.
For Adlib(SoundBlaster) its very similar to edit.
Now I will show what I had analysed in sound file content, taking Adlib file as example:
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=7855;image)
(this is a mod screenshot to show all content bytes on original and mod files in horizontal split screen)
Has you can see there is a STOPSTARENGIBLOWSKIDSCRABUMPCRAS text on first line, spacing these chars in logic words, it identifies 8 words that is the number of rows below the first text line of the file content.
Assuming this, Stop sound sample code corresponds to the first line, Star(t) the second, The third is for Engi(ne) sound and so on.
I don't know what all chars do in each line, I tried to change on by one, but the most relevant were those that I point at pictures above.
And that is some of what I remember of this. All suggestions are welcome to get this sound sampling code revealed.
Cheers
nice work but... why on earth don't you use a real hex-editor like http://mh-nexus.de/en/hxd/ (http://mh-nexus.de/en/hxd/) or others?
Because at that time, in 2002 I was no such expert on file editing, rarely had internet access to get more powerfull tools, so I work with the tools I had on my system.
To get this in this topic I had to go to my old Pentium 100 and backup my "note files".
Today it would be different of course, but has I stated earlier, I post what I remember that I did at that time, literally.
Since this is a sound effects thread, it's of course very natural that the the böff must be louder, and modulated as well.
What does it mean "Böff"?
Quote from: BonzaiJoe on December 12, 2011, 10:43:48 AM
Quote from: zapper on December 12, 2011, 01:31:29 AM
What does it mean "Böff"?
It means "I'm gay".
So "Böff" means Bonzai Joe is gay? Or it means I (Chulk) am gay? I'm confused!!!
http://en.wikipedia.org/wiki/Quote_sign
A gay from a bay.
Ok, so you all are go thrashing this thread?
Please, there is an appropriate section to do that!
If you write some thing, do it "ontopic" only.
VCEs are Stunts resource archives. Working on the MIDI file conversion (http://forum.stunts.hu/index.php?topic=2560.msg46214#msg46214) I identified some values in the MT-32 voices file that holds MIDI controller data:
char *vce = findResource(vceBuf, seq->voices[i].id);
if (vce == NULL) {
seq->voices[i].enabled = false;
}
else {
seq->voices[i].enabled = true;
seq->voices[i].channel = vce[0x43];
seq->voices[i].program = vce[0x44];
seq->voices[i].volume = vce[0x45];
seq->voices[i].pan = vce[0x46];
seq->voices[i].transpose = vce[0x10];
seq->voices[i].hasHits = vce[0x25];
}
I need a deep engine voice for the airplanes. Is it possible to solve?
It would be cool to have a main theme remix to replace the old one. But I guess music file editing has no priority. :)
Quote from: CTG on October 25, 2012, 09:23:05 AM
I need a deep engine voice for the airplanes. Is it possible to solve?
Probably not unless you don't mind all other vehicles being affected (cf. Zapper's sound pack).
Hi,
Visiting this maturated topic, I found that some images were lost with imageshack... so I tried to fix some of those included in the first topic.
Also related to this topic I recently discovered an edited VCE file (different than the ones included in Zapper's Sound Pack) in my old laptop... so I decided to share it here:
ADENG1T3.VCE (http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=7857) (Just copy over adeng1.vce after making it's backup)
This version has an good engine sound match for Flat-6 or V6 engines as Adlib/SoundBlaster sound effects.
Try and enjoy.
Quote from: dstien on December 13, 2011, 02:11:37 PM
VCEs are Stunts resource archives. Working on the MIDI file conversion (http://forum.stunts.hu/index.php?topic=2560.msg46214#msg46214) I identified some values in the MT-32 voices file that holds MIDI controller data:
char *vce = findResource(vceBuf, seq->voices[i].id);
if (vce == NULL) {
seq->voices[i].enabled = false;
}
else {
seq->voices[i].enabled = true;
seq->voices[i].channel = vce[0x43];
seq->voices[i].program = vce[0x44];
seq->voices[i].volume = vce[0x45];
seq->voices[i].pan = vce[0x46];
seq->voices[i].transpose = vce[0x10];
seq->voices[i].hasHits = vce[0x25];
}
i found similar offsets while doing my MT15.DRV reverse engineering project - attached is the C-Source part of the Driver
there are some struct-members with the same offset that are used in drv function calls
see
struct1_t
...
byte_44
byte_45
byte_46
used in code as
Line 878: send_
program_change_midi_msg(channel_, buffer_->
byte_44);
Line 918: send_
pan_control_change_midi_msg(channel_, buffer_->
byte_46);
Line 922: send_
volume_control_change_midi_msg(channel_, buffer_->
byte_45);
sames as
seq->voices[i].program = vce[0x44];
seq->voices[i].volume = vce[0x45];
seq->voices[i].pan = vce[0x46];
Definitely the implmentation of adlib vce file seems to be similar with mt32, but parameter addresses should have different goals and in other numbers since this effects are played differently.
Quote from: Zapper on July 14, 2021, 05:00:32 PM
Definitely the implmentation of adlib vce file seems to be similar with mt32, but parameter addresses should have different goals and in other numbers since this effects are played differently.
is a full descriptione of the VCE format available somewhere?
Quote from: llm on July 14, 2021, 08:33:16 PM
Quote from: Zapper on July 14, 2021, 05:00:32 PM
Definitely the implmentation of adlib vce file seems to be similar with mt32, but parameter addresses should have different goals and in other numbers since this effects are played differently.
is a full descriptione of the VCE format available somewhere?
I also would like to discover that, but for now, just guessing and messing with bytes. ;)
I don't know if you can use this. But I have found a modding resource about the file type.
https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Voice_Format (https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Voice_Format)
Also maybe useful. A list of games that use the same music system.
http://www.vgmpf.com/Wiki/index.php?title=KMS (http://www.vgmpf.com/Wiki/index.php?title=KMS)
Released Title Sample
1990-10-?? Stunts (DOS)
1990-??-?? 4D Sports Tennis (DOS)
1990-??-?? Bill Elliott's NASCAR Challenge (DOS)
1990-??-?? Teenage Mutant Hero Turtles (DOS)
1991-??-?? 4-D Boxing (DOS)
1991-??-?? Mission: Impossible (DOS)
1992-??-?? The Simpsons: Bart's House of Weirdness (DOS)
1993-??-?? Michael Jordan In Flight (DOS)
1993-??-?? NHL 93 (DOS)
1993-??-?? World Tour Tennis (DOS)
1994-??-?? NHL 95 (DOS)
@Daniel3D
do you know which of them also got a MT15.drv or variants of it - i've heard (don't know the source anymore) that there are even more tiny differences MT15.drv exist - then the variants in Stunts 1.0/1.1 - a search for " DSI " in all the files could reveal them (even if different named) - but i think only the MT32 supporting games from that list are relevant for the MT15.drv relevant investigation
would be great to have them all - i would include the differences in my C port of the driver
my next goal is to write an MT15.drv based player to play the game sounds outside of the game
so the next question is: which of the above games support MT32? - except the ones we know, its easier for me analysing the VCE stuff from the MT32 direction because i know more details in that area
a list of Game + exact Release Date + MD5 of the MT15.DRV and MT32.PLB would be great
Quote@Daniel3D
do you know which of them also got a MT15.drv or variants of it - i've heard (don't know the source anymore) that there are even more tiny differences MT15.drv exist - then the variants in Stunts 1.0/1.1 - a search for " DSI " in all the files could reveal them (even if different named) - but i think only the MT32 supporting games from that list are relevant for the MT15.drv relevant investigation
Well, I don't know.
I found this when I was looking for information on the Kms file.
some of them containing MT15.drv(and MT32.PLB) and the the other sound drivers + bunch of VCE files - in different versions (seem to be fixes in the timing code) or content - seems to be a very good source for VCE,MIDI sound analysing
1990-10-?? Stunts (DOS) <-- contains MT15.DRV+VCEs+MT32.PLB
1990-??-?? 4D Sports Tennis (DOS) <-- contains MT15.DRV+VCEs+MT32.PLB
1990-??-?? Bill Elliott's NASCAR Challenge (DOS) <-- contains MT15.DRV+MT32.PLB and other VCEs+DRVS
1990-??-?? Teenage Mutant Hero Turtles (DOS) <-- contains DRV (no MT15) +VCEs
1991-??-?? 4-D Boxing (DOS) <-- contains MT15.DRV+VCEs+MT32.PLB
1991-??-?? Mission: Impossible (DOS) <-- contains MT15.DRV+VCEs+MT32.PLB
1992-??-?? The Simpsons: Bart's House of Weirdness (DOS) <-- contains MT15.DRV+MT32.PLB and other VCEs+DRVS
1993-??-?? Michael Jordan In Flight (DOS) <-- contains MT15.DRV+MT32.PLB and other VCEs+ many different other sound-source DRVS
1993-??-?? NHL 93 (DOS) <- MT30.BGP seems to be the MT32-sound driver, HOCKEY.EXE seems to have integrated MT32 support
1993-??-?? World Tour Tennis (DOS) <-- contains MT15.DRV+VCEs+no MT32.PLB
1994-??-?? NHL 95 (DOS) <-- contains some KMS files
there are several changed versions of MT15.drv (and other drvs) around - also the contained MT32.PLB (sounds etc.) are different (much bigger or smaller then stunts)
could be funny to test if the different MT15.DRV and MT32.PLBs work with Stunts (some of the driver a litte bit bigger, some are 2-3 kilobytes larger)
Zapper, your V6 driver (ADENG1T3.VCE) sounds like a V10 with a Formula 1 car. So let's call it a Formula 1 V10 driver, okay?
Quote from: GTAMan18 on July 25, 2021, 07:05:29 AM
Zapper, your V6 driver (ADENG1T3.VCE) sounds like a V10 with a Formula 1 car. So let's call it a Formula 1 V10 driver, okay?
Proof
Quote from: GTAMan18 on July 25, 2021, 07:05:29 AM
Zapper, your V6 driver (ADENG1T3.VCE) sounds like a V10 with a Formula 1 car. So let's call it a Formula 1 V10 driver, okay?
Hi GTAMan18, if it's suitable as a V10 let it be also known as for this type of racing engines ;)
It's not a v10 @ 20000rpm
what i've know so far:
these are the files that i seem fit together
3.571 AD15.DRV <- adlib sound card driver
1.152 ADENG1.VCE
3.008 ADSKIDMS.VCE
1.750 MT15.DRV <- 100% revesed into C code and i know what the thing is doing
976 MTENG1.VCE
1.184 MTSKIDMS.VCE
1.271 MT32.PLB <- Engine Sounds/Crash Sound etc.
2.227 PC15.DRV <- pc speaker driver
1.049 PCENG1.VCE
1.232 PCSKIDMS.VCE
2.993 TD15.DRV <- tandy sound driver (special tandy sound chip?)
912 TDENG1.VCE
2.528 TDSKIDMS.VCE
4.303 SKIDOVER.KMS <-- over-what?
8.612 SKIDSLCT.KMS <-- selection/menu music?
2.590 SKIDTITL.KMS <-- title music?
4.221 SKIDVICT.KMS <-- victory music?
i think the *ENG1* are engine sounds
no idea what *SKIDMS" means
https://moddingwiki.shikadi.net/wiki/Stunts
*.kms "Kris' Music System Format" - Music
https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Format
*.vce "Kris' Music System Voice Format" - Instruments for background music
https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Voice_Format
Skid is the game (project) code. In 4D boxing it has box in that place.
The ms stands for music or something alike.
Skidover is the game over / lose high score screen music.
Skidvict is the game win / finish high score screen music
The **skidms.vce files have the instrument information for the skid****.Kms files.
If you rename the VCE files from boxing you get the stunts song with different instruments..
Quote from: Daniel3D on August 02, 2021, 03:41:02 PM
Skid
super-self-facepalm!
"skid" is a english word that also means sling, slide, spin - like, for example, a too fast car on the street :)
the VCEs contain ascii strings
example:
ADENG1.VCE: STOPSTARENGIBLOWSKIDSCRABUMPCRAS (stop,star(t),engin(n),blow,skid,scra(tch),bump,cras(h))
GREENG.SFX: BLOWBUMPCRASSCRASKI2SKIDSTARSTOPMTIN (blow, bump, cras(h), ski(d)2,skid,start,stop,mtin?) <-- seems to be some sort of VCE
TDENG1.VCE: STARSKIDSTOPCRASBLOWENGIBUMPSCRA (start,skid, stop,cras(h),blow,engi(n),bump,scra(tch))
Quote from: llm on August 02, 2021, 04:04:06 PM
Quote from: Daniel3D on August 02, 2021, 03:41:02 PM
Skid
super-self-facepalm!
"skid" is a english word that also means sling, slide, spin - like, for example, a too fast car on the street :)
I'm getting the feeling that STUNTS was named SKID when developing started.
Quote from: Daniel3D on August 02, 2021, 05:44:04 PM
Quote from: llm on August 02, 2021, 04:04:06 PM
Quote from: Daniel3D on August 02, 2021, 03:41:02 PM
Skid
super-self-facepalm!
"skid" is a english word that also means sling, slide, spin - like, for example, a too fast car on the street :)
I'm getting the feeling that STUNTS was named SKID when developing started.
and then the marketing guys entered the room
I think they were planning on making test drive 3. They made test drive 2 with Accolade.
The may have pitched this idea for test drive 3, but Accolade got the job and DSI was left out.
So they made their own game out of it. They would need a working title that doesn't smell like test drive rip off. :D
I think you could use the VCE from 4d Sports Tennis too ;)
Hello you all,
A few days ago I discovered "Mario Andretti's Racing Challenge" game by the fact that it uses the same sound effects file format as Stunts. This time it uses the ".pcv" extension which is the packed .vce file for "Kris' Music System Voice Format".
This game has the particularity of using different engine sound for each of it's type of racing cars (Formula1, Indycar, Sprint, Stockcar, Modified, and Prototypes).
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=8508;image)
By knowing this, my curiosity simply got me into checking how this sound file have inside. So I unpacked ADENG1.PVC in Stressed application and easily find out all this resources:
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=8502;image)
Unfortunately I tried to compare the content with Stunts ADENG1.VCE in Stressed but it results in error:
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=8504;image)
So as an alternative I used HxD to read all it's contents and found what I suspect, just by listening the in game engine sound of Mario Andretti's Racing Challenge's StockCar (also like "formula1" and "modified" cars), that some cars have the same car engine sound of stunts (for AdLib at least):
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=8506;image)
The INDY(car), SPNT(Sprint) and PROT(otype) resources are different engine sounds, so I copy each one to ENGI(ne) of stunts ADENG1.VCE and it worked just fine!
That's a great find Zapper! I haven't played Mario Andretti's Racing Challenge for quite some time, but in your opinion, do any of the engine sounds offer an improvement over those originally included in Stunts?
It seems that the sound for skid and crash are the same as well.
To bad that stunts does not differentiate different engine types.
How does it compare to 'zappers engine sounds'
Or did you change that in the KMS?
Those engine sounds comparing to the original sound of stunts are almost the same quality.
I've copied each engine sound from "MARC" that are different than Stunts (Indy, Prototype and Sprint versions) and replicate them in several ADE____.VCE files for using in Stunts (check the attached zip), to use them just rename each one to ADENG1.VCE.
Really cool.
The indy has a more F1 vibe to it.
The proto has bit lower vibration.,
The sprint has i think the nicest. I like the idle sound. sounds lazy. I think it fits the dodge.
(terrible descriptions, i know. Don't know much about engines)
I renamed them into separate folders, so I can quickly swap them.
Attached for whoever wants them.
Thanks Zapper for the research. Gives a bit more life to the game,
Hi,
After stating that grass surface sound is missing on AdLib/Sound Blaster setup (Tandy also doesn't) by comparison with PC Speaker and MT-32 VCE files, I found a way to use a skid sound when driving non-tarmac (grass/mud/ice) surfaces.
Initially I tried to add a resource at the end of the file ADENG1.VCE and also increasing byte nr. 5 from 8 to 9 (matching number of sound resources), but it seems dificult to get it recognized (all sounds get muted):
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=10046;image)
So my second attempt was to replace the "STOP" sound resource (as far as I know it's not heard in game), with the a new resource "SKI2" that is related for non-tarmac skid sound as you can check:
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=10041;image)
(original file content on top window)
I've tunned a little to be a lower tonned like It happens on Pc Speaker or MT-32.
The resulting file ADENG1SK.VCE (http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=10043) is on attach, just replace the original ADENG1.VCE to try it.
Now I can migrate to sound blaster for racing. Thank you! It was one of the biggest pothole of the game!
That's brilliant! Let's test it for a bit, but it might be worth adding to the standard ZakStunts pack
Quote from: dreadnaut on July 05, 2022, 02:21:46 PM
That's brilliant! Let's test it for a bit, but it might be worth adding to the standard ZakStunts pack
Exactly. I will add it to the the new builds as well.
Quote from: Zapper on July 05, 2022, 11:34:56 AM
After stating that grass surface sound is missing on AdLib/Sound Blaster setup (Tandy also doesn't) by comparison with PC Speaker and MT-32 VCE files, I found a way to use a skid sound when driving non-tarmac (grass/mud/ice) surfaces.
I've replicated the same fix on Tandy resource file TDENG1.VCE, check attached TDENG1SK.VCE file below.
Great news! This is indeed one of the most annoying bugs in the game. Thanks Zapper!
Wow! I've just downloaded the updated file. It's almost 3:00am, so I'm going to bed, but I'll try it tomorrow.
Quote from: Zapper on October 22, 2021, 11:58:57 PM
By knowing this, my curiosity simply got me into checking how this sound file have inside. So I unpacked ADENG1.PVC in Stressed application and easily find out all this resources:
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=8502;image)
Out of curiosity. Mario Andretti's Racing Challenge version can be edited in stressed. But stunts version can not.
What happens if you edit the Mario Andretti's Racing Challenge version to match stunts? Does that work?
Just tried it - great work Zapper!
Quote from: Daniel3D on July 07, 2022, 05:18:56 PM
Quote from: Zapper on October 22, 2021, 11:58:57 PM
By knowing this, my curiosity simply got me into checking how this sound file have inside. So I unpacked ADENG1.PVC in Stressed application and easily find out all this resources:
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=8502;image)
Out of curiosity. Mario Andretti's Racing Challenge version can be edited in stressed. But stunts version can not.
What happens if you edit the Mario Andretti's Racing Challenge version to match stunts? Does that work?
Yep they are very similar games, graphics and sounds. They took many things from Stunts like Porsche 962 and Porsche March 3d models.
Quote from: Daniel3D on July 07, 2022, 05:18:56 PM
Out of curiosity. Mario Andretti's Racing Challenge version can be edited in stressed. But stunts version can not.
What happens if you edit the Mario Andretti's Racing Challenge version to match stunts? Does that work?
Curiosity got the better of me as well.
Editing the Mario version is very possible. and i managed to match the stunts version easy. The files are however not the same.
There are slight variations in the file (Stunts had not problem with it though). Adding SKI2 in stressed also worked fine in stuns
(if SKI2 is located before SKID it seems, had it at the end the first try, that didn't produce skidding sound, but worked otherwise fine)..
But i wanted closer to the original. So I edited the second high bite of the original from 2 to 4 (as it was in my adaptation of mario's file [ADENG1-MA.VCE] )
that gave the expected size in stressed of 1136 (instead of 624) that was long enough to trim the last few bits and have a working original in stressed. [ADENG1-C.VCE]
then I added the SKI2 Chunk by duplicating and renaming SKID. [ADENG1.VCE]
** files attached for reference - all are different, but all work in stressed and in stunts **
I think we can do this for other files that stressed won't open with this error as well.
Credit goes to Zapper. i only connected two separate bits of information together. And I am happy that it fit withing my skill set.
Applied the same trick to the tandy version. (only 22 empty bites difference)
Needs testing, but i think it will be ok.
also edited the other PC and MT VCE file so they can be opened in stressed now.
@zapper. You know, I think, more than most of us about how the game processes the sound files. Can you lower the tone of SKI2 so that it is more of a rumble?
Daniel this is getting good! We have another game to take resourses for Stunts.
Quote from: Daniel3D on July 08, 2022, 12:08:46 PM
@zapper. You know, I think, more than most of us about how the game processes the sound files. Can you lower the tone of SKI2 so that it is more of a rumble?
Yes it should be possible, I'll try to achieve it in a couple of days. (im out from home) ;)
I have something else to play with (continuing earlier acquired knowledge)
The other VCE files contain the instruments for the music. (KMS has the notes)
stunts has 25 instruments.
Mario's has the same format as do both versions of 4D boxing.
There is some overlap, but there are a lot of instruments there.
We can switch the instrument code to get the songs with different instruments.
I fixed the files, so they can be opened in stressed.
Stunt's own version I also cleaned. It had some crap at the end of the file that had noting useful,
The others still have it.
you can rename any of them to ADSKIDMS and it will work, but not all instruments will be played.
What a great job! I'll download it tomorrow (saturday). It wil be fun. I wonder if we can add sounds for new things... A different sound for snow grip or driving over water...
is the VCE format fully understand? (i mean every byte)
i can only find this description: https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Voice_Format
Quote from: llm on July 09, 2022, 09:46:37 AM
is the VCE format fully understand? (i mean every byte)
i can only find this description: https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Voice_Format
Yes and No
We know that for music the KMS provides the tone and rhythm and the VCE provides the instruments. It is build similar to MIDI but with less variables.
That is why we can convert KMS to MIDI but not the other way around.
As for the contents. There is not more to it than the wiki says. Its just a list of base instrument sounds. No melody or anything.
How the sound is build up is something zapper can tell you more about.
But the sound parts have all the same buildup and can be exchanged. The only thing that matters is that the chunk has the name stunts is looking for.
Quote from: Daniel3D on July 09, 2022, 01:44:07 PM
As for the contents. There is not more to it than the wiki says. Its just a list of base instrument sounds. No melody or anything.
How the sound is build up is something zapper can tell you more about.
is there interest in a small console tool or something that shows the info from the VCE file? then we can fill the wiki gaps :)
O yes. That would be cool.
All you can see now is the chunk name and you can see the raw data in stressed.
I suspect that the 100 Bytes of instrument data is some kind of waveform. Some graphics representation would help in analysis.
Quote from: llm on July 09, 2022, 02:33:36 PM
Quote from: Daniel3D on July 09, 2022, 01:44:07 PM
As for the contents. There is not more to it than the wiki says. Its just a list of base instrument sounds. No melody or anything.
How the sound is build up is something zapper can tell you more about.
is there interest in a small console tool or something that shows the info from the VCE file? then we can fill the wiki gaps :)
But I don't really know what there is left to discover.
The files are a bit messy with crap behind the last chunk that is total rubbish and can be removed without trouble.
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
Quote from: llm on July 10, 2022, 09:36:31 AM
-understand the last chunk - not crashing if that is revemoved does not mean its correct or error free to do it :)
That is true.
I based my opinion on (my) logic and intuition. That is indeed not a fact.
Contrary to my assumption is data from Mario's.
Quote from: Zapper on October 22, 2021, 11:58:57 PM
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=8506;image)
The CRAS chunk in the middle is the same as the one that stunts has at the end.
I believe that they copied the chunk with the rubbish data to this file. Or it may still be real data.
I don't know. Looks inconsistent.
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
What I see in resource files in Stunts in general is that there is no chunk length specification anywhere. What you have is an offset that points to the beginning of the chunk and it's relative to the end of the header, which has a variable length that's 4 + 2 + 4 * (number_of_chunks) + 4 * (number_of_chunks) = 6 + 8 * (number_of_chunks).
This means that, in order to properly get a chunk's data, one needs to know where the next chunk starts and assume that there's no gap between them. For the last chunk, there is no next chunk, so this is what the first field is for: it's supposed to point to the byte after the last byte of the last chunk. The file can be larger, but no chunks can extend past that point.
I deally, chunks should be in order, which simplifies the parsing of the file. This is the case for all the resource files in Stunts that I know of except for original car RES files. Even in disorder, you can sort the chunk positions in memory and guess their lengths as long as the first field is correctly set.
Now, if the length of a field is known in advance because of what it's supposed to carry, for example, if it's supposed to be of a fixed length, like in the case here, in which it seems they're all 100 bytes long, or if the length is specified within the chunk data directly or indirectly, like it happens when listing vertices in the 3D shape resource files, then it may occur that you get more data than you actually need. Stunts may or may not load these extra bytes in memory. I assume it does. I think it's safest to think it that way. So gaps are possible this way.... functional gaps, but probably not content gaps.
@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.
EDIT:: i wrote part of this post without internet before the 2 posts above, so some information is double. Some is later added response to them. ::/EDIT
As far as I understand, all stunts resources files have the same build-up.
File size / chunk names / chunk offsets
The chunk offsets only give the start position.
The end is the value of the next start position.
So the extra data would give trouble in files with variable chunk sizes. In this case it is not a problem because the game only reads the expected size.
If you remove the corrupted chunk in stressed and replace it with a good one, stressed will update the offsets automatically.
Lenfile is updated to. But I also have no idea if stunts uses it.
Maybe some general tool kept track of that for size management to aid in keeping the game fit for distribution on floppy.
-----
for testing I took the Mario's ADENG1 with the corrupted CRAS chunk, removed that and duplicated the CRs2
(renamed it to CRAS and edited the single different value to be an equal to original CRAS) and saved it again.
now the file looks clean.
You can now see that the file length part (first 4 characters) are updated. but after the chunk names the offset values for the first 3 are the same, the others are also updated. and the start of each sound chunk sarts with | d. :).... |
Quote from: Daniel3D on July 09, 2022, 02:43:05 PM
I suspect that the 100 Bytes of instrument data is some kind of waveform. Some graphics representation would help in analysis.
The 100
bitsbytes are sound samples, and I am searching for a way to analyze it or visualize it. I came upon the article below.
Looks like something worth to try, but I don't know for sure.
Understanding Binary Formatted Waveform Datahttps://rfmw.em.keysight.com/wireless/helpfiles/n5106a/understanding_waveform_data.htm (https://rfmw.em.keysight.com/wireless/helpfiles/n5106a/understanding_waveform_data.htm)
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. All other RES files in Stunts follow the simple rule that I tried to describe (that is, by suggesting it probably isn't truly the "file length", but the position where the next chunk should be attached if there were another, so that you know the length of the last chunk; in practice, pretty much the same thing). But even if you understand this field my way, it still doesn't match for VCE files. However, I am feeling that, if you change this to whatever you please, that doesn't affect Stunts. Then the question is why it was generated with that value, but still, we can give it the "right" one. Kind of like why car RES files have their chunks misordered for original cars, but still, the "right" order works.
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
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 :)
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 :)
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
Quote from: llm on July 11, 2022, 10:26:43 AM
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 :)
Stressed has to update the header and offset table. otherwise, every edit would break the file.
(most stunts resources are Chunk based and have the same buildup regardless of the extension)
Stressed can manage all chunk based resource files now it has an escape in raw data.
Stressed loads only the contents of the chunks as raw data the rest of the file it understands.
So you can add, remove and hex-edit chunks without problem.
I started rereading the tread. The current discussion may shed new light on old information.
Quote from: dstien on December 13, 2011, 02:11:37 PM
VCEs are Stunts resource archives. Working on the MIDI file conversion (http://forum.stunts.hu/index.php?topic=2560.msg46214#msg46214) I identified some values in the MT-32 voices file that holds MIDI controller data:
char *vce = findResource(vceBuf, seq->voices[i].id);
if (vce == NULL) {
seq->voices[i].enabled = false;
}
else {
seq->voices[i].enabled = true;
seq->voices[i].channel = vce[0x43];
seq->voices[i].program = vce[0x44];
seq->voices[i].volume = vce[0x45];
seq->voices[i].pan = vce[0x46];
seq->voices[i].transpose = vce[0x10];
seq->voices[i].hasHits = vce[0x25];
}
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
Quote from: llm on July 11, 2022, 02:58:04 PM
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
I remember zapper mentioning that the first part of the chunk is different and at a certain point they become the same.
From that and the above info (off which I am not sure if it is related to the chunk itself, but I think so) I gathered that the sound wave itself is the same for all. But that was a big assumption.
I have not checked that. But now that you bring it up. I will check it tonight.
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 .............................
I'm seeing that you all have harvesting some useful information! :D But let me bring some information that I noted when changing "engine" sound on ADENG1.VCE bytes:
"Instrument data:
Lines (100 byte split)
1: STOP
2: STAR
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)
4: BLOW
5: SKID
6: SCRA
7: BUMP
8: CRAS
"
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=10083;image)
These notes can be gathered into a wiki to describe VCE content files.
Quote from: Daniel3D on July 08, 2022, 12:08:46 PM
@zapper. You know, I think, more than most of us about how the game processes the sound files. Can you lower the tone of SKI2 so that it is more of a rumble?
@Daniel3D, here you have the file (http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=10087) (based on ADENG1.VCE you post before (http://forum.stunts.hu/index.php?topic=2570.msg86121#msg86121)) with a lower tone grass skid sound.
Changes signaled below:
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=10085;image)
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)
Quote from: Zapper on July 11, 2022, 06:38:46 PM
Quote from: Daniel3D on July 08, 2022, 12:08:46 PM
@zapper. You know, I think, more than most of us about how the game processes the sound files. Can you lower the tone of SKI2 so that it is more of a rumble?
@Daniel3D, here you have the file (http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=10087) (based on ADENG1.VCE you post before (http://forum.stunts.hu/index.php?topic=2570.msg86121#msg86121)) with a lower tone grass skid sound.
Changes signaled below:
(http://forum.stunts.hu/index.php?action=dlattach;topic=2570.0;attach=10085;image)
Very neat. It sounds better, I only cleaned the end of the file up a bit. But I love it. Nice work.
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 :)
Quote from: llm on July 12, 2022, 10:49:49 AM
added export/import feature to my vce_dump tool
O wow.
I was messing with music files from other sources (4D boxing mostly) but they didn't seem to work back then.
Now I wonder if they just missed the right instruments.
Now I can make the right collection of instruments in the vce. Then I will try again.
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.
When I just renamed the adboxms.vce of 4D boxing stunts played the music, but is sounded different.
So I expect that some chunks with the same name contain different instrument data.
So there is room to play.
just ask if you need a special feature in vce_dump - the dirty cpp code is ease extendible to even dirtier style :)
Well Mario Andretti's Racing Challenge has the exact same instrument data as STUNTS and a few instruments more.
I can easily make a duplicate adskidms.vce by just renaming the one from Mario Andretti's Racing Challenge.
The order of the instruments does not make a difference, nor does the fact that there are 10 more.
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.
Attached is a cleaned up version with only the ones stunts uses.
Alternative sound..
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?
I extracted them all from Mario's, boxing and stunts. Then dropped them in one folder. But some of the instruments from boxing have the same name but sound different.
I still have to look at other games, 4D tennis is first.
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?
Quote from: llm on July 13, 2022, 10:50:55 AM
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?
I know that the structure is the same for these 3 games. So I look at the chunk as a whole and identify them by chunk name (not by structure).
Also keeping in mind that the are "midi" based and points to the opl2 chip or equivalent.
Quote
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?
The instruments are identified by chunk name only. There are differences between games, but researching that would mean a deep understanding of how the FM Synthesys is interpreted and routed to the OPL2.
so you got 77 different titles (with instrument data)
i thought each title contains multiple instruments - not a single instrument (as you stated)
The Kms/vce combination is built like MIDI and the chunk names match synthesized instruments.
There are also hints in the Kms files.
Quote from: llm on July 13, 2022, 12:19:57 PM
so you got 77 different titles (with instrument data)
i thought each title contains multiple instruments - not a single instrument (as you stated)
I found a bit of light reading for you
Programmer's Guide to Yamaha YMF 262/OPL3 FM Music Synthesizer (https://moddingwiki.shikadi.net/wiki/OPL_chip)
OPL3 is a direct descendant of OPL2 (what a surprise), so most features of OPL2 are also present on OPL3.
Quote from: Daniel3D on July 13, 2022, 06:23:10 PM
Quote from: llm on July 13, 2022, 12:19:57 PM
so you got 77 different titles (with instrument data)
i thought each title contains multiple instruments - not a single instrument (as you stated)
I found a bit of light reading for you
Programmer's Guide to Yamaha YMF 262/OPL3 FM Music Synthesizer (https://moddingwiki.shikadi.net/wiki/OPL_chip)
OPL3 is a direct descendant of OPL2 (what a surprise), so most features of OPL2 are also present on OPL3.
thanks, i've got plenty of hardware programming documentation about the sound blaster - but this one is nice and small :)
another idea to easy the analyse of the VCE stuff would be logging the data that gets tunnelt from stunts to the loaded DRV-plugin
(at least extending the dosbox source a little)
maybe its just more or less the content of the VCE files then we can understand how this data is used exactly in den DRV
and write a small program that uses the DRV-Plugins to play the sounds without using stunts
i can do it, but my limited time makes every fun project a problem :)
I know what you mean by limited time. Most of the time is spent on it this last few weeks were at the expense of sleep. Which is not advisable, but excitement got the better of me..
Being able to play sounds would be very helpful, but also limited in long term use. I can do a lot without.
I have discovered that a vce file with every available instrument chunk works fine in stunts. When loading a Kms music file the code only loads the instrument chunks it needs.
Quote from: Daniel3D on July 13, 2022, 09:20:11 PM
I know what you mean by limited time. Most of the time is spent on it this last few weeks were at the expense of sleep. Which is not advisable, but excitement got the better of me..
Being able to play sounds would be very helpful, but also limited in long term use. I can do a lot without.
I have discovered that a vce file with every available instrument chunk works fine in stunts. When loading a Kms music file the code only loads the instrument chunks it needs.
i am trying to expand the data.
I have a new instrument pack (113 now)
and i have found a way to make songs from other games work in Stunts.
So attached a reverse compatible instrument library (stunts songs still sound the same)
and the title song from
mission impossible. (which fits the animation quite nicely)
i started to investigate my dosbox-extension-to-trace-DRV-data-communication-idea
seems to be easy, i've branched dosbox-staging and started to implement stunts-DRV-tracing :)
what can we do with that: each driver got 22 functions - few of them are used and i know at least based on my https://github.com/LowLevelMahn/UnifiedMT15 project what the parameter,content-size/types are - but not if these data just the VCE, MKS content
hope i've got a little time on the week-end to get at least some of my micro-projects ready
Quote from: llm on July 13, 2022, 06:47:07 PM
maybe its just more or less the content of the VCE files then we can understand how this data is used exactly in den DRV
and write a small program that uses the DRV-Plugins to play the sounds without using stunts
i can do it, but my limited time makes every fun project a problem :)
Could you make it play the music as well?
Somebody (Darien?) Made a convert to midi at some point.
Quote from: Daniel3D on July 14, 2022, 08:35:20 PM
Could you make it play the music as well?
Somebody (Darien?) Made a convert to midi at some point.
the first step is to analyse the Stunts <-> DRV communication - after that im able to write a player - but it will take some time
Quote from: llm on July 14, 2022, 09:43:43 PM
Quote from: Daniel3D on July 14, 2022, 08:35:20 PM
Could you make it play the music as well?
Somebody (Darien?) Made a convert to midi at some point.
the first step is to analyse the Stunts <-> DRV communication - after that im able to write a player - but it will take some time
I have noticed 8)
Quote from: llm on July 19, 2021, 10:57:20 AM
@Daniel3D
my next goal is to write an MT15.drv based player to play the game sounds outside of the game
my dosbox extension for hooking the drv load+drv calling prototype works!
very few changes to dosbox staging needed to get it working :) +-45min
that means: i can trace all function calls from stunts into the sound driver (all drivers contain a equal jump-table with 23 functions - but only a few are needed for the driver to work - it seem like a generic interface with serveral features)
my github dosbox-staging fork branch: main_stunts_tests
commit: https://github.com/LowLevelMahn/dosbox-staging/commit/3604bcd5de0e6c4a188807f35b94088abbd51f08
main code: https://github.com/LowLevelMahn/dosbox-staging/blob/3604bcd5de0e6c4a188807f35b94088abbd51f08/src/_stunts/_stunts.cpp
dosbox detects the stunts game.exe start and hooks the drv function call tsub00 - the driver init - nothing more so far
https://imgur.com/a/MIF6i02
how to build:
1. VS2019 community edition (or VS2022) is needed to build under windows, or any not too old debian/ubuntu
2. clone my dosbox staging fork: https://github.com/LowLevelMahn/dosbox-staging
3. checkout main_stunts_tests branch
4. build sln file .\vs\dosbox.sln
(everything should build out of the box)
i've did a quick trace with the MT15.DRV
all tsub[NR] names are the functions from the public driver interface (the 23 functions in the jump table)
in my C-Port all the public functions are currently called c_tsub[NR] - just named by the order they appear in the jump-table
(buts is mostly know what these functions do - very simple C-Code in my port)
tsub0 called 1 -> is driver init
tsub1 called 1 -> only calls tsub2 -> driver shutdown
tsub2 called 1 -> reset everything, silence
tsub3 called 76
tsub4 called 101
tsub5 called 74 -> empty implementation (called by Stunts but not needed by the MT15.DRV)
tsub6 called 6
tsub7 called 4
tsub8 called 2
tsub10 called 16
tsub11 called 6
tsub13 called 947
tsub16 called 581 -> empty implementation (called by Stunts but not needed by the MT15.DRV)
tsub21 called 1
tsub22 called 1
find for example "tsub0" in my MT15.DRV project
Original Assembler
https://github.com/LowLevelMahn/UnifiedMT15/blob/2947002fe4a839e7e4a3d66a27e5f3d6ff38587c/MT15.asm#L1198
C-Port:
https://github.com/LowLevelMahn/UnifiedMT15/blob/2947002fe4a839e7e4a3d66a27e5f3d6ff38587c/drv.c#L648
more traces with better parameter names
game.exe startet
driver = mt15.drv
driver init done
MT32: LCD-Message: (C)1990,1991 DSI
tsub10: channel: 0
tsub10: channel: 1
tsub10: channel: 2
tsub10: channel: 3
tsub10: channel: 4
tsub10: channel: 5
tsub10: channel: 6
tsub10: channel: 7
tsub10: channel: 8
tsub10: channel: 9
tsub10: channel: 10
tsub10: channel: 11
tsub10: channel: 12
tsub10: channel: 13
tsub10: channel: 14
tsub10: channel: 15
tsub8: unknown0: 21410
tsub22: should be MT32.PLB content with MT15.DRV: {05 02 00 18 32 18 00 00 00 45 6E 67 69 6E 65 20 31 20 20 07 05 0F 00 17 15 0B 01 01 00 35 07 00 00 00 37 28 32 23 0A 32 46 46 14 0D 10 10 23 14 09 69 07 37 00 00 00 00 2A 2E 64 32 64 64 64 64 64 32 5B 0C 1B 0C 00 00 05 00 00 00 19 64 64 64 64 17 4C 0B 01 01 00 35 07 00 00 00 37 28 32 23 0A 32 46 46 14 0D 10 10 23 14 09 69 07 37 00 00 00 00 2A 2E 64 32 64 64 64 64 64 32 5B 0C 1B 0C 00 00 05 00 00 00 19 64 64 64 64 18 32 0B 01 01 35 25 07 00 00 00 37 2D 2D 23 0A 32 46 46 14 0C 00 10 39 14 09 69 07 37 00 00 00 00 2A 2C 64 32 64 64 64 64 64 32 5B 0C 1B 0C 00 00 05 00 00 00 1D 64 64 63 64 00 00 0B 01 01 2B 35 07 00 00 00 37 28 32 23 0A 32 46 46 14 0D 10 10 23 14 09 69 07 37 00 00 00 00 2A 2E 64 32 64 64 64 64 64 32 5B 0C 1B 0C 00 00 05 00 00 00 19 64 64 64 64 02 01 18 32 0C 00 01 00 53 71 75 65 65 6C 20 20 20 20 00 08 0F 00 24 19 0B 01 00 25 64 07 00 00 00 00 06 00 00 00 64 64 64 00 48 64 00 03 1E 09 69 07 64 00 00 00 00 00 00 00 00 64 64 64 64 32 64 5B 0C 1B 0C 00 00 05 00 00 00 00 64 63 00 63 24 56 0B 01 00 25 58 07 00 00 00 00 06 00 00 00 64 64 64 00 48 64 00 03 1E 09 69 07 64 00 00 00 00 00 00 00 00 64 64 64 64 32 64 5B 0C 1B 0C 00 00 05 00 00 00 00 64 63 00 63 13 0B 0B 01 01 35 25 07 00 00 00 00 00 00 00 00 4E 4E 4E 00 32 64 10 39 14 09 69 07 37 00 00 00 00 2A 2C 64 32 64 64 64 64 46 64 5B 0C 1B 0C 00 00 05 02 00 00 00 64 63 00 64 07 5E 0B 01 00 35 64 07 00 00 00 00 00 00 00 00 50 50 51 00 21 64 00 1C 1E 09 69 07 37 00 00 00 00 2A 2C 64 32 64 64 64 64 46 64 5B 0C 1B 0C 00 00 05 00 00 00 00 64 63 00 63 02 02 18 32 0C 00 01 00 44 61 6D 61 67 65 20 20 20 20 05 05 0F 00 15 00 0F 00 00 12 42 00 04 00 00 14 1E 00 00 00 14 28 00 00 05 00 00 64 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 4C 00 00 00 00 00 00 0E 00 46 00 0A 00 61 00 00 09 00 0F 00 00 13 41 00 04 00 00 14 14 00 00 64 50 00 00 00 0A 1E 00 64 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 4C 00 00 00 00 00 00 13 11 3B 37 00 00 63 2D 04 12 00 0F 00 00 18 41 04 08 00 00 4C 17 13 0A 34 00 00 00 11 05 00 00 64 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 4C 00 00 00 00 00 00 00 00 41 1D 0E 00 5E 17 03 14 00 0F 00 00 53 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 4C 00 00 00 00 00 00 00 32 33 50 0C 53 64 2D 00 02 03 18 32 0C 00 01 00 4D 65 74 61 6C 43 6C 61 6E 6B 08 09 03 00 05 00 0F 00 00 45 41 00 03 00 00 14 1E 00 00 31 14 28 00 00 05 00 00 64 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 4C 00 00 00 00 00 00 00 3F 3D 00 0A 62 00 00 00 0D 00 0F 00 01 58 41 00 04 00 00 3D 00 00 00 31 2F 00 00 00 18 0D 05 64 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 4C 00 00 00 00 00 00 00 39 0C 04 2A 64 00 00 00 24 00 0F 00 00 18 41 04 05 00 00 4C 17 13 0A 34 00 00 00 11 05 00 00 64 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 4C 00 00 00 00 00 00 00 40 06 17 1D 64 00 00 00 36 00 0F 00 00 53 41 00 02 00 00 0A 0A 00 00 64 50 32 00 00 00 00 00 64 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 4C 00 00 00 00 00 00 00 39 00 26 2C 64 00 00 00 02 04 18 32 0C 00 01 00 45 6E 67 69 6E 65 20 31 20 20 02 02 0F 00 24 32 0B 01 00 53 64 0E 00 00 00 37 2D 2D 23 0A 32 46 46 14 13 64 10 22 00 09 69 07 37 00 00 00 00 2A 2C 64 32 64 64 64 64 0D 32 40 0C 00 0C 00 00 05 00 00 00 13 64 64 64 64 18 4C 0B 01 01 00 35 07 00 00 00 37 28 32 23 0A 32 46 46 14 0D 10 10 23 14 09 69 07 37 00 00 00 00 2A 2E 64 32 64 64 64 64 64 32 5B 0C 1B 0C 00 00 05 00 00 00 19 64 64 64 64 16 32 0B 01 01 58 25 07 00 00 00 37 2D 2D 23 0A 32 46 46 14 0C 00 10 39 14 09 69 07 37 00 00 00 00 2A 2C 64 32 64 64 64 64 0E 32 5B 0C 1B 0C 00 00 05 00 00 00 1D 64 64 63 64 0C 36 0B 01 00 00 32 07 02 00 00 37 28 32 23 32 32 37 40 14 0D 10 10 38 12 0B 69 07 37 00 00 00 00 2A 2E 64 32 64 64 64 64 23 32 5B 0C 1B 0C 00 00 05 00 00 00 19 64 64 64 64}
tsub21: size: 4, buffer: {10 00 16 64}
tsub8: unknown0: 1
tsub6: channel_: 9, unknown2_: 0, controller_value_: 0x7F
tsub11: channel_: 9, unknown1: 0, unknown2: 81fc, buffer_(seg:ofs): 4543:118
MT32: playSysexWithoutHeader: Message checksum is incorrect (provided: 532ff5b0, expected: 7d)!
tsub3: channel: 9, struct1_(seg:ofs): 81fc:a2b6, key_note_number_: 24, velocity_: 5d, struct2_(seg:ofs): 4543:118
tsub6: channel_: 9, unknown2_: 0, controller_value_: 0x7F
tsub11: channel_: 9, unknown1: 0, unknown2: 8248, buffer_(seg:ofs): 4543:118
MT32: playSysexWithoutHeader: Message checksum is incorrect (provided: 532ff5b0, expected: 7d)!
tsub3: channel: 9, struct1_(seg:ofs): 8248:a2e4, key_note_number_: 31, velocity_: 3e, struct2_(seg:ofs): 4543:118
tsub6: channel_: 2, unknown2_: 0, controller_value_: 0x7F
tsub11: channel_: 2, unknown1: 0, unknown2: 8294, buffer_(seg:ofs): 4543:5e
tsub3: channel: 2, struct1_(seg:ofs): 8294:a312, key_note_number_: 3d, velocity_: 38, struct2_(seg:ofs): 4543:5e
tsub6: channel_: 5, unknown2_: 0, controller_value_: 0x7F
tsub11: channel_: 5, unknown1: 0, unknown2: 82e0, buffer_(seg:ofs): 4543:1d2
tsub6: channel_: 3, unknown2_: 0, controller_value_: 0x7F
tsub11: channel_: 3, unknown1: 0, unknown2: 832c, buffer_(seg:ofs): 4543:bb
tsub6: channel_: 6, unknown2_: 0, controller_value_: 0x7F
tsub11: channel_: 6, unknown1: 0, unknown2: 8378, buffer_(seg:ofs): 0:0
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub3: channel: 2, struct1_(seg:ofs): 8294:a2b6, key_note_number_: 36, velocity_: 2f, struct2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub3: channel: 9, struct1_(seg:ofs): 8248:a2e4, key_note_number_: 2c, velocity_: 12, struct2_(seg:ofs): 4543:118
tsub3: channel: 2, struct1_(seg:ofs): 8294:a312, key_note_number_: 31, velocity_: 3a, struct2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a2b6, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub3: channel: 9, struct1_(seg:ofs): 8248:a2b6, key_note_number_: 2a, velocity_: e, struct2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub3: channel: 9, struct1_(seg:ofs): 81fc:a2b6, key_note_number_: 24, velocity_: 5d, struct2_(seg:ofs): 4543:118
tsub3: channel: 9, struct1_(seg:ofs): 8248:a2e4, key_note_number_: 2a, velocity_: 18, struct2_(seg:ofs): 4543:118
tsub3: channel: 2, struct1_(seg:ofs): 8294:a312, key_note_number_: 31, velocity_: 35, struct2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 9, buffer1_(seg:ofs): 81fc:a2b6, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 9, buffer1_(seg:ofs): 8248:a2e4, buffer2_(seg:ofs): 4543:118
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
tsub13: channel_: 2, buffer1_(seg:ofs): 8294:a312, buffer2_(seg:ofs): 4543:5e
attached is a full log of getting to the game menu and then exit to DOS
this trace contains all data sent to the driver so you would hear the stunts sounds/music if i could replay this trace with the same timing :)
btw: this type of tracing is possible for every stunts function or code part - if its relevant for understanding what stunts is doing etc.
Quote from: llm on July 16, 2022, 07:50:10 AM
btw: this type of tracing is possible for every stunts function or code part - if its relevant for understanding what stunts is doing etc.
Well,I can kinda follow what you are doing. But this is to advanced for me.
I did find a code part where the track is loaded. It seems to be a sequence of multiple passes per tile. Maybe there are clues about collision data hidden there.
Quote from: Daniel3D on July 16, 2022, 09:11:13 AM
Well,I can kinda follow what you are doing. But this is to advanced for me.
the implementation itself is easy if one knows the dosbox/16bit code internas a little
but the stunts related code (offsets etc.) needs stunts knowledge from reversing
Quote from: Daniel3D on July 16, 2022, 09:11:13 AM
I did find a code part where the track is loaded. It seems to be a sequence of multiple passes per tile. Maybe there are clues about collision data hidden
it sometimes helps to see the data live going through the functions for analysis - my tracer is something like that
debugging step by step isn't always the best way understanding it clearly