OPL3BankEditor icon indicating copy to clipboard operation
OPL3BankEditor copied to clipboard

Supporting real OPL3 on modern Windows

Open datajake1999 opened this issue 6 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

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

I tested, that should work, there is a 64-bit driver had been added too.

Anyway, closing this issue as it had been completed a while ago.

Wohlstand avatar Nov 14 '23 01:11 Wohlstand

Hmm... where can I download "InstallDriver.exe" for x64... My understanding, I need to run the "InstallDriver.exe" to install the driver inpoutx64.dll. Right?

110-kenichi avatar Nov 20 '23 14:11 110-kenichi

No need, you can try to just run the Bank Editor as-is, and it should work. I don't remind that I ran any kind of "InstallDriver" ever...

Wohlstand avatar Nov 20 '23 16:11 Wohlstand

However, the Dialog shows "Make sure you installed the latest OPL proxy" messages... image

110-kenichi avatar Nov 21 '23 04:11 110-kenichi

Try to run the thing as Administrator for a first time, will it work?

Wohlstand avatar Nov 21 '23 04:11 Wohlstand

Yes. Run it as Admin but failed. What means "first time"?

110-kenichi avatar Nov 21 '23 04:11 110-kenichi

What means "first time"?

I mean, ensure it gets started, and then you can normally run the thing without Admin. Anyway a question: what OS you do use? And what hardware chip you do have? The OPL3 Proxy thing works for devices are installed on sound cards that used by the system and these chips are available directoy through hardware address queries. Anyway, I'll check something also. Little note about inpout32/inpoutx64 module - developer no longer maintains it as the ability to sign drivers had been lost.

Wohlstand avatar Nov 21 '23 04:11 Wohlstand

btw, the page itself: https://www.highrez.co.uk/Downloads/InpOut32/default.htm Oh, ye, I really should include the InstallDriver thing too. But, I do not remind how it worked on my end... (I tested on my brother's PC without installing of any stuff, it ran Windows 7 at that moment, and there was a CMedia card).

Wohlstand avatar Nov 21 '23 04:11 Wohlstand

Also: do you run 32-bit or 64-bit thing?

Wohlstand avatar Nov 21 '23 04:11 Wohlstand

64bit Windows 11.

110-kenichi avatar Nov 21 '23 04:11 110-kenichi

Ah.. so sorry. do I need to install CMI8738 driver...?😅 I use CMI8738 card.

110-kenichi avatar Nov 21 '23 04:11 110-kenichi

From documentation:

The InpOut32 device driver supports writing to "old fashioned" hardware port addresses. It does NOT support USB devices such as USB Parallel ports or even PCI parallel ports (as I am lead to believe).

The device driver is installed at runtime. To do this however needs administrator privileges. On Vista & later, using UAC, you can run the InstallDriver.exe in the \Win32 folder to install the driver appropriate for your OS. Doing so will request elevation and ask for your permission (or for the administrator password). Once the driver is installed for the first time, it can then be used by any user without administrator privileges

Ah.. so sorry. do I need to install CMI8738 driver...?😅

Ye, the sound card SHOULD have its driver installed and worked to have an access to it.

Wohlstand avatar Nov 21 '23 04:11 Wohlstand

Thanks I will try it. But, are there CMI8738 x64 driver for modern windows...?

110-kenichi avatar Nov 21 '23 04:11 110-kenichi

But, are there CMI8738 x64 driver for modern windows...?

Should be something, I bet, but I am not fully sure. By myself: I don't use Windows for a while, I have the second computer to debug Windows software, it runs Windows 10 right now. My main computer runs Linux Mint, and there is a pile of Windows VMs of different versions to do the same - debug any Windows-related problems.

Wohlstand avatar Nov 21 '23 04:11 Wohlstand