summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/fmopl.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-14 08:20:09 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-14 08:20:09 +0000
commit98b3cf37e79148efee7d3cb531877082996eb66b (patch)
tree3ea14802b853ef2eadaa9aa1a6cd3f0799f76528 /src/emu/sound/fmopl.c
parentaf1273c18d6bdd5c6607554f524306cb5d9df771 (diff)
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, December 13, 2008 6:58 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] additional sound core deprecat.h removal Hi mamedev, This patch removes most of the remaining deprecat.h includes in the sound cores. deprecat.h -= 8. ~aa -- From: Atari Ace [mailto:atari_ace@verizon.net] Sent: Saturday, December 13, 2008 10:14 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] final sound core deprecat.h cleanup Hi mamedev, This patch removes the last three deprecat.h includes from the sound cores. ~aa
Diffstat (limited to 'src/emu/sound/fmopl.c')
-rw-r--r--src/emu/sound/fmopl.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/emu/sound/fmopl.c b/src/emu/sound/fmopl.c
index 73cc7e228a1..675315b1cf6 100644
--- a/src/emu/sound/fmopl.c
+++ b/src/emu/sound/fmopl.c
@@ -68,12 +68,8 @@ Revision History:
*/
#include <math.h>
-
-#include "sndintrf.h" /* use M.A.M.E. */
-#include "deprecat.h" /* use M.A.M.E. */
-
+#include "sndintrf.h"
#include "ymdeltat.h"
-
#include "fmopl.h"
@@ -1726,7 +1722,7 @@ static TIMER_CALLBACK( cymfile_callback )
}
/* lock/unlock for common table */
-static int OPL_LockTable(void)
+static int OPL_LockTable(const device_config *device)
{
num_lock++;
if(num_lock>1) return 0;
@@ -1745,7 +1741,7 @@ static int OPL_LockTable(void)
{
cymfile = fopen("3812_.cym","wb");
if (cymfile)
- timer_pulse ( Machine, ATTOTIME_IN_HZ(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
+ timer_pulse ( device->machine, ATTOTIME_IN_HZ(110), NULL, 0, cymfile_callback); /*110 Hz pulse timer*/
else
logerror("Could not create file 3812_.cym\n");
}
@@ -1966,13 +1962,13 @@ static void OPL_save_state(FM_OPL *OPL, const device_config *device)
/* Create one of virtual YM3812/YM3526/Y8950 */
/* 'clock' is chip clock in Hz */
/* 'rate' is sampling rate */
-static FM_OPL *OPLCreate(int type, UINT32 clock, UINT32 rate)
+static FM_OPL *OPLCreate(const device_config *device, UINT32 clock, UINT32 rate, int type)
{
char *ptr;
FM_OPL *OPL;
int state_size;
- if (OPL_LockTable() ==-1) return NULL;
+ if (OPL_LockTable(device) == -1) return NULL;
/* calculate OPL state size */
state_size = sizeof(FM_OPL);
@@ -2162,7 +2158,7 @@ static int OPLTimerOver(FM_OPL *OPL,int c)
void * ym3812_init(const device_config *device, UINT32 clock, UINT32 rate)
{
/* emulator create */
- FM_OPL *YM3812 = OPLCreate(OPL_TYPE_YM3812,clock,rate);
+ FM_OPL *YM3812 = OPLCreate(device,clock,rate,OPL_TYPE_YM3812);
if (YM3812)
{
OPL_save_state(YM3812, device);
@@ -2298,7 +2294,7 @@ void ym3812_update_one(void *chip, OPLSAMPLE *buffer, int length)
void *ym3526_init(const device_config *device, UINT32 clock, UINT32 rate)
{
/* emulator create */
- FM_OPL *YM3526 = OPLCreate(OPL_TYPE_YM3526,clock,rate);
+ FM_OPL *YM3526 = OPLCreate(device,clock,rate,OPL_TYPE_YM3526);
if (YM3526)
{
OPL_save_state(YM3526, device);
@@ -2445,7 +2441,7 @@ static void Y8950_deltat_status_reset(void *chip, UINT8 changebits)
void *y8950_init(const device_config *device, UINT32 clock, UINT32 rate)
{
/* emulator create */
- FM_OPL *Y8950 = OPLCreate(OPL_TYPE_Y8950,clock,rate);
+ FM_OPL *Y8950 = OPLCreate(device,clock,rate,OPL_TYPE_Y8950);
if (Y8950)
{
Y8950->deltat->status_set_handler = Y8950_deltat_status_set;