OPL3BankEditor icon indicating copy to clipboard operation
OPL3BankEditor copied to clipboard

Supporting real OPL3 on modern Windows

Open datajake1999 opened this issue 5 years ago • 16 comments

I modified opl_proxy to use inpout32.dll. This makes it possible to use real OPL3 chip on modern Windows. Is it possible to add this patch into the OPL3BankEditor? Thanks. opl_proxy.zip

datajake1999 avatar Dec 20 '18 02:12 datajake1999

Nice! Yes, it's very possible! :fox_face: :wink: Also, which conditions to this work? I mean, which sound card I would to try to let this work? Is it's fine with C-Media chips? I have some sound cards are equipped with OPL3 clone on them. I think, why not to also make similar thing for Linux too? (would to check, will be possible to access the chip directly or I need to make some sort of a bridge in a form of kernel module).

Wohlstand avatar Dec 20 '18 02:12 Wohlstand

It should work on CMI8738 cards. To access the OPL3 synth on a CMI8738 card, set the OPL3 base port to the base address of your card + 50. For example if your CMI8738 is at address 0xe00, you set the OPL3 base address to 0xe50.

datajake1999 avatar Dec 20 '18 03:12 datajake1999

Then, looks, I'll need to also add the setup GUI to allow user set that up. Anyway, will this work from off the user space, or admin rights are needed? (for a worse case, an admin<->user additional bridge driver will be needed)

Wohlstand avatar Dec 20 '18 03:12 Wohlstand

Inpout32.dll runs in user mode. Admin rights are only needed on first install of the driver.

datajake1999 avatar Dec 20 '18 03:12 datajake1999

Nice! :fox_face: Anyway, will try some experiments with this to be sure this will work...

Wohlstand avatar Dec 20 '18 03:12 Wohlstand

Okay, I have made some changes over @jpcima 's changes:

  • I made the sure that OPL emulator will work by default on modern Windows, otherwise, very rare cases will have hardware OPL chip support.
  • I made OPL3 address setting be save-able

Wohlstand avatar Dec 31 '18 20:12 Wohlstand

AppVeyor's automated CI devbuild (http://wohlsoft.ru/docs/_laboratory/_Builds/win32/opl3-bank-editor/opl3-bank-editor-dev-win32.zip) with Nuked OPL3 emulator doesn't work: Cannot load inpout32.dll for hardware OPL playback I don't have OPL3-based soundcard...

freq-mod avatar Feb 18 '19 16:02 freq-mod

Looks like some sort of bug... Lemme check out that...

Wohlstand avatar Feb 18 '19 16:02 Wohlstand

Having the fix applied, the software will open and work, however the message box "Cannot load inpout32" can still pop up. To make it go away, I think it's needed to run it as admin once. Then it will setup the necessary Windows things, and following runs no longer need the admin rights.

(as I remember, the inpout32 client embeds in its own dll a copy of the kernel-space helper)

jpcima avatar Feb 21 '19 19:02 jpcima

Did that and it's alright now. Thanks for the fix @jpcima!

freq-mod avatar Feb 21 '19 21:02 freq-mod

A little question about inpout32.dll. Is here the 64bit version for it? Otherwise, 64-bit OPL3-BE won't support it...

Wohlstand avatar Oct 13 '20 09:10 Wohlstand

A little question about inpout32.dll. Is here the 64bit version for it? Otherwise, 64-bit OPL3-BE won't support it...

I think 64-bit version is inpoutx64.dll, I'm not 100% sure though...

EDIT:http://www.highrez.co.uk/downloads/inpout32/

freq-mod avatar Oct 13 '20 09:10 freq-mod

That is correct. If compiling for X64, impoutx64.dll is used.

datajake1999 avatar Oct 13 '20 09:10 datajake1999

Gonna to put it...

Wohlstand avatar Oct 13 '20 09:10 Wohlstand

Done! Please test some after build, will that work or not? :thinking:

Wohlstand avatar Oct 13 '20 11:10 Wohlstand

Did anyone test a real OPL3 board on x64 windows? Working?

110-kenichi avatar Feb 02 '22 15:02 110-kenichi