#8363 closed patch
Better MT-32 support
Reported by: | sev- | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Audio: MT32 |
Version: | Keywords: | ||
Cc: | Game: |
Description
This is a patch which incorporates MT-32 emulator into ScummVM.
Current code has some flaws which I haven't fixed: o It runs correctly only with --output-rate=32000. I tried to resample it on the fly without success. o There are sound glitches in mi2 - Sound cracks, due to some bug in freeverb - It hangs in intro due to unknown reason to me
Otherwise it works perfect.
Ticket imported from: #1048326. Ticket imported from: patches/468.
Attachments (7)
Change History (25)
by , 20 years ago
Attachment: | mt-32.v1.patch.bz2 added |
---|
comment:1 by , 20 years ago
Forgot to mention that code will not work as is until bug #1048129 (Bug in File class) is fixed. For a workaround comment 'clearerr(_handle)' in read() method.
comment:2 by , 20 years ago
This code is currently x86 only (and in fact, even more limited, namely to compilers which support that special __asm__ syntax in backends/ midi/MT32Structures.h).
As such, it's definitely not yet ready for CVS :-)
comment:3 by , 20 years ago
I corrected it. In configure I define #HAVE_X86 if on appropriate platform and use it in the code.
comment:4 by , 20 years ago
Ah, and mentioned bug is already fixed, so the patch should work ritght out of the box.
comment:5 by , 20 years ago
Oops. patch v2 doesn't apply correctly. Here is an updated version without any changes.
comment:6 by , 20 years ago
Here is a patch to be applied atop sev's v3 patch (i.e. first apply his patch, then mine inside the backends/midi directory). It fixes endian issues, and adds support for output rates other than 32000.
comment:7 by , 20 years ago
A new revision of my patch (mt32.endian.v4.patch), still to be applied atop V3 of Eugene's patch (beware of the V3 / V4 confusion :-).
It makes use of the newly added MidiDriver_Emulated base class.
comment:8 by , 20 years ago
Updated version of the patch.
- Endian patch included - files moved to mt32/ subdir and renamed - _native_mt32 is set if emulator is active - sound buffermemory is properly initialized, so there is no noise at the beginning
comment:9 by , 20 years ago
Ok. in backends/module.mk.
backends/mt32 -> backends/midi/mt32
Anything else?
comment:10 by , 20 years ago
Owner: | set to |
---|
comment:11 by , 20 years ago
OK, from my POV, we are almost there. While the MT32 emulation isn't usable on my machine, I think it's just because it's too slow (1.5 Ghz G4) -- that is, at least using the generic C version, maybe if we added some PowerPC asm, it would work fine over here, too :-).
The remaining issues, in my eyes: * Legal stuff: This patch is based on GPL code, I assume? In any case, we should still mention the author in the README, I guess (under credits) * Documentation: a patch for the README and the .tex files mentioning the mt32 driver, and maybe explaining it a little bit (including a note which states that this is very power hungry, so you need a fast machine). Also, we need to explain how it relates to the --native-mt32 option * base/gameDetector.cpp: need to add it to the USAGE_STRING * update the manpage, maybe?
comment:12 by , 20 years ago
Yes, I mention author in each file. Actually there should be three of them added. Original MT-32 emulator author (code is GPL, added to dosbox variant and is posted under same license), linux porter which version I base on and freeverb author (that code is public domain).
So I will add all mentioned documentation modifications and commit. No objections?
comment:13 by , 20 years ago
Ok, here it goes for checking once more.
I didn't renamed 07_ subsections in tex documentations, though having section numbers as file names isn't convenient.
I didn't update USAGE_STRING as it now states "(see README)" for -e command line option.
As of --native-mt32, i dont' know what to mention as it will not affect emulation since it gets set intentionally by it neverthless command line option specified or not.
comment:14 by , 20 years ago
* I agree on the .tex filenames. They are bad. The whole TeX stuff is suboptimal, and I wouldn't have checked it in that way in the first place, but done is done. Don't worry about renaming those files for now...
* USAGE_STRING -> fine
* --native-mt32 -> that's exactly what you should write in the README -- I am sure people will wonder whether they need to use it or not. So we should tell them (i.e. that it doesn't matter :-)
* I'd clarify "enough processor power" in the README ("1-2 GHz" maybe?)
* Authors: Canadacow, Jezar, Tristan -> do they really prefer the nick names only, or should we add them as FIRST "NICK" LAST to the credits?
* Whether to commit: it's fine by me now. Can't speak for Ender of course, but I don't think he'd object...
comment:15 by , 20 years ago
Status: | new → closed |
---|
comment:16 by , 20 years ago
o --native-mt32. Added.
o Processor power . I don't really know. Works no problem on my Athlon 1900+. We need some feedback to put an estimate.
o Authors. I couldn't find real names anywhere on their sites.
o Ender had no objections. Commited.
comment:17 by , 20 years ago
http://sourceforge.net/users/canadacow/
You'll probably have to ask him whether it's ok to display his full name or not, since I'm not sure what finally happened to his legal struggles with Roland.
That may not be a reliable information as far as ScummVM is concerned, but the MT-32 enabled DOSBox build used to work ok on my P3/1Ghz (with no graphic filter, no fancy setting). CC says on his website it "runs fine on either my Celeron 1333Mhz laptop and my Athlon 1400Mhz".
comment:18 by , 6 years ago
Component: | → Audio: MT32 |
---|
Vesrion1 of MT-32 patch