AUDIO : hardware / software OPL2 / 3 (YM262 / YM3812) support for Atari TOS#7395
AUDIO : hardware / software OPL2 / 3 (YM262 / YM3812) support for Atari TOS#7395n0kturnal wants to merge 56 commits intoscummvm:masterfrom
Conversation
Added integration with nFM library (https://framagit.org/nokturnal/nfm), which provides driver layer for various OPL devices. Changelist provides Atari support only for now, it might be extended to other platforms as well with some additional work. It requires build system adjustments either by prebuilding library directly from repository or downloading prebuilt package to a place folder set by '--with-nfm-prefix' and with --enable-nfm switch enabling nFM support in build). Software driver integration wasn't tested, might be revisited after Atari audio backend updates.
|
|
||
| extern "C" | ||
| { | ||
| #include "nfmcore.h" |
There was a problem hiding this comment.
Shouldn't it be
| #include "nfmcore.h" | |
| #include <nfmcore.h> |
There was a problem hiding this comment.
@sev- Yes, you are right, corrected angled braces in all includes in follow up commit.
| { "sdlnet", "USE_SDL_NET", true, true, "SDL_net support" }, | ||
| { "discord", "USE_DISCORD", true, false, "Discord support" }, | ||
| { "retrowave", "USE_RETROWAVE", true, false, "RetroWave OPL3 support" }, | ||
| { "nFM", "USE_NFM", true, false, "Nokturnal nFM OPL2/OPL3 support" }, |
There was a problem hiding this comment.
| { "nFM", "USE_NFM", true, false, "Nokturnal nFM OPL2/OPL3 support" }, | |
| { "nFM", "USE_NFM", true, false, "Nokturnal nFM OPL2/OPL3 support" }, |
So it is nicely aligned
| _mad=auto | ||
| _opl2lpt=no | ||
| _retrowave=auto | ||
| _nfm=no |
There was a problem hiding this comment.
Since we have a test, why not do it auto?
There was a problem hiding this comment.
@sev- Turned out that test in configure script was broken, fixed it and set detection to auto as you suggested.
Fixed broken auto nFM tests in configure script, set library detection to auto ('--enable-nfm' is not needed if path '--with-nfm-prefix' is valid and contains library). Use angled braces for library includes. Minor formatting in create project as in suggested changes by SEV.
Currently translated at 100.0% (3076 of 3076 strings)
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: ScummVM/scummvm Translate-URL: https://translations.scummvm.org/projects/scummvm/scummvm/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: ScummVM/scummvm Translate-URL: https://translations.scummvm.org/projects/scummvm/scummvm/
Currently translated at 100.0% (3075 of 3075 strings)
This header is included more than once in ScummVM
But still switch to fullscreen after setting it up. This avoids changing the window size in fullscreen which does not make sense.
# Conflicts: # audio/fmopl.cpp
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: ScummVM/scummvm Translate-URL: https://translations.scummvm.org/projects/scummvm/scummvm/
Apple Clang has its own versioning, distinct from vanilla Clang. Differentiate them, to avoid any ambiguity when reporting a compiler version. This relies on `__apple_build_version__`, as done by CMake.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: ScummVM/scummvm Translate-URL: https://translations.scummvm.org/projects/scummvm/scummvm/
|
Had to sync with main branch and resolve conflict related to null opl driver changes. Also comma at the end of enum OplEmulator was removed in last commits related to null driver, so I had to readd it (added it as a part of 'USE_NFM' ifdef ). Disabled explicitly nFM on Coldfire target (it's unsupported atm). |
…i TOS Fixed comma in enum
…i TOS Fixed comma in enum, consistency
…i TOS Disabled explicitly nFM on Firebee, nFM is not supported / tested on Coldfire processors yet
|
This PR contains unrelated commits. Looks like an erroneous sync with master |
|
@n0kturnal no need to close the PR, just force-push your branch with new content. |
Added integration with nFM library (https://framagit.org/nokturnal/nfm), which provides driver layer for various OPL devices on Atari TOS target. Library is crossplatform, but changelist provides Atari support only for now. Integration might be extended to other platforms as well (if there will be any demand) with some additional work on library (mostly toolchain / packaging / testing related) and ScummVM side (rather minor, providing platform flags and enabling / disabling drivers depending on target).
It requires '--enable-nfm' switch and prebuilt library package for m68k-mintelf-gcc downloaded / built from repository or downloaded (I can provide prebuilt one for now) and copied to a folder set by '--with-nfm-prefix'). Enabling step will be added as separate PRs, right now change isn't enabled by default.
Software driver integration wasn't tested, might be revisited after Atari audio backend updates by @mikrosk .
I plan to remove dual opl2 on opl3 emulation at some point, right now I leaving it as is (want to implement something similar on nFM library level). Any comments or suggestions appreciated. Tested locally with / without switches provided. Formatted by AStyle with recommended set of switches.