mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
xybots.cpp: fixed MT05379
This commit is contained in:
parent
5c17e6c1d6
commit
3583cce9af
@ -178,6 +178,14 @@ INPUT_PORTS_START( jsa_i_ioports )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER(DEVICE_SELF, atari_jsa_base_device, main_test_read_line) // self test
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START( jsa_i_ioports_inverted_coins )
|
||||
PORT_INCLUDE( jsa_i_ioports )
|
||||
|
||||
PORT_MODIFY("JSAI")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START( jsa_ii_ioports )
|
||||
PORT_START("JSAII")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
@ -630,7 +638,8 @@ atari_jsa_i_device::atari_jsa_i_device(const machine_config &mconfig, const char
|
||||
m_tms5220(*this, "tms"),
|
||||
m_jsai(*this, "JSAI"),
|
||||
m_pokey_volume(1.0),
|
||||
m_tms5220_volume(1.0)
|
||||
m_tms5220_volume(1.0),
|
||||
m_inverted_coins(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -800,7 +809,7 @@ void atari_jsa_i_device::device_add_mconfig(machine_config &config)
|
||||
|
||||
ioport_constructor atari_jsa_i_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( jsa_i_ioports );
|
||||
return m_inverted_coins ? INPUT_PORTS_NAME( jsa_i_ioports_inverted_coins ) : INPUT_PORTS_NAME( jsa_i_ioports );
|
||||
}
|
||||
|
||||
|
||||
|
@ -169,6 +169,9 @@ public:
|
||||
// construction/destruction
|
||||
atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// configuration
|
||||
void set_inverted_coins() { m_inverted_coins = true; } // for Xybots
|
||||
|
||||
// read/write handlers
|
||||
uint8_t rdio_r();
|
||||
void wrio_w(uint8_t data);
|
||||
@ -196,6 +199,9 @@ protected:
|
||||
// internal state
|
||||
double m_pokey_volume;
|
||||
double m_tms5220_volume;
|
||||
|
||||
private:
|
||||
bool m_inverted_coins;
|
||||
};
|
||||
|
||||
|
||||
|
@ -121,12 +121,6 @@ static INPUT_PORTS_START( xybots )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* 256H */
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") /* VBLANK */
|
||||
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
/* Xybots uses a swapped version */
|
||||
// todo:
|
||||
// PORT_MODIFY("jsa:JSAI")
|
||||
// PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||
// PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -214,6 +208,7 @@ void xybots_state::xybots(machine_config &config)
|
||||
ATARI_JSA_I(config, m_jsa, 0);
|
||||
m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_2);
|
||||
m_jsa->test_read_cb().set_ioport("FFE200").bit(8);
|
||||
m_jsa->set_inverted_coins();
|
||||
m_jsa->add_route(0, "rspeaker", 1.0);
|
||||
m_jsa->add_route(1, "lspeaker", 1.0);
|
||||
config.device_remove("jsa:pokey");
|
||||
|
Loading…
Reference in New Issue
Block a user