ref: 962d6dcf12e740c26c3be035884b310e74947d97
parent: b796c64d34847434d053aeacca5b6ec10ace2450
author: Simon Howard <[email protected]>
date: Wed Mar 11 16:20:05 EDT 2009
Debug trace code for register writes. Subversion-branch: /branches/opl-branch Subversion-revision: 1462
--- a/opl/opl.c
+++ b/opl/opl.c
@@ -30,6 +30,8 @@
#include "opl.h"
#include "opl_internal.h"
+#define OPL_DEBUG_TRACE
+
#ifdef HAVE_IOPERM
extern opl_driver_t opl_linux_driver;
#endif
@@ -75,6 +77,9 @@
{
if (driver != NULL)
{
+#ifdef OPL_DEBUG_TRACE
+ printf("OPL_write: %i, %x\n", port, value);
+#endif
driver->write_port_func(port, value);
}
}
@@ -83,7 +88,15 @@
{
if (driver != NULL)
{
- return driver->read_port_func(port);
+ unsigned int result;
+
+ result = driver->read_port_func(port);
+
+#ifdef OPL_DEBUG_TRACE
+ printf("OPL_read: %i -> %x\n", port, result);
+#endif
+
+ return result;
}
else
{