(MESS) minor improvements to pce save state reliability. not there yet + added saving for a crvision variable. nw

This commit is contained in:
Fabio Priuli 2013-05-26 13:12:30 +00:00
parent eab6a13f1c
commit cc7f8be8ea
5 changed files with 94 additions and 15 deletions

View File

@ -314,4 +314,21 @@ void c6280_device::device_start()
level /= pow(10.0, step / 20.0);
}
m_volume_table[31] = 0;
save_item(NAME(m_select));
save_item(NAME(m_balance));
save_item(NAME(m_lfo_frequency));
save_item(NAME(m_lfo_control));
for (int chan = 0; chan < 8; chan++)
{
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_frequency);
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_control);
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_balance);
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_waveform);
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_index);
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_dda);
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_noise_control);
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_noise_counter);
state_save_register_item(machine(), "c6280", NULL, chan, m_channel[chan].m_counter);
}
}

View File

@ -76,6 +76,9 @@ enum {
DVSSR = 0x13
};
ALLOW_SAVE_TYPE(huc6270_device::huc6270_v_state);
ALLOW_SAVE_TYPE(huc6270_device::huc6270_h_state);
/* Bits in the VDC status register */
#define HUC6270_BSY 0x40 /* Set when the VDC accesses VRAM */
@ -816,9 +819,56 @@ void huc6270_device::device_start()
assert( ! m_irq_changed.isnull() );
m_vram = (UINT16 *)machine().memory().region_alloc( tag(), vram_size, 1, ENDIANNESS_LITTLE )->base();
m_vram = (UINT16 *)machine().memory().region_alloc(tag(), vram_size, 1, ENDIANNESS_LITTLE)->base();
memset(m_vram, 0, vram_size);
m_vram_mask = ( vram_size >> 1 ) - 1;
//save_pointer(NAME(m_vram), vram_size);
save_item(NAME(m_register_index));
save_item(NAME(m_mawr));
save_item(NAME(m_marr));
save_item(NAME(m_vrr));
save_item(NAME(m_vwr));
save_item(NAME(m_cr));
save_item(NAME(m_rcr));
save_item(NAME(m_bxr));
save_item(NAME(m_byr));
save_item(NAME(m_mwr));
save_item(NAME(m_hsr));
save_item(NAME(m_hdr));
save_item(NAME(m_vpr));
save_item(NAME(m_vdw));
save_item(NAME(m_vcr));
save_item(NAME(m_dcr));
save_item(NAME(m_sour));
save_item(NAME(m_desr));
save_item(NAME(m_lenr));
save_item(NAME(m_dvssr));
save_item(NAME(m_status));
save_item(NAME(m_hsync));
save_item(NAME(m_vsync));
save_item(NAME(m_vert_state));
save_item(NAME(m_horz_state));
save_item(NAME(m_vd_triggered));
save_item(NAME(m_vert_to_go));
save_item(NAME(m_horz_to_go));
save_item(NAME(m_horz_steps));
save_item(NAME(m_raster_count));
save_item(NAME(m_dvssr_written));
save_item(NAME(m_satb_countdown));
save_item(NAME(m_dma_enabled));
save_item(NAME(m_byr_latched));
save_item(NAME(m_bxr_latched));
save_item(NAME(m_bat_address));
save_item(NAME(m_bat_address_mask));
save_item(NAME(m_bat_row));
save_item(NAME(m_bat_column));
save_item(NAME(m_bat_tile_row));
save_item(NAME(m_sat));
save_item(NAME(m_sprites_this_line));
save_item(NAME(m_sprite_row_index));
save_item(NAME(m_sprite_row));
}

View File

@ -10,20 +10,6 @@
#include "emu.h"
enum huc6270_v_state {
HUC6270_VSW,
HUC6270_VDS,
HUC6270_VDW,
HUC6270_VCR
};
enum huc6270_h_state {
HUC6270_HDS,
HUC6270_HDW,
HUC6270_HDE,
HUC6270_HSW
};
#define MCFG_HUC6270_ADD( _tag, _intrf ) \
MCFG_DEVICE_ADD( _tag, HUC6270, 0 ) \
@ -74,6 +60,21 @@ protected:
inline void next_horz_state();
private:
enum huc6270_v_state {
HUC6270_VSW,
HUC6270_VDS,
HUC6270_VDW,
HUC6270_VCR
};
enum huc6270_h_state {
HUC6270_HDS,
HUC6270_HDW,
HUC6270_HDE,
HUC6270_HSW
};
/* Callbacks */
devcb_resolved_write_line m_irq_changed;

View File

@ -807,12 +807,14 @@ void crvision_state::machine_start()
{
// state saving
save_item(NAME(m_keylatch));
save_item(NAME(m_joylatch));
}
void crvision_pal_state::machine_start()
{
// state saving
save_item(NAME(m_keylatch));
save_item(NAME(m_joylatch));
}
/*-------------------------------------------------
@ -823,6 +825,7 @@ void laser2001_state::machine_start()
{
// state saving
save_item(NAME(m_keylatch));
save_item(NAME(m_joylatch));
}
/***************************************************************************

View File

@ -281,6 +281,14 @@ MACHINE_START_MEMBER(pce_state,pce)
{
pce_cd_init( machine() );
machine().device<nvram_device>("nvram")->set_base(m_cd.bram, PCE_BRAM_SIZE);
// *partial* saving (no cd items, no cart-specific items)
save_item(NAME(m_io_port_options));
save_item(NAME(m_sys3_card));
save_item(NAME(m_acard));
save_item(NAME(m_joystick_port_select));
save_item(NAME(m_joystick_data_select));
save_item(NAME(m_joy_6b_packet));
}
MACHINE_RESET_MEMBER(pce_state,mess_pce)