diff options
author | Simon Howard | 2015-05-30 13:04:56 -0400 |
---|---|---|
committer | Simon Howard | 2015-05-30 13:04:56 -0400 |
commit | 0e90c19ca717298f4f3b83dfd075cdf0c458de32 (patch) | |
tree | 09fae977fd34c03759d5c90e7daf2a087e6e7756 /opl/opl.h | |
parent | 5082f14944442344030d66f6fbdf86a75a1c1c70 (diff) | |
parent | 1e516e34911d3a95479c303fe26b59f20e618252 (diff) | |
download | chocolate-doom-0e90c19ca717298f4f3b83dfd075cdf0c458de32.tar.gz chocolate-doom-0e90c19ca717298f4f3b83dfd075cdf0c458de32.tar.bz2 chocolate-doom-0e90c19ca717298f4f3b83dfd075cdf0c458de32.zip |
Merge pull request #545 from khokh2001/opl3_mode
opl: Add OPL3 mode.
The DMX library had limited support for the features of the OPL3 chip,
enabled by setting the DMXOPTIONS variable. This reproduces the OPL3
support in Chocolate Doom's OPL playback and emulation layer.
Huge thanks to Alexey Khokholov for researching and developing this.
This fixes #470.
Diffstat (limited to 'opl/opl.h')
-rw-r--r-- | opl/opl.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -26,7 +26,8 @@ typedef void (*opl_callback_t)(void *data); typedef enum { OPL_REGISTER_PORT = 0, - OPL_DATA_PORT = 1 + OPL_DATA_PORT = 1, + OPL_REGISTER_PORT_OPL3 = 2 } opl_port_t; #define OPL_NUM_OPERATORS 21 @@ -37,6 +38,7 @@ typedef enum #define OPL_REG_TIMER2 0x03 #define OPL_REG_TIMER_CTRL 0x04 #define OPL_REG_FM_MODE 0x08 +#define OPL_REG_NEW 0x105 // Operator registers (21 of each): @@ -101,7 +103,7 @@ int OPL_Detect(void); // Initialize all registers, performed on startup. -void OPL_InitRegisters(void); +void OPL_InitRegisters(int opl3); // // Timer callback functions. |