If you need an app to do bit depth reduction on wave files, I can adapt something I already have for that. Simple truncation of bits (shifting) - nothing fancy. (Edit) Also, Cool Edit Pro 2.1 does bitdepth reduction (though the results are still stored in 8bit or whatever format).
SOX is another tool that supports that kind of truncation ... I'm using it in the pre-processing stage for the PCE/PC-FX ADPCM conversion. But I know that Michirin9801 isn't a fan of command-line tools.
But ... do we know if the waveform data is in linear-space, or in logarithmic-space?
The amplitude levels in R1, R4 & R5 are all logarithmic, and I was finally curious-enough to look at the volume level number in excel.
Wow! I didn't realize that we were compressing down an approx 15-bit linear audio range into only 5-bits!
If the waveform data uses a similar logarithmic-space ... then the simple bit-truncation method isn't going to give great results.
I think that you and ccovell and mednafen have already checked this kind of stuff with oscilliscopes.
Do you know whether it is linear or logarithmic?
The idea is pretty simple: 7bit unsigned samples -> volume LUT -> becomes 8bit 2's complement value -> add all four channels -> some flag checking and branch to 10bit decode LUT -> two 5bit values (in byte form) in two different buffers for the playback driver.
I mean, I can write it - but something tells me you probably don't need me to
Ahh ... but the devil-is-in-the-details, and it's always much nicer to use tried-and-tested code rather than having to write every darned thing by myself.
I'd much rather be able to take what you've got, give you appropriate credit for all the hard work that you've done, and be able to concentrate my limited time on the other stuff that hasn't already been written!
I should be able to update the dmf2pce project on github with the latest code this week, and I'll be adding in the work-in-progress version of the huzak driver at the same time.
I'm hoping that it will have a solid-enough foundation by then that it'll be a matter of making improvements, rather than the large-scale reorganization that's still going on right now.
The point, once again, is to make this stuff open source (like Uli's improvements to HuC), so that any programmer can take it and modify it for their own needs.