Make Java OPL3 Emulator be an independent library

Moderator: GZDoom Developers

User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Discord: Wohlstand#4881
Github ID: Wohlstand
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia

Make Java OPL3 Emulator be an independent library

Post by Wohlstand »

Hello!

Recently we are discussed about of giving support to libADLMIDI use multiple emulators (in the current case, support all emulators are supported by "OPL Synth Emulation" device now) with an ability to switch them in run time.

It's my backend stuff I implemented over Nuked OPL3 and DosBox emulator:
https://github.com/Wohlstand/OPL3BankEd ... /opl/chips

And on OPNMIDI side I made it over Nuked OPN2, MAME YM2612, and GENS 2.10 emulators:
https://github.com/Wohlstand/libOPNMIDI ... /src/chips

I have checked out emulators inside of GZDoom and I found Java OPL3 emulator is "too integrated" into GZDoom and to have used it separately, it also will pull a dozen of other files are not related to emulator itself, but GZDoom in most.

I gonna to remove dependencies of Java OPL3 emulator on GZDoom's guts to let it be a pure STL-C++ that can be used everywhere. I created this to discuss the entire process and ask any questions related to GZDoom's internals.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Make Java OPL3 Emulator be an independent library

Post by Graf Zahl »

I'm sorry but this is out of scope for us. This is external code, after all, even if it was ported to C++ for use in ZDoom. That port was done by randi, who, as we all know is no longer working here. For the rest of us developers this is as much a black box as it is for you, if not more, because no active developer has any musical background.

I'm afraid that you may have to find someone else with better knowledge about MIDI/OPL to help you out here.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Discord: Wohlstand#4881
Github ID: Wohlstand
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia

Re: Make Java OPL3 Emulator be an independent library

Post by Wohlstand »

Anyway, as I told, I'll try to dig it by myself and replace the GZDoom-specific code with common one and on success, I'll send it to you. Myself I have no fear of the emulator itself, I only need to replace the FRandom thing and xz_Float.h with pure STL.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47968
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Make Java OPL3 Emulator be an independent library

Post by Graf Zahl »

Ok. xs_Float is relatively harmless. You can just copy over that file, it got no dependencies at all. Of course on modern SSE2 hardware most of its purpose has gone away, it was mostly to work around x87's poorly defined float->int conversions.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Discord: Wohlstand#4881
Github ID: Wohlstand
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia

Re: Make Java OPL3 Emulator be an independent library

Post by Wohlstand »

Hello! And sorry for the necro-posting. Since I found this topic again, I want to notice that with a help of Jean Pierre Cimalando, this task has been solved a year ago.
I leaving the link to the standalone version of Java OPL3 emulator for everyone who is interested for it: https://github.com/Wohlstand/OPL3BankEd ... vaOPL3.hpp

Return to “Closed Feature Suggestions”