AUDIO: add support for OPL2LPT

The OPL2LPT is an OPL2 chip plugged on a parallel port. It is
write-only but otherwise acts as a classic AdLib. This commit adds
support for this device.

User is expected to have the right permissions on the parallel
port. By default, the first suitable parallel port is used. It is
possible to override that with the hidden configuration setting
"opl2lpt_parport".

It depends on the presence of the libieee1284 library which abstracts
a bit parallel port handling. An alternative would be to access
directly /dev/parportX on Linux. This would amount of code but it
would be Linux-only.

Tested with Indy 3 and SOMI.
This commit is contained in:
Vincent Bernat
2018-04-08 09:17:19 +02:00
committed by Eugene Sandulenko
parent 73c56f13e0
commit 9edd8eff01
5 changed files with 215 additions and 1 deletions
+4
View File
@@ -134,6 +134,9 @@ static const char HELP_STRING[] =
" --opl-driver=DRIVER Select AdLib (OPL) emulator (db, mame"
#ifndef DISABLE_NUKED_OPL
", nuked"
#endif
#ifdef ENABLE_OPL2LPT
", opl2lpt"
#endif
")\n"
" --aspect-ratio Enable aspect ratio correction\n"
@@ -224,6 +227,7 @@ void registerDefaults() {
ConfMan.registerDefault("music_driver", "auto");
ConfMan.registerDefault("mt32_device", "null");
ConfMan.registerDefault("gm_device", "null");
ConfMan.registerDefault("opl2lpt_parport", "null");
ConfMan.registerDefault("cdrom", 0);