mirror of
https://github.com/mamedev/mame.git
synced 2024-11-18 10:06:19 +01:00
considering the sprite hw is like on NES, IN0 d6 looks like it is sprite-0 collision detection
This commit is contained in:
parent
faf34668d9
commit
325006970c
3 changed files with 14 additions and 14 deletions
|
@ -121,14 +121,6 @@ static ADDRESS_MAP_START( homerun_iomap, AS_IO, 8, homerun_state )
|
|||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
CUSTOM_INPUT_MEMBER(homerun_state::homerun_40_r)
|
||||
{
|
||||
// screen split location is a guess, but works in homerun
|
||||
UINT8 ret = (machine().primary_screen->vpos() > 116) ? 1 : 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
CUSTOM_INPUT_MEMBER(homerun_state::homerun_d7756_busy_r)
|
||||
{
|
||||
return m_samples->playing(0) ? 0 : 1;
|
||||
|
@ -155,7 +147,7 @@ CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_hopper_status_r)
|
|||
static INPUT_PORTS_START( homerun )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_40_r, NULL)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_d7756_busy_r, NULL)
|
||||
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
|
||||
|
@ -192,8 +184,9 @@ INPUT_PORTS_END
|
|||
static INPUT_PORTS_START( dynashot )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_40_r, NULL)
|
||||
PORT_BIT( 0xb7, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // doesn't have d7756
|
||||
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
|
||||
|
@ -229,8 +222,9 @@ static INPUT_PORTS_START( ganjaja )
|
|||
PORT_START("IN0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ?
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_d7756_busy_r, NULL)
|
||||
PORT_BIT( 0x76, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x36, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P1 Up / Rock")
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
DECLARE_WRITE8_MEMBER(homerun_scrolly_w);
|
||||
DECLARE_WRITE8_MEMBER(homerun_scrollx_w);
|
||||
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(homerun_40_r);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(homerun_sprite0_r);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(homerun_d7756_busy_r);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(ganjaja_d7756_busy_r);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(ganjaja_hopper_status_r);
|
||||
|
|
|
@ -10,6 +10,12 @@
|
|||
|
||||
/**************************************************************************/
|
||||
|
||||
CUSTOM_INPUT_MEMBER(homerun_state::homerun_sprite0_r)
|
||||
{
|
||||
// sprite-0 vs background collision status, similar to NES
|
||||
return (machine().primary_screen->vpos() > (m_spriteram[0] - 15)) ? 1 : 0;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(homerun_state::homerun_scrollhi_w)
|
||||
{
|
||||
// d0: scroll y high bit
|
||||
|
@ -113,7 +119,7 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
|
|||
for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
|
||||
{
|
||||
int sx = spriteram[offs + 3];
|
||||
int sy = spriteram[offs + 0] - 16;
|
||||
int sy = spriteram[offs + 0] - 15;
|
||||
int code = (spriteram[offs + 1]) | ((spriteram[offs + 2] & 0x8) << 5) | ((state->m_gfx_ctrl & 3) << 9);
|
||||
int color = (spriteram[offs + 2] & 0x07) | 8;
|
||||
int flipx = (spriteram[offs + 2] & 0x40) >> 6;
|
||||
|
|
Loading…
Reference in a new issue