hornet.c: made the eeprom optional since it seems to be only on the LAN

board. This is a better fix for the nbapbp issue. nw.
This commit is contained in:
etabeta78 2015-02-09 20:53:04 +01:00
parent c4aef2a747
commit 83d8264cc4

View File

@ -338,18 +338,19 @@ public:
m_gn680(*this, "gn680"),
m_dsp(*this, "dsp"),
m_dsp2(*this, "dsp2"),
m_eeprom(*this, "eeprom"),
m_k037122_1(*this, "k037122_1"),
m_k037122_2(*this, "k037122_2" ),
m_adc12138(*this, "adc12138"),
m_konppc(*this, "konppc"),
m_lan_eeprom(*this, "lan_eeprom"),
m_in0(*this, "IN0"),
m_in1(*this, "IN1"),
m_in2(*this, "IN2"),
m_dsw(*this, "DSW"),
m_eepromout(*this, "EEPROMOUT"),
m_analog1(*this, "ANALOG1"),
m_analog2(*this, "ANALOG2"),
m_konppc(*this, "konppc"){ }
m_analog2(*this, "ANALOG2")
{ }
// TODO: Needs verification on real hardware
static const int m_sound_timer_usec = 2800;
@ -363,13 +364,13 @@ public:
optional_device<cpu_device> m_gn680;
required_device<cpu_device> m_dsp;
optional_device<cpu_device> m_dsp2;
required_device<eeprom_serial_93cxx_device> m_eeprom;
optional_device<k037122_device> m_k037122_1;
optional_device<k037122_device> m_k037122_2;
required_device<adc12138_device> m_adc12138;
required_ioport m_in0, m_in1, m_in2, m_dsw, m_eepromout;
optional_ioport m_analog1, m_analog2;
required_device<konppc_device> m_konppc;
optional_device<eeprom_serial_93cxx_device> m_lan_eeprom;
required_ioport m_in0, m_in1, m_in2, m_dsw;
optional_ioport m_eepromout, m_analog1, m_analog2;
emu_timer *m_sound_irq_timer;
UINT8 m_led_reg0;
@ -534,7 +535,9 @@ READ8_MEMBER(hornet_state::sysreg_r)
0x02 = ADDOR (ADC DOR)
0x01 = ADDO (ADC DO)
*/
r = 0xf0; m_eeprom->do_read();
r = 0xf0;
if (m_lan_eeprom)
r |= m_lan_eeprom->do_read() << 3;
r |= m_adc12138->do_r(space, 0) | (m_adc12138->eoc_r(space, 0) << 2);
break;
@ -572,6 +575,7 @@ WRITE8_MEMBER(hornet_state::sysreg_w)
0x02 = LAMP1
0x01 = LAMP0
*/
if (m_eepromout)
m_eepromout->write(data, 0xff);
osd_printf_debug("System register 0 = %02X\n", data);
break;
@ -877,11 +881,6 @@ static INPUT_PORTS_START( hornet )
PORT_DIPNAME( 0x01, 0x01, "Monitor Type" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x01, "24KHz" )
PORT_DIPSETTING( 0x00, "15KHz" )
PORT_START( "EEPROMOUT" )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, di_write)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, clk_write)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write)
INPUT_PORTS_END
static INPUT_PORTS_START( sscope )
@ -902,6 +901,16 @@ static INPUT_PORTS_START( sscope )
PORT_BIT( 0x7ff, 0x3ff, IPT_AD_STICK_Y ) PORT_MINMAX(0x000, 0x7ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) PORT_INVERT
INPUT_PORTS_END
static INPUT_PORTS_START( sscope2 )
PORT_INCLUDE( sscope )
// LAN board EEPROM
PORT_START( "EEPROMOUT" )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("lan_eeprom", eeprom_serial_93cxx_device, di_write)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("lan_eeprom", eeprom_serial_93cxx_device, clk_write)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("lan_eeprom", eeprom_serial_93cxx_device, cs_write)
INPUT_PORTS_END
/* PowerPC interrupts
@ -977,8 +986,8 @@ static MACHINE_CONFIG_START( hornet, hornet_state )
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
// PCB description at top doesn't mention any EEPROM on the base board...
// MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_DEVICE_ADD("voodoo0", VOODOO_1, STD_VOODOO_1_CLOCK)
MCFG_VOODOO_FBMEM(2)
@ -1541,4 +1550,4 @@ GAMEL( 2000, sscopec, sscope, hornet_2board, sscope, hornet_state, hornet
GAMEL( 2000, sscopeb, sscope, hornet_2board, sscope, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxB, Ver 1.20)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
GAMEL( 2000, sscopea, sscope, hornet_2board, sscope, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxA, Ver 1.00)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
GAMEL( 2000, sscope2, 0, sscope2, sscope, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope 2", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
GAMEL( 2000, sscope2, 0, sscope2, sscope2, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope 2", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )