diff options
author | 2008-12-12 06:11:15 +0000 | |
---|---|---|
committer | 2008-12-12 06:11:15 +0000 | |
commit | b400e7978bb626a14196fae7b45bb89dfeeae249 (patch) | |
tree | 454f1b103d0f8e80e719dbf37251b2304c07a91e /src/emu/sound/3812intf.c | |
parent | 9dc496610928a3adee6c2d46f954634fcb83063a (diff) |
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Thursday, December 11, 2008 6:52 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] deprecat.h cpu cleanup
Hi mamedev,
This patch purges the last few uses of deprecat.h from the cpu cores,
plus a handful of other Machine cases elsewhere that were found by
script inspection.
~aa
--
Hi mamedev,
This patch eliminates most uses of deprecat.h in the sound cores by
attaching the device to the state object and using it where
appropriate. Given that all the cpu objects use this convention, and
three sound cores already do this, this seemed an appropriate
approach.
~aa
Diffstat (limited to 'src/emu/sound/3812intf.c')
-rw-r--r-- | src/emu/sound/3812intf.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/emu/sound/3812intf.c b/src/emu/sound/3812intf.c index be1888837c4..e91b9d467f4 100644 --- a/src/emu/sound/3812intf.c +++ b/src/emu/sound/3812intf.c @@ -17,7 +17,6 @@ * ******************************************************************************/ #include "sndintrf.h" -#include "deprecat.h" #include "streams.h" #include "cpuintrf.h" #include "3812intf.h" @@ -33,12 +32,13 @@ struct ym3812_info emu_timer * timer[2]; void * chip; const ym3812_interface *intf; + const device_config *device; }; static void IRQHandler_3812(void *param,int irq) { struct ym3812_info *info = param; - if (info->intf->handler) (info->intf->handler)(Machine, irq ? ASSERT_LINE : CLEAR_LINE); + if (info->intf->handler) (info->intf->handler)(info->device->machine, irq ? ASSERT_LINE : CLEAR_LINE); } static TIMER_CALLBACK( timer_callback_3812_0 ) { @@ -89,6 +89,7 @@ static SND_START( ym3812 ) memset(info, 0, sizeof(*info)); info->intf = config ? config : &dummy; + info->device = device; /* stream system initialize */ info->chip = ym3812_init(device,clock,rate); @@ -200,6 +201,7 @@ struct ym3526_info emu_timer * timer[2]; void * chip; const ym3526_interface *intf; + const device_config *device; }; @@ -207,7 +209,7 @@ struct ym3526_info static void IRQHandler_3526(void *param,int irq) { struct ym3526_info *info = param; - if (info->intf->handler) (info->intf->handler)(Machine, irq ? ASSERT_LINE : CLEAR_LINE); + if (info->intf->handler) (info->intf->handler)(info->device->machine, irq ? ASSERT_LINE : CLEAR_LINE); } /* Timer overflow callback from timer.c */ static TIMER_CALLBACK( timer_callback_3526_0 ) @@ -258,6 +260,7 @@ static SND_START( ym3526 ) memset(info, 0, sizeof(*info)); info->intf = config ? config : &dummy; + info->device = device; /* stream system initialize */ info->chip = ym3526_init(device,clock,rate); @@ -368,13 +371,14 @@ struct y8950_info emu_timer * timer[2]; void * chip; const y8950_interface *intf; + const device_config *device; int index; }; static void IRQHandler_8950(void *param,int irq) { struct y8950_info *info = param; - if (info->intf->handler) (info->intf->handler)(Machine, irq ? ASSERT_LINE : CLEAR_LINE); + if (info->intf->handler) (info->intf->handler)(info->device->machine, irq ? ASSERT_LINE : CLEAR_LINE); } static TIMER_CALLBACK( timer_callback_8950_0 ) { @@ -402,9 +406,9 @@ static void TimerHandler_8950(void *param,int c,attotime period) static unsigned char Y8950PortHandler_r(void *param) { - /* temporary hack until this is converted to a device */ - const address_space *space = cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM); struct y8950_info *info = param; + /* temporary hack until this is converted to a device */ + const address_space *space = cpu_get_address_space(info->device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); if (info->intf->portread) return info->intf->portread(space,info->index); return 0; @@ -412,18 +416,18 @@ static unsigned char Y8950PortHandler_r(void *param) static void Y8950PortHandler_w(void *param,unsigned char data) { - /* temporary hack until this is converted to a device */ - const address_space *space = cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM); struct y8950_info *info = param; + /* temporary hack until this is converted to a device */ + const address_space *space = cpu_get_address_space(info->device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); if (info->intf->portwrite) info->intf->portwrite(space,info->index,data); } static unsigned char Y8950KeyboardHandler_r(void *param) { - /* temporary hack until this is converted to a device */ - const address_space *space = cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM); struct y8950_info *info = param; + /* temporary hack until this is converted to a device */ + const address_space *space = cpu_get_address_space(info->device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); if (info->intf->keyboardread) return info->intf->keyboardread(space,info->index); return 0; @@ -431,9 +435,9 @@ static unsigned char Y8950KeyboardHandler_r(void *param) static void Y8950KeyboardHandler_w(void *param,unsigned char data) { - /* temporary hack until this is converted to a device */ - const address_space *space = cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM); struct y8950_info *info = param; + /* temporary hack until this is converted to a device */ + const address_space *space = cpu_get_address_space(info->device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); if (info->intf->keyboardwrite) info->intf->keyboardwrite(space,info->index,data); } @@ -461,6 +465,7 @@ static SND_START( y8950 ) memset(info, 0, sizeof(*info)); info->intf = config ? config : &dummy; + info->device = device; info->index = sndindex; /* stream system initialize */ |