trunk/src/mame/video/homerun.c
r18025 | r18026 | |
10 | 10 | |
11 | 11 | /**************************************************************************/ |
12 | 12 | |
| 13 | CUSTOM_INPUT_MEMBER(homerun_state::homerun_sprite0_r) |
| 14 | { |
| 15 | // sprite-0 vs background collision status, similar to NES |
| 16 | return (machine().primary_screen->vpos() > (m_spriteram[0] - 15)) ? 1 : 0; |
| 17 | } |
| 18 | |
13 | 19 | WRITE8_MEMBER(homerun_state::homerun_scrollhi_w) |
14 | 20 | { |
15 | 21 | // d0: scroll y high bit |
r18025 | r18026 | |
113 | 119 | for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
114 | 120 | { |
115 | 121 | int sx = spriteram[offs + 3]; |
116 | | int sy = spriteram[offs + 0] - 16; |
| 122 | int sy = spriteram[offs + 0] - 15; |
117 | 123 | int code = (spriteram[offs + 1]) | ((spriteram[offs + 2] & 0x8) << 5) | ((state->m_gfx_ctrl & 3) << 9); |
118 | 124 | int color = (spriteram[offs + 2] & 0x07) | 8; |
119 | 125 | int flipx = (spriteram[offs + 2] & 0x40) >> 6; |
trunk/src/mame/drivers/homerun.c
r18025 | r18026 | |
121 | 121 | ADDRESS_MAP_END |
122 | 122 | |
123 | 123 | |
124 | | CUSTOM_INPUT_MEMBER(homerun_state::homerun_40_r) |
125 | | { |
126 | | // screen split location is a guess, but works in homerun |
127 | | UINT8 ret = (machine().primary_screen->vpos() > 116) ? 1 : 0; |
128 | | |
129 | | return ret; |
130 | | } |
131 | | |
132 | 124 | CUSTOM_INPUT_MEMBER(homerun_state::homerun_d7756_busy_r) |
133 | 125 | { |
134 | 126 | return m_samples->playing(0) ? 0 : 1; |
r18025 | r18026 | |
155 | 147 | static INPUT_PORTS_START( homerun ) |
156 | 148 | PORT_START("IN0") |
157 | 149 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
158 | | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_40_r, NULL) |
| 150 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL) |
159 | 151 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_d7756_busy_r, NULL) |
160 | 152 | PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
161 | 153 | |
r18025 | r18026 | |
192 | 184 | static INPUT_PORTS_START( dynashot ) |
193 | 185 | PORT_START("IN0") |
194 | 186 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
195 | | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_40_r, NULL) |
196 | | PORT_BIT( 0xb7, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 187 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL) |
| 188 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // doesn't have d7756 |
| 189 | PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
197 | 190 | |
198 | 191 | PORT_START("IN1") |
199 | 192 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) |
r18025 | r18026 | |
229 | 222 | PORT_START("IN0") |
230 | 223 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ? |
231 | 224 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 225 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_sprite0_r, NULL) |
232 | 226 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_d7756_busy_r, NULL) |
233 | | PORT_BIT( 0x76, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 227 | PORT_BIT( 0x36, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
234 | 228 | |
235 | 229 | PORT_START("IN1") |
236 | 230 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("P1 Up / Rock") |