From bf01cc746f889487e2eef8002fbd45b2b0a1c926 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 24 Jun 2023 01:07:50 -0400 Subject: [PATCH] genmidi: Disable OPL2 waveform checks. Pretty much every Sound Blaster-compatible card used an OPL3 chip (everything since the Sound Blaster 2 in October 1991) so it seems reasonable to add this as a requirement. Because of the way that the new waveforms are arranged in OPL3, it's a pretty graceful degradation if they're used on an OPL2 anyway (see datasheet, page 14). --- lumps/genmidi/instrument.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lumps/genmidi/instrument.py b/lumps/genmidi/instrument.py index 15d5ecf8..7c52821b 100644 --- a/lumps/genmidi/instrument.py +++ b/lumps/genmidi/instrument.py @@ -9,6 +9,8 @@ import sys import sbi_file import a2i_file +DO_OPL2_CHECK = False + # Check the specified instrument data is OPL2-compatible and does not # use any OPL3 features. Returns an error message, or 'None' if data # is valid. @@ -50,7 +52,8 @@ def load_instrument(filename): else: raise Exception("Unknown instrument file type: '%s'" % filename) - check_opl2(filename, result) + if DO_OPL2_CHECK: + check_opl2(filename, result) return result