bus/nes_ctrl: Revised Bandai Hyper Shot to only use exp port calls. (#8947)
* bus/nes_ctrl: Revised Bandai Hyper Shot to only use exp port calls. - Also corrected Space Shadow mirroring. Now game properly blanks background every other frame. - Use %p player specifier for B button. - Use helper function for writing strobe bit
This commit is contained in:
parent
7ce27dadde
commit
11e49d9be6
@ -50134,7 +50134,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="discrete_74x161" />
|
||||
<feature name="pcb" value="BANDAI-74*161/161/32" />
|
||||
<feature name="mirroring" value="pcb_controlled" />
|
||||
<feature name="mirroring" value="vertical" />
|
||||
<feature name="peripheral" value="bandai_hypershot" />
|
||||
<dataarea name="chr" size="131072">
|
||||
<rom name="space shadow (japan).chr" size="131072" crc="6690e5c1" sha1="f05cc0478786a5e6d153c2f85c00c14afa0e61b0" offset="00000" status="baddump" />
|
||||
@ -55019,7 +55019,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- The Bandai Hyper Shot controller/zapper for Space Shadow is not emulated. Operation Wolf currently only works with joypad but not zapper. -->
|
||||
<!-- Operation Wolf currently only works with joypad but not zapper -->
|
||||
<software name="2uzilght" supported="partial">
|
||||
<description>2 in 1 Uzi Lightgun</description>
|
||||
<year>199?</year>
|
||||
@ -55027,6 +55027,7 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
<info name="serial" value="MGC-002"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="txc_22110" />
|
||||
<feature name="peripheral" value="bandai_hypershot" />
|
||||
<dataarea name="prg" size="262144">
|
||||
<rom name="2-in-1 uzi lightgun (mgc-002).prg" size="262144" crc="7349c91a" sha1="00d0c7a423b9c8c18974022c619d9f3084c4fd8d" status="baddump" />
|
||||
</dataarea>
|
||||
|
@ -34,7 +34,7 @@ static INPUT_PORTS_START( nes_bandaihs )
|
||||
|
||||
PORT_START("JOYPAD")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) // has complete joypad inputs except button A
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("B")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("%p B")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
|
||||
@ -86,7 +86,6 @@ nes_bandaihs_device::nes_bandaihs_device(const machine_config &mconfig, const ch
|
||||
: nes_zapper_device(mconfig, NES_BANDAIHS, tag, owner, clock)
|
||||
, m_joypad(*this, "JOYPAD")
|
||||
, m_latch(0)
|
||||
, m_strobe(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -144,17 +143,23 @@ u8 nes_zapper_device::read_exp(offs_t offset)
|
||||
{
|
||||
u8 ret = 0;
|
||||
if (offset == 1) // $4017
|
||||
ret |= nes_zapper_device::read_bit34();
|
||||
ret = nes_zapper_device::read_bit34();
|
||||
return ret;
|
||||
}
|
||||
|
||||
u8 nes_bandaihs_device::read_bit0()
|
||||
u8 nes_bandaihs_device::read_exp(offs_t offset)
|
||||
{
|
||||
if (m_strobe & 1)
|
||||
m_latch = m_joypad->read();
|
||||
u8 ret = 0;
|
||||
|
||||
u8 ret = m_latch & 1;
|
||||
m_latch = (m_latch >> 1) | 0x80;
|
||||
if (offset == 0) // $4016
|
||||
{
|
||||
if (m_strobe)
|
||||
m_latch = m_joypad->read();
|
||||
ret = (m_latch & 1) << 1;
|
||||
m_latch = (m_latch >> 1) | 0x80;
|
||||
}
|
||||
else // $4017
|
||||
ret = nes_zapper_device::read_exp(offset);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -167,8 +172,6 @@ u8 nes_bandaihs_device::read_bit0()
|
||||
// carried on expansion port pin 2, so there's likely nothing more going on.
|
||||
void nes_bandaihs_device::write(u8 data)
|
||||
{
|
||||
if (m_strobe & 1)
|
||||
if (write_strobe(data))
|
||||
m_latch = m_joypad->read();
|
||||
|
||||
m_strobe = data;
|
||||
}
|
||||
|
@ -61,13 +61,12 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
virtual u8 read_bit0() override;
|
||||
virtual u8 read_exp(offs_t offset) override;
|
||||
virtual void write(u8 data) override;
|
||||
|
||||
private:
|
||||
required_ioport m_joypad;
|
||||
u8 m_latch;
|
||||
u8 m_strobe;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user