mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
bfmsys85.cpp: added save state support, no idea why this was marked as SUPPORTS_SAVE (nw)
This commit is contained in:
parent
2d392f5ef8
commit
6c23ea53f6
@ -87,6 +87,43 @@ public:
|
||||
m_lamps(*this, "lamp%u", 0U)
|
||||
{ }
|
||||
|
||||
void bfmsys85(machine_config &config);
|
||||
void memmap(address_map &map);
|
||||
|
||||
INTERRUPT_GEN_MEMBER(timer_irq);
|
||||
|
||||
void init_decode();
|
||||
void init_nodecode();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
int m_mmtr_latch;
|
||||
int m_triac_latch;
|
||||
int m_alpha_clock; // always 0
|
||||
int m_irq_status;
|
||||
int m_optic_pattern;
|
||||
int m_locked; // always 0
|
||||
int m_is_timer_enabled; // always 1
|
||||
int m_coin_inhibits; // always 0
|
||||
int m_mux_output_strobe;
|
||||
int m_mux_input_strobe;
|
||||
int m_mux_input;
|
||||
uint8_t m_Inputs[64];
|
||||
uint8_t m_codec_data[256];
|
||||
uint8_t m_sys85_data_line_t; // never read
|
||||
optional_device<rocvfd_device> m_vfd;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<stepper_device> m_reel0;
|
||||
required_device<stepper_device> m_reel1;
|
||||
required_device<stepper_device> m_reel2;
|
||||
required_device<stepper_device> m_reel3;
|
||||
required_device<acia6850_device> m_acia6850_0;
|
||||
required_device<meters_device> m_meters;
|
||||
output_finder<256> m_lamps;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
|
||||
DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
|
||||
@ -107,40 +144,7 @@ public:
|
||||
DECLARE_READ8_MEMBER(triac_r);
|
||||
DECLARE_WRITE_LINE_MEMBER(sys85_data_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_acia_clock);
|
||||
void init_decode();
|
||||
void init_nodecode();
|
||||
INTERRUPT_GEN_MEMBER(timer_irq);
|
||||
int b85_find_project_string();
|
||||
void bfmsys85(machine_config &config);
|
||||
void memmap(address_map &map);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
int m_mmtr_latch;
|
||||
int m_triac_latch;
|
||||
int m_alpha_clock;
|
||||
int m_irq_status;
|
||||
int m_optic_pattern;
|
||||
int m_locked;
|
||||
int m_is_timer_enabled;
|
||||
int m_coin_inhibits;
|
||||
int m_mux_output_strobe;
|
||||
int m_mux_input_strobe;
|
||||
int m_mux_input;
|
||||
uint8_t m_Inputs[64];
|
||||
uint8_t m_codec_data[256];
|
||||
uint8_t m_sys85_data_line_t;
|
||||
optional_device<rocvfd_device> m_vfd;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<stepper_device> m_reel0;
|
||||
required_device<stepper_device> m_reel1;
|
||||
required_device<stepper_device> m_reel2;
|
||||
required_device<stepper_device> m_reel3;
|
||||
required_device<acia6850_device> m_acia6850_0;
|
||||
required_device<meters_device> m_meters;
|
||||
output_finder<256> m_lamps;
|
||||
};
|
||||
|
||||
#define MASTER_CLOCK (XTAL(4'000'000))
|
||||
@ -356,6 +360,19 @@ READ8_MEMBER(bfmsys85_state::triac_r)
|
||||
void bfmsys85_state::machine_start()
|
||||
{
|
||||
m_lamps.resolve();
|
||||
|
||||
save_item(NAME(m_mmtr_latch));
|
||||
save_item(NAME(m_triac_latch));
|
||||
// save_item(NAME(m_alpha_clock));
|
||||
save_item(NAME(m_irq_status));
|
||||
save_item(NAME(m_optic_pattern));
|
||||
// save_item(NAME(m_locked));
|
||||
// save_item(NAME(m_is_timer_enabled));
|
||||
// save_item(NAME(m_coin_inhibits));
|
||||
save_item(NAME(m_mux_output_strobe));
|
||||
save_item(NAME(m_mux_input_strobe));
|
||||
save_item(NAME(m_mux_input));
|
||||
save_item(NAME(m_Inputs));
|
||||
}
|
||||
|
||||
// memory map for bellfruit system85 board ////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user