Previous Page

by Nisto at 10:51 PM EST on January 9, 2018
I took it upon myself to update the decoder to support the Resident Evil 0 movies and potential other games (use -n switch; for the moment I don't know if/how the ADPCM variant can be automatically detected). Probably half the time was spent on debugging a really dumb misinterpretation of the assembly, so I hope this will be of use...

https://www.dropbox.com/s/cxb3exphv0bokry/h4m_audio_decode.zip?dl=1

I spot some additional decoding routines and IMA ADPCM step/index arrays in the Resident Evil 0 executable, so there may still be issues with files from other games.

I haven't made a pull request on hcs' Github repository, because I don't have any Git tools on my system and frankly don't understand much of it. I guess I'll need some Git for dummies guide or something. Regardless, I've included the source code in the archive, so do what you want with it!

Bye!
by Nisto at 12:17 PM EST on January 21, 2018
Another (hopefully final) update from me:

h4m_audio_decode 0.5

- Support 8-bit (A)DPCM (can someone properly name/identify this coding?)
- Support raw PCM
- Support non-stereo channel configurations
- Support multi-track audio (Tales of Symphonia, Pokemon Channel) (*)
- Tweak some sanity checks to support more files (Bomberman Jetters)
- Consistently write little-endian samples on all machines
- Correct the offsets for audio/video frame counts (**)
- More header values figured out (detect audio format and display some more info)
- Add -h option to display header info and exit
- Remove output path argument since there may be multiple tracks
- Remove pointless switch from v0.4 and old/redundant code for IMA ADPCM decoding
- Refactor a bunch of code

(*) The tracks in Pokemon Channel are meant to be played separately as they are different languages, whereas in Tales of Symphonia, it seems like it's actually 4 channels rather than two separate stereo tracks, so you'll have to combine them yourself.

(**) I verified this from movies without audio in a bunch of games.

So, as it turns out, the IMA ADPCM code that hcs originally used worked flawlessly for some cases, but there were some edge cases (e.g. Resident Evil 0) where the step index would eventually get out of range in the H4M variant. I compared the decoded audio of the movies from Master Quest generated by the original decoder (v0.3) against the output of the code I've reversed from the Resident Evil 0 executable and can say that they're identical. So I've simply removed the old code instead of having a switch to use it.

Furthermore, support for the other audio formats I spotted has now also been added. Whether I got things right is another matter, because I've checked as many games as I could find (see below) now and didn't find a single H4M/HVQM4 video that didn't use IMA ADPCM as the audio format, so I haven't actually been able to test anything else.

I've also looked at Pikmin, but unfortunately wasn't able to figure it out. It uses an audio frame format I haven't seen before, and, if we're interpreting the main header correctly, the bitdepth is set to zero, so I have no idea how to handle that. Someone's gonna have to reverse Pikmin I think.

I've tested all movies from the following GameCube games, which now all decodes properly, as far as I can tell:

Bakuten Shoot Beyblade 2002 Nettou! Magne Tag Battle!
Bomberman Jetters
Kirby's Airride
Mystic Heroes
Naruto - Gekitou Ninja Taisen! 2
Pokemon Channel
Rayman Arena
Resident Evil 2 (Biohazard 2)
Resident Evil 3 Nemesis (Biohazard 3 Last Escape)
Resident Evil Zero (Biohazard 0)
Tales of Symphonia
The Legend of Zelda - Ocarina of Time - Master Quest
Viewtiful Joe

edited 10:12 AM EST January 22, 2018
by SubDrag at 7:54 AM EST on January 26, 2018
Nice one. Do you know how many games use this format? I think I remember seeing one of these videos in the Star Fox Adventures GCM.
by MurraySkull at 6:53 AM EST on January 27, 2018
I believe that Super Smash Bros. Melee and Pac-Man World 2 also use this format.
by Nisto at 2:37 PM EST on January 27, 2018
Thanks, SubDrag! I don't know how many games use the format, but I went through all that I could find mentioned in this thread, and whatever I could find via Google. I checked Star Fox Adventures already but didn't find any HVQM4 videos there. Unless they're compressed or something?

I'll check SSBM and Pac-Man World 2 as well, thanks MurraySkull.
by SubDrag at 2:53 PM EST on January 27, 2018
Sorry the SFA Kiosk or whatever it was. It has something called crap starfox.h4m

It has video but no one was able to get audio, if it exists.

http://www.mediafire.com/download/dm26jn16bjxdsp7/crap_starfox.h4m

https://www.youtube.com/watch?v=iqsuIvAAenU

edited 2:56 PM EST January 27, 2018
by Nisto at 3:32 PM EST on January 27, 2018
Based on the header, there aren't any audio frames, and all the vital audio metadata is zero too. So yeah, there's probably no audio for that movie. There may be audio in a separate file though, like in Eternal Darkness and others.

Pac-Man World 2 had some videos with audio. No problems decoding them.

SSBM doesn't appear to have any h4m files.

Previous Page
Go to Page 0 1 2 3

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source
Generated in 0.0029s;