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/ay8910.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/ay8910.c')
-rw-r--r-- | src/emu/sound/ay8910.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c index e63b81ec0a5..26133022e0c 100644 --- a/src/emu/sound/ay8910.c +++ b/src/emu/sound/ay8910.c @@ -101,7 +101,6 @@ has twice the steps, happening twice as fast. ***************************************************************************/ #include "sndintrf.h" -#include "deprecat.h" #include "streams.h" #include "cpuintrf.h" #include "cpuexec.h" @@ -388,7 +387,7 @@ INLINE UINT16 mix_3D(ay8910_context *psg) static void ay8910_write_reg(ay8910_context *psg, int r, int v) { /* temporary hack until this is converted to a device */ - const address_space *space = cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM); + const address_space *space = cpu_get_address_space(psg->device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); //if (r >= 11 && r <= 13 ) printf("%d %x %02x\n", PSG->index, r, v); psg->regs[r] = v; @@ -782,9 +781,9 @@ void ay8910_write_ym(void *chip, int addr, int data) int ay8910_read_ym(void *chip) { - /* temporary hack until this is converted to a device */ - const address_space *space = cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM); ay8910_context *psg = chip; + /* temporary hack until this is converted to a device */ + const address_space *space = cpu_get_address_space(psg->device->machine->cpu[0], ADDRESS_SPACE_PROGRAM); int r = psg->register_latch; if (r > 15) return 0; @@ -801,7 +800,7 @@ int ay8910_read_ym(void *chip) if (psg->intf->portAread) psg->regs[AY_PORTA] = (*psg->intf->portAread)(space, 0); else - logerror("%s: warning - read 8910 '%s' Port A\n",cpuexec_describe_context(Machine),psg->device->tag); + logerror("%s: warning - read 8910 '%s' Port A\n",cpuexec_describe_context(psg->device->machine),psg->device->tag); break; case AY_PORTB: if ((psg->regs[AY_ENABLE] & 0x80) != 0) @@ -809,7 +808,7 @@ int ay8910_read_ym(void *chip) if (psg->intf->portBread) psg->regs[AY_PORTB] = (*psg->intf->portBread)(space, 0); else - logerror("%s: warning - read 8910 '%s' Port B\n",cpuexec_describe_context(Machine),psg->device->tag); + logerror("%s: warning - read 8910 '%s' Port B\n",cpuexec_describe_context(psg->device->machine),psg->device->tag); break; } return psg->regs[r]; |