summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/namco52.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-01-18 20:24:42 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-01-18 20:24:42 +0000
commit170b4c27522f3ed0c3af90e0e24e45659f0ea763 (patch)
treeebf0563c6f0a9f8b48040beec2543e5b5fd086fa /src/emu/sound/namco52.c
parent6278021cf6a3a3e6af895ff4ea3623175fd4ef71 (diff)
Sound cores no longer allocate their own tokens. Instead they return a new
integer value indicating the size of token they want, and the core allocates it for them. This mirrors the standard device behavior.
Diffstat (limited to 'src/emu/sound/namco52.c')
-rw-r--r--src/emu/sound/namco52.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/sound/namco52.c b/src/emu/sound/namco52.c
index ea1f23720ff..81a6a972a55 100644
--- a/src/emu/sound/namco52.c
+++ b/src/emu/sound/namco52.c
@@ -134,12 +134,9 @@ static SND_RESET( namco_52xx )
static SND_START( namco_52xx )
{
- struct namco_52xx *chip;
+ struct namco_52xx *chip = device->token;
int rate = clock/32;
- chip = auto_malloc(sizeof(*chip));
- memset(chip, 0, sizeof(*chip));
-
chip->intf = device->static_config;
chip->rom = device->region;
chip->rom_len = device->regionbytes;
@@ -168,7 +165,7 @@ static SND_START( namco_52xx )
state_save_register_device_item(device, 0, chip->n52_length);
state_save_register_device_item(device, 0, chip->n52_pos);
- return chip;
+ return DEVICE_START_OK;
}
@@ -213,6 +210,7 @@ SND_GET_INFO( namco_52xx )
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
+ case SNDINFO_INT_TOKEN_BYTES: info->i = sizeof(struct namco_52xx); break;
/* --- the following bits of info are returned as pointers to data or functions --- */
case SNDINFO_PTR_SET_INFO: info->set_info = SND_SET_INFO_NAME( namco_52xx ); break;