From 9edd8eff0166c32fc2b5e07eaf0a37783a847ef3 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 17 Feb 2018 12:50:19 +0100 Subject: 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. --- base/commandLine.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'base') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 10ded95a51..9e62443d30 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -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); -- cgit v1.2.3