mirror of
https://github.com/holub/mame
synced 2025-07-04 09:28:51 +03:00
reverted ccompan2: remove standbytimer
This commit is contained in:
parent
92b128b1e7
commit
3ae6843807
@ -10,8 +10,9 @@ NOTE: nsnova does an NMI at power-off (or power-failure). If this isn't done,
|
|||||||
NVRAM won't work properly (supremo doesn't have NVRAM).
|
NVRAM won't work properly (supremo doesn't have NVRAM).
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- if/when MAME supports an exit callback, hook up power-off NMI to that
|
|
||||||
- beeps are glitchy, as if interrupted for too long
|
- beeps are glitchy, as if interrupted for too long
|
||||||
|
- if/when MAME supports an exit callback, hook up power-off NMI to that
|
||||||
|
- nsnova MCU internal NVRAM belongs in m6801.cpp
|
||||||
- nsnova serial port isn't working, MCU emulation problem?
|
- nsnova serial port isn't working, MCU emulation problem?
|
||||||
- nsnova unmapped reads from 0x33/0x34
|
- nsnova unmapped reads from 0x33/0x34
|
||||||
- is "Aquamarine / Super Nova" the same rom as nsnova and just a redesign?
|
- is "Aquamarine / Super Nova" the same rom as nsnova and just a redesign?
|
||||||
|
@ -104,8 +104,9 @@ private:
|
|||||||
void led_w(u8 data);
|
void led_w(u8 data);
|
||||||
|
|
||||||
void set_cpu_freq();
|
void set_cpu_freq();
|
||||||
TIMER_CALLBACK_MEMBER(delayed_nmi);
|
TIMER_CALLBACK_MEMBER(set_pin);
|
||||||
|
|
||||||
|
emu_timer *m_standbytimer;
|
||||||
emu_timer *m_nmitimer;
|
emu_timer *m_nmitimer;
|
||||||
bool m_power = false;
|
bool m_power = false;
|
||||||
u8 m_inp_mux = 0;
|
u8 m_inp_mux = 0;
|
||||||
@ -113,7 +114,8 @@ private:
|
|||||||
|
|
||||||
void ccompan2_state::machine_start()
|
void ccompan2_state::machine_start()
|
||||||
{
|
{
|
||||||
m_nmitimer = timer_alloc(FUNC(ccompan2_state::delayed_nmi), this);
|
m_nmitimer = timer_alloc(FUNC(ccompan2_state::set_pin), this);
|
||||||
|
m_standbytimer = timer_alloc(FUNC(ccompan2_state::set_pin), this);
|
||||||
|
|
||||||
// register for savestates
|
// register for savestates
|
||||||
save_item(NAME(m_power));
|
save_item(NAME(m_power));
|
||||||
@ -135,11 +137,12 @@ void ccompan2_state::set_cpu_freq()
|
|||||||
void ccompan2_state::machine_reset()
|
void ccompan2_state::machine_reset()
|
||||||
{
|
{
|
||||||
m_power = true;
|
m_power = true;
|
||||||
|
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
TIMER_CALLBACK_MEMBER(ccompan2_state::delayed_nmi)
|
TIMER_CALLBACK_MEMBER(ccompan2_state::set_pin)
|
||||||
{
|
{
|
||||||
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
m_maincpu->set_input_line(param, ASSERT_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
INPUT_CHANGED_MEMBER(ccompan2_state::power_off)
|
INPUT_CHANGED_MEMBER(ccompan2_state::power_off)
|
||||||
@ -149,8 +152,12 @@ INPUT_CHANGED_MEMBER(ccompan2_state::power_off)
|
|||||||
m_power = false;
|
m_power = false;
|
||||||
|
|
||||||
// when power switch is set to MEMORY, it triggers an NMI after a short delay
|
// when power switch is set to MEMORY, it triggers an NMI after a short delay
|
||||||
// (and shortly after that, MCU STBY is asserted)
|
attotime delay = attotime::from_msec(100);
|
||||||
m_nmitimer->adjust(attotime::from_msec(100));
|
m_nmitimer->adjust(delay, INPUT_LINE_NMI);
|
||||||
|
|
||||||
|
// afterwards, MCU STBY pin is asserted after a short delay
|
||||||
|
delay += attotime::from_msec(10);
|
||||||
|
m_standbytimer->adjust(delay, INPUT_LINE_RESET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user