diff options
author | 2008-12-05 08:00:13 +0000 | |
---|---|---|
committer | 2008-12-05 08:00:13 +0000 | |
commit | 3c6eacc96f5ede7feec56e345e70af28ba3bed42 (patch) | |
tree | 5bea0770d49222e8e0a8836dabb41e0ce4d91008 /src/emu/sound/hc55516.c | |
parent | 9c88aa96d05c4c88908a571b7581dfc16b9e7e5e (diff) |
Changed save state system to accept machine parameters where
appropriate, and to keep all global variables hanging off the
machine structure. Once again, this means all state registration
call sites have been touched:
- state_save_register_global* now takes a machine parameter
- state_save_register_item* now takes a machine parameter
- added new state_save_register_device_item* which now uses
the device name and tag to generate the base name
Extended the fake sound devices to have more populated fields.
Modified sound cores to use tags from the devices and simplified
the start function.
Renumbered CPU and sound get/set info constants to align with
the device constants, and shared values where they were perfectly
aligned.
Set the type field in the fake device_configs for CPU and sound
chips to a get_info stub which calls through to the CPU and sound
specific get_info functions. This means the device_get_info()
functions work for CPU and sound cores, even in their fake state.
Changed device information getters from device_info() to
device_get_info() to match the CPU and sound macros.
Diffstat (limited to 'src/emu/sound/hc55516.c')
-rw-r--r-- | src/emu/sound/hc55516.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/emu/sound/hc55516.c b/src/emu/sound/hc55516.c index d614ce35d8a..4368e453af1 100644 --- a/src/emu/sound/hc55516.c +++ b/src/emu/sound/hc55516.c @@ -52,7 +52,7 @@ static void hc55516_update(void *param, stream_sample_t **inputs, stream_sample_ -static void *start_common(const char *tag, int clock, const void *config, +static void *start_common(const device_config *device, int clock, UINT8 _shiftreg_mask, int _active_clock_hi) { struct hc55516_data *chip; @@ -74,15 +74,15 @@ static void *start_common(const char *tag, int clock, const void *config, /* create the stream */ chip->channel = stream_create(0, 1, SAMPLE_RATE, chip, hc55516_update); - state_save_register_item("hc55516", tag, 0, chip->last_clock_state); - state_save_register_item("hc55516", tag, 0, chip->digit); - state_save_register_item("hc55516", tag, 0, chip->new_digit); - state_save_register_item("hc55516", tag, 0, chip->shiftreg); - state_save_register_item("hc55516", tag, 0, chip->curr_sample); - state_save_register_item("hc55516", tag, 0, chip->next_sample); - state_save_register_item("hc55516", tag, 0, chip->update_count); - state_save_register_item("hc55516", tag, 0, chip->filter); - state_save_register_item("hc55516", tag, 0, chip->integrator); + state_save_register_device_item(device, 0, chip->last_clock_state); + state_save_register_device_item(device, 0, chip->digit); + state_save_register_device_item(device, 0, chip->new_digit); + state_save_register_device_item(device, 0, chip->shiftreg); + state_save_register_device_item(device, 0, chip->curr_sample); + state_save_register_device_item(device, 0, chip->next_sample); + state_save_register_device_item(device, 0, chip->update_count); + state_save_register_device_item(device, 0, chip->filter); + state_save_register_device_item(device, 0, chip->integrator); /* success */ return chip; @@ -91,19 +91,19 @@ static void *start_common(const char *tag, int clock, const void *config, static SND_START( hc55516 ) { - return start_common(tag, clock, config, 0x07, TRUE); + return start_common(device, clock, 0x07, TRUE); } static SND_START( mc3417 ) { - return start_common(tag, clock, config, 0x07, FALSE); + return start_common(device, clock, 0x07, FALSE); } static SND_START( mc3418 ) { - return start_common(tag, clock, config, 0x0f, FALSE); + return start_common(device, clock, 0x0f, FALSE); } |