First post, by nukeykt
This patch adds my Nuked OPL3 emulator to DOSBox SVN.
Set oplemu to nuked in config file. Also set oplrate and mixer rate to 49716 for best sound quality.
This patch adds my Nuked OPL3 emulator to DOSBox SVN.
Set oplemu to nuked in config file. Also set oplrate and mixer rate to 49716 for best sound quality.
Thanks.
Care to explain the difference to dosbox OPL?
here: Re: DOSBOX fork with better FM synthesis?
Make absolutely sure that both the Mixer and oplrate set to 49716 in DOSBox config else there is high level of harmonic distortion in the OPL emulation.
wrote:Make absolutely sure that both the Mixer and oplrate set to 49716 in DOSBox config else there is high level of harmonic distortion in the OPL emulation.
What about real sound card setting? 48KHz is not enough and you need set higher (i.e. 96KHz if you can, of course)?
No, for the real sound card DirectX (if you are on Windows) handles the sample rate conversion so everything should be right.
SDL which DOSBox uses for audio has far from alright sample rate conversion.
Anything but 49716 on both mixer and OPL, sounds distorted and noisy.
This applies to the Fast/Compat modes as well as for Nuked.
Real OPL3 for reference (YMF719):
Awesome stuff! I'm currently listening to MegaRace's music right now and it sounds perfect! At first, the song "Maeva" was playing weird but it turns out I had the oplmode set to "opl3gold" (which I turned on earlier for my reverse engineer work on Dune and MegaRace's music format). Everything went back to normal once I switched the oplmode back to "opl3". Keep up the excellent work!
Is this now added to any of the dosbox forks? (As the attached is 64bit only).
Or can I just use this : Windows, Doom, Apogee OPL3 Synthesizer. and then set dosbox to use it as midi? (i'm guessing not as i don't think dosbox supports external soundcard emulation?)
The user Yesterplay80 is compiling all the latest SVN versions with many useful patches.
https://drive.google.com/drive/folders/0BxEUS … aW1aYXlRRkRpVE0
The Enhanced version has a PATCHES.TXT which lists all the patches applied to the SVN.
Including the bit perfect Nuked OPL3 emulation.
Thanks, I'll try it.
Are there any good crt filters/shaders for dosbox too? That's something I always missed (along with scaling options)
@nukeykt
Do you have a YM3812 version too of nukedOPL?
I ask because SB1.x,SB2.0,SBPro1 are still using the less accurate OPL2 emulation.
wrote:@nukeykt
Do you have a YM3812 version too of nukedOPL?
I ask because SB1.x,SB2.0,SBPro1 are still using the less accurate OPL2 emulation.
No. I cancelled it due to 2 reasons:
1) For me OPL2 sounds exactly like OPL3. Indeed, Nuked OPL3 sounds closer to OPL2 than any OPL2 emulator.
2) As i mentioned earlier, i'm busy with OPN2 emulator.
You can use OPL3 with blocked high ports. It will behave almost like real OPL2, except CSM(never was used), WSE bit(enables 4 waveforms on OPL2. These waves always active on OPL3)
Alright, the question is whether your patch activates the NukedOPL core on the SBPro1 and SB1/2 cards in dosbox?
wrote:Alright, the question is whether your patch activates the NukedOPL core on the SBPro1 and SB1/2 cards in dosbox?
Yes. It should. Except SBPro 1 it behaves like OPL3 in OPL2 mode. DOSBox actually uses OPL3 to emulate Dual OPL2, so Rhythm mode can be broken.
A programmer friend asks a question about how nukedOPL enabled OPL2 modes:
"How do I set NukedOPL into OPL2 and Dual OPL2 modes?"
wrote:A programmer friend asks a question about how nukedOPL enabled OPL2 modes:
"How do I set NukedOPL into OPL2 and Dual OPL2 modes?"
For OPL2 just ignore high bank writes. There are two ways to emulate Dual OPL2:
1) "True" Dual OPL2: Just run two instances of the Nuked OPL3 for each OPL2. But it would be heavy for CPU.
2) DOSBox way: Enable OPL3 mode. Set L/R panning. And just map first OPL2 chip commands to first bank, and second chip commands to second bank. You should also filter and block OPL3 specific commands. Look DOSBox source code for further information.
nukeykt,
Is this how dosbox does OPL2 with its cores, It just ignores high bank writes when using the opl core?
It seems that there is a separate OPL2 emulation in dbopl cores besides the OPL3.
The friend in question is me. I am doing this in 86Box which is a fork of PCem. It uses (old?) dbopl.cpp, which has a variable that when turned off, makes the code pretend to be an OPL 2 and make the required adjustments. But nukedopl.cpp has no such switch and I'd rather not write my own code to do such adjustments because I have no idea how to do it right.
wrote:nukeykt,
Is this how dosbox does OPL2 with its cores, It just ignores high bank writes when using the opl core?
It seems that there is a separate OPL2 emulation in dbopl cores besides the OPL3.
DBOPL is a combined OPL2/OPL3 emulator. When OPL3 mode disabled it emulates OPL2, when you enable OPL3 it emulates OPL3. But in fact it only affects on WSE bit, which was removed in OPL3.
OPL3 in OPL2 mode should be good. OPL3 mode register is on high bank. So you never will be able to enable OPL3 mode with blocked bank. It'll stuck in OPL2 mode.
wrote:The friend in question is me. I am doing this in 86Box which is a fork of PCem. It uses (old?) dbopl.cpp, which has a variable that when turned off, makes the code pretend to be an OPL 2 and make the required adjustments. But nukedopl.cpp has no such switch and I'd rather not write my own code to do such adjustments because I have no idea how to do it right.
OPL3 was designed to be fully OPL2 compatibly. Yamaha added second register bank for extra channels. It's mapped to 0x222-0x223 and 0x38a-0x38b ports. Register which enables OPL3 mode is located on high bank. So it's enought to block writes to high bank.
So basically, all I need to do is not map the high bank, and that's it?