ref: 6e4f6ab9626d81e4106d3ccc974a76d832fdff13
parent: b695843cc549e3de4845e340c611efb0ae98866c
author: Simon Howard <[email protected]>
date: Thu May 28 14:37:31 EDT 2009
Set channel bits for OPL3 so that OPL2 traces will play back properly. Subversion-branch: /branches/opl-branch Subversion-revision: 1537
--- a/opl/examples/droplay.c
+++ b/opl/examples/droplay.c
@@ -39,6 +39,15 @@
{
int i;
+ // This was recorded from an OPL2, but we are probably playing
+ // back on an OPL3, so we need to enable the original OPL2
+ // channels. Doom does this already, but other games don't.
+
+ if ((reg & 0xf0) == OPL_REGS_FEEDBACK)
+ {
+ val |= 0x30;
+ }
+
OPL_WritePort(OPL_REGISTER_PORT, reg);
for (i=0; i<6; ++i)