summaryrefslogtreecommitdiff
path: root/opl/opl.h
diff options
context:
space:
mode:
Diffstat (limited to 'opl/opl.h')
-rw-r--r--opl/opl.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/opl/opl.h b/opl/opl.h
index f5b93a64..9f5d0a9f 100644
--- a/opl/opl.h
+++ b/opl/opl.h
@@ -58,7 +58,11 @@ typedef enum
#define OPL_REGS_FREQ_2 0xB0
#define OPL_REGS_FEEDBACK 0xC0
-// Initialise the OPL subsystem.
+//
+// Low-level functions.
+//
+
+// Initialize the OPL subsystem.
int OPL_Init(unsigned int port_base);
@@ -74,6 +78,31 @@ void OPL_WritePort(opl_port_t port, unsigned int value);
unsigned int OPL_ReadPort(opl_port_t port);
+//
+// Higher-level functions.
+//
+
+// Read the cuurrent status byte of the OPL chip.
+
+unsigned int OPL_ReadStatus(void);
+
+// Write to an OPL register.
+
+void OPL_WriteRegister(int reg, int value);
+
+// Perform a detection sequence to determine that an
+// OPL chip is present.
+
+int OPL_Detect(void);
+
+// Initialize all registers, performed on startup.
+
+void OPL_InitRegisters(void);
+
+//
+// Timer callback functions.
+//
+
// Set a timer callback. After the specified number of milliseconds
// have elapsed, the callback will be invoked.