Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting real OPL3 on modern Windows #118

Closed
datajake1999 opened this issue Dec 20, 2018 · 34 comments
Closed

Supporting real OPL3 on modern Windows #118

datajake1999 opened this issue Dec 20, 2018 · 34 comments

Comments

@datajake1999
Copy link

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

@Wohlstand
Copy link
Owner

Wohlstand commented Dec 20, 2018

Nice!
Yes, it's very possible! 🦊 😉
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).

@datajake1999
Copy link
Author

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.

@Wohlstand
Copy link
Owner

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)

@datajake1999
Copy link
Author

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

@Wohlstand
Copy link
Owner

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

@Wohlstand
Copy link
Owner

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

@freq-mod
Copy link
Contributor

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...

@Wohlstand
Copy link
Owner

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

@jpcima jpcima self-assigned this Feb 21, 2019
@jpcima
Copy link
Collaborator

jpcima commented Feb 21, 2019

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)

@freq-mod
Copy link
Contributor

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

@Wohlstand
Copy link
Owner

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

@freq-mod
Copy link
Contributor

freq-mod commented Oct 13, 2020

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/

@datajake1999
Copy link
Author

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

@Wohlstand
Copy link
Owner

Gonna to put it...

@Wohlstand
Copy link
Owner

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

@110-kenichi
Copy link

110-kenichi commented Feb 2, 2022

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

@Wohlstand
Copy link
Owner

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.

@110-kenichi
Copy link

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?

@Wohlstand
Copy link
Owner

Wohlstand commented Nov 20, 2023

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...

@110-kenichi
Copy link

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

@Wohlstand
Copy link
Owner

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

@110-kenichi
Copy link

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

@Wohlstand
Copy link
Owner

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
Copy link
Owner

Wohlstand commented Nov 21, 2023

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
Copy link
Owner

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

@110-kenichi
Copy link

64bit Windows 11.

@110-kenichi
Copy link

110-kenichi commented Nov 21, 2023

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

@Wohlstand
Copy link
Owner

Wohlstand commented Nov 21, 2023

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.

@110-kenichi
Copy link

110-kenichi commented Nov 21, 2023

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

@Wohlstand
Copy link
Owner

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
Copy link
Owner

I found something: https://www.drvhub.net/devices/sound-cards/c-media/cmi8738-c3dx-pci-audio
But be careful, this site is jerkish, use "Download driver" link, not "Install driver" that is a suspicious adware.

@Wohlstand
Copy link
Owner

Inside of archive, will be another archve and executable. Ignogre executable, and unpack the second archive. Then, open context menu over INF file, run "install", and then reboot.

@110-kenichi
Copy link

Hmm... I could not install the driver... (BSoD Error...😭)

@Wohlstand
Copy link
Owner

Hmm... I could not install the driver... (BSoD Error...😭)

Sounds like, there is another driver needed... 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants