mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +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).
|
||||
|
||||
TODO:
|
||||
- if/when MAME supports an exit callback, hook up power-off NMI to that
|
||||
- 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 unmapped reads from 0x33/0x34
|
||||
- is "Aquamarine / Super Nova" the same rom as nsnova and just a redesign?
|
||||
|
@ -104,8 +104,9 @@ private:
|
||||
void led_w(u8 data);
|
||||
|
||||
void set_cpu_freq();
|
||||
TIMER_CALLBACK_MEMBER(delayed_nmi);
|
||||
TIMER_CALLBACK_MEMBER(set_pin);
|
||||
|
||||
emu_timer *m_standbytimer;
|
||||
emu_timer *m_nmitimer;
|
||||
bool m_power = false;
|
||||
u8 m_inp_mux = 0;
|
||||
@ -113,7 +114,8 @@ private:
|
||||
|
||||
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
|
||||
save_item(NAME(m_power));
|
||||
@ -135,11 +137,12 @@ void ccompan2_state::set_cpu_freq()
|
||||
void ccompan2_state::machine_reset()
|
||||
{
|
||||
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)
|
||||
@ -149,8 +152,12 @@ INPUT_CHANGED_MEMBER(ccompan2_state::power_off)
|
||||
m_power = false;
|
||||
|
||||
// when power switch is set to MEMORY, it triggers an NMI after a short delay
|
||||
// (and shortly after that, MCU STBY is asserted)
|
||||
m_nmitimer->adjust(attotime::from_msec(100));
|
||||
attotime delay = 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