mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
ti99: Fixed save state, declared MACHINE_SUPPORTS_SAVE
This commit is contained in:
parent
580421d53d
commit
f8c77f3d80
@ -1192,6 +1192,11 @@ void vaquerro_device::device_start()
|
||||
save_item(NAME(m_sry));
|
||||
save_item(NAME(m_a14));
|
||||
save_item(NAME(m_dbin_level));
|
||||
|
||||
// FIXME: In rare occasions, the saved state is invalid and restoring
|
||||
// may crash the emulated 99/8 (e.g. with invalid opcodes)
|
||||
// Saving the wait state logic does not affect the operation, as it seems,
|
||||
// so we leave it out.
|
||||
}
|
||||
|
||||
void vaquerro_device::device_reset()
|
||||
|
@ -238,7 +238,7 @@ private:
|
||||
// DRAM access
|
||||
bool m_skdrcs;
|
||||
|
||||
// Holds the decoding result; essentially names the selected line
|
||||
// Indicates the UP level of the GROMCLK
|
||||
bool m_gromclk_up;
|
||||
|
||||
// Have we got the upper word of the address?
|
||||
|
@ -211,17 +211,40 @@
|
||||
|
||||
geneve_mapper_device::geneve_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, GENEVE_MAPPER, "Geneve Gate Array", tag, owner, clock, "geneve_mapper", __FILE__), m_gromwaddr_LSB(false),
|
||||
m_gromraddr_LSB(false), m_grom_address(0), m_video_waitstates(false),
|
||||
m_extra_waitstates(false), m_ready_asserted(false), m_read_mode(false),
|
||||
m_debug_no_ws(false), m_geneve_mode(false), m_direct_mode(false),
|
||||
m_cartridge_size(0), m_cartridge_secondpage(false),
|
||||
m_cartridge6_writable(false), m_cartridge7_writable(false),
|
||||
m_turbo(false), m_genmod(false), m_timode(false), m_pfm_mode(0),
|
||||
m_pfm_bank(0), m_pfm_output_enable(false), m_sram_mask(0), m_sram_val(0),
|
||||
m_ready(*this), m_waitcount(0), m_ext_waitcount(0),
|
||||
m_clock(nullptr), m_cpu(nullptr), m_pfm512(nullptr),
|
||||
m_pfm512a(nullptr), m_sound(nullptr), m_keyboard(nullptr),
|
||||
m_video(nullptr), m_peribox(nullptr), m_sram(*this, SRAM_PAR_TAG), m_dram(*this, DRAM_PAR_TAG)
|
||||
m_gromraddr_LSB(false),
|
||||
m_grom_address(0),
|
||||
m_video_waitstates(false),
|
||||
m_extra_waitstates(false),
|
||||
m_ready_asserted(false),
|
||||
m_read_mode(false),
|
||||
m_debug_no_ws(false),
|
||||
m_geneve_mode(false),
|
||||
m_direct_mode(false),
|
||||
m_cartridge_size(0),
|
||||
m_cartridge_secondpage(false),
|
||||
m_cartridge6_writable(false),
|
||||
m_cartridge7_writable(false),
|
||||
m_turbo(false),
|
||||
m_genmod(false),
|
||||
m_timode(false),
|
||||
m_pfm_mode(0),
|
||||
m_pfm_bank(0),
|
||||
m_pfm_output_enable(false),
|
||||
m_sram_mask(0),
|
||||
m_sram_val(0),
|
||||
m_ready(*this),
|
||||
m_waitcount(0),
|
||||
m_ext_waitcount(0),
|
||||
m_clock(*owner, GCLOCK_TAG),
|
||||
m_cpu(*owner, "maincpu"),
|
||||
m_pfm512(*owner, PFM512_TAG),
|
||||
m_pfm512a(*owner, PFM512A_TAG),
|
||||
m_sound(*owner, TISOUNDCHIP_TAG),
|
||||
m_keyboard(*owner, GKEYBOARD_TAG),
|
||||
m_video(*owner, VDP_TAG),
|
||||
m_peribox(*owner, PERIBOX_TAG),
|
||||
m_sram(*this, SRAM_PAR_TAG),
|
||||
m_dram(*this, DRAM_PAR_TAG)
|
||||
{
|
||||
m_eprom = nullptr;
|
||||
}
|
||||
@ -1384,19 +1407,7 @@ WRITE_LINE_MEMBER( geneve_mapper_device::pfm_output_enable )
|
||||
|
||||
void geneve_mapper_device::device_start()
|
||||
{
|
||||
// Get pointers
|
||||
m_peribox = machine().device<peribox_device>(PERIBOX_TAG);
|
||||
m_keyboard = machine().device<geneve_keyboard_device>(GKEYBOARD_TAG);
|
||||
m_video = machine().device<v9938_device>(VDP_TAG);
|
||||
m_sound = machine().device<sn76496_base_device>(TISOUNDCHIP_TAG);
|
||||
m_clock = machine().device<mm58274c_device>(GCLOCK_TAG);
|
||||
|
||||
// PFM expansion
|
||||
m_pfm512 = machine().device<at29c040_device>(PFM512_TAG);
|
||||
m_pfm512a = machine().device<at29c040a_device>(PFM512A_TAG);
|
||||
|
||||
m_ready.resolve();
|
||||
m_cpu = static_cast<tms9995_device*>(machine().device("maincpu"));
|
||||
|
||||
m_geneve_mode = false;
|
||||
m_direct_mode = true;
|
||||
@ -1416,6 +1427,13 @@ void geneve_mapper_device::device_start()
|
||||
save_item(NAME(m_cartridge_secondpage));
|
||||
save_item(NAME(m_cartridge6_writable));
|
||||
save_item(NAME(m_cartridge7_writable));
|
||||
save_pointer(NAME(m_map), 8);
|
||||
save_item(NAME(m_decoded.function));
|
||||
save_item(NAME(m_decoded.offset));
|
||||
save_item(NAME(m_decoded.physaddr));
|
||||
save_item(NAME(m_turbo));
|
||||
save_item(NAME(m_genmod));
|
||||
save_item(NAME(m_timode));
|
||||
save_item(NAME(m_pfm_mode));
|
||||
save_item(NAME(m_pfm_bank));
|
||||
save_item(NAME(m_pfm_output_enable));
|
||||
|
@ -203,15 +203,15 @@ private:
|
||||
int m_ext_waitcount;
|
||||
|
||||
// Devices
|
||||
mm58274c_device* m_clock;
|
||||
tms9995_device* m_cpu;
|
||||
at29c040_device* m_pfm512;
|
||||
at29c040a_device* m_pfm512a;
|
||||
sn76496_base_device* m_sound;
|
||||
required_device<mm58274c_device> m_clock;
|
||||
required_device<tms9995_device> m_cpu;
|
||||
required_device<at29c040_device> m_pfm512;
|
||||
required_device<at29c040a_device> m_pfm512a;
|
||||
required_device<sn76496_base_device> m_sound;
|
||||
|
||||
geneve_keyboard_device* m_keyboard;
|
||||
v9938_device* m_video;
|
||||
peribox_device* m_peribox;
|
||||
required_device<geneve_keyboard_device> m_keyboard;
|
||||
required_device<v9938_device> m_video;
|
||||
required_device<peribox_device> m_peribox;
|
||||
uint8_t* m_eprom;
|
||||
required_device<ram_device> m_sram;
|
||||
required_device<ram_device> m_dram;
|
||||
|
@ -66,6 +66,9 @@ void mm58274c_device::device_start()
|
||||
m_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mm58274c_device::rtc_interrupt_cb),this));
|
||||
|
||||
// register for state saving
|
||||
save_item(NAME(m_mode24));
|
||||
save_item(NAME(m_day1));
|
||||
|
||||
save_item(NAME(m_status));
|
||||
save_item(NAME(m_control));
|
||||
save_item(NAME(m_clk_set));
|
||||
|
@ -654,6 +654,20 @@ void tms9901_device::device_start(void)
|
||||
m_interrupt.resolve();
|
||||
|
||||
m_clock_register = 0;
|
||||
|
||||
save_item(NAME(m_int_state));
|
||||
save_item(NAME(m_old_int_state));
|
||||
save_item(NAME(m_enabled_ints));
|
||||
save_item(NAME(m_int_pending));
|
||||
save_item(NAME(m_timer_int_pending));
|
||||
save_item(NAME(m_pio_direction));
|
||||
save_item(NAME(m_pio_output));
|
||||
save_item(NAME(m_pio_direction_mirror));
|
||||
save_item(NAME(m_pio_output_mirror));
|
||||
save_item(NAME(m_clock_mode));
|
||||
save_item(NAME(m_clock_register));
|
||||
save_item(NAME(m_decrementer_value));
|
||||
save_item(NAME(m_clock_read_register));
|
||||
}
|
||||
|
||||
const device_type TMS9901 = &device_creator<tms9901_device>;
|
||||
|
@ -773,4 +773,4 @@ ROM_START(geneve)
|
||||
ROM_END
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
|
||||
COMP( 1987,geneve, 0, 0, geneve_60hz, geneve, geneve_state, geneve, "Myarc", "Geneve 9640" , 0)
|
||||
COMP( 1987,geneve, 0, 0, geneve_60hz, geneve, geneve_state, geneve, "Myarc", "Geneve 9640" , MACHINE_SUPPORTS_SAVE)
|
||||
|
@ -1050,4 +1050,4 @@ ROM_START(ti99_4p)
|
||||
ROM_END
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
|
||||
COMP( 1996, ti99_4p, 0, 0, ti99_4p_60hz, ti99_4p, driver_device, 0, "System-99 User Group", "SGCPU (aka TI-99/4P)" , 0 )
|
||||
COMP( 1996, ti99_4p, 0, 0, ti99_4p_60hz, ti99_4p, driver_device, 0, "System-99 User Group", "SGCPU (aka TI-99/4P)" , MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -1244,9 +1244,9 @@ ROM_START(ti99_4ev)
|
||||
ROM_END
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1979, ti99_4, 0, 0, ti99_4_60hz, ti99_4, driver_device, 0, "Texas Instruments", "TI-99/4 Home Computer (US)", 0)
|
||||
COMP( 1980, ti99_4e, ti99_4, 0, ti99_4_50hz, ti99_4, driver_device, 0, "Texas Instruments", "TI-99/4 Home Computer (Europe)", 0)
|
||||
COMP( 1981, ti99_4a, 0, 0, ti99_4a_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer (US)", 0)
|
||||
COMP( 1981, ti99_4ae, ti99_4a, 0, ti99_4a_50hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer (Europe)", 0)
|
||||
COMP( 1983, ti99_4qi, ti99_4a, 0, ti99_4qi_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4QI Home Computer (US)", 0)
|
||||
COMP( 1994, ti99_4ev, ti99_4a, 0, ti99_4ev_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer with EVPC", 0)
|
||||
COMP( 1979, ti99_4, 0, 0, ti99_4_60hz, ti99_4, driver_device, 0, "Texas Instruments", "TI-99/4 Home Computer (US)", MACHINE_SUPPORTS_SAVE)
|
||||
COMP( 1980, ti99_4e, ti99_4, 0, ti99_4_50hz, ti99_4, driver_device, 0, "Texas Instruments", "TI-99/4 Home Computer (Europe)", MACHINE_SUPPORTS_SAVE)
|
||||
COMP( 1981, ti99_4a, 0, 0, ti99_4a_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer (US)", MACHINE_SUPPORTS_SAVE)
|
||||
COMP( 1981, ti99_4ae, ti99_4a, 0, ti99_4a_50hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer (Europe)", MACHINE_SUPPORTS_SAVE)
|
||||
COMP( 1983, ti99_4qi, ti99_4a, 0, ti99_4qi_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4QI Home Computer (US)", MACHINE_SUPPORTS_SAVE)
|
||||
COMP( 1994, ti99_4ev, ti99_4a, 0, ti99_4ev_60hz, ti99_4a, driver_device, 0, "Texas Instruments", "TI-99/4A Home Computer with EVPC", MACHINE_SUPPORTS_SAVE)
|
||||
|
@ -912,5 +912,5 @@ ROM_END
|
||||
#define rom_ti99_8e rom_ti99_8
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
|
||||
COMP( 1983, ti99_8, 0, 0, ti99_8_60hz,ti99_8, driver_device, 0, "Texas Instruments", "TI-99/8 Computer (US)" , 0)
|
||||
COMP( 1983, ti99_8e, ti99_8, 0, ti99_8_50hz,ti99_8, driver_device, 0, "Texas Instruments", "TI-99/8 Computer (Europe)" , 0 )
|
||||
COMP( 1983, ti99_8, 0, 0, ti99_8_60hz,ti99_8, driver_device, 0, "Texas Instruments", "TI-99/8 Computer (US)" , MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1983, ti99_8e, ti99_8, 0, ti99_8_50hz,ti99_8, driver_device, 0, "Texas Instruments", "TI-99/8 Computer (Europe)" , MACHINE_SUPPORTS_SAVE )
|
||||
|
Loading…
Reference in New Issue
Block a user