igs_m027: add dsw read (commented out for now)

This commit is contained in:
hap 2024-08-30 10:46:04 +02:00
parent 55bbe418d7
commit 7ae196d1cf

View File

@ -49,9 +49,7 @@ public:
m_oki(*this, "oki"),
m_portb(*this, "PORTB"),
m_portc(*this, "PORTC"),
m_dsw1(*this, "DSW1"),
m_dsw2(*this, "DSW2"),
m_dsw3(*this, "DSW3")
m_dsw(*this, "DSW%u", 1U)
{ }
void igs_mahjong(machine_config &config);
@ -92,9 +90,7 @@ private:
required_device<okim6295_device> m_oki;
required_ioport m_portb;
required_ioport m_portc;
required_ioport m_dsw1;
required_ioport m_dsw2;
required_ioport m_dsw3;
required_ioport_array<3> m_dsw;
u32 unk_r();
u32 unk2_r();
@ -153,7 +149,7 @@ void igs_m027_state::igs_mahjong_map(address_map &map)
map(0x4000000c, 0x4000000f).r(FUNC(igs_m027_state::unk2_r));
map(0x40000018, 0x4000001b).w(FUNC(igs_m027_state::dsw_io_select_w));
map(0x70000200, 0x70000203).ram(); //??????????????
map(0x70000200, 0x70000203).ram(); // ??????????????
map(0x50000000, 0x500003ff).nopw(); // uploads XOR table to external ROM here
map(0xf0000000, 0xf000000f).nopw(); // magic registers
}
@ -165,7 +161,6 @@ void igs_m027_state::igs_mahjong_map(address_map &map)
***************************************************************************/
static INPUT_PORTS_START( base )
PORT_START("DSW1")
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW1:1" )
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW1:2" )
@ -281,7 +276,6 @@ static INPUT_PORTS_START( jking02 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // maybe bet?
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) // maybe start?
INPUT_PORTS_END
static INPUT_PORTS_START( qlgs )
@ -291,7 +285,6 @@ static INPUT_PORTS_START( qlgs )
PORT_DIPNAME( 0x04, 0x00, "Link Mode" )
PORT_DIPSETTING( 0x04, "Linked" )
PORT_DIPSETTING( 0x00, "Standalone" )
INPUT_PORTS_END
static INPUT_PORTS_START( amazonia )
@ -423,6 +416,16 @@ u32 igs_m027_state::unk2_r()
u32 igs_m027_state::lhdmg_unk2_r()
{
#if 0
u32 data = 0xffffffff;
for (int i = 0; i < 3; i++)
if (!BIT(m_dsw_io_select, i))
data &= m_dsw[i]->read() | 0xffffff00;
return data;
#endif
logerror("%s: lhdmg_unk2_r\n", machine().describe_context());
if (m_dsw_io_select & 1)