Skip to content

Commit

Permalink
make this code specific to tomshoot for now
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHaywood committed Sep 26, 2024
1 parent 2e316de commit 11f34fd
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/mame/tvgames/xavix.h
Original file line number Diff line number Diff line change
Expand Up @@ -421,23 +421,7 @@ class xavix_state : public driver_device

uint8_t pal_ntsc_r();

uint8_t lightgun_r(offs_t offset)
{
if (!m_lightgun[offset])
return 0xff;

uint16_t ret = m_lightgun[offset>>1]->read();

if (offset & 1)
ret >>= 8;
else
ret &= 0xff;

if (offset == 0)
ret += 0x20;

return ret;
}
virtual uint8_t lightgun_r(offs_t offset) { logerror("%s: unhandled lightgun_r %d\n", machine().describe_context(), offset); return 0xff; }

uint8_t xavix_memoryemu_txarray_r(offs_t offset);
void xavix_memoryemu_txarray_w(offs_t offset, uint8_t data);
Expand Down Expand Up @@ -663,6 +647,22 @@ class xavix_i2c_tomshoot_state : public xavix_i2c_state
DECLARE_INPUT_CHANGED_MEMBER(gun_fired);
DECLARE_INPUT_CHANGED_MEMBER(gun2_fired);

private:
virtual uint8_t lightgun_r(offs_t offset) override
{
uint16_t ret = m_lightgun[offset>>1]->read();

if (offset & 1)
ret >>= 8;
else
ret &= 0xff;

if (offset == 0)
ret += 0x20;

return ret;
}

};

class xavix_i2c_ltv_tam_state : public xavix_i2c_state
Expand Down

0 comments on commit 11f34fd

Please sign in to comment.