Apollo updates: [Hans Ostermeyer]

- Changed "20 years ago" Y2K-avoidance option to "30 years ago"
- Removed runtime device lookup
- Fixed reset command handling in 3C505
This commit is contained in:
arbee 2020-08-25 22:23:50 -04:00
parent e8376ed361
commit 2c6f48331b
4 changed files with 28 additions and 8 deletions

View File

@ -487,6 +487,26 @@ void isa16_3c505_device::hcr_w(u8 data)
{
LOGMASKED(LOG_REG, "hcr_w 0x%02x (%s)\n", data, machine().describe_context());
// attention condition
if (!(m_hcr & HCR_ATTN) && (data & HCR_ATTN))
{
if (!(data & HCR_FLSH))
{
LOGMASKED(LOG_REG, "### soft reset\n");
// soft reset
m_cpu->set_input_line(INPUT_LINE_NMI, 1);
m_cpu->set_input_line(INPUT_LINE_NMI, 0);
}
else
{
LOGMASKED(LOG_REG, "### hard reset\n");
// hard reset
reset();
}
}
// update host status flags
if ((data ^ m_hcr) & HCR_HSF)
m_asr = (m_asr & ~ASR_HSF) | (data & HCR_HSF);

View File

@ -935,7 +935,7 @@ WRITE_LINE_MEMBER(apollo_state::apollo_reset_instr_callback)
m_graphics->reset();
m_keyboard->reset();
#ifdef APOLLO_XXL
machine().device(APOLLO_STDIO_TAG )->reset();
m_sio2->reset();
#endif
}
}

View File

@ -300,7 +300,7 @@ private:
#define APOLLO_CONF_MONO_15I 0x0008
#define APOLLO_CONF_MONO_19I 0x0010
#define APOLLO_CONF_GERMAN_KBD 0x0020
#define APOLLO_CONF_20_YEARS_AGO 0x0040
#define APOLLO_CONF_30_YEARS_AGO 0x0040
#define APOLLO_CONF_25_YEARS_AGO 0x0080
#define APOLLO_CONF_NODE_ID 0x0100
#define APOLLO_CONF_IDLE_SLEEP 0x0200

View File

@ -91,9 +91,9 @@ INPUT_PORTS_START( apollo_config )
PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
PORT_CONFSETTING(APOLLO_CONF_GERMAN_KBD, DEF_STR ( On ) )
PORT_CONFNAME(APOLLO_CONF_20_YEARS_AGO, APOLLO_CONF_20_YEARS_AGO, "20 Years Ago ...")
PORT_CONFNAME(APOLLO_CONF_30_YEARS_AGO, APOLLO_CONF_30_YEARS_AGO, "30 Years Ago ...")
PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
PORT_CONFSETTING(APOLLO_CONF_20_YEARS_AGO, DEF_STR ( On ) )
PORT_CONFSETTING(APOLLO_CONF_30_YEARS_AGO, DEF_STR ( On ) )
PORT_CONFNAME(APOLLO_CONF_25_YEARS_AGO, APOLLO_CONF_25_YEARS_AGO, "25 Years Ago ...")
PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
@ -1220,15 +1220,15 @@ MACHINE_RESET_MEMBER(apollo_state,apollo)
year += 75;
apollo_rtc_w(9, year);
}
else if (year < 20 && apollo_config(APOLLO_CONF_20_YEARS_AGO))
else if (year < 30 && apollo_config(APOLLO_CONF_30_YEARS_AGO))
{
year += 80;
year += 70;
apollo_rtc_w(9, year);
}
else if (year >= 80 && !apollo_config(APOLLO_CONF_20_YEARS_AGO)
else if (year >= 70 && !apollo_config(APOLLO_CONF_30_YEARS_AGO)
&& !apollo_config(APOLLO_CONF_25_YEARS_AGO))
{
year -= 80;
year -= 70;
apollo_rtc_w(9, year);
}