diff --git a/src/emu/cpu/psx/rcnt.c b/src/emu/cpu/psx/rcnt.c index cfe0f17c345..fe2bb9143ad 100644 --- a/src/emu/cpu/psx/rcnt.c +++ b/src/emu/cpu/psx/rcnt.c @@ -58,10 +58,10 @@ void psxrcnt_device::device_start() for( n = 0; n < 3; n++ ) { root_counter[ n ].timer = timer_alloc(n); - state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_count ); - state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_mode ); - state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_target ); - state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_start ); + save_item(NAME(root_counter[ n ].n_count), n); + save_item(NAME(root_counter[ n ].n_mode), n); + save_item(NAME(root_counter[ n ].n_target), n); + save_item(NAME(root_counter[ n ].n_start), n); root_counter[ n ].n_count = 0; root_counter[ n ].n_mode = 0; root_counter[ n ].n_target = 0; diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c index bf24e91bbe5..181e600347d 100644 --- a/src/mame/audio/segasnd.c +++ b/src/mame/audio/segasnd.c @@ -316,11 +316,11 @@ void usb_sound_device::device_start() configure_filter(&m_final_filter, 100e3, 4.7e-6); /* register for save states */ - state_save_register_item(machine(), "usb", NULL, 0, m_in_latch); - state_save_register_item(machine(), "usb", NULL, 0, m_out_latch); - state_save_register_item(machine(), "usb", NULL, 0, m_last_p2_value); - state_save_register_item(machine(), "usb", NULL, 0, m_work_ram_bank); - state_save_register_item(machine(), "usb", NULL, 0, m_t1_clock); + save_item(NAME(m_in_latch)); + save_item(NAME(m_out_latch)); + save_item(NAME(m_last_p2_value)); + save_item(NAME(m_work_ram_bank)); + save_item(NAME(m_t1_clock)); for (tgroup = 0; tgroup < 3; tgroup++) { @@ -328,36 +328,36 @@ void usb_sound_device::device_start() for (tchan = 0; tchan < 3; tchan++) { timer8253_channel *channel = &group->chan[tchan]; - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->holding); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->latchmode); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->latchtoggle); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->clockmode); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->bcdmode); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->output); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->lastgate); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->gate); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->subcount); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->count); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->remain); + save_item(NAME(channel->holding), tgroup * 3 + tchan); + save_item(NAME(channel->latchmode), tgroup * 3 + tchan); + save_item(NAME(channel->latchtoggle), tgroup * 3 + tchan); + save_item(NAME(channel->clockmode), tgroup * 3 + tchan); + save_item(NAME(channel->bcdmode), tgroup * 3 + tchan); + save_item(NAME(channel->output), tgroup * 3 + tchan); + save_item(NAME(channel->lastgate), tgroup * 3 + tchan); + save_item(NAME(channel->gate), tgroup * 3 + tchan); + save_item(NAME(channel->subcount), tgroup * 3 + tchan); + save_item(NAME(channel->count), tgroup * 3 + tchan); + save_item(NAME(channel->remain), tgroup * 3 + tchan); } - state_save_register_item_array(machine(), "usb", NULL, tgroup, group->env); - state_save_register_item(machine(), "usb", NULL, tgroup, group->chan_filter[0].capval); - state_save_register_item(machine(), "usb", NULL, tgroup, group->chan_filter[1].capval); - state_save_register_item(machine(), "usb", NULL, tgroup, group->gate1.capval); - state_save_register_item(machine(), "usb", NULL, tgroup, group->gate2.capval); - state_save_register_item(machine(), "usb", NULL, tgroup, group->config); + save_item(NAME(group->env), tgroup); + save_item(NAME(group->chan_filter[0].capval), tgroup); + save_item(NAME(group->chan_filter[1].capval), tgroup); + save_item(NAME(group->gate1.capval), tgroup); + save_item(NAME(group->gate2.capval), tgroup); + save_item(NAME(group->config), tgroup); } - state_save_register_item_array(machine(), "usb", NULL, 0, m_timer_mode); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_shift); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_state); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_subcount); - state_save_register_item(machine(), "usb", NULL, 0, m_final_filter.capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[0].capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[1].capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[2].capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[3].capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[4].capval); + save_item(NAME(m_timer_mode)); + save_item(NAME(m_noise_shift)); + save_item(NAME(m_noise_state)); + save_item(NAME(m_noise_subcount)); + save_item(NAME(m_final_filter.capval)); + save_item(NAME(m_noise_filters[0].capval)); + save_item(NAME(m_noise_filters[1].capval)); + save_item(NAME(m_noise_filters[2].capval)); + save_item(NAME(m_noise_filters[3].capval)); + save_item(NAME(m_noise_filters[4].capval)); } //------------------------------------------------- diff --git a/src/mame/audio/tiamc1.c b/src/mame/audio/tiamc1.c index f88f9636ac0..5cca16190dc 100644 --- a/src/mame/audio/tiamc1.c +++ b/src/mame/audio/tiamc1.c @@ -85,15 +85,15 @@ void tiamc1_sound_device::device_start() for (j = 0; j < 3; j++) { - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].count); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].cnval); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].bcdMode); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].cntMode); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].valMode); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].gate); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].output); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].loadCnt); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].enable); + save_item(NAME(t->channel[j].count), i * 3 + j); + save_item(NAME(t->channel[j].cnval), i * 3 + j); + save_item(NAME(t->channel[j].bcdMode), i * 3 + j); + save_item(NAME(t->channel[j].cntMode), i * 3 + j); + save_item(NAME(t->channel[j].valMode), i * 3 + j); + save_item(NAME(t->channel[j].gate), i * 3 + j); + save_item(NAME(t->channel[j].output), i * 3 + j); + save_item(NAME(t->channel[j].loadCnt), i * 3 + j); + save_item(NAME(t->channel[j].enable), i * 3 + j); } } diff --git a/src/mame/machine/konppc.c b/src/mame/machine/konppc.c index dd631ad6401..9855ac9f928 100644 --- a/src/mame/machine/konppc.c +++ b/src/mame/machine/konppc.c @@ -44,18 +44,18 @@ void konppc_device::device_start() nwk_fifo[i] = auto_alloc_array(machine(), UINT32, 0x800); nwk_ram[i] = auto_alloc_array(machine(), UINT32, 0x2000); - state_save_register_item_array(machine(), "konppc", NULL, i, dsp_comm_ppc[i]); - state_save_register_item_array(machine(), "konppc", NULL, i, dsp_comm_sharc[i]); - state_save_register_item(machine(), "konppc", NULL, i, dsp_shared_ram_bank[i]); - state_save_register_item_pointer(machine(), "konppc", NULL, i, dsp_shared_ram[i], DSP_BANK_SIZE * 2 / sizeof(dsp_shared_ram[i][0])); - state_save_register_item(machine(), "konppc", NULL, i, dsp_state[i]); - state_save_register_item(machine(), "konppc", NULL, i, nwk_device_sel[i]); - state_save_register_item(machine(), "konppc", NULL, i, nwk_fifo_read_ptr[i]); - state_save_register_item(machine(), "konppc", NULL, i, nwk_fifo_write_ptr[i]); - state_save_register_item_pointer(machine(), "konppc", NULL, i, nwk_fifo[i], 0x800); - state_save_register_item_pointer(machine(), "konppc", NULL, i, nwk_ram[i], 0x2000); + save_item(NAME(dsp_comm_ppc[i]), i); + save_item(NAME(dsp_comm_sharc[i]), i); + save_item(NAME(dsp_shared_ram_bank[i]), i); + save_pointer(NAME(dsp_shared_ram[i]), DSP_BANK_SIZE * 2 / sizeof(dsp_shared_ram[i][0]), i); + save_item(NAME(dsp_state[i]), i); + save_item(NAME(nwk_device_sel[i]), i); + save_item(NAME(nwk_fifo_read_ptr[i]), i); + save_item(NAME(nwk_fifo_write_ptr[i]), i); + save_pointer(NAME(nwk_fifo[i]), 0x800, i); + save_pointer(NAME(nwk_ram[i]), 0x2000, i); } - state_save_register_item(machine(), "konppc", NULL, 0, cgboard_id); + save_item(NAME(cgboard_id)); if (cgboard_type == CGBOARD_TYPE_NWKTR) { diff --git a/src/mess/audio/lynx.c b/src/mess/audio/lynx.c index 6a3d0e624dc..2db121308c0 100644 --- a/src/mess/audio/lynx.c +++ b/src/mess/audio/lynx.c @@ -139,19 +139,19 @@ void lynx_sound_device::register_save() save_item(NAME(m_master_enable)); for (int chan = 0; chan < LYNX_AUDIO_CHANNELS; chan++) { - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.volume); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.feedback); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.output); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.shifter); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.bakup); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.control1); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.counter); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.control2); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].attenuation); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].mask); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].shifter); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].ticks); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].count); + save_item(NAME(m_audio[chan].reg.volume), chan); + save_item(NAME(m_audio[chan].reg.feedback), chan); + save_item(NAME(m_audio[chan].reg.output), chan); + save_item(NAME(m_audio[chan].reg.shifter), chan); + save_item(NAME(m_audio[chan].reg.bakup), chan); + save_item(NAME(m_audio[chan].reg.control1), chan); + save_item(NAME(m_audio[chan].reg.counter), chan); + save_item(NAME(m_audio[chan].reg.control2), chan); + save_item(NAME(m_audio[chan].attenuation), chan); + save_item(NAME(m_audio[chan].mask), chan); + save_item(NAME(m_audio[chan].shifter), chan); + save_item(NAME(m_audio[chan].ticks), chan); + save_item(NAME(m_audio[chan].count), chan); } } diff --git a/src/mess/machine/lynx.c b/src/mess/machine/lynx.c index f2864ef3ed6..df70f47f6d3 100644 --- a/src/mess/machine/lynx.c +++ b/src/mess/machine/lynx.c @@ -1381,11 +1381,11 @@ void lynx_state::lynx_timer_init(int which) memset(&m_timer[which], 0, sizeof(LYNX_TIMER)); m_timer[which].timer = timer_alloc(TIMER_SHOT); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].bakup); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].cntrl1); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].cntrl2); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].counter); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].timer_active); + save_item(NAME(m_timer[which].bakup), which); + save_item(NAME(m_timer[which].cntrl1), which); + save_item(NAME(m_timer[which].cntrl2), which); + save_item(NAME(m_timer[which].counter), which); + save_item(NAME(m_timer[which].timer_active), which); } void lynx_state::lynx_timer_signal_irq(int which)