| Previous | 15994 Revisions | Next |
| r14884 Monday 9th April, 2012 at 14:35:02 UTC by Miodrag Milanović |
|---|
| Sync with MAME r15926 (no whatsnew) |
| [src/emu] | driver.h |
| [src/emu/machine] | generic.c generic.h |
| [src/mame/audio] | gottlieb.c jedi.c |
| [src/mame/drivers] | 8080bw.c acefruit.c alg.c arcadia.c arkanoid.c artmagic.c asteroid.c astrocde.c astrof.c balsente.c battlex.c bwidow.c bzone.c cave.c ccastles.c cd32.c champbas.c cidelsa.c cloud9.c cop01.c crbaloon.c crshrace.c dacholer.c dbz.c dcheese.c ddayjlc.c ddenlovr.c ddragon.c dlair.c dorachan.c dreamwld.c dynax.c ecoinfr.c enigma2.c eolith.c eolith16.c eolithsp.c equites.c exerion.c exidy.c exidy440.c expro02.c famibox.c fantland.c fgoal.c firefox.c firetrk.c flstory.c fromanc2.c fuukifg3.c gaelco2.c gaelco3d.c gal3.c galaga.c galastrm.c galaxi.c galaxian.c galaxold.c galdrvr.c gottlieb.c groundfx.c gstream.c gunbustr.c homerun.c igs009.c igs011.c igspoker.c inufuku.c itech32.c itech8.c jack.c jackie.c jaguar.c jankenmn.c jedi.c junofrst.c konamigx.c ksys573.c ladybug.c lethalj.c limenko.c littlerb.c m92.c mainsnk.c majorpkr.c merit.c metro.c mhavoc.c micro3d.c midvunit.c midyunit.c midzeus.c missile.c model2.c mquake.c ms32.c multfish.c multigam.c mw18w.c mw8080bw.c namcos22.c neodrvr.c neogeo.c niyanpai.c nova2001.c pastelg.c peplus.c peyper.c phoenix.c pirates.c playch10.c polepos.c policetr.c psikyo.c psikyo4.c punchout.c pzletime.c qdrmfgp.c quizshow.c r2dtank.c renegade.c rgum.c rpunch.c sandscrp.c scobra.c scramble.c segag80v.c seibuspi.c snk.c snk6502.c spoker.c sprint4.c ssingles.c stactics.c stadhero.c starshp1.c starwars.c statriv2.c suprnova.c suprridr.c system1.c taito_f3.c taitojc.c taitosj.c tempest.c tetrisp2.c thayers.c toaplan2.c ultratnk.c ultrsprt.c undrfire.c vamphalf.c vegaeo.c vicdual.c welltris.c williams.c wolfpack.c wwfsstar.c wwfwfest.c xain.c xmen.c xxmissio.c zaccaria.c zaxxon.c zn.c zr107.c |
| [src/mame/includes] | 8080bw.h amiga.h arkanoid.h artmagic.h asteroid.h astrocde.h astrof.h balsente.h battlex.h bzone.h cave.h ccastles.h cd32.h champbas.h cidelsa.h cloud9.h cop01.h crbaloon.h crshrace.h dcheese.h ddragon.h dynax.h eolith.h eolithsp.h equites.h exerion.h exidy.h exidy440.h fantland.h fgoal.h firetrk.h flstory.h fromanc2.h gaelco2.h gaelco3d.h galaga.h galastrm.h galaxian.h galaxold.h gottlieb.h groundfx.h gunbustr.h homerun.h inufuku.h itech32.h itech8.h jack.h jedi.h konamigx.h ladybug.h lethalj.h m92.h mainsnk.h metro.h mhavoc.h micro3d.h midyunit.h midzeus.h model2.h ms32.h mw8080bw.h namcos22.h neogeo.h niyanpai.h nova2001.h pastelg.h phoenix.h pirates.h playch10.h polepos.h policetr.h psikyo.h psikyo4.h punchout.h qdrmfgp.h renegade.h rpunch.h scramble.h segag80v.h seibuspi.h snk.h snk6502.h sprint4.h stactics.h starshp1.h starwars.h suprnova.h suprridr.h system1.h taito_f3.h taitojc.h taitosj.h tetrisp2.h toaplan2.h ultratnk.h undrfire.h vicdual.h welltris.h williams.h wolfpack.h wwfsstar.h wwfwfest.h xain.h xmen.h xxmissio.h zaccaria.h zaxxon.h |
| [src/mame/machine] | amiga.c arkanoid.c balsente.c gaelco2.c galaxold.c mhavoc.c micro3d.c playch10.c scramble.c starwars.c williams.c |
| [src/mame/video] | phoenix.c stactics.c |
| [src/mess/drivers] | ami1200.c amiga.c |
| r14883 | r14884 | |
|---|---|---|
| 785 | 785 | } |
| 786 | 786 | else |
| 787 | 787 | { |
| 788 | device | |
| 788 | ay8913_device | |
| 789 | 789 | ay8910_address_w(ay, 0, m_psg_latch); |
| 790 | 790 | ay8910_data_w(ay, 0, m_psg_data_latch); |
| 791 | 791 | } |
| r14883 | r14884 | |
|---|---|---|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | |
| 104 | CUSTOM_INPUT( | |
| 104 | CUSTOM_INPUT_MEMBER( | |
| 105 | 105 | { |
| 106 | jedi_state *state = field.machine().driver_data<jedi_state>(); | |
| 107 | return *state->m_audio_comm_stat >> 6; | |
| 106 | return *m_audio_comm_stat >> 6; | |
| 108 | 107 | } |
| 109 | 108 | |
| 110 | 109 |
| r14883 | r14884 | |
|---|---|---|
| 205 | 205 | * |
| 206 | 206 | *************************************/ |
| 207 | 207 | |
| 208 | CUSTOM_INPUT( | |
| 208 | CUSTOM_INPUT_MEMBER(mhavoc_state::tms5220_r | |
| 209 | 209 | { |
| 210 | return tms5220_readyq_r( | |
| 210 | return tms5220_readyq_r( | |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | CUSTOM_INPUT( | |
| 213 | CUSTOM_INPUT_MEMBER( | |
| 214 | 214 | { |
| 215 | mhavoc_state *state = field.machine().driver_data<mhavoc_state>(); | |
| 216 | 215 | const char *tag1 = (const char *)param; |
| 217 | 216 | const char *tag2 = tag1 + strlen(tag1) + 1; |
| 218 | return input_port_read( | |
| 217 | return input_port_read( | |
| 219 | 218 | } |
| 220 | 219 | |
| 221 | CUSTOM_INPUT( | |
| 220 | CUSTOM_INPUT_MEMBER(mhavoc_state::gamma_rcvd_r | |
| 222 | 221 | { |
| 223 | mhavoc_state *state = field.machine().driver_data<mhavoc_state>(); | |
| 224 | 222 | /* Gamma rcvd flag */ |
| 225 | return | |
| 223 | return | |
| 226 | 224 | } |
| 227 | 225 | |
| 228 | CUSTOM_INPUT( | |
| 226 | CUSTOM_INPUT_MEMBER(mhavoc_state::gamma_xmtd_r | |
| 229 | 227 | { |
| 230 | mhavoc_state *state = field.machine().driver_data<mhavoc_state>(); | |
| 231 | 228 | /* Gamma xmtd flag */ |
| 232 | return | |
| 229 | return | |
| 233 | 230 | } |
| 234 | 231 | |
| 235 | CUSTOM_INPUT( | |
| 232 | CUSTOM_INPUT_MEMBER(mhavoc_state::alpha_rcvd_r | |
| 236 | 233 | { |
| 237 | mhavoc_state *state = field.machine().driver_data<mhavoc_state>(); | |
| 238 | 234 | /* Alpha rcvd flag */ |
| 239 | return ( | |
| 235 | return ( | |
| 240 | 236 | } |
| 241 | 237 | |
| 242 | CUSTOM_INPUT( | |
| 238 | CUSTOM_INPUT_MEMBER(mhavoc_state::alpha_xmtd_r | |
| 243 | 239 | { |
| 244 | mhavoc_state *state = field.machine().driver_data<mhavoc_state>(); | |
| 245 | 240 | /* Alpha xmtd flag */ |
| 246 | return ( | |
| 241 | return ( | |
| 247 | 242 | } |
| 248 | 243 | |
| 249 | 244 | /************************************* |
| r14883 | r14884 | |
|---|---|---|
| 1091 | 1091 | * |
| 1092 | 1092 | *************************************/ |
| 1093 | 1093 | |
| 1094 | CUSTOM_INPUT( | |
| 1094 | CUSTOM_INPUT_MEMBER(balsente_state::nstocker_bits_r | |
| 1095 | 1095 | { |
| 1096 | balsente_state *state = field.machine().driver_data<balsente_state>(); | |
| 1097 | return state->m_nstocker_bits; | |
| 1096 | return m_nstocker_bits; | |
| 1098 | 1097 | } |
| 1099 | 1098 | |
| 1100 | 1099 |
| r14883 | r14884 | |
|---|---|---|
| 417 | 417 | * |
| 418 | 418 | *************************************/ |
| 419 | 419 | |
| 420 | CUSTOM_INPUT( amiga_joystick_convert ) | |
| 420 | CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert ) | |
| 421 | 421 | { |
| 422 | UINT8 bits = input_port_read( | |
| 422 | UINT8 bits = input_port_read( | |
| 423 | 423 | int up = (bits >> 0) & 1; |
| 424 | 424 | int down = (bits >> 1) & 1; |
| 425 | 425 | int left = (bits >> 2) & 1; |
| r14883 | r14884 | |
|---|---|---|
| 537 | 537 | machine().scheduler().timer_set(attotime::from_usec(40), FUNC(adc_done_callback), data & ~4); |
| 538 | 538 | } |
| 539 | 539 | |
| 540 | CUSTOM_INPUT( | |
| 540 | CUSTOM_INPUT_MEMBER(micro3d_state::botssa_hwchk_r | |
| 541 | 541 | { |
| 542 | micro3d_state *state = field.machine().driver_data<micro3d_state>(); | |
| 543 | 542 | |
| 544 | return | |
| 543 | return | |
| 545 | 544 | } |
| 546 | 545 | |
| 547 | 546 | READ16_MEMBER(micro3d_state::botssa_140000_r) |
| r14883 | r14884 | |
|---|---|---|
| 86 | 86 | * |
| 87 | 87 | *************************************/ |
| 88 | 88 | |
| 89 | CUSTOM_INPUT( | |
| 89 | CUSTOM_INPUT_MEMBER( | |
| 90 | 90 | { |
| 91 | playch10_state *state = field.machine().driver_data<playch10_state>(); | |
| 92 | return ~state->m_pc10_int_detect & 1; | |
| 91 | return ~m_pc10_int_detect & 1; | |
| 93 | 92 | } |
| 94 | 93 | |
| 95 | 94 | WRITE8_MEMBER(playch10_state::pc10_SDCS_w) |
| r14883 | r14884 | |
|---|---|---|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
| 36 | CUSTOM_INPUT( | |
| 36 | CUSTOM_INPUT_MEMBER(scramble_state::darkplnt_custom_r | |
| 37 | 37 | { |
| 38 | 38 | static const UINT8 remap[] = {0x03, 0x02, 0x00, 0x01, 0x21, 0x20, 0x22, 0x23, |
| 39 | 39 | 0x33, 0x32, 0x30, 0x31, 0x11, 0x10, 0x12, 0x13, |
| r14883 | r14884 | |
| 43 | 43 | 0x2b, 0x2a, 0x28, 0x29, 0x09, 0x08, 0x0a, 0x0b, |
| 44 | 44 | 0x0f, 0x0e, 0x0c, 0x0d, 0x2d, 0x2c, 0x2e, 0x2f, |
| 45 | 45 | 0x27, 0x26, 0x24, 0x25, 0x05, 0x04, 0x06, 0x07 }; |
| 46 | UINT8 val = input_port_read( | |
| 46 | UINT8 val = input_port_read( | |
| 47 | 47 | |
| 48 | 48 | return remap[val >> 2]; |
| 49 | 49 | } |
| r14883 | r14884 | |
|---|---|---|
| 218 | 218 | ***************************************************************************/ |
| 219 | 219 | |
| 220 | 220 | |
| 221 | CUSTOM_INPUT( | |
| 221 | CUSTOM_INPUT_MEMBER(gaelco2_state::wrally2_analog_bit_r | |
| 222 | 222 | { |
| 223 | gaelco2_state *state = field.machine().driver_data<gaelco2_state>(); | |
| 224 | 223 | int which = (FPTR)param; |
| 225 | return ( | |
| 224 | return ( | |
| 226 | 225 | } |
| 227 | 226 | |
| 228 | 227 |
| r14883 | r14884 | |
|---|---|---|
| 97 | 97 | m_ddr_c = data; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | CUSTOM_INPUT( | |
| 100 | CUSTOM_INPUT_MEMBER( | |
| 101 | 101 | { |
| 102 | arkanoid_state *state = field.machine().driver_data<arkanoid_state>(); | |
| 103 | 102 | int res = 0; |
| 104 | 103 | |
| 105 | 104 | /* bit 0x40 of comes from the sticky bit */ |
| 106 | if (! | |
| 105 | if (! | |
| 107 | 106 | res |= 0x01; |
| 108 | 107 | |
| 109 | 108 | /* bit 0x80 comes from a write latch */ |
| 110 | if (! | |
| 109 | if (! | |
| 111 | 110 | res |= 0x02; |
| 112 | 111 | |
| 113 | 112 | return res; |
| 114 | 113 | } |
| 115 | 114 | |
| 116 | CUSTOM_INPUT( | |
| 115 | CUSTOM_INPUT_MEMBER( | |
| 117 | 116 | { |
| 118 | arkanoid_state *state = field.machine().driver_data<arkanoid_state>(); | |
| 119 | 117 | const char *tag1 = (const char *)param; |
| 120 | 118 | const char *tag2 = tag1 + strlen(tag1) + 1; |
| 121 | return input_port_read( | |
| 119 | return input_port_read( | |
| 122 | 120 | } |
| 123 | 121 | |
| 124 | 122 | /* |
| r14883 | r14884 | |
|---|---|---|
| 254 | 254 | memory_set_bank(machine(), "bank1", m__4in1_bank); |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | CUSTOM_INPUT( | |
| 257 | CUSTOM_INPUT_MEMBER(galaxold_state::_4in1_fake_port_r | |
| 258 | 258 | { |
| 259 | galaxold_state *state = field.machine().driver_data<galaxold_state>(); | |
| 260 | 259 | static const char *const portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" }; |
| 261 | 260 | int bit_mask = (FPTR)param; |
| 262 | 261 | |
| 263 | return (input_port_read( | |
| 262 | return (input_port_read( | |
| 264 | 263 | } |
| 265 | 264 | |
| 266 | 265 | #ifdef UNUSED_FUNCTION |
| r14883 | r14884 | |
|---|---|---|
| 616 | 616 | state->m_port_select = data; |
| 617 | 617 | } |
| 618 | 618 | |
| 619 | CUSTOM_INPUT( | |
| 619 | CUSTOM_INPUT_MEMBER( | |
| 620 | 620 | { |
| 621 | williams_state *state = field.machine().driver_data<williams_state>(); | |
| 622 | 621 | const char *tag = (const char *)param; |
| 623 | 622 | |
| 624 | if ( | |
| 623 | if ( | |
| 625 | 624 | tag += strlen(tag) + 1; |
| 626 | 625 | |
| 627 | return input_port_read( | |
| 626 | return input_port_read( | |
| 628 | 627 | } |
| 629 | 628 | |
| 630 | 629 | /* |
| r14883 | r14884 | |
|---|---|---|
| 107 | 107 | * |
| 108 | 108 | *************************************/ |
| 109 | 109 | |
| 110 | CUSTOM_INPUT( | |
| 110 | CUSTOM_INPUT_MEMBER(starwars_state::matrix_flag_r | |
| 111 | 111 | { |
| 112 | starwars_state *state = field.machine().driver_data<starwars_state>(); | |
| 113 | 112 | /* set the matrix processor flag */ |
| 114 | return | |
| 113 | return | |
| 115 | 114 | } |
| 116 | 115 | |
| 117 | 116 |
| r14883 | r14884 | |
|---|---|---|
| 40 | 40 | DECLARE_WRITE8_MEMBER(fgoal_color_w); |
| 41 | 41 | DECLARE_WRITE8_MEMBER(fgoal_ypos_w); |
| 42 | 42 | DECLARE_WRITE8_MEMBER(fgoal_xpos_w); |
| 43 | DECLARE_CUSTOM_INPUT_MEMBER(fgoal_80_r); | |
| 43 | 44 | }; |
| 44 | 45 | |
| 45 | 46 |
| r14883 | r14884 | |
|---|---|---|
| 18 | 18 | DECLARE_WRITE8_MEMBER(mainsnk_c600_w); |
| 19 | 19 | DECLARE_WRITE8_MEMBER(mainsnk_fgram_w); |
| 20 | 20 | DECLARE_WRITE8_MEMBER(mainsnk_bgram_w); |
| 21 | DECLARE_CUSTOM_INPUT_MEMBER(mainsnk_sound_r); | |
| 21 | 22 | }; |
| 22 | 23 | |
| 23 | 24 |
| r14883 | r14884 | |
|---|---|---|
| 75 | 75 | DECLARE_WRITE16_MEMBER(midyunit_paletteram_w); |
| 76 | 76 | DECLARE_READ16_MEMBER(midyunit_dma_r); |
| 77 | 77 | DECLARE_WRITE16_MEMBER(midyunit_dma_w); |
| 78 | DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_strobe_r); | |
| 79 | DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_data_r); | |
| 80 | DECLARE_CUSTOM_INPUT_MEMBER(adpcm_irq_state_r); | |
| 78 | 81 | }; |
| 79 | 82 | |
| 80 | 83 |
| r14883 | r14884 | |
|---|---|---|
| 50 | 50 | DECLARE_WRITE8_MEMBER(mhavoc_out_1_w); |
| 51 | 51 | DECLARE_WRITE8_MEMBER(mhavocrv_speech_data_w); |
| 52 | 52 | DECLARE_WRITE8_MEMBER(mhavocrv_speech_strobe_w); |
| 53 | DECLARE_CUSTOM_INPUT_MEMBER(tms5220_r); | |
| 54 | DECLARE_CUSTOM_INPUT_MEMBER(mhavoc_bit67_r); | |
| 55 | DECLARE_CUSTOM_INPUT_MEMBER(gamma_rcvd_r); | |
| 56 | DECLARE_CUSTOM_INPUT_MEMBER(gamma_xmtd_r); | |
| 57 | DECLARE_CUSTOM_INPUT_MEMBER(alpha_rcvd_r); | |
| 58 | DECLARE_CUSTOM_INPUT_MEMBER(alpha_xmtd_r); | |
| 59 | DECLARE_CUSTOM_INPUT_MEMBER(clock_r); | |
| 53 | 60 | }; |
| 54 | 61 | |
| 55 | 62 | |
| r14883 | r14884 | |
| 63 | 70 | DRIVER_INIT( mhavocrv ); |
| 64 | 71 | |
| 65 | 72 | |
| 66 | ||
| 67 | ||
| 68 | CUSTOM_INPUT( tms5220_r ); | |
| 69 | CUSTOM_INPUT( gamma_rcvd_r ); | |
| 70 | CUSTOM_INPUT( gamma_xmtd_r ); | |
| 71 | CUSTOM_INPUT( alpha_rcvd_r ); | |
| 72 | CUSTOM_INPUT( alpha_xmtd_r ); | |
| 73 | CUSTOM_INPUT( mhavoc_bit67_r ); | |
| 74 | ||
| 75 | ||
| 76 |
| r14883 | r14884 | |
|---|---|---|
| 20 | 20 | DECLARE_WRITE8_MEMBER(bzone_coin_counter_w); |
| 21 | 21 | DECLARE_READ8_MEMBER(analog_data_r); |
| 22 | 22 | DECLARE_WRITE8_MEMBER(analog_select_w); |
| 23 | DECLARE_CUSTOM_INPUT_MEMBER(clock_r); | |
| 23 | 24 | }; |
| 24 | 25 | |
| 25 | 26 |
| r14883 | r14884 | |
|---|---|---|
| 38 | 38 | DECLARE_READ16_MEMBER(unk_r); |
| 39 | 39 | DECLARE_READ16_MEMBER(artmagic_blitter_r); |
| 40 | 40 | DECLARE_WRITE16_MEMBER(artmagic_blitter_w); |
| 41 | DECLARE_CUSTOM_INPUT_MEMBER(prot_r); | |
| 41 | 42 | }; |
| 42 | 43 | |
| 43 | 44 |
| r14883 | r14884 | |
|---|---|---|
| 61 | 61 | DECLARE_READ8_MEMBER(ccastles_bitmode_r); |
| 62 | 62 | DECLARE_WRITE8_MEMBER(ccastles_bitmode_w); |
| 63 | 63 | DECLARE_WRITE8_MEMBER(ccastles_bitmode_addr_w); |
| 64 | DECLARE_CUSTOM_INPUT_MEMBER(get_vblank); | |
| 64 | 65 | }; |
| 65 | 66 | |
| 66 | 67 |
| r14883 | r14884 | |
|---|---|---|
| 39 | 39 | DECLARE_READ32_MEMBER(policetr_video_r); |
| 40 | 40 | DECLARE_WRITE32_MEMBER(policetr_palette_offset_w); |
| 41 | 41 | DECLARE_WRITE32_MEMBER(policetr_palette_data_w); |
| 42 | DECLARE_CUSTOM_INPUT_MEMBER(bsmt_status_r); | |
| 42 | 43 | }; |
| 43 | 44 | |
| 44 | 45 |
| r14883 | r14884 | |
|---|---|---|
| 53 | 53 | DECLARE_WRITE32_MEMBER(sprite_dma_start_w); |
| 54 | 54 | DECLARE_WRITE32_MEMBER(video_dma_length_w); |
| 55 | 55 | DECLARE_WRITE32_MEMBER(video_dma_address_w); |
| 56 | DECLARE_CUSTOM_INPUT_MEMBER(ejsakura_keyboard_r); | |
| 57 | DECLARE_CUSTOM_INPUT_MEMBER(ejanhs_encode); | |
| 56 | 58 | }; |
| 57 | 59 | |
| 58 | 60 |
| r14883 | r14884 | |
|---|---|---|
| 50 | 50 | DECLARE_READ8_MEMBER(system1_videoram_r); |
| 51 | 51 | DECLARE_WRITE8_MEMBER(system1_videoram_w); |
| 52 | 52 | DECLARE_WRITE8_MEMBER(system1_paletteram_w); |
| 53 | DECLARE_CUSTOM_INPUT_MEMBER(dakkochn_mux_data_r); | |
| 54 | DECLARE_CUSTOM_INPUT_MEMBER(dakkochn_mux_status_r); | |
| 53 | 55 | }; |
| 54 | 56 | |
| 55 | 57 |
| r14883 | r14884 | |
|---|---|---|
| 75 | 75 | DECLARE_WRITE16_MEMBER(niyanpai_clutsel_0_w); |
| 76 | 76 | DECLARE_WRITE16_MEMBER(niyanpai_clutsel_1_w); |
| 77 | 77 | DECLARE_WRITE16_MEMBER(niyanpai_clutsel_2_w); |
| 78 | DECLARE_CUSTOM_INPUT_MEMBER(musobana_outcoin_flag_r); | |
| 78 | 79 | }; |
| 79 | 80 | |
| 80 | 81 |
| r14883 | r14884 | |
|---|---|---|
| 54 | 54 | DECLARE_WRITE8_MEMBER(nvram_enable_w); |
| 55 | 55 | DECLARE_WRITE8_MEMBER(jedi_vscroll_w); |
| 56 | 56 | DECLARE_WRITE8_MEMBER(jedi_hscroll_w); |
| 57 | DECLARE_CUSTOM_INPUT_MEMBER(jedi_audio_comm_stat_r); | |
| 57 | 58 | }; |
| 58 | 59 | |
| 59 | 60 | |
| r14883 | r14884 | |
| 64 | 65 | WRITE8_HANDLER( jedi_audio_reset_w ); |
| 65 | 66 | WRITE8_HANDLER( jedi_audio_latch_w ); |
| 66 | 67 | READ8_HANDLER( jedi_audio_ack_latch_r ); |
| 67 | CUSTOM_INPUT( jedi_audio_comm_stat_r ); | |
| 68 | 68 | |
| 69 | 69 | |
| 70 | 70 | /*----------- defined in video/jedi.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 94 | 94 | DECLARE_WRITE32_MEMBER(skns_tilemapA_w); |
| 95 | 95 | DECLARE_WRITE32_MEMBER(skns_tilemapB_w); |
| 96 | 96 | DECLARE_WRITE32_MEMBER(skns_v3_regs_w); |
| 97 | DECLARE_CUSTOM_INPUT_MEMBER(paddle_r); | |
| 97 | 98 | }; |
| 98 | 99 | |
| 99 | 100 |
| r14883 | r14884 | |
|---|---|---|
| 207 | 207 | DECLARE_READ8_MEMBER(htengoku_coin_r); |
| 208 | 208 | DECLARE_WRITE8_MEMBER(htengoku_rombank_w); |
| 209 | 209 | DECLARE_WRITE8_MEMBER(htengoku_blit_romregion_w); |
| 210 | DECLARE_READ8_MEMBER(unk_r); | |
| 211 | 210 | DECLARE_WRITE8_MEMBER(tenkai_ipsel_w); |
| 212 | 211 | DECLARE_WRITE8_MEMBER(tenkai_ip_w); |
| 213 | 212 | DECLARE_READ8_MEMBER(tenkai_ip_r); |
| r14883 | r14884 | |
| 266 | 265 | DECLARE_WRITE8_MEMBER(jantouki_blitter2_rev2_w); |
| 267 | 266 | DECLARE_WRITE8_MEMBER(hanamai_priority_w); |
| 268 | 267 | DECLARE_WRITE8_MEMBER(tenkai_priority_w); |
| 268 | DECLARE_CUSTOM_INPUT_MEMBER(ddenlovr_special_r); | |
| 269 | DECLARE_CUSTOM_INPUT_MEMBER(ddenlovj_blitter_r); | |
| 270 | DECLARE_CUSTOM_INPUT_MEMBER(nettoqc_special_r); | |
| 271 | DECLARE_CUSTOM_INPUT_MEMBER(mjflove_blitter_r); | |
| 272 | DECLARE_WRITE8_MEMBER(ddenlovr_bgcolor_w); | |
| 273 | DECLARE_WRITE8_MEMBER(ddenlovr_bgcolor2_w); | |
| 274 | DECLARE_WRITE16_MEMBER(ddenlovr16_bgcolor_w); | |
| 275 | DECLARE_WRITE8_MEMBER(ddenlovr_priority_w); | |
| 276 | DECLARE_WRITE8_MEMBER(ddenlovr_priority2_w); | |
| 277 | DECLARE_WRITE16_MEMBER(ddenlovr16_priority_w); | |
| 278 | DECLARE_WRITE8_MEMBER(ddenlovr_layer_enable_w); | |
| 279 | DECLARE_WRITE8_MEMBER(ddenlovr_layer_enable2_w); | |
| 280 | DECLARE_WRITE16_MEMBER(ddenlovr16_layer_enable_w); | |
| 281 | DECLARE_WRITE8_MEMBER(hanakanz_blitter_reg_w); | |
| 282 | DECLARE_WRITE8_MEMBER(hanakanz_blitter_data_w); | |
| 283 | DECLARE_WRITE8_MEMBER(rongrong_blitter_w); | |
| 284 | DECLARE_WRITE16_MEMBER(ddenlovr_blitter_w); | |
| 285 | DECLARE_WRITE16_MEMBER(ddenlovr_blitter_irq_ack_w); | |
| 286 | DECLARE_READ8_MEMBER(rongrong_gfxrom_r); | |
| 287 | DECLARE_READ16_MEMBER(ddenlovr_gfxrom_r); | |
| 288 | DECLARE_WRITE16_MEMBER(ddenlovr_coincounter_0_w); | |
| 289 | DECLARE_WRITE16_MEMBER(ddenlovr_coincounter_1_w); | |
| 290 | DECLARE_WRITE8_MEMBER(rongrong_palette_w); | |
| 291 | DECLARE_WRITE16_MEMBER(ddenlovr_palette_w); | |
| 292 | DECLARE_WRITE8_MEMBER(ddenlovr_palette_base_w); | |
| 293 | DECLARE_WRITE8_MEMBER(ddenlovr_palette_base2_w); | |
| 294 | DECLARE_WRITE8_MEMBER(ddenlovr_palette_mask_w); | |
| 295 | DECLARE_WRITE8_MEMBER(ddenlovr_palette_mask2_w); | |
| 296 | DECLARE_WRITE8_MEMBER(ddenlovr_transparency_pen_w); | |
| 297 | DECLARE_WRITE8_MEMBER(ddenlovr_transparency_pen2_w); | |
| 298 | DECLARE_WRITE8_MEMBER(ddenlovr_transparency_mask_w); | |
| 299 | DECLARE_WRITE8_MEMBER(ddenlovr_transparency_mask2_w); | |
| 300 | DECLARE_WRITE16_MEMBER(ddenlovr16_palette_base_w); | |
| 301 | DECLARE_WRITE16_MEMBER(ddenlovr16_palette_mask_w); | |
| 302 | DECLARE_WRITE16_MEMBER(ddenlovr16_transparency_pen_w); | |
| 303 | DECLARE_WRITE16_MEMBER(ddenlovr16_transparency_mask_w); | |
| 304 | DECLARE_READ8_MEMBER(unk_r); | |
| 305 | DECLARE_READ16_MEMBER(unk16_r); | |
| 306 | DECLARE_WRITE16_MEMBER(ddenlovr_select_16_w); | |
| 307 | DECLARE_WRITE8_MEMBER(ddenlovr_select2_w); | |
| 308 | DECLARE_WRITE16_MEMBER(ddenlovr_select2_16_w); | |
| 309 | DECLARE_READ8_MEMBER(rongrong_input2_r); | |
| 310 | DECLARE_READ16_MEMBER(quiz365_input2_r); | |
| 311 | DECLARE_WRITE8_MEMBER(rongrong_blitter_busy_w); | |
| 312 | DECLARE_READ8_MEMBER(rongrong_blitter_busy_r); | |
| 313 | DECLARE_WRITE16_MEMBER(quiz365_coincounter_w); | |
| 314 | DECLARE_READ16_MEMBER(quiz365_protection_r); | |
| 315 | DECLARE_WRITE16_MEMBER(quiz365_protection_w); | |
| 316 | DECLARE_READ16_MEMBER(ddenlovj_dsw_r); | |
| 317 | DECLARE_WRITE16_MEMBER(ddenlovj_coincounter_w); | |
| 318 | DECLARE_READ16_MEMBER(ddenlovrk_protection1_r); | |
| 319 | DECLARE_READ16_MEMBER(ddenlovrk_protection2_r); | |
| 320 | DECLARE_WRITE16_MEMBER(ddenlovrk_protection2_w); | |
| 321 | DECLARE_READ16_MEMBER(nettoqc_input_r); | |
| 322 | DECLARE_READ16_MEMBER(nettoqc_protection_r); | |
| 323 | DECLARE_WRITE16_MEMBER(nettoqc_coincounter_w); | |
| 324 | DECLARE_READ8_MEMBER(rongrong_input_r); | |
| 325 | DECLARE_WRITE8_MEMBER(rongrong_select_w); | |
| 326 | DECLARE_READ8_MEMBER(magic_r); | |
| 327 | DECLARE_WRITE8_MEMBER(mmpanic_rombank_w); | |
| 328 | DECLARE_WRITE8_MEMBER(mmpanic_soundlatch_w); | |
| 329 | DECLARE_WRITE8_MEMBER(mmpanic_blitter_w); | |
| 330 | DECLARE_WRITE8_MEMBER(mmpanic_blitter2_w); | |
| 331 | DECLARE_WRITE8_MEMBER(mmpanic_leds_w); | |
| 332 | DECLARE_WRITE8_MEMBER(mmpanic_leds2_w); | |
| 333 | DECLARE_WRITE8_MEMBER(mmpanic_lockout_w); | |
| 334 | DECLARE_READ8_MEMBER(mmpanic_link_r); | |
| 335 | DECLARE_READ8_MEMBER(funkyfig_busy_r); | |
| 336 | DECLARE_WRITE8_MEMBER(funkyfig_blitter_w); | |
| 337 | DECLARE_WRITE8_MEMBER(funkyfig_rombank_w); | |
| 338 | DECLARE_READ8_MEMBER(funkyfig_dsw_r); | |
| 339 | DECLARE_READ8_MEMBER(funkyfig_coin_r); | |
| 340 | DECLARE_READ8_MEMBER(funkyfig_key_r); | |
| 341 | DECLARE_WRITE8_MEMBER(funkyfig_lockout_w); | |
| 342 | DECLARE_WRITE8_MEMBER(hanakanz_rombank_w); | |
| 343 | DECLARE_WRITE8_MEMBER(hanakanz_keyb_w); | |
| 344 | DECLARE_WRITE8_MEMBER(hanakanz_dsw_w); | |
| 345 | DECLARE_READ8_MEMBER(hanakanz_keyb_r); | |
| 346 | DECLARE_READ8_MEMBER(hanakanz_dsw_r); | |
| 347 | DECLARE_READ8_MEMBER(hanakanz_busy_r); | |
| 348 | DECLARE_READ8_MEMBER(hanakanz_gfxrom_r); | |
| 349 | DECLARE_WRITE8_MEMBER(hanakanz_coincounter_w); | |
| 350 | DECLARE_WRITE8_MEMBER(hanakanz_palette_w); | |
| 351 | DECLARE_READ8_MEMBER(hanakanz_rand_r); | |
| 352 | DECLARE_WRITE8_MEMBER(mjreach1_protection_w); | |
| 353 | DECLARE_READ8_MEMBER(mjreach1_protection_r); | |
| 354 | DECLARE_READ8_MEMBER(mjchuuka_keyb_r); | |
| 355 | DECLARE_WRITE8_MEMBER(mjchuuka_blitter_w); | |
| 356 | DECLARE_READ8_MEMBER(mjchuuka_gfxrom_0_r); | |
| 357 | DECLARE_READ8_MEMBER(mjchuuka_gfxrom_1_r); | |
| 358 | DECLARE_WRITE8_MEMBER(mjchuuka_palette_w); | |
| 359 | DECLARE_WRITE8_MEMBER(mjchuuka_coincounter_w); | |
| 360 | DECLARE_WRITE8_MEMBER(mjmyster_rambank_w); | |
| 361 | DECLARE_WRITE8_MEMBER(mjmyster_select2_w); | |
| 362 | DECLARE_READ8_MEMBER(mjmyster_coins_r); | |
| 363 | DECLARE_READ8_MEMBER(mjmyster_keyb_r); | |
| 364 | DECLARE_READ8_MEMBER(mjmyster_dsw_r); | |
| 365 | DECLARE_WRITE8_MEMBER(mjmyster_coincounter_w); | |
| 366 | DECLARE_WRITE8_MEMBER(mjmyster_blitter_w); | |
| 367 | DECLARE_WRITE8_MEMBER(hginga_rombank_w); | |
| 368 | DECLARE_READ8_MEMBER(hginga_protection_r); | |
| 369 | DECLARE_WRITE8_MEMBER(hginga_input_w); | |
| 370 | DECLARE_READ8_MEMBER(hginga_coins_r); | |
| 371 | DECLARE_WRITE8_MEMBER(hginga_80_w); | |
| 372 | DECLARE_WRITE8_MEMBER(hginga_coins_w); | |
| 373 | DECLARE_READ8_MEMBER(hginga_input_r); | |
| 374 | DECLARE_WRITE8_MEMBER(hginga_blitter_w); | |
| 375 | DECLARE_WRITE8_MEMBER(hgokou_dsw_sel_w); | |
| 376 | DECLARE_READ8_MEMBER(hgokou_input_r); | |
| 377 | DECLARE_WRITE8_MEMBER(hgokou_input_w); | |
| 378 | DECLARE_READ8_MEMBER(hgokou_protection_r); | |
| 379 | DECLARE_READ8_MEMBER(hgokbang_input_r); | |
| 380 | DECLARE_WRITE8_MEMBER(hparadis_select_w); | |
| 381 | DECLARE_READ8_MEMBER(hparadis_input_r); | |
| 382 | DECLARE_READ8_MEMBER(hparadis_dsw_r); | |
| 383 | DECLARE_WRITE8_MEMBER(hparadis_coin_w); | |
| 384 | DECLARE_READ8_MEMBER(mjmywrld_coins_r); | |
| 385 | DECLARE_READ16_MEMBER(akamaru_protection1_r); | |
| 386 | DECLARE_WRITE16_MEMBER(akamaru_protection1_w); | |
| 387 | DECLARE_READ16_MEMBER(akamaru_protection2_r); | |
| 388 | DECLARE_READ16_MEMBER(akamaru_dsw_r); | |
| 389 | DECLARE_READ16_MEMBER(akamaru_blitter_r); | |
| 390 | DECLARE_READ16_MEMBER(akamaru_e0010d_r); | |
| 391 | DECLARE_WRITE8_MEMBER(mjflove_rombank_w); | |
| 392 | DECLARE_READ8_MEMBER(mjflove_protection_r); | |
| 393 | DECLARE_READ8_MEMBER(mjflove_keyb_r); | |
| 394 | DECLARE_WRITE8_MEMBER(mjflove_blitter_w); | |
| 395 | DECLARE_WRITE8_MEMBER(mjflove_coincounter_w); | |
| 396 | DECLARE_WRITE8_MEMBER(jongtei_dsw_keyb_w); | |
| 397 | DECLARE_READ8_MEMBER(jongtei_busy_r); | |
| 398 | DECLARE_READ8_MEMBER(sryudens_keyb_r); | |
| 399 | DECLARE_WRITE8_MEMBER(sryudens_coincounter_w); | |
| 400 | DECLARE_WRITE8_MEMBER(sryudens_rambank_w); | |
| 401 | DECLARE_READ8_MEMBER(daimyojn_keyb1_r); | |
| 402 | DECLARE_READ8_MEMBER(daimyojn_keyb2_r); | |
| 403 | DECLARE_WRITE8_MEMBER(daimyojn_protection_w); | |
| 404 | DECLARE_READ8_MEMBER(daimyojn_protection_r); | |
| 405 | DECLARE_READ8_MEMBER(momotaro_protection_r); | |
| 406 | DECLARE_WRITE8_MEMBER(daimyojn_palette_sel_w); | |
| 407 | DECLARE_WRITE8_MEMBER(daimyojn_blitter_data_palette_w); | |
| 408 | DECLARE_READ8_MEMBER(daimyojn_year_hack_r); | |
| 269 | 409 | }; |
| 270 | 410 | |
| 271 | 411 | //----------- defined in drivers/dynax.c ----------- |
| r14883 | r14884 | |
| 276 | 416 | void neruton_update_irq(running_machine &machine); |
| 277 | 417 | |
| 278 | 418 | //----------- defined in video/dynax.c ----------- |
| 279 | ||
| 280 | ||
| 281 | ||
| 282 | ||
| 283 | ||
| 284 | ||
| 285 | ||
| 286 | ||
| 287 | 419 | VIDEO_START( hanamai ); |
| 288 | 420 | VIDEO_START( hnoridur ); |
| 289 | 421 | VIDEO_START( mcnpshnt ); |
| r14883 | r14884 | |
| 307 | 439 | |
| 308 | 440 | //----------- defined in drivers/ddenlovr.c ----------- |
| 309 | 441 | |
| 310 | WRITE8_HANDLER( ddenlovr_bgcolor_w ); | |
| 311 | WRITE8_HANDLER( ddenlovr_priority_w ); | |
| 312 | WRITE8_HANDLER( ddenlovr_layer_enable_w ); | |
| 313 | WRITE8_HANDLER( ddenlovr_palette_base_w ); | |
| 314 | WRITE8_HANDLER( ddenlovr_palette_mask_w ); | |
| 315 | WRITE8_HANDLER( ddenlovr_transparency_pen_w ); | |
| 316 | WRITE8_HANDLER( ddenlovr_transparency_mask_w ); | |
| 317 | ||
| 318 | 442 | VIDEO_START(ddenlovr); |
| 319 | 443 | SCREEN_UPDATE_IND16(ddenlovr); |
| r14883 | r14884 | |
|---|---|---|
| 158 | 158 | DECLARE_WRITE8_MEMBER(balsente_palette_select_w); |
| 159 | 159 | DECLARE_WRITE8_MEMBER(balsente_paletteram_w); |
| 160 | 160 | DECLARE_WRITE8_MEMBER(shrike_sprite_select_w); |
| 161 | DECLARE_CUSTOM_INPUT_MEMBER(nstocker_bits_r); | |
| 161 | 162 | }; |
| 162 | 163 | |
| 163 | 164 | |
| r14883 | r14884 | |
| 184 | 185 | |
| 185 | 186 | |
| 186 | 187 | |
| 187 | CUSTOM_INPUT( nstocker_bits_r ); | |
| 188 | 188 | |
| 189 | 189 | |
| 190 | 190 | |
| 191 | ||
| 192 | 191 | /*----------- defined in video/balsente.c -----------*/ |
| 193 | 192 | |
| 194 | 193 | VIDEO_START( balsente ); |
| r14883 | r14884 | |
|---|---|---|
| 123 | 123 | DECLARE_WRITE32_MEMBER(itech020_video_w); |
| 124 | 124 | DECLARE_WRITE32_MEMBER(drivedge_zbuf_control_w); |
| 125 | 125 | DECLARE_READ32_MEMBER(itech020_video_r); |
| 126 | DECLARE_CUSTOM_INPUT_MEMBER(special_port_r); | |
| 126 | 127 | }; |
| 127 | 128 | |
| 128 | 129 |
| r14883 | r14884 | |
|---|---|---|
| 37 | 37 | DECLARE_WRITE32_MEMBER(cbombers_cpua_ctrl_w); |
| 38 | 38 | DECLARE_READ32_MEMBER(cbombers_adc_r); |
| 39 | 39 | DECLARE_WRITE32_MEMBER(cbombers_adc_w); |
| 40 | DECLARE_CUSTOM_INPUT_MEMBER(frame_counter_r); | |
| 40 | 41 | }; |
| 41 | 42 | |
| 42 | 43 |
| r14883 | r14884 | |
|---|---|---|
| 426 | 426 | UINT16 m_aga_sprdatb[8][4]; |
| 427 | 427 | int m_aga_sprite_fetched_words; |
| 428 | 428 | int m_aga_sprite_dma_used_words[8]; |
| 429 | ||
| 430 | DECLARE_CUSTOM_INPUT_MEMBER( amiga_joystick_convert ); | |
| 429 | 431 | }; |
| 430 | 432 | |
| 431 | 433 | |
| r14883 | r14884 | |
| 439 | 441 | |
| 440 | 442 | MACHINE_RESET( amiga ); |
| 441 | 443 | |
| 442 | CUSTOM_INPUT( amiga_joystick_convert ); | |
| 443 | ||
| 444 | 444 | READ16_HANDLER( amiga_cia_r ); |
| 445 | 445 | WRITE16_HANDLER( amiga_cia_w ); |
| 446 | 446 |
| r14883 | r14884 | |
|---|---|---|
| 35 | 35 | DECLARE_READ8_MEMBER(PIC16C5X_T0_clk_r); |
| 36 | 36 | DECLARE_READ32_MEMBER(zeus_r); |
| 37 | 37 | DECLARE_WRITE32_MEMBER(zeus_w); |
| 38 | DECLARE_CUSTOM_INPUT_MEMBER(custom_49way_r); | |
| 39 | DECLARE_CUSTOM_INPUT_MEMBER(keypad_r); | |
| 38 | 40 | }; |
| 39 | 41 | |
| 40 | 42 |
| r14883 | r14884 | |
|---|---|---|
| 48 | 48 | DECLARE_WRITE8_MEMBER(zaxxon_videoram_w); |
| 49 | 49 | DECLARE_WRITE8_MEMBER(congo_colorram_w); |
| 50 | 50 | DECLARE_WRITE8_MEMBER(congo_sprite_custom_w); |
| 51 | DECLARE_CUSTOM_INPUT_MEMBER(razmataz_dial_r); | |
| 52 | DECLARE_CUSTOM_INPUT_MEMBER(zaxxon_coin_r); | |
| 51 | 53 | }; |
| 52 | 54 | |
| 53 | 55 |
| r14883 | r14884 | |
|---|---|---|
| 48 | 48 | DECLARE_READ8_MEMBER(abattle_coin_prot_r); |
| 49 | 49 | DECLARE_READ8_MEMBER(afire_coin_prot_r); |
| 50 | 50 | DECLARE_READ8_MEMBER(tomahawk_protection_r); |
| 51 | DECLARE_CUSTOM_INPUT_MEMBER(astrof_p1_controls_r); | |
| 52 | DECLARE_CUSTOM_INPUT_MEMBER(astrof_p2_controls_r); | |
| 53 | DECLARE_CUSTOM_INPUT_MEMBER(tomahawk_controls_r); | |
| 51 | 54 | }; |
| 52 | 55 | |
| 53 | 56 | /*----------- defined in audio/astrof.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 35 | 35 | DECLARE_WRITE8_MEMBER(armwrest_fg_videoram_w); |
| 36 | 36 | DECLARE_WRITE8_MEMBER(punchout_spr1_videoram_w); |
| 37 | 37 | DECLARE_WRITE8_MEMBER(punchout_spr2_videoram_w); |
| 38 | DECLARE_CUSTOM_INPUT_MEMBER(punchout_vlm5030_busy_r); | |
| 38 | 39 | }; |
| 39 | 40 | |
| 40 | 41 |
| r14883 | r14884 | |
|---|---|---|
| 24 | 24 | DECLARE_WRITE8_MEMBER(sprint4_lamp_w); |
| 25 | 25 | DECLARE_WRITE8_MEMBER(sprint4_lockout_w); |
| 26 | 26 | DECLARE_WRITE8_MEMBER(sprint4_video_ram_w); |
| 27 | DECLARE_CUSTOM_INPUT_MEMBER(get_lever); | |
| 28 | DECLARE_CUSTOM_INPUT_MEMBER(get_wheel); | |
| 29 | DECLARE_CUSTOM_INPUT_MEMBER(get_collision); | |
| 27 | 30 | }; |
| 28 | 31 | |
| 29 | 32 |
| r14883 | r14884 | |
|---|---|---|
| 65 | 65 | DECLARE_WRITE8_MEMBER(to_main_w); |
| 66 | 66 | DECLARE_WRITE32_MEMBER(ms32_brightness_w); |
| 67 | 67 | DECLARE_WRITE32_MEMBER(ms32_gfxctrl_w); |
| 68 | DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r); | |
| 68 | 69 | }; |
| 69 | 70 | |
| 70 | 71 |
| r14883 | r14884 | |
|---|---|---|
| 18 | 18 | DECLARE_WRITE16_MEMBER(wwfsstar_irqack_w); |
| 19 | 19 | DECLARE_WRITE16_MEMBER(wwfsstar_fg0_videoram_w); |
| 20 | 20 | DECLARE_WRITE16_MEMBER(wwfsstar_bg0_videoram_w); |
| 21 | DECLARE_CUSTOM_INPUT_MEMBER(wwfsstar_vblank_r); | |
| 21 | 22 | }; |
| 22 | 23 | |
| 23 | 24 |
| r14883 | r14884 | |
|---|---|---|
| 58 | 58 | DECLARE_WRITE16_MEMBER(polepos_alpha16_w); |
| 59 | 59 | DECLARE_READ8_MEMBER(polepos_alpha_r); |
| 60 | 60 | DECLARE_WRITE8_MEMBER(polepos_alpha_w); |
| 61 | DECLARE_CUSTOM_INPUT_MEMBER(high_port_r); | |
| 62 | DECLARE_CUSTOM_INPUT_MEMBER(low_port_r); | |
| 63 | DECLARE_CUSTOM_INPUT_MEMBER(auto_start_r); | |
| 61 | 64 | }; |
| 62 | 65 | |
| 63 | 66 |
| r14883 | r14884 | |
|---|---|---|
| 89 | 89 | DECLARE_READ8_MEMBER(bowler_shift_result_r); |
| 90 | 90 | DECLARE_WRITE8_MEMBER(bowler_lights_1_w); |
| 91 | 91 | DECLARE_WRITE8_MEMBER(bowler_lights_2_w); |
| 92 | DECLARE_CUSTOM_INPUT_MEMBER(seawolf_erase_input_r); | |
| 93 | DECLARE_CUSTOM_INPUT_MEMBER(tornbase_hit_left_input_r); | |
| 94 | DECLARE_CUSTOM_INPUT_MEMBER(tornbase_hit_right_input_r); | |
| 95 | DECLARE_CUSTOM_INPUT_MEMBER(tornbase_pitch_left_input_r); | |
| 96 | DECLARE_CUSTOM_INPUT_MEMBER(tornbase_pitch_right_input_r); | |
| 97 | DECLARE_CUSTOM_INPUT_MEMBER(tornbase_score_input_r); | |
| 98 | DECLARE_CUSTOM_INPUT_MEMBER(desertgu_gun_input_r); | |
| 99 | DECLARE_CUSTOM_INPUT_MEMBER(desertgu_dip_sw_0_1_r); | |
| 100 | DECLARE_CUSTOM_INPUT_MEMBER(dplay_pitch_left_input_r); | |
| 101 | DECLARE_CUSTOM_INPUT_MEMBER(dplay_pitch_right_input_r); | |
| 102 | DECLARE_CUSTOM_INPUT_MEMBER(clowns_controller_r); | |
| 103 | DECLARE_CUSTOM_INPUT_MEMBER(invaders_coin_input_r); | |
| 104 | DECLARE_CUSTOM_INPUT_MEMBER(invaders_sw6_sw7_r); | |
| 105 | DECLARE_CUSTOM_INPUT_MEMBER(invaders_sw5_r); | |
| 106 | DECLARE_CUSTOM_INPUT_MEMBER(blueshrk_coin_input_r); | |
| 107 | DECLARE_CUSTOM_INPUT_MEMBER(invaders_in0_control_r); | |
| 108 | DECLARE_CUSTOM_INPUT_MEMBER(invaders_in1_control_r); | |
| 109 | DECLARE_CUSTOM_INPUT_MEMBER(invaders_in2_control_r); | |
| 92 | 110 | }; |
| 93 | 111 | |
| 94 | 112 | |
| r14883 | r14884 | |
| 136 | 154 | |
| 137 | 155 | UINT8 tornbase_get_cabinet_type(running_machine &machine); |
| 138 | 156 | |
| 139 | CUSTOM_INPUT( invaders_in1_control_r ); | |
| 140 | CUSTOM_INPUT( invaders_in2_control_r ); | |
| 141 | ||
| 142 | 157 | int invaders_is_cabinet_cocktail(running_machine &machine); |
| 143 | 158 | |
| 144 | 159 |
| r14883 | r14884 | |
|---|---|---|
| 8 | 8 | { } |
| 9 | 9 | |
| 10 | 10 | required_device<cpu_device> m_maincpu; |
| 11 | required_shared_ptr<UINT | |
| 11 | required_shared_ptr<UINT16> m_nvram; | |
| 12 | 12 | UINT8 *m_sndram; |
| 13 | 13 | UINT16 *m_workram; |
| 14 | 14 | UINT16 m_control; |
| r14883 | r14884 | |
| 24 | 24 | DECLARE_READ16_MEMBER(sndram_r); |
| 25 | 25 | DECLARE_WRITE16_MEMBER(sndram_w); |
| 26 | 26 | DECLARE_READ16_MEMBER(gp2_ide_std_r); |
| 27 | DECLARE_CUSTOM_INPUT_MEMBER(inputs_r); | |
| 28 | DECLARE_CUSTOM_INPUT_MEMBER(battery_sensor_r); | |
| 27 | 29 | }; |
| 28 | 30 | |
| 29 | 31 | /*----------- defined in video/qdrmfgp.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 21 | 21 | DECLARE_WRITE8_MEMBER(nova2001_scroll_y_w); |
| 22 | 22 | DECLARE_WRITE8_MEMBER(nova2001_flipscreen_w); |
| 23 | 23 | DECLARE_WRITE8_MEMBER(pkunwar_flipscreen_w); |
| 24 | DECLARE_CUSTOM_INPUT_MEMBER(ninjakun_io_A002_ctrl_r); | |
| 24 | 25 | }; |
| 25 | 26 | |
| 26 | 27 |
| r14883 | r14884 | |
|---|---|---|
| 43 | 43 | DECLARE_WRITE8_MEMBER(stactics_speed_latch_w); |
| 44 | 44 | DECLARE_WRITE8_MEMBER(stactics_shot_trigger_w); |
| 45 | 45 | DECLARE_WRITE8_MEMBER(stactics_shot_flag_clear_w); |
| 46 | DECLARE_CUSTOM_INPUT_MEMBER(stactics_get_frame_count_d3); | |
| 47 | DECLARE_CUSTOM_INPUT_MEMBER(stactics_get_shot_standby); | |
| 48 | DECLARE_CUSTOM_INPUT_MEMBER(stactics_get_not_shot_arrive); | |
| 49 | DECLARE_CUSTOM_INPUT_MEMBER(get_motor_not_ready); | |
| 50 | DECLARE_CUSTOM_INPUT_MEMBER(get_rng); | |
| 46 | 51 | }; |
| 47 | 52 | |
| 48 | 53 | |
| r14883 | r14884 | |
| 50 | 55 | |
| 51 | 56 | MACHINE_CONFIG_EXTERN( stactics_video ); |
| 52 | 57 | |
| 53 | CUSTOM_INPUT( stactics_get_frame_count_d3 ); | |
| 54 | CUSTOM_INPUT( stactics_get_shot_standby ); | |
| 55 | CUSTOM_INPUT( stactics_get_not_shot_arrive ); | |
| 56 | 58 | |
| 59 |
| r14883 | r14884 | |
|---|---|---|
| 97 | 97 | DECLARE_WRITE32_MEMBER(gaelco3d_render_w); |
| 98 | 98 | DECLARE_WRITE16_MEMBER(gaelco3d_paletteram_w); |
| 99 | 99 | DECLARE_WRITE32_MEMBER(gaelco3d_paletteram_020_w); |
| 100 | DECLARE_CUSTOM_INPUT_MEMBER(analog_bit_r); | |
| 100 | 101 | }; |
| 101 | 102 | |
| 102 | 103 |
| r14883 | r14884 | |
|---|---|---|
| 24 | 24 | DECLARE_READ16_MEMBER(lethalj_gun_r); |
| 25 | 25 | DECLARE_WRITE16_MEMBER(lethalj_blitter_w); |
| 26 | 26 | void do_blit(); |
| 27 | DECLARE_CUSTOM_INPUT_MEMBER(cclownz_paddle); | |
| 27 | 28 | }; |
| 28 | 29 | |
| 29 | 30 |
| r14883 | r14884 | |
|---|---|---|
| 71 | 71 | DECLARE_READ8_MEMBER(itech8_tms34061_r); |
| 72 | 72 | DECLARE_WRITE8_MEMBER(grmatch_palette_w); |
| 73 | 73 | DECLARE_WRITE8_MEMBER(grmatch_xscroll_w); |
| 74 | DECLARE_CUSTOM_INPUT_MEMBER(special_r); | |
| 75 | DECLARE_CUSTOM_INPUT_MEMBER(gtg_mux); | |
| 74 | 76 | }; |
| 75 | 77 | |
| 76 | 78 |
| r14883 | r14884 | |
|---|---|---|
| 90 | 90 | DECLARE_WRITE8_MEMBER(scramble_background_green_w); |
| 91 | 91 | DECLARE_WRITE8_MEMBER(scramble_background_blue_w); |
| 92 | 92 | DECLARE_WRITE8_MEMBER(galaxian_gfxbank_w); |
| 93 | DECLARE_CUSTOM_INPUT_MEMBER(scramble_protection_alt_r); | |
| 94 | DECLARE_CUSTOM_INPUT_MEMBER(gmgalax_port_r); | |
| 95 | DECLARE_CUSTOM_INPUT_MEMBER(azurian_port_r); | |
| 96 | DECLARE_CUSTOM_INPUT_MEMBER(kingball_muxbit_r); | |
| 97 | DECLARE_CUSTOM_INPUT_MEMBER(kingball_noise_r); | |
| 98 | DECLARE_CUSTOM_INPUT_MEMBER(moonwar_dial_r); | |
| 93 | 99 | }; |
| 94 | 100 | |
| 95 | 101 |
| r14883 | r14884 | |
|---|---|---|
| 129 | 129 | DECLARE_WRITE8_MEMBER(gwara_sp_scroll_msb_w); |
| 130 | 130 | DECLARE_WRITE8_MEMBER(tdfever_sp_scroll_msb_w); |
| 131 | 131 | DECLARE_WRITE8_MEMBER(tdfever_spriteram_w); |
| 132 | DECLARE_CUSTOM_INPUT_MEMBER(marvins_sound_busy); | |
| 133 | DECLARE_CUSTOM_INPUT_MEMBER(snk_sound_busy); | |
| 134 | DECLARE_CUSTOM_INPUT_MEMBER(gwar_rotary); | |
| 135 | DECLARE_CUSTOM_INPUT_MEMBER(gwarb_rotary); | |
| 136 | DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_x); | |
| 137 | DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_y); | |
| 138 | DECLARE_CUSTOM_INPUT_MEMBER(snk_bonus_r); | |
| 132 | 139 | }; |
| 133 | 140 | |
| 134 | 141 |
| r14883 | r14884 | |
|---|---|---|
| 97 | 97 | DECLARE_READ8_MEMBER(victnine_gfxctrl_r); |
| 98 | 98 | DECLARE_WRITE8_MEMBER(victnine_gfxctrl_w); |
| 99 | 99 | DECLARE_WRITE8_MEMBER(flstory_scrlram_w); |
| 100 | DECLARE_CUSTOM_INPUT_MEMBER(victnine_mcu_status_bit01_r); | |
| 100 | 101 | }; |
| 101 | 102 | |
| 102 | 103 |
| r14883 | r14884 | |
|---|---|---|
| 69 | 69 | bitmap_rgb32 m_sys24_bitmap; |
| 70 | 70 | |
| 71 | 71 | required_device<cpu_device> m_maincpu; |
| 72 | DECLARE_CUSTOM_INPUT_MEMBER(_1c00000_r); | |
| 73 | DECLARE_CUSTOM_INPUT_MEMBER(_1c0001c_r); | |
| 74 | DECLARE_CUSTOM_INPUT_MEMBER(rchase2_devices_r); | |
| 72 | 75 | }; |
| 73 | 76 | |
| 74 | 77 |
| r14883 | r14884 | |
|---|---|---|
| 11 | 11 | UINT8 m_cavelon_bank; |
| 12 | 12 | UINT8 m_security_2B_counter; |
| 13 | 13 | UINT8 m_xb; |
| 14 | DECLARE_CUSTOM_INPUT_MEMBER(darkplnt_custom_r); | |
| 15 | DECLARE_CUSTOM_INPUT_MEMBER(ckongs_coinage_r); | |
| 14 | 16 | }; |
| 15 | 17 | |
| 16 | 18 | |
| r14883 | r14884 | |
| 54 | 56 | READ8_HANDLER( hunchbks_mirror_r ); |
| 55 | 57 | WRITE8_HANDLER( hunchbks_mirror_w ); |
| 56 | 58 | |
| 57 | CUSTOM_INPUT( darkplnt_custom_r ); | |
| 58 | 59 | |
| 59 | ||
| 60 | 60 | /*----------- defined in audio/scramble.c -----------*/ |
| 61 | 61 | |
| 62 | 62 | void scramble_sh_init(running_machine &machine); |
| r14883 | r14884 | |
|---|---|---|
| 102 | 102 | DECLARE_READ32_MEMBER(taitojc_char_r); |
| 103 | 103 | DECLARE_WRITE32_MEMBER(taitojc_tile_w); |
| 104 | 104 | DECLARE_WRITE32_MEMBER(taitojc_char_w); |
| 105 | DECLARE_CUSTOM_INPUT_MEMBER(mascon_state_r); | |
| 105 | 106 | }; |
| 106 | 107 | |
| 107 | 108 |
| r14883 | r14884 | |
|---|---|---|
| 31 | 31 | DECLARE_WRITE8_MEMBER(suprridr_bgscrolly_w); |
| 32 | 32 | DECLARE_WRITE8_MEMBER(suprridr_bgram_w); |
| 33 | 33 | DECLARE_WRITE8_MEMBER(suprridr_fgram_w); |
| 34 | DECLARE_CUSTOM_INPUT_MEMBER(suprridr_control_r); | |
| 34 | 35 | }; |
| 35 | 36 | |
| 36 | 37 |
| r14883 | r14884 | |
|---|---|---|
| 71 | 71 | DECLARE_WRITE8_MEMBER(gunbird_sound_bankswitch_w); |
| 72 | 72 | DECLARE_WRITE32_MEMBER(psikyo_vram_0_w); |
| 73 | 73 | DECLARE_WRITE32_MEMBER(psikyo_vram_1_w); |
| 74 | DECLARE_CUSTOM_INPUT_MEMBER(z80_nmi_r); | |
| 75 | DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r); | |
| 74 | 76 | }; |
| 75 | 77 | |
| 76 | 78 |
| r14883 | r14884 | |
|---|---|---|
| 27 | 27 | DECLARE_WRITE8_MEMBER(battlex_scroll_starfield_w); |
| 28 | 28 | DECLARE_WRITE8_MEMBER(battlex_videoram_w); |
| 29 | 29 | DECLARE_WRITE8_MEMBER(battlex_flipscreen_w); |
| 30 | DECLARE_CUSTOM_INPUT_MEMBER(battlex_in0_b4_r); | |
| 30 | 31 | }; |
| 31 | 32 | |
| 32 | 33 |
| r14883 | r14884 | |
|---|---|---|
| 96 | 96 | DECLARE_WRITE16_MEMBER(batrider_textdata_dma_w); |
| 97 | 97 | DECLARE_WRITE16_MEMBER(batrider_unknown_dma_w); |
| 98 | 98 | DECLARE_WRITE16_MEMBER(batrider_objectbank_w); |
| 99 | DECLARE_CUSTOM_INPUT_MEMBER(c2map_r); | |
| 99 | 100 | }; |
| 100 | 101 | |
| 101 | 102 | /*----------- defined in video/toaplan2.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 27 | 27 | DECLARE_WRITE8_MEMBER(port_sound_w); |
| 28 | 28 | DECLARE_WRITE8_MEMBER(crbaloon_videoram_w); |
| 29 | 29 | DECLARE_WRITE8_MEMBER(crbaloon_colorram_w); |
| 30 | DECLARE_CUSTOM_INPUT_MEMBER(pc3092_r); | |
| 30 | 31 | }; |
| 31 | 32 | |
| 32 | 33 |
| r14883 | r14884 | |
|---|---|---|
| 30 | 30 | DECLARE_WRITE8_MEMBER(threeds_output_w); |
| 31 | 31 | DECLARE_READ8_MEMBER(threeds_rom_readback_r); |
| 32 | 32 | DECLARE_WRITE8_MEMBER(pastelg_romsel_w); |
| 33 | DECLARE_CUSTOM_INPUT_MEMBER(nb1413m3_hackbusyflag_r); | |
| 33 | 34 | }; |
| 34 | 35 | |
| 35 | 36 |
| r14883 | r14884 | |
|---|---|---|
| 41 | 41 | DECLARE_WRITE32_MEMBER(galastrm_input_w); |
| 42 | 42 | DECLARE_READ32_MEMBER(galastrm_adstick_ctrl_r); |
| 43 | 43 | DECLARE_WRITE32_MEMBER(galastrm_adstick_ctrl_w); |
| 44 | DECLARE_CUSTOM_INPUT_MEMBER(frame_counter_r); | |
| 45 | DECLARE_CUSTOM_INPUT_MEMBER(coin_word_r); | |
| 44 | 46 | }; |
| 45 | 47 | |
| 46 | 48 |
| r14883 | r14884 | |
|---|---|---|
| 73 | 73 | DECLARE_WRITE16_MEMBER(rocknms_sub_vram_bg_w); |
| 74 | 74 | DECLARE_WRITE16_MEMBER(rocknms_sub_vram_fg_w); |
| 75 | 75 | DECLARE_WRITE16_MEMBER(rocknms_sub_vram_rot_w); |
| 76 | DECLARE_CUSTOM_INPUT_MEMBER(rocknms_main2sub_status_r); | |
| 76 | 77 | }; |
| 77 | 78 | |
| 78 | 79 | /*----------- defined in video/tetrisp2.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 127 | 127 | DECLARE_WRITE16_MEMBER(namcos22_dspram16_bank_w); |
| 128 | 128 | DECLARE_READ16_MEMBER(namcos22_dspram16_r); |
| 129 | 129 | DECLARE_WRITE16_MEMBER(namcos22_dspram16_w); |
| 130 | DECLARE_CUSTOM_INPUT_MEMBER(alpine_motor_read); | |
| 130 | 131 | }; |
| 131 | 132 | |
| 132 | 133 |
| r14883 | r14884 | |
|---|---|---|
| 64 | 64 | DECLARE_READ8_MEMBER(invinco_io_r); |
| 65 | 65 | DECLARE_WRITE8_MEMBER(invinco_io_w); |
| 66 | 66 | DECLARE_WRITE8_MEMBER(vicdual_palette_bank_w); |
| 67 | DECLARE_CUSTOM_INPUT_MEMBER(vicdual_read_coin_status); | |
| 68 | DECLARE_CUSTOM_INPUT_MEMBER(vicdual_get_64v); | |
| 69 | DECLARE_CUSTOM_INPUT_MEMBER(vicdual_get_vblank_comp); | |
| 70 | DECLARE_CUSTOM_INPUT_MEMBER(vicdual_get_composite_blank_comp); | |
| 71 | DECLARE_CUSTOM_INPUT_MEMBER(vicdual_get_timer_value); | |
| 72 | DECLARE_CUSTOM_INPUT_MEMBER(brdrline_lives); | |
| 73 | DECLARE_CUSTOM_INPUT_MEMBER(samurai_protection_r); | |
| 67 | 74 | }; |
| 68 | 75 | |
| 69 | 76 |
| r14883 | r14884 | |
|---|---|---|
| 123 | 123 | DECLARE_READ8_MEMBER(rockclim_videoram_r); |
| 124 | 124 | DECLARE_WRITE8_MEMBER(dambustr_bg_split_line_w); |
| 125 | 125 | DECLARE_WRITE8_MEMBER(dambustr_bg_color_w); |
| 126 | DECLARE_CUSTOM_INPUT_MEMBER(_4in1_fake_port_r); | |
| 127 | DECLARE_CUSTOM_INPUT_MEMBER(vpool_lives_r); | |
| 128 | DECLARE_CUSTOM_INPUT_MEMBER(ckongg_coinage_r); | |
| 129 | DECLARE_CUSTOM_INPUT_MEMBER(dkongjrm_coinage_r); | |
| 126 | 130 | }; |
| 127 | 131 | |
| 128 | 132 | |
| r14883 | r14884 | |
| 192 | 196 | #define galaxold_coin_counter_0_w galaxold_coin_counter_w |
| 193 | 197 | |
| 194 | 198 | |
| 195 | CUSTOM_INPUT( _4in1_fake_port_r ); | |
| 196 | 199 | |
| 197 | 200 | INTERRUPT_GEN( hunchbks_vh_interrupt ); |
| 198 | 201 |
| r14883 | r14884 | |
|---|---|---|
| 27 | 27 | DECLARE_WRITE16_MEMBER(welltris_scrollreg_w); |
| 28 | 28 | DECLARE_WRITE16_MEMBER(welltris_charvideoram_w); |
| 29 | 29 | void setbank(int num, int bank); |
| 30 | DECLARE_CUSTOM_INPUT_MEMBER(pending_sound_r); | |
| 30 | 31 | }; |
| 31 | 32 | |
| 32 | 33 |
| r14883 | r14884 | |
|---|---|---|
| 36 | 36 | DECLARE_WRITE8_MEMBER(cop01_background_w); |
| 37 | 37 | DECLARE_WRITE8_MEMBER(cop01_foreground_w); |
| 38 | 38 | DECLARE_WRITE8_MEMBER(cop01_vreg_w); |
| 39 | DECLARE_CUSTOM_INPUT_MEMBER(mightguy_area_r); | |
| 39 | 40 | }; |
| 40 | 41 | |
| 41 | 42 |
| r14883 | r14884 | |
|---|---|---|
| 118 | 118 | DECLARE_WRITE16_MEMBER(metro_vram_2_w); |
| 119 | 119 | DECLARE_WRITE16_MEMBER(metro_window_w); |
| 120 | 120 | void blt_write( address_space *space, const int tmap, const offs_t offs, const UINT16 data, const UINT16 mask ); |
| 121 | DECLARE_CUSTOM_INPUT_MEMBER(custom_soundstatus_r); | |
| 121 | 122 | }; |
| 122 | 123 | |
| 123 | 124 |
| r14883 | r14884 | |
|---|---|---|
| 27 | 27 | DECLARE_WRITE8_MEMBER(zaccaria_attributes_w); |
| 28 | 28 | DECLARE_WRITE8_MEMBER(zaccaria_flip_screen_x_w); |
| 29 | 29 | DECLARE_WRITE8_MEMBER(zaccaria_flip_screen_y_w); |
| 30 | DECLARE_CUSTOM_INPUT_MEMBER(acs_r); | |
| 30 | 31 | }; |
| 31 | 32 | |
| 32 | 33 |
| r14883 | r14884 | |
|---|---|---|
| 17 | 17 | DECLARE_READ32_MEMBER(hidctch3_pen2_r); |
| 18 | 18 | DECLARE_WRITE32_MEMBER(eolith_vram_w); |
| 19 | 19 | DECLARE_READ32_MEMBER(eolith_vram_r); |
| 20 | DECLARE_CUSTOM_INPUT_MEMBER(eolith_speedup_getvblank); | |
| 21 | DECLARE_CUSTOM_INPUT_MEMBER(stealsee_speedup_getvblank); | |
| 20 | 22 | }; |
| 21 | 23 | |
| 22 | 24 |
| r14883 | r14884 | |
|---|---|---|
| 39 | 39 | DECLARE_WRITE16_MEMBER(inufuku_bg_videoram_w); |
| 40 | 40 | DECLARE_READ16_MEMBER(inufuku_tx_videoram_r); |
| 41 | 41 | DECLARE_WRITE16_MEMBER(inufuku_tx_videoram_w); |
| 42 | DECLARE_CUSTOM_INPUT_MEMBER(soundflag_r); | |
| 42 | 43 | }; |
| 43 | 44 | |
| 44 | 45 |
| r14883 | r14884 | |
|---|---|---|
| 23 | 23 | DECLARE_WRITE8_MEMBER(asteroid_bank_switch_w); |
| 24 | 24 | DECLARE_WRITE8_MEMBER(astdelux_bank_switch_w); |
| 25 | 25 | DECLARE_WRITE8_MEMBER(astdelux_led_w); |
| 26 | DECLARE_CUSTOM_INPUT_MEMBER(clock_r); | |
| 26 | 27 | }; |
| 27 | 28 | |
| 28 | 29 |
| r14883 | r14884 | |
|---|---|---|
| 78 | 78 | DECLARE_WRITE16_MEMBER(fromanc4_gfxreg_0_w); |
| 79 | 79 | DECLARE_WRITE16_MEMBER(fromanc4_gfxreg_1_w); |
| 80 | 80 | DECLARE_WRITE16_MEMBER(fromanc4_gfxreg_2_w); |
| 81 | DECLARE_CUSTOM_INPUT_MEMBER(subcpu_int_r); | |
| 82 | DECLARE_CUSTOM_INPUT_MEMBER(sndcpu_nmi_r); | |
| 83 | DECLARE_CUSTOM_INPUT_MEMBER(subcpu_nmi_r); | |
| 81 | 84 | }; |
| 82 | 85 | |
| 83 | 86 |
| r14883 | r14884 | |
|---|---|---|
| 34 | 34 | DECLARE_READ8_MEMBER(multiply_r); |
| 35 | 35 | DECLARE_WRITE8_MEMBER(coin_count_w); |
| 36 | 36 | DECLARE_WRITE8_MEMBER(unknown_w); |
| 37 | DECLARE_CUSTOM_INPUT_MEMBER(elim4_joint_coin_r); | |
| 37 | 38 | }; |
| 38 | 39 | |
| 39 | 40 |
| r14883 | r14884 | |
|---|---|---|
| 57 | 57 | DECLARE_WRITE8_MEMBER(xain_scrollxP1_w); |
| 58 | 58 | DECLARE_WRITE8_MEMBER(xain_scrollyP1_w); |
| 59 | 59 | DECLARE_WRITE8_MEMBER(xain_flipscreen_w); |
| 60 | DECLARE_CUSTOM_INPUT_MEMBER(xain_vblank_r); | |
| 61 | DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r); | |
| 60 | 62 | }; |
| 61 | 63 | |
| 62 | 64 |
| r14883 | r14884 | |
|---|---|---|
| 100 | 100 | DECLARE_WRITE8_MEMBER(profpac_screenram_ctrl_w); |
| 101 | 101 | DECLARE_READ8_MEMBER(profpac_videoram_r); |
| 102 | 102 | DECLARE_WRITE8_MEMBER(profpac_videoram_w); |
| 103 | DECLARE_CUSTOM_INPUT_MEMBER(ebases_trackball_r); | |
| 104 | DECLARE_CUSTOM_INPUT_MEMBER(demndragn_joystick_r); | |
| 103 | 105 | }; |
| 104 | 106 | |
| 105 | 107 |
| r14883 | r14884 | |
|---|---|---|
| 60 | 60 | DECLARE_WRITE8_MEMBER(renegade_flipscreen_w); |
| 61 | 61 | DECLARE_WRITE8_MEMBER(renegade_scroll0_w); |
| 62 | 62 | DECLARE_WRITE8_MEMBER(renegade_scroll1_w); |
| 63 | DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r); | |
| 63 | 64 | }; |
| 64 | 65 | |
| 65 | 66 |
| r14883 | r14884 | |
|---|---|---|
| 37 | 37 | DECLARE_WRITE8_MEMBER(bosco_latch_w); |
| 38 | 38 | DECLARE_WRITE8_MEMBER(galaga_videoram_w); |
| 39 | 39 | DECLARE_WRITE8_MEMBER(gatsbee_bank_w); |
| 40 | DECLARE_CUSTOM_INPUT_MEMBER(shifted_port_r); | |
| 40 | 41 | }; |
| 41 | 42 | |
| 42 | 43 | class xevious_state : public galaga_state |
| r14883 | r14884 | |
|---|---|---|
| 32 | 32 | UINT8 m_screen_red; |
| 33 | 33 | |
| 34 | 34 | device_t *m_speaker; |
| 35 | DECLARE_CUSTOM_INPUT_MEMBER(sflush_80_r); | |
| 35 | 36 | }; |
| 36 | 37 | |
| 37 | 38 |
| r14883 | r14884 | |
|---|---|---|
| 36 | 36 | DECLARE_WRITE32_MEMBER(ps4_screen2_brt_w); |
| 37 | 37 | DECLARE_WRITE32_MEMBER(ps4_vidregs_w); |
| 38 | 38 | DECLARE_WRITE32_MEMBER(hotgmck_pcm_bank_w); |
| 39 | DECLARE_CUSTOM_INPUT_MEMBER(system_port_r); | |
| 40 | DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r); | |
| 39 | 41 | }; |
| 40 | 42 | |
| 41 | 43 |
| r14883 | r14884 | |
|---|---|---|
| 38 | 38 | DECLARE_WRITE8_MEMBER(jack_paletteram_w); |
| 39 | 39 | DECLARE_READ8_MEMBER(jack_flipscreen_r); |
| 40 | 40 | DECLARE_WRITE8_MEMBER(jack_flipscreen_w); |
| 41 | DECLARE_CUSTOM_INPUT_MEMBER(sound_check_r); | |
| 41 | 42 | }; |
| 42 | 43 | |
| 43 | 44 |
| r14883 | r14884 | |
|---|---|---|
| 60 | 60 | DECLARE_WRITE8_MEMBER(taitosj_characterram_w); |
| 61 | 61 | DECLARE_WRITE8_MEMBER(junglhbr_characterram_w); |
| 62 | 62 | DECLARE_WRITE8_MEMBER(taitosj_collision_reg_clear_w); |
| 63 | DECLARE_CUSTOM_INPUT_MEMBER(input_port_4_f0_r); | |
| 64 | DECLARE_CUSTOM_INPUT_MEMBER(kikstart_gear_r); | |
| 63 | 65 | }; |
| 64 | 66 | |
| 65 | 67 |
| r14883 | r14884 | |
|---|---|---|
| 40 | 40 | DECLARE_WRITE8_MEMBER(snk6502_scrolly_w); |
| 41 | 41 | DECLARE_WRITE8_MEMBER(satansat_b002_w); |
| 42 | 42 | DECLARE_WRITE8_MEMBER(satansat_backcolor_w); |
| 43 | DECLARE_CUSTOM_INPUT_MEMBER(snk6502_music0_r); | |
| 44 | DECLARE_CUSTOM_INPUT_MEMBER(sasuke_count_r); | |
| 43 | 45 | }; |
| 44 | 46 | |
| 45 | 47 |
| r14883 | r14884 | |
|---|---|---|
| 50 | 50 | DECLARE_WRITE8_MEMBER(exidy440_spriteram_w); |
| 51 | 51 | DECLARE_WRITE8_MEMBER(exidy440_control_w); |
| 52 | 52 | DECLARE_WRITE8_MEMBER(exidy440_interrupt_clear_w); |
| 53 | DECLARE_CUSTOM_INPUT_MEMBER(firq_beam_r); | |
| 54 | DECLARE_CUSTOM_INPUT_MEMBER(firq_vblank_r); | |
| 55 | DECLARE_CUSTOM_INPUT_MEMBER(hitnmiss_button1_r); | |
| 53 | 56 | }; |
| 54 | 57 | |
| 55 | 58 |
| r14883 | r14884 | |
|---|---|---|
| 40 | 40 | DECLARE_WRITE8_MEMBER(borntofi_nmi_enable_w); |
| 41 | 41 | DECLARE_READ8_MEMBER(borntofi_inputs_r); |
| 42 | 42 | DECLARE_WRITE8_MEMBER(borntofi_msm5205_w); |
| 43 | DECLARE_CUSTOM_INPUT_MEMBER(wheelrun_wheel_r); | |
| 43 | 44 | }; |
| 44 | 45 | |
| 45 | 46 |
| r14883 | r14884 | |
|---|---|---|
| 41 | 41 | DECLARE_WRITE16_MEMBER(sound_irq_w); |
| 42 | 42 | DECLARE_WRITE16_MEMBER(xmen_18fa00_w); |
| 43 | 43 | DECLARE_WRITE8_MEMBER(sound_bankswitch_w); |
| 44 | DECLARE_CUSTOM_INPUT_MEMBER(xmen_frame_r); | |
| 44 | 45 | }; |
| 45 | 46 | |
| 46 | 47 | /*----------- defined in video/xmen.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 25 | 25 | int m_cd32_shifter[2]; |
| 26 | 26 | void (*m_input_hack)(running_machine &machine); |
| 27 | 27 | int m_oldstate[2]; |
| 28 | DECLARE_CUSTOM_INPUT_MEMBER(cubo_input); | |
| 28 | 29 | }; |
| 29 | 30 | |
| 30 | 31 | /*----------- defined in machine/cd32.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 99 | 99 | DECLARE_WRITE32_MEMBER(micro3d_fifo_w); |
| 100 | 100 | DECLARE_WRITE32_MEMBER(micro3d_alt_fifo_w); |
| 101 | 101 | DECLARE_READ32_MEMBER(micro3d_pipe_r); |
| 102 | DECLARE_CUSTOM_INPUT_MEMBER(botssa_hwchk_r); | |
| 102 | 103 | }; |
| 103 | 104 | |
| 104 | 105 | typedef struct _micro3d_vtx_ |
| r14883 | r14884 | |
| 115 | 116 | |
| 116 | 117 | |
| 117 | 118 | |
| 118 | CUSTOM_INPUT( botssa_hwchk_r ); | |
| 119 | ||
| 120 | ||
| 121 | ||
| 122 | ||
| 123 | 119 | void micro3d_duart_irq_handler(device_t *device, UINT8 vector); |
| 124 | 120 | UINT8 micro3d_duart_input_r(device_t *device); |
| 125 | 121 | void micro3d_duart_output_w(device_t *device, UINT8 data); |
| r14883 | r14884 | |
|---|---|---|
| 28 | 28 | DECLARE_WRITE8_MEMBER(ultratnk_led_2_w); |
| 29 | 29 | DECLARE_WRITE8_MEMBER(ultratnk_lockout_w); |
| 30 | 30 | DECLARE_WRITE8_MEMBER(ultratnk_video_ram_w); |
| 31 | DECLARE_CUSTOM_INPUT_MEMBER(get_collision); | |
| 32 | DECLARE_CUSTOM_INPUT_MEMBER(get_joystick); | |
| 31 | 33 | }; |
| 32 | 34 | |
| 33 | 35 |
| r14883 | r14884 | |
|---|---|---|
| 26 | 26 | DECLARE_READ32_MEMBER(gunbustr_gun_r); |
| 27 | 27 | DECLARE_WRITE32_MEMBER(gunbustr_gun_w); |
| 28 | 28 | DECLARE_READ32_MEMBER(main_cycle_r); |
| 29 | DECLARE_CUSTOM_INPUT_MEMBER(coin_word_r); | |
| 29 | 30 | }; |
| 30 | 31 | |
| 31 | 32 |
| r14883 | r14884 | |
|---|---|---|
| 25 | 25 | DECLARE_WRITE8_MEMBER(pleiads_videoreg_w); |
| 26 | 26 | DECLARE_WRITE8_MEMBER(phoenix_scroll_w); |
| 27 | 27 | DECLARE_READ8_MEMBER(survival_input_port_0_r); |
| 28 | DECLARE_CUSTOM_INPUT_MEMBER(player_input_r); | |
| 29 | DECLARE_CUSTOM_INPUT_MEMBER(pleiads_protection_r); | |
| 28 | 30 | }; |
| 29 | 31 | |
| 30 | 32 | |
| r14883 | r14884 | |
| 60 | 62 | SCREEN_UPDATE_IND16( phoenix ); |
| 61 | 63 | |
| 62 | 64 | |
| 63 | CUSTOM_INPUT( player_input_r ); | |
| 64 | CUSTOM_INPUT( pleiads_protection_r ); | |
| 65 | 65 | READ8_DEVICE_HANDLER( survival_protection_r ); |
| 66 | 66 | |
| 67 | 67 | READ_LINE_DEVICE_HANDLER( survival_sid_callback ); |
| r14883 | r14884 | |
|---|---|---|
| 80 | 80 | DECLARE_WRITE8_MEMBER(hboard_rom_switch_w); |
| 81 | 81 | void pc10_set_mirroring(int mirroring); |
| 82 | 82 | DECLARE_WRITE8_MEMBER(playch10_videoram_w); |
| 83 | DECLARE_CUSTOM_INPUT_MEMBER(pc10_int_detect_r); | |
| 83 | 84 | }; |
| 84 | 85 | |
| 85 | 86 | |
| r14883 | r14884 | |
| 104 | 105 | DRIVER_INIT( pchboard ); /* h-board games */ |
| 105 | 106 | DRIVER_INIT( pciboard ); /* i-board games */ |
| 106 | 107 | DRIVER_INIT( pckboard ); /* k-board games */ |
| 107 | CUSTOM_INPUT( pc10_int_detect_r ); | |
| 108 | 108 | |
| 109 | 109 | |
| 110 | 110 |
| r14883 | r14884 | |
|---|---|---|
| 79 | 79 | DECLARE_WRITE16_MEMBER(splndrbt_flip1_w); |
| 80 | 80 | DECLARE_WRITE16_MEMBER(splndrbt_bg_scrollx_w); |
| 81 | 81 | DECLARE_WRITE16_MEMBER(splndrbt_bg_scrolly_w); |
| 82 | DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_status); | |
| 82 | 83 | }; |
| 83 | 84 | |
| 84 | 85 |
| r14883 | r14884 | |
|---|---|---|
| 3 | 3 | void eolith_speedup_read(address_space *space); |
| 4 | 4 | void init_eolith_speedup(running_machine &machine); |
| 5 | 5 | TIMER_DEVICE_CALLBACK( eolith_speedup ); |
| 6 | CUSTOM_INPUT( eolith_speedup_getvblank ); | |
| 7 | CUSTOM_INPUT( stealsee_speedup_getvblank ); | |
| 8 | 6 | |
| 7 |
| r14883 | r14884 | |
|---|---|---|
| 72 | 72 | DECLARE_WRITE8_MEMBER(montecar_drone_reset_w); |
| 73 | 73 | DECLARE_WRITE8_MEMBER(steer_reset_w); |
| 74 | 74 | DECLARE_WRITE8_MEMBER(crash_reset_w); |
| 75 | DECLARE_CUSTOM_INPUT_MEMBER(steer_dir_r); | |
| 76 | DECLARE_CUSTOM_INPUT_MEMBER(steer_flag_r); | |
| 77 | DECLARE_CUSTOM_INPUT_MEMBER(skid_r); | |
| 78 | DECLARE_CUSTOM_INPUT_MEMBER(crash_r); | |
| 79 | DECLARE_CUSTOM_INPUT_MEMBER(gear_r); | |
| 75 | 80 | }; |
| 76 | 81 | |
| 77 | 82 |
| r14883 | r14884 | |
|---|---|---|
| 128 | 128 | DECLARE_WRITE16_MEMBER(neogeo_paletteram_w); |
| 129 | 129 | DECLARE_READ16_MEMBER(neogeo_video_register_r); |
| 130 | 130 | DECLARE_WRITE16_MEMBER(neogeo_video_register_w); |
| 131 | DECLARE_CUSTOM_INPUT_MEMBER(multiplexed_controller_r); | |
| 132 | DECLARE_CUSTOM_INPUT_MEMBER(mahjong_controller_r); | |
| 133 | DECLARE_CUSTOM_INPUT_MEMBER(get_calendar_status); | |
| 134 | DECLARE_CUSTOM_INPUT_MEMBER(get_memcard_status); | |
| 135 | DECLARE_CUSTOM_INPUT_MEMBER(get_audio_result); | |
| 131 | 136 | }; |
| 132 | 137 | |
| 133 | 138 |
| r14883 | r14884 | |
|---|---|---|
| 42 | 42 | DECLARE_WRITE32_MEMBER(konamigx_tilebank_w); |
| 43 | 43 | DECLARE_WRITE32_MEMBER(konamigx_t1_psacmap_w); |
| 44 | 44 | DECLARE_WRITE32_MEMBER(konamigx_t4_psacmap_w); |
| 45 | DECLARE_CUSTOM_INPUT_MEMBER(gx_rdport1_3_r); | |
| 45 | 46 | }; |
| 46 | 47 | |
| 47 | 48 |
| r14883 | r14884 | |
|---|---|---|
| 51 | 51 | DECLARE_WRITE8_MEMBER(ladybug_colorram_w); |
| 52 | 52 | DECLARE_WRITE8_MEMBER(ladybug_flipscreen_w); |
| 53 | 53 | DECLARE_WRITE8_MEMBER(sraider_io_w); |
| 54 | DECLARE_CUSTOM_INPUT_MEMBER(ladybug_p1_control_r); | |
| 55 | DECLARE_CUSTOM_INPUT_MEMBER(ladybug_p2_control_r); | |
| 54 | 56 | }; |
| 55 | 57 | |
| 56 | 58 |
| r14883 | r14884 | |
|---|---|---|
| 67 | 67 | DECLARE_WRITE8_MEMBER(starshp1_ssadd_w); |
| 68 | 68 | DECLARE_WRITE8_MEMBER(starshp1_sspic_w); |
| 69 | 69 | DECLARE_WRITE8_MEMBER(starshp1_playfield_w); |
| 70 | DECLARE_CUSTOM_INPUT_MEMBER(starshp1_analog_r); | |
| 71 | DECLARE_CUSTOM_INPUT_MEMBER(collision_latch_r); | |
| 70 | 72 | }; |
| 71 | 73 | |
| 72 | 74 |
| r14883 | r14884 | |
|---|---|---|
| 253 | 253 | DECLARE_WRITE8_MEMBER(gottlieb_laserdisc_video_control_w); |
| 254 | 254 | DECLARE_WRITE8_MEMBER(gottlieb_videoram_w); |
| 255 | 255 | DECLARE_WRITE8_MEMBER(gottlieb_charram_w); |
| 256 | DECLARE_CUSTOM_INPUT_MEMBER(analog_delta_r); | |
| 257 | DECLARE_CUSTOM_INPUT_MEMBER(stooges_joystick_r); | |
| 256 | 258 | }; |
| 257 | 259 | |
| 258 | 260 |
| r14883 | r14884 | |
|---|---|---|
| 60 | 60 | device_t *m_adpcm_2; |
| 61 | 61 | DECLARE_WRITE8_MEMBER(ddragon_bgvideoram_w); |
| 62 | 62 | DECLARE_WRITE8_MEMBER(ddragon_fgvideoram_w); |
| 63 | DECLARE_CUSTOM_INPUT_MEMBER(sub_cpu_busy); | |
| 63 | 64 | }; |
| 64 | 65 | |
| 65 | 66 |
| r14883 | r14884 | |
|---|---|---|
| 45 | 45 | bitmap_ind16 m_motion_object_2_clip; |
| 46 | 46 | DECLARE_WRITE8_MEMBER(fax_bank_select_w); |
| 47 | 47 | DECLARE_READ8_MEMBER(exidy_interrupt_r); |
| 48 | DECLARE_CUSTOM_INPUT_MEMBER(teetert_input_r); | |
| 48 | 49 | }; |
| 49 | 50 | |
| 50 | 51 |
| r14883 | r14884 | |
|---|---|---|
| 20 | 20 | DECLARE_WRITE8_MEMBER(xxmissio_bgram_w); |
| 21 | 21 | DECLARE_READ8_MEMBER(xxmissio_bgram_r); |
| 22 | 22 | DECLARE_WRITE8_MEMBER(xxmissio_paletteram_w); |
| 23 | DECLARE_CUSTOM_INPUT_MEMBER(xxmissio_status_r); | |
| 23 | 24 | }; |
| 24 | 25 | |
| 25 | 26 |
| r14883 | r14884 | |
|---|---|---|
| 30 | 30 | DECLARE_WRITE32_MEMBER(rotate_control_w); |
| 31 | 31 | DECLARE_WRITE32_MEMBER(motor_control_w); |
| 32 | 32 | DECLARE_READ32_MEMBER(irq_speedup_r_groundfx); |
| 33 | DECLARE_CUSTOM_INPUT_MEMBER(frame_counter_r); | |
| 34 | DECLARE_CUSTOM_INPUT_MEMBER(coin_word_r); | |
| 33 | 35 | }; |
| 34 | 36 | |
| 35 | 37 |
| r14883 | r14884 | |
|---|---|---|
| 70 | 70 | UINT8 *m_pageram; |
| 71 | 71 | UINT8 *m_pcbram; |
| 72 | 72 | UINT8 *m_charram; |
| 73 | DECLARE_CUSTOM_INPUT_MEMBER(cdp1869_pcb_r); | |
| 73 | 74 | }; |
| 74 | 75 | |
| 75 | 76 | class draco_state : public cidelsa_state |
| r14883 | r14884 | |
|---|---|---|
| 54 | 54 | DECLARE_WRITE16_MEMBER(m92_pf2_control_w); |
| 55 | 55 | DECLARE_WRITE16_MEMBER(m92_pf3_control_w); |
| 56 | 56 | DECLARE_WRITE16_MEMBER(m92_master_control_w); |
| 57 | DECLARE_CUSTOM_INPUT_MEMBER(m92_sprite_busy_r); | |
| 57 | 58 | }; |
| 58 | 59 | |
| 59 | 60 |
| r14883 | r14884 | |
|---|---|---|
| 32 | 32 | DECLARE_WRITE16_MEMBER(wwfwfest_fg0_videoram_w); |
| 33 | 33 | DECLARE_WRITE16_MEMBER(wwfwfest_bg0_videoram_w); |
| 34 | 34 | DECLARE_WRITE16_MEMBER(wwfwfest_bg1_videoram_w); |
| 35 | DECLARE_CUSTOM_INPUT_MEMBER(dsw_3f_r); | |
| 36 | DECLARE_CUSTOM_INPUT_MEMBER(dsw_c0_r); | |
| 35 | 37 | }; |
| 36 | 38 | |
| 37 | 39 |
| r14883 | r14884 | |
|---|---|---|
| 216 | 216 | DECLARE_READ16_MEMBER(f3_lineram_r); |
| 217 | 217 | DECLARE_WRITE16_MEMBER(f3_lineram_w); |
| 218 | 218 | DECLARE_WRITE32_MEMBER(f3_palette_24bit_w); |
| 219 | DECLARE_CUSTOM_INPUT_MEMBER(f3_analog_r); | |
| 220 | DECLARE_CUSTOM_INPUT_MEMBER(f3_coin_r); | |
| 219 | 221 | }; |
| 220 | 222 | |
| 221 | 223 |
| r14883 | r14884 | |
|---|---|---|
| 36 | 36 | DECLARE_WRITE16_MEMBER(snowboar_protection_w); |
| 37 | 37 | DECLARE_WRITE16_MEMBER(gaelco2_vram_w); |
| 38 | 38 | DECLARE_WRITE16_MEMBER(gaelco2_palette_w); |
| 39 | DECLARE_CUSTOM_INPUT_MEMBER(wrally2_analog_bit_r); | |
| 39 | 40 | }; |
| 40 | 41 | |
| 41 | 42 | |
| r14883 | r14884 | |
| 46 | 47 | DRIVER_INIT( snowboar ); |
| 47 | 48 | DRIVER_INIT( bang ); |
| 48 | 49 | TIMER_DEVICE_CALLBACK( bang_irq ); |
| 49 | CUSTOM_INPUT( wrally2_analog_bit_r ); | |
| 50 | 50 | WRITE16_DEVICE_HANDLER( gaelco2_eeprom_cs_w ); |
| 51 | 51 | WRITE16_DEVICE_HANDLER( gaelco2_eeprom_sk_w ); |
| 52 | 52 | WRITE16_DEVICE_HANDLER( gaelco2_eeprom_data_w ); |
| r14883 | r14884 | |
|---|---|---|
| 27 | 27 | int m_gc_down; |
| 28 | 28 | DECLARE_WRITE8_MEMBER(homerun_videoram_w); |
| 29 | 29 | DECLARE_WRITE8_MEMBER(homerun_color_w); |
| 30 | DECLARE_CUSTOM_INPUT_MEMBER(homerun_40_r); | |
| 30 | 31 | }; |
| 31 | 32 | |
| 32 | 33 |
| r14883 | r14884 | |
|---|---|---|
| 43 | 43 | DECLARE_WRITE8_MEMBER(champbas_gfxbank_w); |
| 44 | 44 | DECLARE_WRITE8_MEMBER(champbas_palette_bank_w); |
| 45 | 45 | DECLARE_WRITE8_MEMBER(champbas_flipscreen_w); |
| 46 | DECLARE_CUSTOM_INPUT_MEMBER(champbas_watchdog_bit2); | |
| 46 | 47 | }; |
| 47 | 48 | |
| 48 | 49 |
| r14883 | r14884 | |
|---|---|---|
| 62 | 62 | DECLARE_WRITE8_MEMBER(arkanoid_d008_w); |
| 63 | 63 | DECLARE_WRITE8_MEMBER(tetrsark_d008_w); |
| 64 | 64 | DECLARE_WRITE8_MEMBER(hexa_d008_w); |
| 65 | DECLARE_CUSTOM_INPUT_MEMBER(arkanoid_68705_input_r); | |
| 66 | DECLARE_CUSTOM_INPUT_MEMBER(arkanoid_input_mux); | |
| 65 | 67 | }; |
| 66 | 68 | |
| 67 | 69 | |
| r14883 | r14884 | |
| 74 | 76 | extern SCREEN_UPDATE_IND16( arkanoid ); |
| 75 | 77 | extern SCREEN_UPDATE_IND16( hexa ); |
| 76 | 78 | |
| 77 | ||
| 78 | /*----------- defined in machine/arkanoid.c -----------*/ | |
| 79 | ||
| 80 | ||
| 81 | ||
| 82 | ||
| 83 | extern CUSTOM_INPUT( arkanoid_68705_input_r ); | |
| 84 | extern CUSTOM_INPUT( arkanoid_input_mux ); | |
| 85 |
| r14883 | r14884 | |
|---|---|---|
| 40 | 40 | DECLARE_WRITE16_MEMBER(crshrace_videoram2_w); |
| 41 | 41 | DECLARE_WRITE16_MEMBER(crshrace_roz_bank_w); |
| 42 | 42 | DECLARE_WRITE16_MEMBER(crshrace_gfxctrl_w); |
| 43 | DECLARE_CUSTOM_INPUT_MEMBER(country_sndpending_r); | |
| 43 | 44 | }; |
| 44 | 45 | |
| 45 | 46 | /*----------- defined in video/crshrace.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 42 | 42 | DECLARE_WRITE16_MEMBER(madmax_blitter_vidparam_w); |
| 43 | 43 | DECLARE_WRITE16_MEMBER(madmax_blitter_unknown_w); |
| 44 | 44 | DECLARE_READ16_MEMBER(madmax_blitter_vidparam_r); |
| 45 | DECLARE_CUSTOM_INPUT_MEMBER(sound_latch_state_r); | |
| 45 | 46 | }; |
| 46 | 47 | |
| 47 | 48 |
| r14883 | r14884 | |
|---|---|---|
| 148 | 148 | DECLARE_WRITE16_MEMBER(cave_vram_1_8x8_w); |
| 149 | 149 | DECLARE_WRITE16_MEMBER(cave_vram_2_8x8_w); |
| 150 | 150 | DECLARE_WRITE16_MEMBER(cave_vram_3_8x8_w); |
| 151 | DECLARE_CUSTOM_INPUT_MEMBER(korokoro_hopper_r); | |
| 152 | DECLARE_CUSTOM_INPUT_MEMBER(tjumpman_hopper_r); | |
| 151 | 153 | }; |
| 152 | 154 | |
| 153 | 155 | /*----------- defined in video/cave.c -----------*/ |
| r14883 | r14884 | |
|---|---|---|
| 65 | 65 | DECLARE_WRITE8_MEMBER(blaster_video_control_w); |
| 66 | 66 | DECLARE_WRITE8_MEMBER(williams_blitter_w); |
| 67 | 67 | DECLARE_WRITE8_MEMBER(williams2_blit_window_enable_w); |
| 68 | DECLARE_CUSTOM_INPUT_MEMBER(williams_mux_r); | |
| 68 | 69 | }; |
| 69 | 70 | |
| 70 | 71 | |
| r14883 | r14884 | |
| 124 | 125 | |
| 125 | 126 | /* banking */ |
| 126 | 127 | |
| 127 | /* misc */ | |
| 128 | CUSTOM_INPUT( williams_mux_r ); | |
| 129 | ||
| 130 | 128 | /* Mayday protection */ |
| 131 | 129 | |
| 132 | 130 |
| r14883 | r14884 | |
|---|---|---|
| 28 | 28 | DECLARE_WRITE16_MEMBER(rpunch_crtc_data_w); |
| 29 | 29 | DECLARE_WRITE16_MEMBER(rpunch_crtc_register_w); |
| 30 | 30 | DECLARE_WRITE16_MEMBER(rpunch_ins_w); |
| 31 | DECLARE_CUSTOM_INPUT_MEMBER(hi_bits_r); | |
| 31 | 32 | }; |
| 32 | 33 | |
| 33 | 34 |
| r14883 | r14884 | |
|---|---|---|
| 52 | 52 | DECLARE_READ8_MEMBER(cloud9_bitmode_r); |
| 53 | 53 | DECLARE_WRITE8_MEMBER(cloud9_bitmode_w); |
| 54 | 54 | DECLARE_WRITE8_MEMBER(cloud9_bitmode_addr_w); |
| 55 | DECLARE_CUSTOM_INPUT_MEMBER(get_vblank); | |
| 55 | 56 | }; |
| 56 | 57 | |
| 57 | 58 |
| r14883 | r14884 | |
|---|---|---|
| 50 | 50 | DECLARE_READ8_MEMBER(starwars_div_reh_r); |
| 51 | 51 | DECLARE_READ8_MEMBER(starwars_div_rel_r); |
| 52 | 52 | DECLARE_WRITE8_MEMBER(starwars_math_w); |
| 53 | DECLARE_CUSTOM_INPUT_MEMBER(matrix_flag_r); | |
| 53 | 54 | }; |
| 54 | 55 | |
| 55 | 56 | |
| 56 | 57 | /*----------- defined in machine/starwars.c -----------*/ |
| 57 | 58 | |
| 58 | 59 | |
| 59 | CUSTOM_INPUT( matrix_flag_r ); | |
| 60 | ||
| 61 | ||
| 62 | 60 | void starwars_mproc_init(running_machine &machine); |
| 63 | 61 | void starwars_mproc_reset(running_machine &machine); |
| 64 | 62 |
| r14883 | r14884 | |
|---|---|---|
| 47 | 47 | DECLARE_WRITE8_MEMBER(wolfpack_ship_pic_w); |
| 48 | 48 | DECLARE_WRITE8_MEMBER(wolfpack_torpedo_h_w); |
| 49 | 49 | DECLARE_WRITE8_MEMBER(wolfpack_torpedo_v_w); |
| 50 | DECLARE_CUSTOM_INPUT_MEMBER(wolfpack_dial_r); | |
| 50 | 51 | }; |
| 51 | 52 | |
| 52 | 53 |
| r14883 | r14884 | |
|---|---|---|
| 17 | 17 | DECLARE_WRITE16_MEMBER(pirates_tx_tileram_w); |
| 18 | 18 | DECLARE_WRITE16_MEMBER(pirates_fg_tileram_w); |
| 19 | 19 | DECLARE_WRITE16_MEMBER(pirates_bg_tileram_w); |
| 20 | DECLARE_CUSTOM_INPUT_MEMBER(prot_r); | |
| 20 | 21 | }; |
| 21 | 22 | |
| 22 | 23 |
| r14883 | r14884 | |
|---|---|---|
| 50 | 50 | DECLARE_WRITE8_MEMBER(exerion_videoreg_w); |
| 51 | 51 | DECLARE_WRITE8_MEMBER(exerion_video_latch_w); |
| 52 | 52 | DECLARE_READ8_MEMBER(exerion_video_timing_r); |
| 53 | DECLARE_CUSTOM_INPUT_MEMBER(exerion_controls_r); | |
| 53 | 54 | }; |
| 54 | 55 | |
| 55 | 56 |
| r14883 | r14884 | |
|---|---|---|
| 111 | 111 | * |
| 112 | 112 | *************************************/ |
| 113 | 113 | |
| 114 | CUSTOM_INPUT( | |
| 114 | CUSTOM_INPUT_MEMBER( | |
| 115 | 115 | { |
| 116 | stactics_state *state = field.machine().driver_data<stactics_state>(); | |
| 117 | 116 | |
| 118 | return ( | |
| 117 | return ( | |
| 119 | 118 | } |
| 120 | 119 | |
| 121 | 120 | |
| r14883 | r14884 | |
| 166 | 165 | } |
| 167 | 166 | |
| 168 | 167 | |
| 169 | CUSTOM_INPUT( | |
| 168 | CUSTOM_INPUT_MEMBER( | |
| 170 | 169 | { |
| 171 | stactics_state *state = field.machine().driver_data<stactics_state>(); | |
| 172 | 170 | |
| 173 | return | |
| 171 | return | |
| 174 | 172 | } |
| 175 | 173 | |
| 176 | 174 | |
| 177 | CUSTOM_INPUT( | |
| 175 | CUSTOM_INPUT_MEMBER( | |
| 178 | 176 | { |
| 179 | stactics_state *state = field.machine().driver_data<stactics_state>(); | |
| 180 | 177 | |
| 181 | return ! | |
| 178 | return ! | |
| 182 | 179 | } |
| 183 | 180 | |
| 184 | 181 |
| r14883 | r14884 | |
|---|---|---|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | |
| 307 | CUSTOM_INPUT( | |
| 307 | CUSTOM_INPUT_MEMBER( | |
| 308 | 308 | { |
| 309 | phoenix_state *state = field.machine().driver_data<phoenix_state>(); | |
| 310 | if (state->m_cocktail_mode) | |
| 311 | return (input_port_read(field.machine(), "CTRL") & 0xf0) >> 4; | |
| 309 | if (m_cocktail_mode) | |
| 310 | return (input_port_read(machine(), "CTRL") & 0xf0) >> 4; | |
| 312 | 311 | else |
| 313 | return (input_port_read( | |
| 312 | return (input_port_read( | |
| 314 | 313 | } |
| 315 | 314 | |
| 316 | CUSTOM_INPUT( | |
| 315 | CUSTOM_INPUT_MEMBER( | |
| 317 | 316 | { |
| 318 | phoenix_state *state = field.machine().driver_data<phoenix_state>(); | |
| 319 | 317 | /* handle Pleiads protection */ |
| 320 | switch ( | |
| 318 | switch ( | |
| 321 | 319 | { |
| 322 | 320 | case 0x00: |
| 323 | 321 | case 0x20: |
| r14883 | r14884 | |
| 328 | 326 | /* Bit 3 is 1 */ |
| 329 | 327 | return 1; |
| 330 | 328 | default: |
| 331 | logerror("%s:Unknown protection question %02X\n", | |
| 329 | logerror("%s:Unknown protection question %02X\n", | |
| 332 | 330 | return 0; |
| 333 | 331 | } |
| 334 | 332 | } |
| r14883 | r14884 | |
|---|---|---|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
| 106 | ||
| 106 | ||
| 107 | 107 | { |
| 108 | UINT8 ret = ( | |
| 108 | UINT8 ret = ( | |
| 109 | 109 | |
| 110 | 110 | return ret; |
| 111 | 111 | } |
| r14883 | r14884 | |
| 257 | 257 | /* extra credit score changes depending on player's performance */ |
| 258 | 258 | |
| 259 | 259 | PORT_START("IN1") |
| 260 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(fgoal_80_r, NULL) /* 128V */ | |
| 260 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fgoal_state,fgoal_80_r, NULL) /* 128V */ | |
| 261 | 261 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet )) |
| 262 | 262 | PORT_DIPSETTING( 0x00, DEF_STR( Upright )) |
| 263 | 263 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail )) |
| r14883 | r14884 | |
|---|---|---|
| 343 | 343 | { |
| 344 | 344 | if(m_vram[0][i]) |
| 345 | 345 | { |
| 346 | kaneko16_vram_0_w( | |
| 346 | kaneko16_vram_0_w( | |
| 347 | 347 | } |
| 348 | 348 | } |
| 349 | 349 | m_vram_0_bank_num = data; |
| r14883 | r14884 | |
| 360 | 360 | { |
| 361 | 361 | if(m_vram[1][i]) |
| 362 | 362 | { |
| 363 | kaneko16_vram_1_w( | |
| 363 | kaneko16_vram_1_w( | |
| 364 | 364 | } |
| 365 | 365 | } |
| 366 | 366 | m_vram_1_bank_num = data; |
| r14883 | r14884 | |
|---|---|---|
| 132 | 132 | return 0xff; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | ||
| 135 | ||
| 136 | 136 | { |
| 137 | mainsnk_state *state = field.machine().driver_data<mainsnk_state>(); | |
| 138 | 137 | |
| 139 | return ( | |
| 138 | return ( | |
| 140 | 139 | } |
| 141 | 140 | |
| 142 | 141 | |
| r14883 | r14884 | |
| 181 | 180 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| 182 | 181 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 183 | 182 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 184 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mainsnk_sound_r, NULL) /* sound CPU status */ | |
| 183 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mainsnk_state,mainsnk_sound_r, NULL) /* sound CPU status */ | |
| 185 | 184 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 186 | 185 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 187 | 186 | |
| r14883 | r14884 | |
| 275 | 274 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| 276 | 275 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 277 | 276 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 278 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mainsnk_sound_r, NULL) /* sound CPU status */ | |
| 277 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mainsnk_state,mainsnk_sound_r, NULL) /* sound CPU status */ | |
| 279 | 278 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 280 | 279 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 281 | 280 |
| r14883 | r14884 | |
|---|---|---|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | |
| 174 | ||
| 174 | ||
| 175 | 175 | { |
| 176 | ccastles_state *state = field.machine().driver_data<ccastles_state>(); | |
| 177 | int scanline = field.machine().primary_screen->vpos(); | |
| 178 | return state->m_syncprom[scanline & 0xff] & 1; | |
| 176 | int scanline = machine().primary_screen->vpos(); | |
| 177 | return m_syncprom[scanline & 0xff] & 1; | |
| 179 | 178 | } |
| 180 | 179 | |
| 181 | 180 | |
| r14883 | r14884 | |
| 366 | 365 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 367 | 366 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) |
| 368 | 367 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) |
| 369 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_vblank, NULL) | |
| 368 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ccastles_state,get_vblank, NULL) | |
| 370 | 369 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* 1p Jump, non-cocktail start1 */ |
| 371 | 370 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* 2p Jump, non-cocktail start2 */ |
| 372 | 371 |
| r14883 | r14884 | |
|---|---|---|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | |
| 181 | ||
| 181 | ||
| 182 | 182 | { |
| 183 | return | |
| 183 | return | |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
| r14883 | r14884 | |
| 321 | 321 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 322 | 322 | PORT_SERVICE( 0x00200000, IP_ACTIVE_LOW ) /* Not actually a dipswitch */ |
| 323 | 323 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 324 | PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(bsmt_status_r, NULL) | |
| 324 | PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, policetr_state,bsmt_status_r, NULL) | |
| 325 | 325 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 326 | 326 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 327 | 327 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| r14883 | r14884 | |
|---|---|---|
| 320 | 320 | PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 321 | 321 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT ) |
| 322 | 322 | PORT_BIT( 0x18, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 323 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(jedi_audio_comm_stat_r, NULL) | |
| 323 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jedi_state,jedi_audio_comm_stat_r, NULL) | |
| 324 | 324 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 325 | 325 | |
| 326 | 326 | PORT_START("STICKY") /* analog Y */ |
| r14883 | r14884 | |
|---|---|---|
| 55 | 55 | int m_cbaj_to_z80; |
| 56 | 56 | int m_cbaj_to_r3k; |
| 57 | 57 | int m_latch_to_z80; |
| 58 | DECLARE_CUSTOM_INPUT_MEMBER(jdredd_gun_mux_read); | |
| 58 | 59 | }; |
| 59 | 60 | |
| 60 | 61 | INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ... ) |
| r14883 | r14884 | |
| 2042 | 2043 | } |
| 2043 | 2044 | } |
| 2044 | 2045 | |
| 2045 | ||
| 2046 | ||
| 2046 | 2047 | { |
| 2047 | zn_state *state = field.machine().driver_data<zn_state>(); | |
| 2048 | 2048 | |
| 2049 | return | |
| 2049 | return | |
| 2050 | 2050 | } |
| 2051 | 2051 | |
| 2052 | 2052 | void jdredd_vblank(zn_state *state, screen_device &screen, bool vblank_state) |
| r14883 | r14884 | |
| 2746 | 2746 | PORT_BIT( 0x6f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2747 | 2747 | |
| 2748 | 2748 | PORT_MODIFY("SERVICE") |
| 2749 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(jdredd_gun_mux_read, NULL) | |
| 2749 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zn_state,jdredd_gun_mux_read, NULL) | |
| 2750 | 2750 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2751 | 2751 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 2752 | 2752 |
| r14883 | r14884 | |
|---|---|---|
| 877 | 877 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "G1:7" ) |
| 878 | 878 | |
| 879 | 879 | PORT_MODIFY("IN0") |
| 880 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(nstocker_bits_r, NULL) | |
| 880 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, balsente_state,nstocker_bits_r, NULL) | |
| 881 | 881 | |
| 882 | 882 | /* cheese alert -- we have to map this to player 2 so that it doesn't interfere with |
| 883 | 883 | the crosshair controls */ |
| r14883 | r14884 | |
|---|---|---|
| 420 | 420 | * |
| 421 | 421 | *************************************/ |
| 422 | 422 | |
| 423 | ||
| 423 | ||
| 424 | 424 | { |
| 425 | 425 | static const UINT8 translate49[7] = { 0x8, 0xc, 0xe, 0xf, 0x3, 0x1, 0x0 }; |
| 426 | 426 | const char *namex = (const char *)param; |
| 427 | 427 | const char *namey = namex + strlen(namex) + 1; |
| 428 | return (translate49[input_port_read( | |
| 428 | return (translate49[input_port_read( | |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | |
| r14883 | r14884 | |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | |
| 439 | ||
| 439 | ||
| 440 | 440 | { |
| 441 | UINT32 bits = input_port_read( | |
| 441 | UINT32 bits = input_port_read( | |
| 442 | 442 | UINT8 select = keypad_select; |
| 443 | 443 | while ((select & 1) != 0) |
| 444 | 444 | { |
| r14883 | r14884 | |
| 931 | 931 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 932 | 932 | |
| 933 | 933 | PORT_START("IN2") |
| 934 | PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM( keypad_r, "KEYPAD" ) | |
| 934 | PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, midzeus_state, keypad_r, "KEYPAD" ) | |
| 935 | 935 | PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 936 | 936 | |
| 937 | 937 | PORT_START("KEYPAD") |
| r14883 | r14884 | |
| 1067 | 1067 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1068 | 1068 | |
| 1069 | 1069 | PORT_START("IN2") |
| 1070 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(custom_49way_r, "49WAYX\0" "49WAYY") | |
| 1070 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midzeus_state,custom_49way_r, "49WAYX\0" "49WAYY") | |
| 1071 | 1071 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1072 | 1072 | |
| 1073 | 1073 | PORT_START("49WAYX") |
| r14883 | r14884 | |
|---|---|---|
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | |
| 353 | ||
| 353 | ||
| 354 | 354 | { |
| 355 | zaxxon_state *state = field.machine().driver_data<zaxxon_state>(); | |
| 356 | 355 | static const char *const dialname[2] = { "DIAL0", "DIAL1" }; |
| 357 | 356 | int num = (FPTR)param; |
| 358 | 357 | int delta, res; |
| 359 | 358 | |
| 360 | delta = input_port_read( | |
| 359 | delta = input_port_read( | |
| 361 | 360 | |
| 362 | 361 | if (delta < 0x80) |
| 363 | 362 | { |
| 364 | 363 | // right |
| 365 | state->m_razmataz_dial_pos[num] -= delta; | |
| 366 | res = (state->m_razmataz_dial_pos[num] << 1) | 1; | |
| 364 | m_razmataz_dial_pos[num] -= delta; | |
| 365 | res = (m_razmataz_dial_pos[num] << 1) | 1; | |
| 367 | 366 | } |
| 368 | 367 | else |
| 369 | 368 | { |
| 370 | 369 | // left |
| 371 | state->m_razmataz_dial_pos[num] += delta; | |
| 372 | res = (state->m_razmataz_dial_pos[num] << 1); | |
| 370 | m_razmataz_dial_pos[num] += delta; | |
| 371 | res = (m_razmataz_dial_pos[num] << 1); | |
| 373 | 372 | } |
| 374 | 373 | |
| 375 | 374 | return res; |
| r14883 | r14884 | |
| 411 | 410 | } |
| 412 | 411 | |
| 413 | 412 | |
| 414 | ||
| 413 | ||
| 415 | 414 | { |
| 416 | zaxxon_state *state = field.machine().driver_data<zaxxon_state>(); | |
| 417 | 415 | |
| 418 | return | |
| 416 | return | |
| 419 | 417 | } |
| 420 | 418 | |
| 421 | 419 | |
| r14883 | r14884 | |
| 514 | 512 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 515 | 513 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) |
| 516 | 514 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 517 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(zaxxon_coin_r, (void *)0) | |
| 518 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(zaxxon_coin_r, (void *)1) | |
| 519 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(zaxxon_coin_r, (void *)2) | |
| 515 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)0) | |
| 516 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)1) | |
| 517 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)2) | |
| 520 | 518 | |
| 521 | 519 | PORT_START("COIN") |
| 522 | 520 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(zaxxon_coin_inserted, (void *)0) |
| r14883 | r14884 | |
| 675 | 673 | |
| 676 | 674 | static INPUT_PORTS_START( razmataz ) |
| 677 | 675 | PORT_START("SW00") |
| 678 | PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM(razmataz_dial_r, (void *)0) | |
| 676 | PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)0) | |
| 679 | 677 | |
| 680 | 678 | PORT_START("DIAL0") |
| 681 | 679 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(1) |
| r14883 | r14884 | |
| 690 | 688 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 691 | 689 | |
| 692 | 690 | PORT_START("SW08") |
| 693 | PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM(razmataz_dial_r, (void *)1) | |
| 691 | PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)1) | |
| 694 | 692 | |
| 695 | 693 | PORT_START("DIAL1") |
| 696 | 694 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(2) |
| r14883 | r14884 | |
| 703 | 701 | |
| 704 | 702 | PORT_START("SW100") |
| 705 | 703 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 706 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(zaxxon_coin_r, (void *)0) | |
| 707 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(zaxxon_coin_r, (void *)1) | |
| 708 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(zaxxon_coin_r, (void *)2) | |
| 704 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)0) | |
| 705 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)1) | |
| 706 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)2) | |
| 709 | 707 | |
| 710 | 708 | PORT_START("COIN") |
| 711 | 709 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(zaxxon_coin_inserted, (void *)0) |
| r14883 | r14884 | |
| 768 | 766 | PORT_INCLUDE(zaxxon) |
| 769 | 767 | |
| 770 | 768 | PORT_MODIFY("SW00") |
| 771 | PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM(razmataz_dial_r, (void *)0) | |
| 769 | PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)0) | |
| 772 | 770 | |
| 773 | 771 | PORT_START("DIAL0") |
| 774 | 772 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_RESET |
| r14883 | r14884 | |
|---|---|---|
| 119 | 119 | #include "includes/punchout.h" |
| 120 | 120 | |
| 121 | 121 | |
| 122 | ||
| 122 | ||
| 123 | 123 | { |
| 124 | 124 | /* bit 4 of DSW1 is busy pin level */ |
| 125 | return (vlm5030_bsy( | |
| 125 | return (vlm5030_bsy( | |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | static WRITE8_DEVICE_HANDLER( punchout_speech_reset_w ) |
| r14883 | r14884 | |
| 437 | 437 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_5C ) ) |
| 438 | 438 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_6C ) ) |
| 439 | 439 | PORT_DIPSETTING( 0x0f, DEF_STR( Free_Play ) ) |
| 440 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(punchout_vlm5030_busy_r, NULL) /* VLM5030 busy signal */ | |
| 440 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, punchout_state,punchout_vlm5030_busy_r, NULL) /* VLM5030 busy signal */ | |
| 441 | 441 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 442 | 442 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x00, "R18:!1" ) /* Not documented, R18 resistor */ |
| 443 | 443 | PORT_DIPNAME( 0x80, 0x00, "Copyright" ) PORT_DIPLOCATION("R19:!1") /* Not documented, R19 resistor */ |
| r14883 | r14884 | |
| 868 | 868 | PORT_DIPSETTING( 0x0d, "1101" ) |
| 869 | 869 | PORT_DIPSETTING( 0x0e, "1110" ) |
| 870 | 870 | PORT_DIPSETTING( 0x0f, "1111" ) |
| 871 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(punchout_vlm5030_busy_r, NULL) /* VLM5030 busy signal */ | |
| 871 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, punchout_state,punchout_vlm5030_busy_r, NULL) /* VLM5030 busy signal */ | |
| 872 | 872 | PORT_DIPNAME( 0x40, 0x00, "Coin Slots" ) PORT_DIPLOCATION("R18:!1") /* R18 resistor */ |
| 873 | 873 | PORT_DIPSETTING( 0x40, "1" ) |
| 874 | 874 | PORT_DIPSETTING( 0x00, "2" ) |
| r14883 | r14884 | |
|---|---|---|
| 283 | 283 | state->m_ddenlovr_blit_flip = data; |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | WRITE8_ | |
| 286 | WRITE8_M | |
| 287 | 287 | { |
| 288 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 289 | state->m_ddenlovr_bgcolor = data; | |
| 288 | m_ddenlovr_bgcolor = data; | |
| 290 | 289 | } |
| 291 | 290 | |
| 292 | ||
| 291 | ||
| 293 | 292 | { |
| 294 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 295 | state->m_ddenlovr_bgcolor2 = data; | |
| 293 | m_ddenlovr_bgcolor2 = data; | |
| 296 | 294 | } |
| 297 | 295 | |
| 298 | ||
| 296 | ||
| 299 | 297 | { |
| 300 | 298 | if (ACCESSING_BITS_0_7) |
| 301 | 299 | ddenlovr_bgcolor_w(space, offset, data); |
| 302 | 300 | } |
| 303 | 301 | |
| 304 | 302 | |
| 305 | WRITE8_ | |
| 303 | WRITE8_M | |
| 306 | 304 | { |
| 307 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 308 | state->m_ddenlovr_priority = data; | |
| 305 | m_ddenlovr_priority = data; | |
| 309 | 306 | } |
| 310 | 307 | |
| 311 | ||
| 308 | ||
| 312 | 309 | { |
| 313 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 314 | state->m_ddenlovr_priority2 = data; | |
| 310 | m_ddenlovr_priority2 = data; | |
| 315 | 311 | } |
| 316 | 312 | |
| 317 | ||
| 313 | ||
| 318 | 314 | { |
| 319 | 315 | if (ACCESSING_BITS_0_7) |
| 320 | 316 | ddenlovr_priority_w(space, offset, data); |
| 321 | 317 | } |
| 322 | 318 | |
| 323 | 319 | |
| 324 | WRITE8_ | |
| 320 | WRITE8_M | |
| 325 | 321 | { |
| 326 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 327 | state->m_ddenlovr_layer_enable = data; | |
| 322 | m_ddenlovr_layer_enable = data; | |
| 328 | 323 | } |
| 329 | 324 | |
| 330 | ||
| 325 | ||
| 331 | 326 | { |
| 332 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 333 | state->m_ddenlovr_layer_enable2 = data; | |
| 327 | m_ddenlovr_layer_enable2 = data; | |
| 334 | 328 | } |
| 335 | 329 | |
| 336 | 330 | |
| 337 | ||
| 331 | ||
| 338 | 332 | { |
| 339 | 333 | if (ACCESSING_BITS_0_7) |
| 340 | 334 | ddenlovr_layer_enable_w(space, offset, data); |
| r14883 | r14884 | |
| 1013 | 1007 | |
| 1014 | 1008 | |
| 1015 | 1009 | |
| 1016 | ||
| 1010 | ||
| 1017 | 1011 | { |
| 1018 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1019 | state->m_ddenlovr_blit_latch = data; | |
| 1012 | m_ddenlovr_blit_latch = data; | |
| 1020 | 1013 | } |
| 1021 | 1014 | |
| 1022 | 1015 | // differences wrt blitter_data_w: registers are shuffled around, hi_bits in the low bits, clip_w/h, includes layers registers |
| 1023 | ||
| 1016 | ||
| 1024 | 1017 | { |
| 1025 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1026 | 1018 | int hi_bits; |
| 1027 | 1019 | |
| 1028 | 1020 | g_profiler.start(PROFILER_VIDEO); |
| 1029 | 1021 | |
| 1030 | hi_bits = ( | |
| 1022 | hi_bits = ( | |
| 1031 | 1023 | |
| 1032 | switch ( | |
| 1024 | switch ( | |
| 1033 | 1025 | { |
| 1034 | 1026 | case 0x00: |
| 1035 | | |
| 1027 | | |
| 1036 | 1028 | break; |
| 1037 | 1029 | |
| 1038 | 1030 | case 0x04: |
| r14883 | r14884 | |
| 1040 | 1032 | break; |
| 1041 | 1033 | |
| 1042 | 1034 | case 0x08: |
| 1043 | | |
| 1035 | | |
| 1044 | 1036 | break; |
| 1045 | 1037 | |
| 1046 | 1038 | case 0x0c: |
| 1047 | ddenlovr_blit_flip_w( | |
| 1039 | ddenlovr_blit_flip_w( | |
| 1048 | 1040 | break; |
| 1049 | 1041 | |
| 1050 | 1042 | case 0x10: |
| 1051 | | |
| 1043 | | |
| 1052 | 1044 | break; |
| 1053 | 1045 | |
| 1054 | 1046 | case 0x14: |
| 1055 | | |
| 1047 | | |
| 1056 | 1048 | break; |
| 1057 | 1049 | |
| 1058 | 1050 | case 0x18: |
| 1059 | 1051 | // related to pen, can be 0 or 1 for 0x10 blitter command |
| 1060 | 1052 | // 0 = only bits 7-4 of ddenlovr_blit_pen contain data |
| 1061 | 1053 | // 1 = bits 3-0 contain data as well |
| 1062 | | |
| 1054 | | |
| 1063 | 1055 | break; |
| 1064 | 1056 | |
| 1065 | 1057 | case 0x28: |
| 1066 | | |
| 1058 | | |
| 1067 | 1059 | break; |
| 1068 | 1060 | |
| 1069 | 1061 | case 0x2c: |
| 1070 | | |
| 1062 | | |
| 1071 | 1063 | break; |
| 1072 | 1064 | |
| 1073 | 1065 | case 0x30: |
| 1074 | | |
| 1066 | | |
| 1075 | 1067 | break; |
| 1076 | 1068 | |
| 1077 | 1069 | case 0x34: |
| 1078 | | |
| 1070 | | |
| 1079 | 1071 | break; |
| 1080 | 1072 | case 0x38: |
| 1081 | | |
| 1073 | | |
| 1082 | 1074 | break; |
| 1083 | 1075 | case 0x3c: |
| 1084 | | |
| 1076 | | |
| 1085 | 1077 | break; |
| 1086 | 1078 | |
| 1087 | 1079 | case 0x50: |
| 1088 | | |
| 1080 | | |
| 1089 | 1081 | break; |
| 1090 | 1082 | |
| 1091 | 1083 | case 0x58: |
| 1092 | | |
| 1084 | | |
| 1093 | 1085 | break; |
| 1094 | 1086 | |
| 1095 | 1087 | case 0x5c: |
| 1096 | | |
| 1088 | | |
| 1097 | 1089 | break; |
| 1098 | 1090 | |
| 1099 | 1091 | case 0x60: |
| r14883 | r14884 | |
| 1104 | 1096 | case 0x74: |
| 1105 | 1097 | case 0x78: |
| 1106 | 1098 | case 0x7c: |
| 1107 | | |
| 1099 | | |
| 1108 | 1100 | break; |
| 1109 | 1101 | |
| 1110 | 1102 | case 0x80: |
| 1111 | | |
| 1103 | | |
| 1112 | 1104 | break; |
| 1113 | 1105 | |
| 1114 | 1106 | case 0x88: |
| 1115 | 1107 | case 0x8a: // can be 3ff |
| 1116 | | |
| 1108 | | |
| 1117 | 1109 | break; |
| 1118 | 1110 | |
| 1119 | 1111 | case 0x8c: |
| 1120 | 1112 | case 0x8e: // can be 3ff |
| 1121 | | |
| 1113 | | |
| 1122 | 1114 | break; |
| 1123 | 1115 | |
| 1124 | 1116 | case 0xc0: |
| 1125 | 1117 | case 0xc2: |
| 1126 | 1118 | case 0xc4: |
| 1127 | 1119 | case 0xc6: |
| 1128 | | |
| 1120 | | |
| 1129 | 1121 | break; |
| 1130 | 1122 | |
| 1131 | 1123 | case 0xc8: |
| 1132 | 1124 | case 0xca: |
| 1133 | 1125 | case 0xcc: |
| 1134 | 1126 | case 0xce: |
| 1135 | | |
| 1127 | | |
| 1136 | 1128 | break; |
| 1137 | 1129 | |
| 1138 | 1130 | case 0xd0: |
| 1139 | 1131 | case 0xd2: |
| 1140 | 1132 | case 0xd4: |
| 1141 | 1133 | case 0xd6: |
| 1142 | | |
| 1134 | | |
| 1143 | 1135 | break; |
| 1144 | 1136 | |
| 1145 | 1137 | case 0xd8: |
| 1146 | 1138 | case 0xda: |
| 1147 | 1139 | case 0xdc: |
| 1148 | 1140 | case 0xde: |
| 1149 | | |
| 1141 | | |
| 1150 | 1142 | break; |
| 1151 | 1143 | |
| 1152 | 1144 | case 0xe4: |
| r14883 | r14884 | |
| 1158 | 1150 | break; |
| 1159 | 1151 | |
| 1160 | 1152 | case 0xe8: |
| 1161 | | |
| 1153 | | |
| 1162 | 1154 | break; |
| 1163 | 1155 | |
| 1164 | 1156 | case 0x90: |
| 1165 | 1157 | |
| 1166 | log_blit( | |
| 1158 | log_blit( | |
| 1167 | 1159 | |
| 1168 | 1160 | switch (data) |
| 1169 | 1161 | { |
| 1170 | case 0x04: blit_fill_xy( | |
| 1162 | case 0x04: blit_fill_xy( | |
| 1171 | 1163 | break; |
| 1172 | case 0x14: blit_fill_xy( | |
| 1164 | case 0x14: blit_fill_xy( | |
| 1173 | 1165 | break; |
| 1174 | 1166 | |
| 1175 | case 0x10: | |
| 1167 | case 0x10: | |
| 1176 | 1168 | break; |
| 1177 | 1169 | |
| 1178 | case 0x13: blit_horiz_line( | |
| 1170 | case 0x13: blit_horiz_line( | |
| 1179 | 1171 | break; |
| 1180 | case 0x1b: blit_vert_line( | |
| 1172 | case 0x1b: blit_vert_line( | |
| 1181 | 1173 | break; |
| 1182 | 1174 | |
| 1183 | case 0x1c: blit_rect_xywh( | |
| 1175 | case 0x1c: blit_rect_xywh( | |
| 1184 | 1176 | break; |
| 1185 | 1177 | |
| 1186 | 1178 | // These two are issued one after the other (43 then 8c) |
| 1187 | 1179 | // 8c is issued immediately after 43 has finished, without |
| 1188 | 1180 | // changing any argument |
| 1189 | 1181 | case 0x43: break; |
| 1190 | case 0x8c: blit_rect_yh( | |
| 1182 | case 0x8c: blit_rect_yh( | |
| 1191 | 1183 | break; |
| 1192 | 1184 | |
| 1193 | 1185 | default: |
| 1194 | 1186 | ; |
| 1195 | 1187 | #ifdef MAME_DEBUG |
| 1196 | 1188 | popmessage("unknown blitter command %02x", data); |
| 1197 | logerror("%06x: unknown blitter command %02x\n", cpu_get_pc(&space | |
| 1189 | logerror("%06x: unknown blitter command %02x\n", cpu_get_pc(&space. | |
| 1198 | 1190 | #endif |
| 1199 | 1191 | } |
| 1200 | 1192 | |
| r14883 | r14884 | |
| 1203 | 1195 | break; |
| 1204 | 1196 | |
| 1205 | 1197 | default: |
| 1206 | logerror("%06x: Blitter 0 reg %02x = %02x\n", cpu_get_pc(&space | |
| 1198 | logerror("%06x: Blitter 0 reg %02x = %02x\n", cpu_get_pc(&space. | |
| 1207 | 1199 | break; |
| 1208 | 1200 | } |
| 1209 | 1201 | |
| r14883 | r14884 | |
| 1211 | 1203 | } |
| 1212 | 1204 | |
| 1213 | 1205 | |
| 1214 | ||
| 1206 | ||
| 1215 | 1207 | { |
| 1216 | blitter_w(space, 0, offset, data, 0xf8); | |
| 1208 | blitter_w(&space, 0, offset, data, 0xf8); | |
| 1217 | 1209 | } |
| 1218 | 1210 | |
| 1219 | ||
| 1211 | ||
| 1220 | 1212 | { |
| 1221 | 1213 | if (ACCESSING_BITS_0_7) |
| 1222 | blitter_w(space, 0, offset, data & 0xff, 0); | |
| 1214 | blitter_w(&space, 0, offset, data & 0xff, 0); | |
| 1223 | 1215 | } |
| 1224 | 1216 | |
| 1225 | 1217 | |
| 1226 | ||
| 1218 | ||
| 1227 | 1219 | { |
| 1228 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1229 | 1220 | |
| 1230 | 1221 | if (ACCESSING_BITS_0_7) |
| 1231 | 1222 | { |
| 1232 | 1223 | if (data & 1) |
| 1233 | 1224 | { |
| 1234 | | |
| 1225 | | |
| 1235 | 1226 | } |
| 1236 | 1227 | else |
| 1237 | 1228 | { |
| 1238 | state->m_ddenlovr_blitter_irq_enable = 0; | |
| 1239 | state->m_ddenlovr_blitter_irq_flag = 0; | |
| 1229 | m_ddenlovr_blitter_irq_enable = 0; | |
| 1230 | m_ddenlovr_blitter_irq_flag = 0; | |
| 1240 | 1231 | } |
| 1241 | 1232 | } |
| 1242 | 1233 | } |
| 1243 | 1234 | |
| 1244 | 1235 | |
| 1245 | ||
| 1236 | ||
| 1246 | 1237 | { |
| 1247 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1248 | UINT8 *rom = space->machine().region("blitter")->base(); | |
| 1249 | size_t size = space->machine().region("blitter")->bytes(); | |
| 1250 | int address = state->m_ddenlovr_blit_address; | |
| 1238 | UINT8 *rom = machine().region("blitter")->base(); | |
| 1239 | size_t size = machine().region("blitter")->bytes(); | |
| 1240 | int address = m_ddenlovr_blit_address; | |
| 1251 | 1241 | |
| 1252 | 1242 | if (address >= size) |
| 1253 | 1243 | { |
| 1254 | logerror("CPU#0 PC %06X: Error, Blitter address %06X out of range\n", cpu_get_pc(&space | |
| 1244 | logerror("CPU#0 PC %06X: Error, Blitter address %06X out of range\n", cpu_get_pc(&space. | |
| 1255 | 1245 | address %= size; |
| 1256 | 1246 | } |
| 1257 | 1247 | |
| 1258 | | |
| 1248 | | |
| 1259 | 1249 | |
| 1260 | 1250 | return rom[address]; |
| 1261 | 1251 | } |
| 1262 | 1252 | |
| 1263 | ||
| 1253 | ||
| 1264 | 1254 | { |
| 1265 | 1255 | return rongrong_gfxrom_r(space, offset); |
| 1266 | 1256 | } |
| r14883 | r14884 | |
| 1407 | 1397 | return 0; |
| 1408 | 1398 | } |
| 1409 | 1399 | |
| 1410 | ||
| 1400 | ||
| 1411 | 1401 | { |
| 1412 | dynax_state *state = field.machine().driver_data<dynax_state>(); | |
| 1413 | return state->m_ddenlovr_blitter_irq_flag; | |
| 1402 | return m_ddenlovr_blitter_irq_flag; | |
| 1414 | 1403 | } |
| 1415 | 1404 | |
| 1416 | ||
| 1405 | ||
| 1417 | 1406 | { |
| 1418 | 1407 | if (ACCESSING_BITS_0_7) |
| 1419 | coin_counter_w( | |
| 1408 | coin_counter_w( | |
| 1420 | 1409 | } |
| 1421 | ||
| 1410 | ||
| 1422 | 1411 | { |
| 1423 | 1412 | if (ACCESSING_BITS_0_7) |
| 1424 | coin_counter_w( | |
| 1413 | coin_counter_w( | |
| 1425 | 1414 | } |
| 1426 | 1415 | |
| 1427 | 1416 | |
| 1428 | ||
| 1417 | ||
| 1429 | 1418 | { |
| 1430 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1431 | 1419 | int r, g, b, d1, d2, indx; |
| 1432 | 1420 | |
| 1433 | | |
| 1421 | | |
| 1434 | 1422 | |
| 1435 | 1423 | indx = ((offset & 0x1e0) >> 1) | (offset & 0x00f); |
| 1436 | d1 = state->m_palram[offset & ~0x10]; | |
| 1437 | d2 = state->m_palram[offset | 0x10]; | |
| 1424 | d1 = m_palram[offset & ~0x10]; | |
| 1425 | d2 = m_palram[offset | 0x10]; | |
| 1438 | 1426 | |
| 1439 | 1427 | r = d1 & 0x1f; |
| 1440 | 1428 | g = d2 & 0x1f; |
| 1441 | 1429 | /* what were they smoking??? */ |
| 1442 | 1430 | b = ((d1 & 0xe0) >> 5) | (d2 & 0xc0) >> 3; |
| 1443 | 1431 | |
| 1444 | palette_set_color_rgb( | |
| 1432 | palette_set_color_rgb( | |
| 1445 | 1433 | } |
| 1446 | 1434 | |
| 1447 | ||
| 1435 | ||
| 1448 | 1436 | { |
| 1449 | 1437 | if (ACCESSING_BITS_0_7) |
| 1450 | 1438 | rongrong_palette_w(space, offset, data & 0xff); |
| 1451 | 1439 | } |
| 1452 | 1440 | |
| 1453 | 1441 | |
| 1454 | WRITE8_ | |
| 1442 | WRITE8_M | |
| 1455 | 1443 | { |
| 1456 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1457 | state->m_ddenlovr_palette_base[offset] = data; | |
| 1444 | m_ddenlovr_palette_base[offset] = data; | |
| 1458 | 1445 | } |
| 1459 | 1446 | |
| 1460 | ||
| 1447 | ||
| 1461 | 1448 | { |
| 1462 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1463 | state->m_ddenlovr_palette_base[offset + 4] = data; | |
| 1449 | m_ddenlovr_palette_base[offset + 4] = data; | |
| 1464 | 1450 | } |
| 1465 | 1451 | |
| 1466 | WRITE8_ | |
| 1452 | WRITE8_M | |
| 1467 | 1453 | { |
| 1468 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1469 | state->m_ddenlovr_palette_mask[offset] = data; | |
| 1454 | m_ddenlovr_palette_mask[offset] = data; | |
| 1470 | 1455 | } |
| 1471 | 1456 | |
| 1472 | ||
| 1457 | ||
| 1473 | 1458 | { |
| 1474 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1475 | state->m_ddenlovr_palette_mask[offset + 4] = data; | |
| 1459 | m_ddenlovr_palette_mask[offset + 4] = data; | |
| 1476 | 1460 | } |
| 1477 | 1461 | |
| 1478 | 1462 | |
| 1479 | WRITE8_ | |
| 1463 | WRITE8_M | |
| 1480 | 1464 | { |
| 1481 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1482 | state->m_ddenlovr_transparency_pen[offset] = data; | |
| 1465 | m_ddenlovr_transparency_pen[offset] = data; | |
| 1483 | 1466 | } |
| 1484 | 1467 | |
| 1485 | ||
| 1468 | ||
| 1486 | 1469 | { |
| 1487 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1488 | state->m_ddenlovr_transparency_pen[offset + 4] = data; | |
| 1470 | m_ddenlovr_transparency_pen[offset + 4] = data; | |
| 1489 | 1471 | } |
| 1490 | 1472 | |
| 1491 | 1473 | |
| 1492 | WRITE8_ | |
| 1474 | WRITE8_M | |
| 1493 | 1475 | { |
| 1494 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1495 | state->m_ddenlovr_transparency_mask[offset] = data; | |
| 1476 | m_ddenlovr_transparency_mask[offset] = data; | |
| 1496 | 1477 | } |
| 1497 | 1478 | |
| 1498 | ||
| 1479 | ||
| 1499 | 1480 | { |
| 1500 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1501 | state->m_ddenlovr_transparency_mask[offset + 4] = data; | |
| 1481 | m_ddenlovr_transparency_mask[offset + 4] = data; | |
| 1502 | 1482 | } |
| 1503 | 1483 | |
| 1504 | 1484 | |
| 1505 | ||
| 1485 | ||
| 1506 | 1486 | { |
| 1507 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1508 | 1487 | |
| 1509 | 1488 | if (ACCESSING_BITS_0_7) |
| 1510 | | |
| 1489 | | |
| 1511 | 1490 | } |
| 1512 | 1491 | |
| 1513 | ||
| 1492 | ||
| 1514 | 1493 | { |
| 1515 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1516 | 1494 | |
| 1517 | 1495 | if (ACCESSING_BITS_0_7) |
| 1518 | | |
| 1496 | | |
| 1519 | 1497 | } |
| 1520 | 1498 | |
| 1521 | ||
| 1499 | ||
| 1522 | 1500 | { |
| 1523 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1524 | 1501 | |
| 1525 | 1502 | if (ACCESSING_BITS_0_7) |
| 1526 | | |
| 1503 | | |
| 1527 | 1504 | } |
| 1528 | 1505 | |
| 1529 | ||
| 1506 | ||
| 1530 | 1507 | { |
| 1531 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1532 | 1508 | |
| 1533 | 1509 | if (ACCESSING_BITS_0_7) |
| 1534 | | |
| 1510 | | |
| 1535 | 1511 | } |
| 1536 | 1512 | |
| 1537 | 1513 | |
| r14883 | r14884 | |
| 1578 | 1554 | |
| 1579 | 1555 | |
| 1580 | 1556 | |
| 1581 | ||
| 1557 | ||
| 1582 | 1558 | { |
| 1583 | 1559 | return 0x78; |
| 1584 | 1560 | } |
| 1585 | 1561 | |
| 1586 | ||
| 1562 | ||
| 1587 | 1563 | { |
| 1588 | 1564 | return unk_r(space, offset); |
| 1589 | 1565 | } |
| r14883 | r14884 | |
| 1595 | 1571 | state->m_dsw_sel = data; |
| 1596 | 1572 | } |
| 1597 | 1573 | |
| 1598 | ||
| 1574 | ||
| 1599 | 1575 | { |
| 1600 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1601 | 1576 | |
| 1602 | 1577 | if (ACCESSING_BITS_0_7) |
| 1603 | | |
| 1578 | | |
| 1604 | 1579 | } |
| 1605 | 1580 | |
| 1606 | ||
| 1581 | ||
| 1607 | 1582 | { |
| 1608 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1609 | state->m_input_sel = data; | |
| 1583 | m_input_sel = data; | |
| 1610 | 1584 | } |
| 1611 | 1585 | |
| 1612 | ||
| 1586 | ||
| 1613 | 1587 | { |
| 1614 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1615 | 1588 | |
| 1616 | 1589 | if (ACCESSING_BITS_0_7) |
| 1617 | | |
| 1590 | | |
| 1618 | 1591 | } |
| 1619 | 1592 | |
| 1620 | ||
| 1593 | ||
| 1621 | 1594 | { |
| 1622 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1623 | 1595 | |
| 1624 | // logerror("%04x: input2_r offset %d select %x\n", cpu_get_pc(&space | |
| 1596 | // logerror("%04x: input2_r offset %d select %x\n", cpu_get_pc(&space. | |
| 1625 | 1597 | /* 0 and 1 are read from offset 1, 2 from offset 0... */ |
| 1626 | switch ( | |
| 1598 | switch ( | |
| 1627 | 1599 | { |
| 1628 | case 0x00: return input_port_read(space->machine(), "P1"); | |
| 1629 | case 0x01: return input_port_read(space->machine(), "P2"); | |
| 1630 | case 0x02: return input_port_read(space->machine(), "SYSTEM"); | |
| 1600 | case 0x00: return input_port_read(machine(), "P1"); | |
| 1601 | case 0x01: return input_port_read(machine(), "P2"); | |
| 1602 | case 0x02: return input_port_read(machine(), "SYSTEM"); | |
| 1631 | 1603 | } |
| 1632 | 1604 | return 0xff; |
| 1633 | 1605 | } |
| r14883 | r14884 | |
| 1645 | 1617 | return 0xff; |
| 1646 | 1618 | } |
| 1647 | 1619 | |
| 1648 | ||
| 1620 | ||
| 1649 | 1621 | { |
| 1650 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1651 | 1622 | |
| 1652 | // logerror("%04x: input2_r offset %d select %x\n",cpu_get_pc(&space | |
| 1623 | // logerror("%04x: input2_r offset %d select %x\n",cpu_get_pc(&space. | |
| 1653 | 1624 | /* 0 and 1 are read from offset 1, 2 from offset 0... */ |
| 1654 | switch ( | |
| 1625 | switch ( | |
| 1655 | 1626 | { |
| 1656 | case 0x10: return input_port_read(space->machine(), "P1"); | |
| 1657 | case 0x11: return input_port_read(space->machine(), "P2"); | |
| 1658 | case 0x12: return input_port_read(space->machine(), "SYSTEM"); | |
| 1627 | case 0x10: return input_port_read(machine(), "P1"); | |
| 1628 | case 0x11: return input_port_read(machine(), "P2"); | |
| 1629 | case 0x12: return input_port_read(machine(), "SYSTEM"); | |
| 1659 | 1630 | } |
| 1660 | 1631 | return 0xff; |
| 1661 | 1632 | } |
| 1662 | 1633 | |
| 1663 | 1634 | |
| 1664 | ||
| 1635 | ||
| 1665 | 1636 | { |
| 1666 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1667 | state->m_rongrong_blitter_busy_select = data; | |
| 1637 | m_rongrong_blitter_busy_select = data; | |
| 1668 | 1638 | |
| 1669 | 1639 | if (data != 0x18) |
| 1670 | logerror("%04x: rongrong_blitter_busy_w data = %02x\n", cpu_get_pc(&space | |
| 1640 | logerror("%04x: rongrong_blitter_busy_w data = %02x\n", cpu_get_pc(&space. | |
| 1671 | 1641 | } |
| 1672 | 1642 | |
| 1673 | ||
| 1643 | ||
| 1674 | 1644 | { |
| 1675 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1676 | 1645 | |
| 1677 | switch ( | |
| 1646 | switch ( | |
| 1678 | 1647 | { |
| 1679 | 1648 | case 0x18: return 0; // bit 5 = blitter busy |
| 1680 | 1649 | |
| 1681 | 1650 | default: |
| 1682 | logerror("%04x: rongrong_blitter_busy_r with select = %02x\n", cpu_get_pc(&space | |
| 1651 | logerror("%04x: rongrong_blitter_busy_r with select = %02x\n", cpu_get_pc(&space. | |
| 1683 | 1652 | } |
| 1684 | 1653 | return 0xff; |
| 1685 | 1654 | } |
| 1686 | 1655 | |
| 1687 | 1656 | |
| 1688 | ||
| 1657 | ||
| 1689 | 1658 | { |
| 1690 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1691 | 1659 | |
| 1692 | 1660 | if (ACCESSING_BITS_0_7) |
| 1693 | 1661 | { |
| 1694 | if ( | |
| 1662 | if ( | |
| 1695 | 1663 | { |
| 1696 | coin_counter_w(space->machine(), 0, ~data & 1); | |
| 1697 | coin_counter_w(space->machine(), 1, ~data & 4); | |
| 1664 | coin_counter_w(machine(), 0, ~data & 1); | |
| 1665 | coin_counter_w(machine(), 1, ~data & 4); | |
| 1698 | 1666 | } |
| 1699 | 1667 | } |
| 1700 | 1668 | } |
| r14883 | r14884 | |
| 1703 | 1671 | 37,28,12 11 -> 88 |
| 1704 | 1672 | 67,4c,3a ?? -> 51 |
| 1705 | 1673 | */ |
| 1706 | ||
| 1674 | ||
| 1707 | 1675 | { |
| 1708 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1709 | 1676 | |
| 1710 | switch ( | |
| 1677 | switch ( | |
| 1711 | 1678 | { |
| 1712 | 1679 | case 0x3a: |
| 1713 | 1680 | return 0x0051; |
| r14883 | r14884 | |
| 1716 | 1683 | } |
| 1717 | 1684 | } |
| 1718 | 1685 | |
| 1719 | ||
| 1686 | ||
| 1720 | 1687 | { |
| 1721 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1722 | COMBINE_DATA(state->m_quiz365_protection + offset); | |
| 1688 | COMBINE_DATA(m_quiz365_protection + offset); | |
| 1723 | 1689 | } |
| 1724 | 1690 | |
| 1725 | 1691 | static ADDRESS_MAP_START( quiz365_map, AS_PROGRAM, 16, dynax_state ) |
| 1726 | 1692 | AM_RANGE(0x000000, 0x17ffff) AM_ROM // ROM |
| 1727 | 1693 | |
| 1728 | AM_RANGE(0x200000, 0x2003ff) AM_WRITE | |
| 1694 | AM_RANGE(0x200000, 0x2003ff) AM_WRITE | |
| 1729 | 1695 | |
| 1730 | AM_RANGE(0x200c02, 0x200c03) AM_READ_LEGACY(quiz365_protection_r) // Protection | |
| 1731 | AM_RANGE(0x200e0a, 0x200e0d) AM_WRITE_LEGACY(quiz365_protection_w) // Protection | |
| 1696 | AM_RANGE(0x200c02, 0x200c03) AM_READ(quiz365_protection_r) // Protection | |
| 1697 | AM_RANGE(0x200e0a, 0x200e0d) AM_WRITE(quiz365_protection_w) // Protection | |
| 1732 | 1698 | // AM_RANGE(0x201000, 0x2017ff) AM_WRITEONLY // ? |
| 1733 | 1699 | |
| 1734 | AM_RANGE(0x300200, 0x300201) AM_WRITE_LEGACY(ddenlovr_select2_16_w) | |
| 1735 | AM_RANGE(0x300202, 0x300203) AM_WRITE_LEGACY(quiz365_coincounter_w) // Coin Counters + more stuff written on startup | |
| 1736 | AM_RANGE(0x300204, 0x300207) AM_READ_LEGACY(quiz365_input2_r) // | |
| 1700 | AM_RANGE(0x300200, 0x300201) AM_WRITE(ddenlovr_select2_16_w) | |
| 1701 | AM_RANGE(0x300202, 0x300203) AM_WRITE(quiz365_coincounter_w) // Coin Counters + more stuff written on startup | |
| 1702 | AM_RANGE(0x300204, 0x300207) AM_READ(quiz365_input2_r) // | |
| 1737 | 1703 | |
| 1738 | AM_RANGE(0x300240, 0x300247) AM_WRITE_LEGACY(ddenlovr16_palette_base_w) | |
| 1739 | AM_RANGE(0x300248, 0x30024f) AM_WRITE_LEGACY(ddenlovr16_palette_mask_w) | |
| 1740 | AM_RANGE(0x300250, 0x300257) AM_WRITE_LEGACY(ddenlovr16_transparency_pen_w) | |
| 1741 | AM_RANGE(0x300258, 0x30025f) AM_WRITE_LEGACY(ddenlovr16_transparency_mask_w) | |
| 1742 | AM_RANGE(0x300268, 0x300269) AM_WRITE_LEGACY(ddenlovr16_bgcolor_w) | |
| 1743 | AM_RANGE(0x30026a, 0x30026b) AM_WRITE_LEGACY(ddenlovr16_priority_w) | |
| 1744 | AM_RANGE(0x30026c, 0x30026d) AM_WRITE_LEGACY(ddenlovr16_layer_enable_w) | |
| 1745 | AM_RANGE(0x300270, 0x300271) AM_READ_LEGACY(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 1746 | AM_RANGE(0x300280, 0x300283) AM_WRITE_LEGACY(ddenlovr_blitter_w) | |
| 1747 | AM_RANGE(0x300286, 0x300287) AM_READ_LEGACY(ddenlovr_gfxrom_r) // Video Chip | |
| 1704 | AM_RANGE(0x300240, 0x300247) AM_WRITE(ddenlovr16_palette_base_w) | |
| 1705 | AM_RANGE(0x300248, 0x30024f) AM_WRITE(ddenlovr16_palette_mask_w) | |
| 1706 | AM_RANGE(0x300250, 0x300257) AM_WRITE(ddenlovr16_transparency_pen_w) | |
| 1707 | AM_RANGE(0x300258, 0x30025f) AM_WRITE(ddenlovr16_transparency_mask_w) | |
| 1708 | AM_RANGE(0x300268, 0x300269) AM_WRITE(ddenlovr16_bgcolor_w) | |
| 1709 | AM_RANGE(0x30026a, 0x30026b) AM_WRITE(ddenlovr16_priority_w) | |
| 1710 | AM_RANGE(0x30026c, 0x30026d) AM_WRITE(ddenlovr16_layer_enable_w) | |
| 1711 | AM_RANGE(0x300270, 0x300271) AM_READ(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 1712 | AM_RANGE(0x300280, 0x300283) AM_WRITE(ddenlovr_blitter_w) | |
| 1713 | AM_RANGE(0x300286, 0x300287) AM_READ(ddenlovr_gfxrom_r) // Video Chip | |
| 1748 | 1714 | |
| 1749 | 1715 | AM_RANGE(0x3002c0, 0x3002c1) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)// Sound |
| 1750 | 1716 | AM_RANGE(0x300300, 0x300303) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| r14883 | r14884 | |
| 1752 | 1718 | AM_RANGE(0x300380, 0x300383) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) |
| 1753 | 1719 | AM_RANGE(0x300384, 0x300385) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) |
| 1754 | 1720 | AM_RANGE(0x3003c2, 0x3003c3) AM_DEVWRITE_LEGACY("oki", quiz365_oki_bank1_w) |
| 1755 | AM_RANGE(0x3003ca, 0x3003cb) AM_WRITE | |
| 1721 | AM_RANGE(0x3003ca, 0x3003cb) AM_WRITE | |
| 1756 | 1722 | AM_RANGE(0x3003cc, 0x3003cd) AM_DEVWRITE_LEGACY("oki", quiz365_oki_bank2_w) |
| 1757 | 1723 | |
| 1758 | 1724 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // RAM |
| 1759 | 1725 | ADDRESS_MAP_END |
| 1760 | 1726 | |
| 1761 | 1727 | |
| 1762 | ||
| 1728 | ||
| 1763 | 1729 | { |
| 1764 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1765 | 1730 | UINT16 dsw = 0; |
| 1766 | if ((~*state->m_dsw_sel16) & 0x01) dsw |= input_port_read(space->machine(), "DSW1"); | |
| 1767 | if ((~*state->m_dsw_sel16) & 0x02) dsw |= input_port_read(space->machine(), "DSW2"); | |
| 1768 | if ((~*state->m_dsw_sel16) & 0x04) dsw |= input_port_read(space->machine(), "DSW3"); | |
| 1731 | if ((~*m_dsw_sel16) & 0x01) dsw |= input_port_read(machine(), "DSW1"); | |
| 1732 | if ((~*m_dsw_sel16) & 0x02) dsw |= input_port_read(machine(), "DSW2"); | |
| 1733 | if ((~*m_dsw_sel16) & 0x04) dsw |= input_port_read(machine(), "DSW3"); | |
| 1769 | 1734 | return dsw; |
| 1770 | 1735 | } |
| 1771 | 1736 | |
| 1772 | ||
| 1737 | ||
| 1773 | 1738 | { |
| 1774 | 1739 | if (ACCESSING_BITS_0_7) |
| 1775 | 1740 | { |
| 1776 | coin_counter_w(space->machine(), 0, data & 0x01); | |
| 1777 | coin_counter_w(space->machine(), 1, data & 0x04); | |
| 1741 | coin_counter_w(machine(), 0, data & 0x01); | |
| 1742 | coin_counter_w(machine(), 1, data & 0x04); | |
| 1778 | 1743 | // data & 0x80 ? |
| 1779 | 1744 | } |
| 1780 | 1745 | } |
| 1781 | 1746 | |
| 1782 | ||
| 1747 | ||
| 1783 | 1748 | { |
| 1784 | dynax_state *state = field.machine().driver_data<dynax_state>(); | |
| 1785 | return state->m_ddenlovr_blitter_irq_flag ? 0x03 : 0x00; // bit 4 = 1 -> blitter busy | |
| 1749 | return m_ddenlovr_blitter_irq_flag ? 0x03 : 0x00; // bit 4 = 1 -> blitter busy | |
| 1786 | 1750 | } |
| 1787 | 1751 | |
| 1788 | 1752 | static ADDRESS_MAP_START( ddenlovj_map, AS_PROGRAM, 16, dynax_state ) |
| 1789 | 1753 | AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM |
| 1790 | 1754 | |
| 1791 | AM_RANGE(0x200000, 0x2003ff) AM_WRITE | |
| 1755 | AM_RANGE(0x200000, 0x2003ff) AM_WRITE | |
| 1792 | 1756 | // AM_RANGE(0x201000, 0x2017ff) AM_WRITEONLY // ? B0 on startup, then 00 |
| 1793 | 1757 | |
| 1794 | AM_RANGE(0x300040, 0x300047) AM_WRITE_LEGACY(ddenlovr16_palette_base_w) | |
| 1795 | AM_RANGE(0x300048, 0x30004f) AM_WRITE_LEGACY(ddenlovr16_palette_mask_w) | |
| 1796 | AM_RANGE(0x300050, 0x300057) AM_WRITE_LEGACY(ddenlovr16_transparency_pen_w) | |
| 1797 | AM_RANGE(0x300058, 0x30005f) AM_WRITE_LEGACY(ddenlovr16_transparency_mask_w) | |
| 1798 | AM_RANGE(0x300068, 0x300069) AM_WRITE_LEGACY(ddenlovr16_bgcolor_w) | |
| 1799 | AM_RANGE(0x30006a, 0x30006b) AM_WRITE_LEGACY(ddenlovr16_priority_w) | |
| 1800 | AM_RANGE(0x30006c, 0x30006d) AM_WRITE_LEGACY(ddenlovr16_layer_enable_w) | |
| 1801 | AM_RANGE(0x300070, 0x300071) AM_READ_LEGACY(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 1802 | AM_RANGE(0x300080, 0x300083) AM_WRITE_LEGACY(ddenlovr_blitter_w) | |
| 1803 | AM_RANGE(0x300086, 0x300087) AM_READ_LEGACY(ddenlovr_gfxrom_r) // Video Chip | |
| 1758 | AM_RANGE(0x300040, 0x300047) AM_WRITE(ddenlovr16_palette_base_w) | |
| 1759 | AM_RANGE(0x300048, 0x30004f) AM_WRITE(ddenlovr16_palette_mask_w) | |
| 1760 | AM_RANGE(0x300050, 0x300057) AM_WRITE(ddenlovr16_transparency_pen_w) | |
| 1761 | AM_RANGE(0x300058, 0x30005f) AM_WRITE(ddenlovr16_transparency_mask_w) | |
| 1762 | AM_RANGE(0x300068, 0x300069) AM_WRITE(ddenlovr16_bgcolor_w) | |
| 1763 | AM_RANGE(0x30006a, 0x30006b) AM_WRITE(ddenlovr16_priority_w) | |
| 1764 | AM_RANGE(0x30006c, 0x30006d) AM_WRITE(ddenlovr16_layer_enable_w) | |
| 1765 | AM_RANGE(0x300070, 0x300071) AM_READ(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 1766 | AM_RANGE(0x300080, 0x300083) AM_WRITE(ddenlovr_blitter_w) | |
| 1767 | AM_RANGE(0x300086, 0x300087) AM_READ(ddenlovr_gfxrom_r) // Video Chip | |
| 1804 | 1768 | AM_RANGE(0x3000c0, 0x3000c3) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 1805 | 1769 | AM_RANGE(0x300100, 0x30011f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| 1806 | 1770 | AM_RANGE(0x300140, 0x300143) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) |
| 1807 | 1771 | AM_RANGE(0x300180, 0x300181) AM_READ_PORT("P1") |
| 1808 | 1772 | AM_RANGE(0x300182, 0x300183) AM_READ_PORT("P2") |
| 1809 | 1773 | AM_RANGE(0x300184, 0x300185) AM_READ_PORT("SYSTEM") |
| 1810 | AM_RANGE(0x300186, 0x300187) AM_READ_LEGACY(ddenlovj_dsw_r) // DSW | |
| 1811 | AM_RANGE(0x300188, 0x300189) AM_WRITE_LEGACY(ddenlovj_coincounter_w) // Coin Counters | |
| 1774 | AM_RANGE(0x300186, 0x300187) AM_READ(ddenlovj_dsw_r) // DSW | |
| 1775 | AM_RANGE(0x300188, 0x300189) AM_WRITE(ddenlovj_coincounter_w) // Coin Counters | |
| 1812 | 1776 | AM_RANGE(0x30018a, 0x30018b) AM_WRITEONLY AM_BASE(m_dsw_sel16) // DSW select |
| 1813 | 1777 | AM_RANGE(0x30018c, 0x30018d) AM_DEVWRITE_LEGACY("oki", ddenlovr_oki_bank_w) |
| 1814 | AM_RANGE(0x3001ca, 0x3001cb) AM_WRITE | |
| 1778 | AM_RANGE(0x3001ca, 0x3001cb) AM_WRITE | |
| 1815 | 1779 | AM_RANGE(0x300240, 0x300241) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)// Sound |
| 1816 | 1780 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // RAM |
| 1817 | 1781 | ADDRESS_MAP_END |
| 1818 | 1782 | |
| 1819 | 1783 | |
| 1820 | ||
| 1784 | ||
| 1821 | 1785 | { |
| 1822 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1823 | switch (*state->m_protection1) | |
| 1786 | switch (*m_protection1) | |
| 1824 | 1787 | { |
| 1825 | 1788 | case 0x007e: return 0x00aa; |
| 1826 | 1789 | } |
| 1827 | return * | |
| 1790 | return * | |
| 1828 | 1791 | } |
| 1829 | 1792 | |
| 1830 | ||
| 1793 | ||
| 1831 | 1794 | { |
| 1832 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1833 | switch (*state->m_protection1) | |
| 1795 | switch (*m_protection1) | |
| 1834 | 1796 | { |
| 1835 | case 0x0000: return * | |
| 1797 | case 0x0000: return * | |
| 1836 | 1798 | } |
| 1837 | 1799 | return 0x80; |
| 1838 | 1800 | } |
| 1839 | ||
| 1801 | ||
| 1840 | 1802 | { |
| 1841 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1842 | 1803 | |
| 1843 | COMBINE_DATA(state->m_protection2); | |
| 1844 | state->m_oki->set_bank_base(((*state->m_protection2) & 0x7) * 0x40000); | |
| 1804 | COMBINE_DATA(m_protection2); | |
| 1805 | m_oki->set_bank_base(((*m_protection2) & 0x7) * 0x40000); | |
| 1845 | 1806 | } |
| 1846 | 1807 | |
| 1847 | 1808 | static ADDRESS_MAP_START( ddenlovrk_map, AS_PROGRAM, 16, dynax_state ) |
| 1848 | 1809 | AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM |
| 1849 | 1810 | |
| 1850 | AM_RANGE(0x100000, 0x100001) AM_RAM_READ_LEGACY(ddenlovrk_protection1_r) AM_BASE(m_protection1) | |
| 1851 | AM_RANGE(0x200000, 0x200001) AM_READWRITE_LEGACY(ddenlovrk_protection2_r, ddenlovrk_protection2_w) AM_BASE(m_protection2) | |
| 1811 | AM_RANGE(0x100000, 0x100001) AM_RAM_READ(ddenlovrk_protection1_r) AM_BASE(m_protection1) | |
| 1812 | AM_RANGE(0x200000, 0x200001) AM_READWRITE(ddenlovrk_protection2_r, ddenlovrk_protection2_w) AM_BASE(m_protection2) | |
| 1852 | 1813 | |
| 1853 | AM_RANGE(0xd00000, 0xd003ff) AM_WRITE | |
| 1814 | AM_RANGE(0xd00000, 0xd003ff) AM_WRITE | |
| 1854 | 1815 | // AM_RANGE(0xd01000, 0xd017ff) AM_RAM // ? B0 on startup, then 00 |
| 1855 | 1816 | |
| 1856 | AM_RANGE(0xe00040, 0xe00047) AM_WRITE_LEGACY(ddenlovr16_palette_base_w) | |
| 1857 | AM_RANGE(0xe00048, 0xe0004f) AM_WRITE_LEGACY(ddenlovr16_palette_mask_w) | |
| 1858 | AM_RANGE(0xe00050, 0xe00057) AM_WRITE_LEGACY(ddenlovr16_transparency_pen_w) | |
| 1859 | AM_RANGE(0xe00058, 0xe0005f) AM_WRITE_LEGACY(ddenlovr16_transparency_mask_w) | |
| 1860 | AM_RANGE(0xe00068, 0xe00069) AM_WRITE_LEGACY(ddenlovr16_bgcolor_w) | |
| 1861 | AM_RANGE(0xe0006a, 0xe0006b) AM_WRITE_LEGACY(ddenlovr16_priority_w) | |
| 1862 | AM_RANGE(0xe0006c, 0xe0006d) AM_WRITE_LEGACY(ddenlovr16_layer_enable_w) | |
| 1817 | AM_RANGE(0xe00040, 0xe00047) AM_WRITE(ddenlovr16_palette_base_w) | |
| 1818 | AM_RANGE(0xe00048, 0xe0004f) AM_WRITE(ddenlovr16_palette_mask_w) | |
| 1819 | AM_RANGE(0xe00050, 0xe00057) AM_WRITE(ddenlovr16_transparency_pen_w) | |
| 1820 | AM_RANGE(0xe00058, 0xe0005f) AM_WRITE(ddenlovr16_transparency_mask_w) | |
| 1821 | AM_RANGE(0xe00068, 0xe00069) AM_WRITE(ddenlovr16_bgcolor_w) | |
| 1822 | AM_RANGE(0xe0006a, 0xe0006b) AM_WRITE(ddenlovr16_priority_w) | |
| 1823 | AM_RANGE(0xe0006c, 0xe0006d) AM_WRITE(ddenlovr16_layer_enable_w) | |
| 1863 | 1824 | AM_RANGE(0xe00070, 0xe00071) AM_READNOP |
| 1864 | AM_RANGE(0xe00080, 0xe00083) AM_WRITE_LEGACY(ddenlovr_blitter_w) | |
| 1865 | AM_RANGE(0xe00086, 0xe00087) AM_READ_LEGACY(ddenlovr_gfxrom_r) // Video Chip | |
| 1825 | AM_RANGE(0xe00080, 0xe00083) AM_WRITE(ddenlovr_blitter_w) | |
| 1826 | AM_RANGE(0xe00086, 0xe00087) AM_READ(ddenlovr_gfxrom_r) // Video Chip | |
| 1866 | 1827 | |
| 1867 | 1828 | AM_RANGE(0xe00100, 0xe00101) AM_READ_PORT("P1") |
| 1868 | 1829 | AM_RANGE(0xe00102, 0xe00103) AM_READ_PORT("P2") |
| 1869 | 1830 | AM_RANGE(0xe00104, 0xe00105) AM_READ_PORT("SYSTEM") |
| 1870 | 1831 | AM_RANGE(0xe00200, 0xe00201) AM_READ_PORT("DSW") |
| 1871 | AM_RANGE(0xe00302, 0xe00303) AM_WRITE_LEGACY(ddenlovr_blitter_irq_ack_w) // Blitter irq acknowledge | |
| 1872 | AM_RANGE(0xe00308, 0xe00309) AM_WRITE_LEGACY(ddenlovr_coincounter_0_w) // Coin Counters | |
| 1873 | AM_RANGE(0xe0030c, 0xe0030d) AM_WRITE_LEGACY(ddenlovr_coincounter_1_w) // | |
| 1832 | AM_RANGE(0xe00302, 0xe00303) AM_WRITE(ddenlovr_blitter_irq_ack_w) // Blitter irq acknowledge | |
| 1833 | AM_RANGE(0xe00308, 0xe00309) AM_WRITE(ddenlovr_coincounter_0_w) // Coin Counters | |
| 1834 | AM_RANGE(0xe0030c, 0xe0030d) AM_WRITE(ddenlovr_coincounter_1_w) // | |
| 1874 | 1835 | |
| 1875 | 1836 | AM_RANGE(0xe00400, 0xe00403) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 1876 | 1837 | AM_RANGE(0xe00500, 0xe0051f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| r14883 | r14884 | |
| 1888 | 1849 | |
| 1889 | 1850 | AM_RANGE(0x300000, 0x300001) AM_DEVWRITE_LEGACY("oki", ddenlovr_oki_bank_w) |
| 1890 | 1851 | |
| 1891 | AM_RANGE(0xd00000, 0xd003ff) AM_WRITE | |
| 1852 | AM_RANGE(0xd00000, 0xd003ff) AM_WRITE | |
| 1892 | 1853 | // AM_RANGE(0xd01000, 0xd017ff) AM_RAM // ? B0 on startup, then 00 |
| 1893 | 1854 | |
| 1894 | AM_RANGE(0xe00040, 0xe00047) AM_WRITE_LEGACY(ddenlovr16_palette_base_w) | |
| 1895 | AM_RANGE(0xe00048, 0xe0004f) AM_WRITE_LEGACY(ddenlovr16_palette_mask_w) | |
| 1896 | AM_RANGE(0xe00050, 0xe00057) AM_WRITE_LEGACY(ddenlovr16_transparency_pen_w) | |
| 1897 | AM_RANGE(0xe00058, 0xe0005f) AM_WRITE_LEGACY(ddenlovr16_transparency_mask_w) | |
| 1898 | AM_RANGE(0xe00068, 0xe00069) AM_WRITE_LEGACY(ddenlovr16_bgcolor_w) | |
| 1899 | AM_RANGE(0xe0006a, 0xe0006b) AM_WRITE_LEGACY(ddenlovr16_priority_w) | |
| 1900 | AM_RANGE(0xe0006c, 0xe0006d) AM_WRITE_LEGACY(ddenlovr16_layer_enable_w) | |
| 1901 | AM_RANGE(0xe00070, 0xe00071) AM_READ_LEGACY(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 1902 | AM_RANGE(0xe00080, 0xe00083) AM_WRITE_LEGACY(ddenlovr_blitter_w) | |
| 1903 | AM_RANGE(0xe00086, 0xe00087) AM_READ_LEGACY(ddenlovr_gfxrom_r) // Video Chip | |
| 1855 | AM_RANGE(0xe00040, 0xe00047) AM_WRITE(ddenlovr16_palette_base_w) | |
| 1856 | AM_RANGE(0xe00048, 0xe0004f) AM_WRITE(ddenlovr16_palette_mask_w) | |
| 1857 | AM_RANGE(0xe00050, 0xe00057) AM_WRITE(ddenlovr16_transparency_pen_w) | |
| 1858 | AM_RANGE(0xe00058, 0xe0005f) AM_WRITE(ddenlovr16_transparency_mask_w) | |
| 1859 | AM_RANGE(0xe00068, 0xe00069) AM_WRITE(ddenlovr16_bgcolor_w) | |
| 1860 | AM_RANGE(0xe0006a, 0xe0006b) AM_WRITE(ddenlovr16_priority_w) | |
| 1861 | AM_RANGE(0xe0006c, 0xe0006d) AM_WRITE(ddenlovr16_layer_enable_w) | |
| 1862 | AM_RANGE(0xe00070, 0xe00071) AM_READ(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 1863 | AM_RANGE(0xe00080, 0xe00083) AM_WRITE(ddenlovr_blitter_w) | |
| 1864 | AM_RANGE(0xe00086, 0xe00087) AM_READ(ddenlovr_gfxrom_r) // Video Chip | |
| 1904 | 1865 | |
| 1905 | 1866 | AM_RANGE(0xe00100, 0xe00101) AM_READ_PORT("P1") |
| 1906 | 1867 | AM_RANGE(0xe00102, 0xe00103) AM_READ_PORT("P2") |
| 1907 | 1868 | AM_RANGE(0xe00104, 0xe00105) AM_READ_PORT("SYSTEM") |
| 1908 | 1869 | AM_RANGE(0xe00200, 0xe00201) AM_READ_PORT("DSW") |
| 1909 | AM_RANGE(0xe00302, 0xe00303) AM_WRITE_LEGACY(ddenlovr_blitter_irq_ack_w) // Blitter irq acknowledge | |
| 1910 | AM_RANGE(0xe00308, 0xe00309) AM_WRITE_LEGACY(ddenlovr_coincounter_0_w) // Coin Counters | |
| 1911 | AM_RANGE(0xe0030c, 0xe0030d) AM_WRITE_LEGACY(ddenlovr_coincounter_1_w) // | |
| 1870 | AM_RANGE(0xe00302, 0xe00303) AM_WRITE(ddenlovr_blitter_irq_ack_w) // Blitter irq acknowledge | |
| 1871 | AM_RANGE(0xe00308, 0xe00309) AM_WRITE(ddenlovr_coincounter_0_w) // Coin Counters | |
| 1872 | AM_RANGE(0xe0030c, 0xe0030d) AM_WRITE(ddenlovr_coincounter_1_w) // | |
| 1912 | 1873 | |
| 1913 | 1874 | AM_RANGE(0xe00400, 0xe00403) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 1914 | 1875 | AM_RANGE(0xe00500, 0xe0051f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| r14883 | r14884 | |
| 1919 | 1880 | ADDRESS_MAP_END |
| 1920 | 1881 | |
| 1921 | 1882 | |
| 1922 | ||
| 1883 | ||
| 1923 | 1884 | { |
| 1924 | dynax_state *state = field.machine().driver_data<dynax_state>(); | |
| 1925 | return state->m_ddenlovr_blitter_irq_flag ? 0x03 : 0x00; | |
| 1885 | return m_ddenlovr_blitter_irq_flag ? 0x03 : 0x00; | |
| 1926 | 1886 | } |
| 1927 | 1887 | |
| 1928 | ||
| 1888 | ||
| 1929 | 1889 | { |
| 1930 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1931 | 1890 | |
| 1932 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(space->machine(), "DSW1"); | |
| 1933 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(space->machine(), "DSW2"); | |
| 1934 | if (!BIT(state->m_dsw_sel, 2)) return input_port_read(space->machine(), "DSW3"); | |
| 1891 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 1892 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 1893 | if (!BIT(m_dsw_sel, 2)) return input_port_read(machine(), "DSW3"); | |
| 1935 | 1894 | return 0xffff; |
| 1936 | 1895 | } |
| 1937 | 1896 | |
| r14883 | r14884 | |
| 1942 | 1901 | Writes 67 4c 3a to 200e0b then 19 to 200e0d. Expects to read 51 from 200c03 |
| 1943 | 1902 | */ |
| 1944 | 1903 | |
| 1945 | ||
| 1904 | ||
| 1946 | 1905 | { |
| 1947 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 1948 | 1906 | |
| 1949 | switch ( | |
| 1907 | switch ( | |
| 1950 | 1908 | { |
| 1951 | 1909 | case 0x3a: return 0x0051; |
| 1952 | 1910 | default: return 0x0088; |
| 1953 | 1911 | } |
| 1954 | 1912 | } |
| 1955 | 1913 | |
| 1956 | ||
| 1914 | ||
| 1957 | 1915 | { |
| 1958 | 1916 | if (ACCESSING_BITS_0_7) |
| 1959 | 1917 | { |
| 1960 | coin_counter_w(space->machine(), 0, data & 0x01); | |
| 1961 | coin_counter_w(space->machine(), 1, data & 0x04); | |
| 1918 | coin_counter_w(machine(), 0, data & 0x01); | |
| 1919 | coin_counter_w(machine(), 1, data & 0x04); | |
| 1962 | 1920 | // data & 0x80 ? |
| 1963 | 1921 | } |
| 1964 | 1922 | } |
| r14883 | r14884 | |
| 1975 | 1933 | static ADDRESS_MAP_START( nettoqc_map, AS_PROGRAM, 16, dynax_state ) |
| 1976 | 1934 | AM_RANGE(0x000000, 0x17ffff) AM_ROM // ROM |
| 1977 | 1935 | |
| 1978 | AM_RANGE(0x200000, 0x2003ff) AM_WRITE_LEGACY(ddenlovr_palette_w) // Palette | |
| 1979 | AM_RANGE(0x200c02, 0x200c03) AM_READ_LEGACY(nettoqc_protection_r) // | |
| 1936 | AM_RANGE(0x200000, 0x2003ff) AM_WRITE(ddenlovr_palette_w) // Palette | |
| 1937 | AM_RANGE(0x200c02, 0x200c03) AM_READ(nettoqc_protection_r) // | |
| 1980 | 1938 | AM_RANGE(0x200e0a, 0x200e0d) AM_WRITEONLY AM_BASE(m_protection1) // |
| 1981 | 1939 | AM_RANGE(0x201000, 0x2017ff) AM_WRITEONLY // ? |
| 1982 | 1940 | |
| 1983 | AM_RANGE(0x300040, 0x300047) AM_WRITE_LEGACY(ddenlovr16_palette_base_w) | |
| 1984 | AM_RANGE(0x300048, 0x30004f) AM_WRITE_LEGACY(ddenlovr16_palette_mask_w) | |
| 1985 | AM_RANGE(0x300050, 0x300057) AM_WRITE_LEGACY(ddenlovr16_transparency_pen_w) | |
| 1986 | AM_RANGE(0x300058, 0x30005f) AM_WRITE_LEGACY(ddenlovr16_transparency_mask_w) | |
| 1987 | AM_RANGE(0x300068, 0x300069) AM_WRITE_LEGACY(ddenlovr16_bgcolor_w) | |
| 1988 | AM_RANGE(0x30006a, 0x30006b) AM_WRITE_LEGACY(ddenlovr16_priority_w) | |
| 1989 | AM_RANGE(0x30006c, 0x30006d) AM_WRITE_LEGACY(ddenlovr16_layer_enable_w) | |
| 1990 | AM_RANGE(0x300070, 0x300071) AM_READ_LEGACY(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 1991 | AM_RANGE(0x300080, 0x300083) AM_WRITE_LEGACY(ddenlovr_blitter_w) | |
| 1992 | AM_RANGE(0x300086, 0x300087) AM_READ_LEGACY(ddenlovr_gfxrom_r) // Video Chip | |
| 1941 | AM_RANGE(0x300040, 0x300047) AM_WRITE(ddenlovr16_palette_base_w) | |
| 1942 | AM_RANGE(0x300048, 0x30004f) AM_WRITE(ddenlovr16_palette_mask_w) | |
| 1943 | AM_RANGE(0x300050, 0x300057) AM_WRITE(ddenlovr16_transparency_pen_w) | |
| 1944 | AM_RANGE(0x300058, 0x30005f) AM_WRITE(ddenlovr16_transparency_mask_w) | |
| 1945 | AM_RANGE(0x300068, 0x300069) AM_WRITE(ddenlovr16_bgcolor_w) | |
| 1946 | AM_RANGE(0x30006a, 0x30006b) AM_WRITE(ddenlovr16_priority_w) | |
| 1947 | AM_RANGE(0x30006c, 0x30006d) AM_WRITE(ddenlovr16_layer_enable_w) | |
| 1948 | AM_RANGE(0x300070, 0x300071) AM_READ(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 1949 | AM_RANGE(0x300080, 0x300083) AM_WRITE(ddenlovr_blitter_w) | |
| 1950 | AM_RANGE(0x300086, 0x300087) AM_READ(ddenlovr_gfxrom_r) // Video Chip | |
| 1993 | 1951 | AM_RANGE(0x3000c0, 0x3000c3) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 1994 | 1952 | AM_RANGE(0x300100, 0x30011f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| 1995 | 1953 | AM_RANGE(0x300140, 0x300143) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) |
| 1996 | 1954 | AM_RANGE(0x300180, 0x300181) AM_READ_PORT("P1") |
| 1997 | 1955 | AM_RANGE(0x300182, 0x300183) AM_READ_PORT("P2") |
| 1998 | 1956 | AM_RANGE(0x300184, 0x300185) AM_READ_PORT("SYSTEM") |
| 1999 | AM_RANGE(0x300186, 0x300187) AM_READ_LEGACY(nettoqc_input_r) // DSW's | |
| 2000 | AM_RANGE(0x300188, 0x300189) AM_WRITE_LEGACY(nettoqc_coincounter_w) // Coin Counters | |
| 2001 | AM_RANGE(0x30018a, 0x30018b) AM_WRITE_LEGACY(ddenlovr_select_16_w) // | |
| 1957 | AM_RANGE(0x300186, 0x300187) AM_READ(nettoqc_input_r) // DSW's | |
| 1958 | AM_RANGE(0x300188, 0x300189) AM_WRITE(nettoqc_coincounter_w) // Coin Counters | |
| 1959 | AM_RANGE(0x30018a, 0x30018b) AM_WRITE(ddenlovr_select_16_w) // | |
| 2002 | 1960 | AM_RANGE(0x30018c, 0x30018d) AM_DEVWRITE_LEGACY("oki", nettoqc_oki_bank_w) |
| 2003 | AM_RANGE(0x3001ca, 0x3001cb) AM_WRITE | |
| 1961 | AM_RANGE(0x3001ca, 0x3001cb) AM_WRITE | |
| 2004 | 1962 | AM_RANGE(0x300240, 0x300241) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound |
| 2005 | 1963 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // RAM |
| 2006 | 1964 | ADDRESS_MAP_END |
| r14883 | r14884 | |
| 2010 | 1968 | Rong Rong |
| 2011 | 1969 | ***************************************************************************/ |
| 2012 | 1970 | |
| 2013 | ||
| 1971 | ||
| 2014 | 1972 | { |
| 2015 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2016 | 1973 | |
| 2017 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(space->machine(), "DSW1"); | |
| 2018 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(space->machine(), "DSW2"); | |
| 2019 | if (!BIT(state->m_dsw_sel, 2)) return 0xff;//space->machine().rand(); | |
| 2020 | if (!BIT(state->m_dsw_sel, 3)) return 0xff;//space->machine().rand(); | |
| 2021 | if (!BIT(state->m_dsw_sel, 4)) return input_port_read(space->machine(), "DSW3"); | |
| 1974 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 1975 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 1976 | if (!BIT(m_dsw_sel, 2)) return 0xff;//machine().rand(); | |
| 1977 | if (!BIT(m_dsw_sel, 3)) return 0xff;//machine().rand(); | |
| 1978 | if (!BIT(m_dsw_sel, 4)) return input_port_read(machine(), "DSW3"); | |
| 2022 | 1979 | return 0xff; |
| 2023 | 1980 | } |
| 2024 | 1981 | |
| 2025 | ||
| 1982 | ||
| 2026 | 1983 | { |
| 2027 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2028 | 1984 | |
| 2029 | //logerror("%04x: rongrong_select_w %02x\n",cpu_get_pc(&space | |
| 1985 | //logerror("%04x: rongrong_select_w %02x\n",cpu_get_pc(&space. | |
| 2030 | 1986 | |
| 2031 | 1987 | /* bits 0-4 = **both** ROM bank **AND** input select */ |
| 2032 | memory_set_bank(space->machine(), "bank1", data & 0x1f); | |
| 2033 | state->m_dsw_sel = data; | |
| 1988 | memory_set_bank(machine(), "bank1", data & 0x1f); | |
| 1989 | m_dsw_sel = data; | |
| 2034 | 1990 | |
| 2035 | 1991 | /* bits 5-7 = RAM bank */ |
| 2036 | memory_set_bank( | |
| 1992 | memory_set_bank( | |
| 2037 | 1993 | } |
| 2038 | 1994 | |
| 2039 | 1995 | |
| r14883 | r14884 | |
| 2041 | 1997 | AM_RANGE(0x0000, 0x5fff) AM_ROM // ROM |
| 2042 | 1998 | AM_RANGE(0x6000, 0x6fff) AM_RAM // RAM |
| 2043 | 1999 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 2044 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") AM_WRITE | |
| 2000 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") AM_WRITE | |
| 2045 | 2001 | ADDRESS_MAP_END |
| 2046 | 2002 | |
| 2047 | 2003 | static ADDRESS_MAP_START( quizchq_portmap, AS_IO, 8, dynax_state ) |
| 2048 | 2004 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 2049 | AM_RANGE(0x00, 0x01) AM_WRITE_LEGACY(rongrong_blitter_w) | |
| 2050 | AM_RANGE(0x03, 0x03) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 2051 | AM_RANGE(0x1b, 0x1b) AM_READWRITE_LEGACY(rongrong_blitter_busy_r, rongrong_blitter_busy_w) | |
| 2005 | AM_RANGE(0x00, 0x01) AM_WRITE(rongrong_blitter_w) | |
| 2006 | AM_RANGE(0x03, 0x03) AM_READ(rongrong_gfxrom_r) | |
| 2007 | AM_RANGE(0x1b, 0x1b) AM_READWRITE(rongrong_blitter_busy_r, rongrong_blitter_busy_w) | |
| 2052 | 2008 | |
| 2053 | AM_RANGE(0x1c, 0x1c) AM_READ_LEGACY(rongrong_input_r) | |
| 2054 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(rongrong_select_w) | |
| 2055 | AM_RANGE(0x20, 0x20) AM_WRITE_LEGACY(ddenlovr_select2_w) | |
| 2056 | AM_RANGE(0x22, 0x23) AM_READ_LEGACY(rongrong_input2_r) | |
| 2009 | AM_RANGE(0x1c, 0x1c) AM_READ(rongrong_input_r) | |
| 2010 | AM_RANGE(0x1e, 0x1e) AM_WRITE(rongrong_select_w) | |
| 2011 | AM_RANGE(0x20, 0x20) AM_WRITE(ddenlovr_select2_w) | |
| 2012 | AM_RANGE(0x22, 0x23) AM_READ(rongrong_input2_r) | |
| 2057 | 2013 | |
| 2058 | 2014 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 2059 | 2015 | AM_RANGE(0x60, 0x61) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 2060 | 2016 | |
| 2061 | AM_RANGE(0x80, 0x83) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 2062 | AM_RANGE(0x84, 0x87) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 2063 | AM_RANGE(0x88, 0x8b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 2064 | AM_RANGE(0x8c, 0x8f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 2065 | AM_RANGE(0x94, 0x94) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 2066 | AM_RANGE(0x95, 0x95) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 2067 | AM_RANGE(0x96, 0x96) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 2068 | AM_RANGE(0x98, 0x98) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 2017 | AM_RANGE(0x80, 0x83) AM_WRITE(ddenlovr_palette_base_w) | |
| 2018 | AM_RANGE(0x84, 0x87) AM_WRITE(ddenlovr_palette_mask_w) | |
| 2019 | AM_RANGE(0x88, 0x8b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 2020 | AM_RANGE(0x8c, 0x8f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 2021 | AM_RANGE(0x94, 0x94) AM_WRITE(ddenlovr_bgcolor_w) | |
| 2022 | AM_RANGE(0x95, 0x95) AM_WRITE(ddenlovr_priority_w) | |
| 2023 | AM_RANGE(0x96, 0x96) AM_WRITE(ddenlovr_layer_enable_w) | |
| 2024 | AM_RANGE(0x98, 0x98) AM_READ(unk_r) // ? must be 78 on startup | |
| 2069 | 2025 | |
| 2070 | 2026 | AM_RANGE(0xa0, 0xaf) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 2071 | 2027 | AM_RANGE(0xc0, 0xc0) AM_DEVWRITE_LEGACY("oki", quizchq_oki_bank_w) |
| r14883 | r14884 | |
| 2078 | 2034 | AM_RANGE(0x0000, 0x5fff) AM_ROM // ROM |
| 2079 | 2035 | AM_RANGE(0x6000, 0x6fff) AM_RAM // RAM |
| 2080 | 2036 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 2081 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") AM_WRITE | |
| 2037 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") AM_WRITE | |
| 2082 | 2038 | ADDRESS_MAP_END |
| 2083 | 2039 | |
| 2084 | 2040 | static ADDRESS_MAP_START( rongrong_portmap, AS_IO, 8, dynax_state ) |
| 2085 | 2041 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 2086 | AM_RANGE(0x00, 0x01) AM_WRITE_LEGACY(rongrong_blitter_w) | |
| 2087 | AM_RANGE(0x03, 0x03) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 2088 | AM_RANGE(0x1b, 0x1b) AM_READWRITE_LEGACY(rongrong_blitter_busy_r, rongrong_blitter_busy_w) | |
| 2042 | AM_RANGE(0x00, 0x01) AM_WRITE(rongrong_blitter_w) | |
| 2043 | AM_RANGE(0x03, 0x03) AM_READ(rongrong_gfxrom_r) | |
| 2044 | AM_RANGE(0x1b, 0x1b) AM_READWRITE(rongrong_blitter_busy_r, rongrong_blitter_busy_w) | |
| 2089 | 2045 | |
| 2090 | AM_RANGE(0x1c, 0x1c) AM_READ_LEGACY(rongrong_input_r) | |
| 2091 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(rongrong_select_w) | |
| 2046 | AM_RANGE(0x1c, 0x1c) AM_READ(rongrong_input_r) | |
| 2047 | AM_RANGE(0x1e, 0x1e) AM_WRITE(rongrong_select_w) | |
| 2092 | 2048 | |
| 2093 | 2049 | AM_RANGE(0x20, 0x2f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 2094 | 2050 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 2095 | 2051 | AM_RANGE(0x60, 0x61) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 2096 | 2052 | |
| 2097 | AM_RANGE(0x80, 0x83) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 2098 | AM_RANGE(0x84, 0x87) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 2099 | AM_RANGE(0x88, 0x8b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 2100 | AM_RANGE(0x8c, 0x8f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 2101 | AM_RANGE(0x94, 0x94) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 2102 | AM_RANGE(0x95, 0x95) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 2103 | AM_RANGE(0x96, 0x96) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 2104 | AM_RANGE(0x98, 0x98) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 2053 | AM_RANGE(0x80, 0x83) AM_WRITE(ddenlovr_palette_base_w) | |
| 2054 | AM_RANGE(0x84, 0x87) AM_WRITE(ddenlovr_palette_mask_w) | |
| 2055 | AM_RANGE(0x88, 0x8b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 2056 | AM_RANGE(0x8c, 0x8f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 2057 | AM_RANGE(0x94, 0x94) AM_WRITE(ddenlovr_bgcolor_w) | |
| 2058 | AM_RANGE(0x95, 0x95) AM_WRITE(ddenlovr_priority_w) | |
| 2059 | AM_RANGE(0x96, 0x96) AM_WRITE(ddenlovr_layer_enable_w) | |
| 2060 | AM_RANGE(0x98, 0x98) AM_READ(unk_r) // ? must be 78 on startup | |
| 2105 | 2061 | |
| 2106 | AM_RANGE(0xa0, 0xa0) AM_WRITE_LEGACY(ddenlovr_select2_w) | |
| 2107 | AM_RANGE(0xa2, 0xa3) AM_READ_LEGACY(rongrong_input2_r) | |
| 2062 | AM_RANGE(0xa0, 0xa0) AM_WRITE(ddenlovr_select2_w) | |
| 2063 | AM_RANGE(0xa2, 0xa3) AM_READ(rongrong_input2_r) | |
| 2108 | 2064 | AM_RANGE(0xc2, 0xc2) AM_WRITENOP // enables palette RAM at f000, and protection device at f705/f706/f601 |
| 2109 | 2065 | ADDRESS_MAP_END |
| 2110 | 2066 | /* |
| r14883 | r14884 | |
| 2120 | 2076 | ***************************************************************************/ |
| 2121 | 2077 | |
| 2122 | 2078 | |
| 2123 | ||
| 2079 | ||
| 2124 | 2080 | { |
| 2125 | 2081 | return 0x01; |
| 2126 | 2082 | } |
| 2127 | 2083 | |
| 2128 | ||
| 2084 | ||
| 2129 | 2085 | { |
| 2130 | memory_set_bank( | |
| 2086 | memory_set_bank( | |
| 2131 | 2087 | /* Bit 4? */ |
| 2132 | 2088 | } |
| 2133 | 2089 | |
| 2134 | ||
| 2090 | ||
| 2135 | 2091 | { |
| 2136 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2137 | 2092 | |
| 2138 | state->soundlatch_w(*space, 0, data); | |
| 2139 | device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); | |
| 2093 | soundlatch_w(*&space, 0, data); | |
| 2094 | device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); | |
| 2140 | 2095 | } |
| 2141 | 2096 | |
| 2142 | ||
| 2097 | ||
| 2143 | 2098 | { |
| 2144 | blitter_w(space, 0, offset, data, 0xdf); // RST 18 | |
| 2099 | blitter_w(&space, 0, offset, data, 0xdf); // RST 18 | |
| 2145 | 2100 | } |
| 2146 | ||
| 2101 | ||
| 2147 | 2102 | { |
| 2148 | blitter_w(space, 1, offset, data, 0xdf); // RST 18 | |
| 2103 | blitter_w(&space, 1, offset, data, 0xdf); // RST 18 | |
| 2149 | 2104 | } |
| 2150 | 2105 | |
| 2151 | 2106 | static void mmpanic_update_leds(running_machine &machine) |
| r14883 | r14884 | |
| 2155 | 2110 | } |
| 2156 | 2111 | |
| 2157 | 2112 | /* leds 1-8 */ |
| 2158 | ||
| 2113 | ||
| 2159 | 2114 | { |
| 2160 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2161 | state->m_mmpanic_leds = (state->m_mmpanic_leds & 0xff00) | data; | |
| 2162 | mmpanic_update_leds(space->machine()); | |
| 2115 | m_mmpanic_leds = (m_mmpanic_leds & 0xff00) | data; | |
| 2116 | mmpanic_update_leds(machine()); | |
| 2163 | 2117 | } |
| 2164 | 2118 | /* led 9 */ |
| 2165 | ||
| 2119 | ||
| 2166 | 2120 | { |
| 2167 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2168 | state->m_mmpanic_leds = (state->m_mmpanic_leds & 0xfeff) | (data ? 0x0100 : 0); | |
| 2169 | mmpanic_update_leds(space->machine()); | |
| 2121 | m_mmpanic_leds = (m_mmpanic_leds & 0xfeff) | (data ? 0x0100 : 0); | |
| 2122 | mmpanic_update_leds(machine()); | |
| 2170 | 2123 | } |
| 2171 | 2124 | |
| 2172 | 2125 | |
| 2173 | ||
| 2126 | ||
| 2174 | 2127 | { |
| 2175 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2176 | 2128 | |
| 2177 | if ( | |
| 2129 | if ( | |
| 2178 | 2130 | { |
| 2179 | coin_counter_w(space->machine(), 0, (~data) & 0x01); | |
| 2180 | coin_lockout_w(space->machine(), 0, (~data) & 0x02); | |
| 2181 | set_led_status(space->machine(), 1, (~data) & 0x04); | |
| 2131 | coin_counter_w(machine(), 0, (~data) & 0x01); | |
| 2132 | coin_lockout_w(machine(), 0, (~data) & 0x02); | |
| 2133 | set_led_status(machine(), 1, (~data) & 0x04); | |
| 2182 | 2134 | } |
| 2183 | 2135 | } |
| 2184 | 2136 | |
| 2185 | ||
| 2137 | ||
| 2186 | 2138 | |
| 2187 | 2139 | /* Main CPU */ |
| 2188 | 2140 | |
| 2189 | 2141 | static ADDRESS_MAP_START( mmpanic_map, AS_PROGRAM, 8, dynax_state ) |
| 2190 | AM_RANGE(0x0051, 0x0051) AM_READ | |
| 2142 | AM_RANGE(0x0051, 0x0051) AM_READ | |
| 2191 | 2143 | AM_RANGE(0x0000, 0x5fff) AM_ROM // ROM |
| 2192 | 2144 | AM_RANGE(0x6000, 0x6fff) AM_RAM // RAM |
| 2193 | 2145 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 2194 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") AM_WRITE | |
| 2146 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") AM_WRITE | |
| 2195 | 2147 | ADDRESS_MAP_END |
| 2196 | 2148 | |
| 2197 | 2149 | static ADDRESS_MAP_START( mmpanic_portmap, AS_IO, 8, dynax_state ) |
| r14883 | r14884 | |
| 2199 | 2151 | AM_RANGE(0x00, 0x0f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 2200 | 2152 | |
| 2201 | 2153 | // Layers 0-3: |
| 2202 | AM_RANGE(0x20, 0x23) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 2203 | AM_RANGE(0x24, 0x27) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 2204 | AM_RANGE(0x28, 0x2b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 2205 | AM_RANGE(0x2c, 0x2f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 2206 | AM_RANGE(0x34, 0x34) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 2207 | AM_RANGE(0x35, 0x35) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 2208 | AM_RANGE(0x36, 0x36) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 2209 | AM_RANGE(0x38, 0x38) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 2154 | AM_RANGE(0x20, 0x23) AM_WRITE(ddenlovr_palette_base_w) | |
| 2155 | AM_RANGE(0x24, 0x27) AM_WRITE(ddenlovr_palette_mask_w) | |
| 2156 | AM_RANGE(0x28, 0x2b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 2157 | AM_RANGE(0x2c, 0x2f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 2158 | AM_RANGE(0x34, 0x34) AM_WRITE(ddenlovr_bgcolor_w) | |
| 2159 | AM_RANGE(0x35, 0x35) AM_WRITE(ddenlovr_priority_w) | |
| 2160 | AM_RANGE(0x36, 0x36) AM_WRITE(ddenlovr_layer_enable_w) | |
| 2161 | AM_RANGE(0x38, 0x38) AM_READ(unk_r) // ? must be 78 on startup | |
| 2210 | 2162 | |
| 2211 | 2163 | // Layers 4-7: |
| 2212 | AM_RANGE(0x40, 0x43) AM_WRITE_LEGACY(ddenlovr_palette_base2_w) | |
| 2213 | AM_RANGE(0x44, 0x47) AM_WRITE_LEGACY(ddenlovr_palette_mask2_w) | |
| 2214 | AM_RANGE(0x48, 0x4b) AM_WRITE_LEGACY(ddenlovr_transparency_pen2_w) | |
| 2215 | AM_RANGE(0x4c, 0x4f) AM_WRITE_LEGACY(ddenlovr_transparency_mask2_w) | |
| 2216 | AM_RANGE(0x54, 0x54) AM_WRITE_LEGACY(ddenlovr_bgcolor2_w) | |
| 2217 | AM_RANGE(0x55, 0x55) AM_WRITE_LEGACY(ddenlovr_priority2_w) | |
| 2218 | AM_RANGE(0x56, 0x56) AM_WRITE_LEGACY(ddenlovr_layer_enable2_w) | |
| 2219 | AM_RANGE(0x58, 0x58) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 2164 | AM_RANGE(0x40, 0x43) AM_WRITE(ddenlovr_palette_base2_w) | |
| 2165 | AM_RANGE(0x44, 0x47) AM_WRITE(ddenlovr_palette_mask2_w) | |
| 2166 | AM_RANGE(0x48, 0x4b) AM_WRITE(ddenlovr_transparency_pen2_w) | |
| 2167 | AM_RANGE(0x4c, 0x4f) AM_WRITE(ddenlovr_transparency_mask2_w) | |
| 2168 | AM_RANGE(0x54, 0x54) AM_WRITE(ddenlovr_bgcolor2_w) | |
| 2169 | AM_RANGE(0x55, 0x55) AM_WRITE(ddenlovr_priority2_w) | |
| 2170 | AM_RANGE(0x56, 0x56) AM_WRITE(ddenlovr_layer_enable2_w) | |
| 2171 | AM_RANGE(0x58, 0x58) AM_READ(unk_r) // ? must be 78 on startup | |
| 2220 | 2172 | |
| 2221 | AM_RANGE(0x60, 0x61) AM_WRITE_LEGACY(mmpanic_blitter_w) | |
| 2222 | AM_RANGE(0x63, 0x63) AM_READ_LEGACY(rongrong_gfxrom_r) // Video Chip | |
| 2223 | AM_RANGE(0x64, 0x65) AM_WRITE_LEGACY(mmpanic_blitter2_w) | |
| 2173 | AM_RANGE(0x60, 0x61) AM_WRITE(mmpanic_blitter_w) | |
| 2174 | AM_RANGE(0x63, 0x63) AM_READ(rongrong_gfxrom_r) // Video Chip | |
| 2175 | AM_RANGE(0x64, 0x65) AM_WRITE(mmpanic_blitter2_w) | |
| 2224 | 2176 | AM_RANGE(0x68, 0x68) AM_DEVWRITE_LEGACY("aysnd", ddenlovr_select_w) |
| 2225 | AM_RANGE(0x69, 0x69) AM_WRITE | |
| 2177 | AM_RANGE(0x69, 0x69) AM_WRITE | |
| 2226 | 2178 | AM_RANGE(0x6a, 0x6a) AM_READ_PORT("IN0") |
| 2227 | 2179 | AM_RANGE(0x6b, 0x6b) AM_READ_PORT("IN1") |
| 2228 | AM_RANGE(0x6c, 0x6d) AM_READ_LEGACY(mmpanic_link_r) // Other cabinets? | |
| 2229 | AM_RANGE(0x74, 0x74) AM_WRITE_LEGACY(mmpanic_rombank_w) | |
| 2180 | AM_RANGE(0x6c, 0x6d) AM_READ(mmpanic_link_r) // Other cabinets? | |
| 2181 | AM_RANGE(0x74, 0x74) AM_WRITE(mmpanic_rombank_w) | |
| 2230 | 2182 | AM_RANGE(0x78, 0x78) AM_WRITENOP // 0, during RST 08 (irq acknowledge?) |
| 2231 | 2183 | AM_RANGE(0x7c, 0x7c) AM_DEVREADWRITE("oki", okim6295_device, read, write) // Sound |
| 2232 | AM_RANGE(0x8c, 0x8c) AM_WRITE_LEGACY(mmpanic_soundlatch_w) // | |
| 2233 | AM_RANGE(0x88, 0x88) AM_WRITE_LEGACY(mmpanic_leds_w) // Leds | |
| 2184 | AM_RANGE(0x8c, 0x8c) AM_WRITE(mmpanic_soundlatch_w) // | |
| 2185 | AM_RANGE(0x88, 0x88) AM_WRITE(mmpanic_leds_w) // Leds | |
| 2234 | 2186 | AM_RANGE(0x90, 0x90) AM_WRITENOP // written just before port 8c |
| 2235 | 2187 | AM_RANGE(0x94, 0x94) AM_READ_PORT("DSW1") |
| 2236 | 2188 | AM_RANGE(0x98, 0x98) AM_READ_PORT("DSW2") |
| 2237 | 2189 | AM_RANGE(0x9c, 0x9c) AM_READ_PORT("DSW3") // DSW 1&2 high bits |
| 2238 | AM_RANGE(0xa6, 0xa6) AM_WRITE | |
| 2190 | AM_RANGE(0xa6, 0xa6) AM_WRITE | |
| 2239 | 2191 | ADDRESS_MAP_END |
| 2240 | 2192 | |
| 2241 | 2193 | /* Sound CPU */ |
| r14883 | r14884 | |
| 2271 | 2223 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 2272 | 2224 | |
| 2273 | 2225 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") |
| 2274 | AM_RANGE(0x8000, 0x81ff) AM_WRITE | |
| 2226 | AM_RANGE(0x8000, 0x81ff) AM_WRITE | |
| 2275 | 2227 | AM_RANGE(0x8400, 0x87ff) AM_WRITENOP |
| 2276 | 2228 | ADDRESS_MAP_END |
| 2277 | 2229 | |
| 2278 | 2230 | |
| 2279 | ||
| 2231 | ||
| 2280 | 2232 | { |
| 2281 | 2233 | // bit 0 ? |
| 2282 | 2234 | return 0x00; // bit 7 = blitter busy |
| 2283 | 2235 | } |
| 2284 | 2236 | |
| 2285 | ||
| 2237 | ||
| 2286 | 2238 | { |
| 2287 | blitter_w_funkyfig( | |
| 2239 | blitter_w_funkyfig( | |
| 2288 | 2240 | } |
| 2289 | 2241 | |
| 2290 | ||
| 2242 | ||
| 2291 | 2243 | { |
| 2292 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2293 | 2244 | |
| 2294 | | |
| 2245 | | |
| 2295 | 2246 | |
| 2296 | memory_set_bank( | |
| 2247 | memory_set_bank( | |
| 2297 | 2248 | // bit 4 selects palette ram at 8000? |
| 2298 | memory_set_bank( | |
| 2249 | memory_set_bank( | |
| 2299 | 2250 | } |
| 2300 | 2251 | |
| 2301 | ||
| 2252 | ||
| 2302 | 2253 | { |
| 2303 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2304 | 2254 | |
| 2305 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(space->machine(), "DSW1"); | |
| 2306 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(space->machine(), "DSW2"); | |
| 2307 | if (!BIT(state->m_dsw_sel, 2)) return input_port_read(space->machine(), "DSW3"); | |
| 2308 | logerror("%06x: warning, unknown bits read, ddenlovr_select = %02x\n", cpu_get_pc(&space->device()), state->m_dsw_sel); | |
| 2255 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 2256 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 2257 | if (!BIT(m_dsw_sel, 2)) return input_port_read(machine(), "DSW3"); | |
| 2258 | logerror("%06x: warning, unknown bits read, ddenlovr_select = %02x\n", cpu_get_pc(&space.device()), m_dsw_sel); | |
| 2309 | 2259 | return 0xff; |
| 2310 | 2260 | } |
| 2311 | 2261 | |
| 2312 | ||
| 2262 | ||
| 2313 | 2263 | { |
| 2314 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2315 | 2264 | |
| 2316 | switch ( | |
| 2265 | switch ( | |
| 2317 | 2266 | { |
| 2318 | case 0x22: return input_port_read(space->machine(), "IN2"); | |
| 2319 | case 0x23: return state->m_funkyfig_lockout; | |
| 2267 | case 0x22: return input_port_read(machine(), "IN2"); | |
| 2268 | case 0x23: return m_funkyfig_lockout; | |
| 2320 | 2269 | } |
| 2321 | logerror("%06x: warning, unknown bits read, ddenlovr_select2 = %02x\n", cpu_get_pc(&space | |
| 2270 | logerror("%06x: warning, unknown bits read, ddenlovr_select2 = %02x\n", cpu_get_pc(&space. | |
| 2322 | 2271 | return 0xff; |
| 2323 | 2272 | } |
| 2324 | 2273 | |
| 2325 | ||
| 2274 | ||
| 2326 | 2275 | { |
| 2327 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2328 | 2276 | |
| 2329 | switch ( | |
| 2277 | switch ( | |
| 2330 | 2278 | { |
| 2331 | case 0x20: return input_port_read(space->machine(), "IN0"); | |
| 2332 | case 0x21: return input_port_read(space->machine(), "IN1"); | |
| 2279 | case 0x20: return input_port_read(machine(), "IN0"); | |
| 2280 | case 0x21: return input_port_read(machine(), "IN1"); | |
| 2333 | 2281 | } |
| 2334 | logerror("%06x: warning, unknown bits read, ddenlovr_select2 = %02x\n", cpu_get_pc(&space | |
| 2282 | logerror("%06x: warning, unknown bits read, ddenlovr_select2 = %02x\n", cpu_get_pc(&space. | |
| 2335 | 2283 | return 0xff; |
| 2336 | 2284 | } |
| 2337 | 2285 | |
| 2338 | ||
| 2286 | ||
| 2339 | 2287 | { |
| 2340 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2341 | 2288 | |
| 2342 | switch ( | |
| 2289 | switch ( | |
| 2343 | 2290 | { |
| 2344 | 2291 | case 0x2c: |
| 2345 | state->m_funkyfig_lockout = data; | |
| 2346 | coin_counter_w(space->machine(), 0, data & 0x01); | |
| 2347 | coin_lockout_w(space->machine(), 0, (~data) & 0x02); | |
| 2292 | m_funkyfig_lockout = data; | |
| 2293 | coin_counter_w(machine(), 0, data & 0x01); | |
| 2294 | coin_lockout_w(machine(), 0, (~data) & 0x02); | |
| 2348 | 2295 | if (data & ~0x03) |
| 2349 | logerror("%06x: warning, unknown bits written, lockout = %02x\n", cpu_get_pc(&space | |
| 2296 | logerror("%06x: warning, unknown bits written, lockout = %02x\n", cpu_get_pc(&space. | |
| 2350 | 2297 | break; |
| 2351 | 2298 | |
| 2352 | 2299 | // case 0xef: 16 bytes on startup |
| 2353 | 2300 | |
| 2354 | 2301 | default: |
| 2355 | logerror("%06x: warning, unknown bits written, ddenlovr_select2 = %02x, data = %02x\n", cpu_get_pc(&space | |
| 2302 | logerror("%06x: warning, unknown bits written, ddenlovr_select2 = %02x, data = %02x\n", cpu_get_pc(&space. | |
| 2356 | 2303 | } |
| 2357 | 2304 | } |
| 2358 | 2305 | |
| 2359 | 2306 | static ADDRESS_MAP_START( funkyfig_portmap, AS_IO, 8, dynax_state ) |
| 2360 | 2307 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 2361 | 2308 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("oki", okim6295_device, read, write) // Sound |
| 2362 | AM_RANGE(0x01, 0x01) AM_WRITE_LEGACY(mmpanic_leds_w) // Leds | |
| 2363 | AM_RANGE(0x02, 0x02) AM_WRITE_LEGACY(mmpanic_soundlatch_w) // | |
| 2364 | AM_RANGE(0x04, 0x04) AM_READ_LEGACY(funkyfig_busy_r) | |
| 2365 | AM_RANGE(0x1c, 0x1c) AM_READ_LEGACY(funkyfig_dsw_r) | |
| 2366 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(funkyfig_rombank_w) | |
| 2367 | AM_RANGE(0x20, 0x21) AM_WRITE_LEGACY(funkyfig_blitter_w) | |
| 2368 | AM_RANGE(0x23, 0x23) AM_READ_LEGACY(rongrong_gfxrom_r) // Video Chip | |
| 2309 | AM_RANGE(0x01, 0x01) AM_WRITE(mmpanic_leds_w) // Leds | |
| 2310 | AM_RANGE(0x02, 0x02) AM_WRITE(mmpanic_soundlatch_w) // | |
| 2311 | AM_RANGE(0x04, 0x04) AM_READ(funkyfig_busy_r) | |
| 2312 | AM_RANGE(0x1c, 0x1c) AM_READ(funkyfig_dsw_r) | |
| 2313 | AM_RANGE(0x1e, 0x1e) AM_WRITE(funkyfig_rombank_w) | |
| 2314 | AM_RANGE(0x20, 0x21) AM_WRITE(funkyfig_blitter_w) | |
| 2315 | AM_RANGE(0x23, 0x23) AM_READ(rongrong_gfxrom_r) // Video Chip | |
| 2369 | 2316 | AM_RANGE(0x40, 0x4f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 2370 | 2317 | |
| 2371 | 2318 | // Layers 0-3: |
| 2372 | AM_RANGE(0x60, 0x63) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 2373 | AM_RANGE(0x64, 0x67) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 2374 | AM_RANGE(0x68, 0x6b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 2375 | AM_RANGE(0x6c, 0x6f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 2376 | AM_RANGE(0x74, 0x74) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 2377 | AM_RANGE(0x75, 0x75) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 2378 | AM_RANGE(0x76, 0x76) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 2379 | AM_RANGE(0x78, 0x78) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 2319 | AM_RANGE(0x60, 0x63) AM_WRITE(ddenlovr_palette_base_w) | |
| 2320 | AM_RANGE(0x64, 0x67) AM_WRITE(ddenlovr_palette_mask_w) | |
| 2321 | AM_RANGE(0x68, 0x6b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 2322 | AM_RANGE(0x6c, 0x6f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 2323 | AM_RANGE(0x74, 0x74) AM_WRITE(ddenlovr_bgcolor_w) | |
| 2324 | AM_RANGE(0x75, 0x75) AM_WRITE(ddenlovr_priority_w) | |
| 2325 | AM_RANGE(0x76, 0x76) AM_WRITE(ddenlovr_layer_enable_w) | |
| 2326 | AM_RANGE(0x78, 0x78) AM_READ(unk_r) // ? must be 78 on startup | |
| 2380 | 2327 | |
| 2381 | AM_RANGE(0x80, 0x80) AM_WRITE_LEGACY(ddenlovr_select2_w) | |
| 2382 | AM_RANGE(0x81, 0x81) AM_WRITE_LEGACY(funkyfig_lockout_w) | |
| 2383 | AM_RANGE(0x82, 0x82) AM_READ_LEGACY(funkyfig_coin_r) | |
| 2384 | AM_RANGE(0x83, 0x83) AM_READ_LEGACY(funkyfig_key_r) | |
| 2328 | AM_RANGE(0x80, 0x80) AM_WRITE(ddenlovr_select2_w) | |
| 2329 | AM_RANGE(0x81, 0x81) AM_WRITE(funkyfig_lockout_w) | |
| 2330 | AM_RANGE(0x82, 0x82) AM_READ(funkyfig_coin_r) | |
| 2331 | AM_RANGE(0x83, 0x83) AM_READ(funkyfig_key_r) | |
| 2385 | 2332 | |
| 2386 | AM_RANGE(0xa2, 0xa2) AM_WRITE | |
| 2333 | AM_RANGE(0xa2, 0xa2) AM_WRITE | |
| 2387 | 2334 | ADDRESS_MAP_END |
| 2388 | 2335 | |
| 2389 | 2336 | |
| r14883 | r14884 | |
| 2403 | 2350 | |
| 2404 | 2351 | ***************************************************************************/ |
| 2405 | 2352 | |
| 2406 | ||
| 2353 | ||
| 2407 | 2354 | { |
| 2408 | memory_set_bank(space->machine(), "bank1", data & 0x0f); | |
| 2409 | memory_set_bank(space->machine(), "bank2", ((data & 0xf0) >> 4)); | |
| 2355 | memory_set_bank(machine(), "bank1", data & 0x0f); | |
| 2356 | memory_set_bank(machine(), "bank2", ((data & 0xf0) >> 4)); | |
| 2410 | 2357 | } |
| 2411 | 2358 | |
| 2412 | 2359 | static ADDRESS_MAP_START( hanakanz_map, AS_PROGRAM, 8, dynax_state ) |
| r14883 | r14884 | |
| 2417 | 2364 | ADDRESS_MAP_END |
| 2418 | 2365 | |
| 2419 | 2366 | |
| 2420 | ||
| 2367 | ||
| 2421 | 2368 | { |
| 2422 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2423 | state->m_keyb = data; | |
| 2369 | m_keyb = data; | |
| 2424 | 2370 | } |
| 2425 | 2371 | |
| 2426 | ||
| 2372 | ||
| 2427 | 2373 | { |
| 2428 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2429 | state->m_dsw_sel = data; | |
| 2374 | m_dsw_sel = data; | |
| 2430 | 2375 | } |
| 2431 | 2376 | |
| 2432 | ||
| 2377 | ||
| 2433 | 2378 | { |
| 2434 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2435 | 2379 | |
| 2436 | 2380 | UINT8 val = 0xff; |
| 2437 | 2381 | |
| 2438 | if (!BIT(state->m_keyb, 0)) val = input_port_read(space->machine(), offset ? "KEY5" : "KEY0"); | |
| 2439 | else if (!BIT(state->m_keyb, 1)) val = input_port_read(space->machine(), offset ? "KEY6" : "KEY1"); | |
| 2440 | else if (!BIT(state->m_keyb, 2)) val = input_port_read(space->machine(), offset ? "KEY7" : "KEY2"); | |
| 2441 | else if (!BIT(state->m_keyb, 3)) val = input_port_read(space->machine(), offset ? "KEY8" : "KEY3"); | |
| 2442 | else if (!BIT(state->m_keyb, 4)) val = input_port_read(space->machine(), offset ? "KEY9" : "KEY4"); | |
| 2382 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), offset ? "KEY5" : "KEY0"); | |
| 2383 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), offset ? "KEY6" : "KEY1"); | |
| 2384 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), offset ? "KEY7" : "KEY2"); | |
| 2385 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), offset ? "KEY8" : "KEY3"); | |
| 2386 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), offset ? "KEY9" : "KEY4"); | |
| 2443 | 2387 | |
| 2444 | val |= input_port_read( | |
| 2388 | val |= input_port_read( | |
| 2445 | 2389 | return val; |
| 2446 | 2390 | } |
| 2447 | 2391 | |
| 2448 | ||
| 2392 | ||
| 2449 | 2393 | { |
| 2450 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2451 | 2394 | |
| 2452 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(space->machine(), "DSW1"); | |
| 2453 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(space->machine(), "DSW2"); | |
| 2454 | if (!BIT(state->m_dsw_sel, 2)) return input_port_read(space->machine(), "DSW3"); | |
| 2455 | if (!BIT(state->m_dsw_sel, 3)) return input_port_read(space->machine(), "DSW4"); | |
| 2456 | if (!BIT(state->m_dsw_sel, 4)) return input_port_read(space->machine(), "DSW5"); | |
| 2395 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 2396 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 2397 | if (!BIT(m_dsw_sel, 2)) return input_port_read(machine(), "DSW3"); | |
| 2398 | if (!BIT(m_dsw_sel, 3)) return input_port_read(machine(), "DSW4"); | |
| 2399 | if (!BIT(m_dsw_sel, 4)) return input_port_read(machine(), "DSW5"); | |
| 2457 | 2400 | return 0xff; |
| 2458 | 2401 | } |
| 2459 | 2402 | |
| 2460 | ||
| 2403 | ||
| 2461 | 2404 | { |
| 2462 | 2405 | return 0x80; // bit 7 == 0 -> blitter busy |
| 2463 | 2406 | } |
| 2464 | 2407 | |
| 2465 | ||
| 2408 | ||
| 2466 | 2409 | { |
| 2467 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2468 | UINT8 *rom = space->machine().region("blitter")->base(); | |
| 2469 | size_t size = space->machine().region("blitter")->bytes(); | |
| 2470 | int address = (state->m_ddenlovr_blit_address & 0xffffff) * 2; | |
| 2410 | UINT8 *rom = machine().region("blitter")->base(); | |
| 2411 | size_t size = machine().region("blitter")->bytes(); | |
| 2412 | int address = (m_ddenlovr_blit_address & 0xffffff) * 2; | |
| 2471 | 2413 | |
| 2472 | 2414 | if (address >= size) |
| 2473 | 2415 | { |
| 2474 | logerror("CPU#0 PC %06X: Error, Blitter address %06X out of range\n", cpu_get_pc(&space | |
| 2416 | logerror("CPU#0 PC %06X: Error, Blitter address %06X out of range\n", cpu_get_pc(&space. | |
| 2475 | 2417 | address %= size; |
| 2476 | 2418 | } |
| 2477 | 2419 | |
| 2478 | 2420 | if (offset == 0) |
| 2479 | 2421 | { |
| 2480 | state->m_romdata[0] = rom[address + 0]; | |
| 2481 | state->m_romdata[1] = rom[address + 1]; | |
| 2422 | m_romdata[0] = rom[address + 0]; | |
| 2423 | m_romdata[1] = rom[address + 1]; | |
| 2482 | 2424 | |
| 2483 | | |
| 2425 | | |
| 2484 | 2426 | |
| 2485 | return | |
| 2427 | return | |
| 2486 | 2428 | } |
| 2487 | 2429 | else |
| 2488 | 2430 | { |
| 2489 | return | |
| 2431 | return | |
| 2490 | 2432 | } |
| 2491 | 2433 | } |
| 2492 | 2434 | |
| 2493 | 2435 | |
| 2494 | ||
| 2436 | ||
| 2495 | 2437 | { |
| 2496 | 2438 | // bit 0 = coin counter |
| 2497 | 2439 | // bit 1 = out counter |
| 2498 | 2440 | // bit 2 = 1 if bet on |
| 2499 | 2441 | // bit 3 = 1 if bet off |
| 2500 | 2442 | |
| 2501 | coin_counter_w( | |
| 2443 | coin_counter_w( | |
| 2502 | 2444 | |
| 2503 | 2445 | if (data & 0xf0) |
| 2504 | logerror("%04x: warning, coin counter = %02x\n", cpu_get_pc(&space | |
| 2446 | logerror("%04x: warning, coin counter = %02x\n", cpu_get_pc(&space. | |
| 2505 | 2447 | |
| 2506 | 2448 | #ifdef MAME_DEBUG |
| 2507 | 2449 | // popmessage("93 = %02x", data); |
| 2508 | 2450 | #endif |
| 2509 | 2451 | } |
| 2510 | 2452 | |
| 2511 | ||
| 2453 | ||
| 2512 | 2454 | { |
| 2513 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2514 | 2455 | |
| 2515 | if ( | |
| 2456 | if ( | |
| 2516 | 2457 | { |
| 2517 | | |
| 2458 | | |
| 2518 | 2459 | } |
| 2519 | 2460 | else |
| 2520 | 2461 | { |
| 2521 | 2462 | // 0bbggggg bbbrrrrr |
| 2522 | 2463 | // 04343210 21043210 |
| 2523 | 2464 | |
| 2524 | int g = | |
| 2465 | int g = | |
| 2525 | 2466 | int r = data & 0x1f; |
| 2526 | int b = ((data & 0xe0) >> 5) | ((state->m_ddenlovr_blit_latch & 0x60) >> 2); | |
| 2527 | palette_set_color_rgb(space->machine(), (state->m_palette_index++) & 0x1ff, pal5bit(r), pal5bit(g), pal5bit(b)); | |
| 2467 | int b = ((data & 0xe0) >> 5) | ((m_ddenlovr_blit_latch & 0x60) >> 2); | |
| 2468 | palette_set_color_rgb(machine(), (m_palette_index++) & 0x1ff, pal5bit(r), pal5bit(g), pal5bit(b)); | |
| 2528 | 2469 | } |
| 2529 | 2470 | } |
| 2530 | 2471 | |
| r14883 | r14884 | |
| 2534 | 2475 | oki->set_bank_base((data & 0x40) ? 0x40000 : 0); |
| 2535 | 2476 | } |
| 2536 | 2477 | |
| 2537 | ||
| 2478 | ||
| 2538 | 2479 | { |
| 2539 | return | |
| 2480 | return | |
| 2540 | 2481 | } |
| 2541 | 2482 | |
| 2542 | 2483 | static ADDRESS_MAP_START( hanakanz_portmap, AS_IO, 8, dynax_state ) |
| 2543 | 2484 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 2544 | AM_RANGE(0x2c, 0x2c) AM_READ_LEGACY(hanakanz_busy_r) AM_DEVWRITE_LEGACY("oki", hanakanz_oki_bank_w) | |
| 2545 | AM_RANGE(0x2e, 0x2e) AM_WRITE_LEGACY(hanakanz_blitter_reg_w) | |
| 2546 | AM_RANGE(0x30, 0x30) AM_WRITE_LEGACY(hanakanz_rombank_w) | |
| 2547 | AM_RANGE(0x31, 0x31) AM_WRITE_LEGACY(hanakanz_dsw_w) | |
| 2548 | AM_RANGE(0x32, 0x32) AM_READ_LEGACY(hanakanz_dsw_r) | |
| 2549 | AM_RANGE(0x80, 0x80) AM_WRITE_LEGACY(hanakanz_blitter_data_w) | |
| 2550 | AM_RANGE(0x81, 0x81) AM_WRITE_LEGACY(hanakanz_palette_w) | |
| 2551 | AM_RANGE(0x83, 0x84) AM_READ_LEGACY(hanakanz_gfxrom_r) | |
| 2485 | AM_RANGE(0x2c, 0x2c) AM_READ(hanakanz_busy_r) AM_DEVWRITE_LEGACY("oki", hanakanz_oki_bank_w) | |
| 2486 | AM_RANGE(0x2e, 0x2e) AM_WRITE(hanakanz_blitter_reg_w) | |
| 2487 | AM_RANGE(0x30, 0x30) AM_WRITE(hanakanz_rombank_w) | |
| 2488 | AM_RANGE(0x31, 0x31) AM_WRITE(hanakanz_dsw_w) | |
| 2489 | AM_RANGE(0x32, 0x32) AM_READ(hanakanz_dsw_r) | |
| 2490 | AM_RANGE(0x80, 0x80) AM_WRITE(hanakanz_blitter_data_w) | |
| 2491 | AM_RANGE(0x81, 0x81) AM_WRITE(hanakanz_palette_w) | |
| 2492 | AM_RANGE(0x83, 0x84) AM_READ(hanakanz_gfxrom_r) | |
| 2552 | 2493 | AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM") |
| 2553 | AM_RANGE(0x91, 0x92) AM_READ_LEGACY(hanakanz_keyb_r) | |
| 2554 | AM_RANGE(0x93, 0x93) AM_WRITE_LEGACY(hanakanz_coincounter_w) | |
| 2555 | AM_RANGE(0x94, 0x94) AM_WRITE_LEGACY(hanakanz_keyb_w) | |
| 2556 | AM_RANGE(0x96, 0x96) AM_READ_LEGACY(hanakanz_rand_r) | |
| 2494 | AM_RANGE(0x91, 0x92) AM_READ(hanakanz_keyb_r) | |
| 2495 | AM_RANGE(0x93, 0x93) AM_WRITE(hanakanz_coincounter_w) | |
| 2496 | AM_RANGE(0x94, 0x94) AM_WRITE(hanakanz_keyb_w) | |
| 2497 | AM_RANGE(0x96, 0x96) AM_READ(hanakanz_rand_r) | |
| 2557 | 2498 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 2558 | 2499 | AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 2559 | 2500 | AM_RANGE(0xe0, 0xef) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| r14883 | r14884 | |
| 2562 | 2503 | |
| 2563 | 2504 | static ADDRESS_MAP_START( hkagerou_portmap, AS_IO, 8, dynax_state ) |
| 2564 | 2505 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 2565 | AM_RANGE(0x2c, 0x2c) AM_READ_LEGACY(hanakanz_busy_r) AM_DEVWRITE_LEGACY("oki", hanakanz_oki_bank_w) | |
| 2566 | AM_RANGE(0x2e, 0x2e) AM_WRITE_LEGACY(hanakanz_blitter_reg_w) | |
| 2567 | AM_RANGE(0x30, 0x30) AM_WRITE_LEGACY(hanakanz_rombank_w) | |
| 2568 | AM_RANGE(0x31, 0x31) AM_WRITE_LEGACY(hanakanz_dsw_w) | |
| 2569 | AM_RANGE(0x32, 0x32) AM_READ_LEGACY(hanakanz_dsw_r) | |
| 2570 | AM_RANGE(0x80, 0x80) AM_WRITE_LEGACY(hanakanz_blitter_data_w) | |
| 2571 | AM_RANGE(0x81, 0x81) AM_WRITE_LEGACY(hanakanz_palette_w) | |
| 2572 | AM_RANGE(0x83, 0x84) AM_READ_LEGACY(hanakanz_gfxrom_r) | |
| 2506 | AM_RANGE(0x2c, 0x2c) AM_READ(hanakanz_busy_r) AM_DEVWRITE_LEGACY("oki", hanakanz_oki_bank_w) | |
| 2507 | AM_RANGE(0x2e, 0x2e) AM_WRITE(hanakanz_blitter_reg_w) | |
| 2508 | AM_RANGE(0x30, 0x30) AM_WRITE(hanakanz_rombank_w) | |
| 2509 | AM_RANGE(0x31, 0x31) AM_WRITE(hanakanz_dsw_w) | |
| 2510 | AM_RANGE(0x32, 0x32) AM_READ(hanakanz_dsw_r) | |
| 2511 | AM_RANGE(0x80, 0x80) AM_WRITE(hanakanz_blitter_data_w) | |
| 2512 | AM_RANGE(0x81, 0x81) AM_WRITE(hanakanz_palette_w) | |
| 2513 | AM_RANGE(0x83, 0x84) AM_READ(hanakanz_gfxrom_r) | |
| 2573 | 2514 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 2574 | 2515 | AM_RANGE(0xb0, 0xb0) AM_READ_PORT("SYSTEM") |
| 2575 | AM_RANGE(0xb1, 0xb2) AM_READ_LEGACY(hanakanz_keyb_r) | |
| 2576 | AM_RANGE(0xb3, 0xb3) AM_WRITE_LEGACY(hanakanz_coincounter_w) | |
| 2577 | AM_RANGE(0xb4, 0xb4) AM_WRITE_LEGACY(hanakanz_keyb_w) | |
| 2578 | AM_RANGE(0xb6, 0xb6) AM_READ_LEGACY(hanakanz_rand_r) | |
| 2516 | AM_RANGE(0xb1, 0xb2) AM_READ(hanakanz_keyb_r) | |
| 2517 | AM_RANGE(0xb3, 0xb3) AM_WRITE(hanakanz_coincounter_w) | |
| 2518 | AM_RANGE(0xb4, 0xb4) AM_WRITE(hanakanz_keyb_w) | |
| 2519 | AM_RANGE(0xb6, 0xb6) AM_READ(hanakanz_rand_r) | |
| 2579 | 2520 | AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 2580 | 2521 | AM_RANGE(0xe0, 0xef) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 2581 | 2522 | ADDRESS_MAP_END |
| 2582 | 2523 | |
| 2583 | 2524 | |
| 2584 | ||
| 2525 | ||
| 2585 | 2526 | { |
| 2586 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2587 | state->m_prot_val = data; | |
| 2527 | m_prot_val = data; | |
| 2588 | 2528 | } |
| 2589 | 2529 | |
| 2590 | ||
| 2530 | ||
| 2591 | 2531 | { |
| 2592 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2593 | return state->m_prot_val; | |
| 2532 | return m_prot_val; | |
| 2594 | 2533 | } |
| 2595 | 2534 | |
| 2596 | 2535 | static ADDRESS_MAP_START( mjreach1_portmap, AS_IO, 8, dynax_state ) |
| 2597 | 2536 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 2598 | AM_RANGE(0x2c, 0x2c) AM_READ_LEGACY(hanakanz_busy_r) AM_DEVWRITE_LEGACY("oki", hanakanz_oki_bank_w) | |
| 2599 | AM_RANGE(0x2e, 0x2e) AM_WRITE_LEGACY(hanakanz_blitter_reg_w) | |
| 2600 | AM_RANGE(0x30, 0x30) AM_WRITE_LEGACY(hanakanz_rombank_w) | |
| 2601 | AM_RANGE(0x31, 0x31) AM_WRITE_LEGACY(hanakanz_dsw_w) | |
| 2602 | AM_RANGE(0x32, 0x32) AM_READ_LEGACY(hanakanz_dsw_r) | |
| 2603 | AM_RANGE(0x80, 0x80) AM_WRITE_LEGACY(hanakanz_blitter_data_w) | |
| 2604 | AM_RANGE(0x81, 0x81) AM_WRITE_LEGACY(hanakanz_palette_w) | |
| 2605 | AM_RANGE(0x83, 0x84) AM_READ_LEGACY(hanakanz_gfxrom_r) | |
| 2606 | AM_RANGE(0x90, 0x90) AM_WRITE_LEGACY(hanakanz_keyb_w) | |
| 2607 | AM_RANGE(0x92, 0x92) AM_READ_LEGACY(hanakanz_rand_r) | |
| 2608 | AM_RANGE(0x93, 0x93) AM_READWRITE_LEGACY(mjreach1_protection_r, mjreach1_protection_w) | |
| 2537 | AM_RANGE(0x2c, 0x2c) AM_READ(hanakanz_busy_r) AM_DEVWRITE_LEGACY("oki", hanakanz_oki_bank_w) | |
| 2538 | AM_RANGE(0x2e, 0x2e) AM_WRITE(hanakanz_blitter_reg_w) | |
| 2539 | AM_RANGE(0x30, 0x30) AM_WRITE(hanakanz_rombank_w) | |
| 2540 | AM_RANGE(0x31, 0x31) AM_WRITE(hanakanz_dsw_w) | |
| 2541 | AM_RANGE(0x32, 0x32) AM_READ(hanakanz_dsw_r) | |
| 2542 | AM_RANGE(0x80, 0x80) AM_WRITE(hanakanz_blitter_data_w) | |
| 2543 | AM_RANGE(0x81, 0x81) AM_WRITE(hanakanz_palette_w) | |
| 2544 | AM_RANGE(0x83, 0x84) AM_READ(hanakanz_gfxrom_r) | |
| 2545 | AM_RANGE(0x90, 0x90) AM_WRITE(hanakanz_keyb_w) | |
| 2546 | AM_RANGE(0x92, 0x92) AM_READ(hanakanz_rand_r) | |
| 2547 | AM_RANGE(0x93, 0x93) AM_READWRITE(mjreach1_protection_r, mjreach1_protection_w) | |
| 2609 | 2548 | AM_RANGE(0x94, 0x94) AM_READ_PORT("SYSTEM") |
| 2610 | AM_RANGE(0x95, 0x96) AM_READ_LEGACY(hanakanz_keyb_r) | |
| 2611 | AM_RANGE(0x97, 0x97) AM_WRITE_LEGACY(hanakanz_coincounter_w) | |
| 2549 | AM_RANGE(0x95, 0x96) AM_READ(hanakanz_keyb_r) | |
| 2550 | AM_RANGE(0x97, 0x97) AM_WRITE(hanakanz_coincounter_w) | |
| 2612 | 2551 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 2613 | 2552 | AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 2614 | 2553 | AM_RANGE(0xe0, 0xef) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| r14883 | r14884 | |
| 2619 | 2558 | Mahjong Chuukanejyo |
| 2620 | 2559 | ***************************************************************************/ |
| 2621 | 2560 | |
| 2622 | ||
| 2561 | ||
| 2623 | 2562 | { |
| 2624 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2625 | 2563 | UINT8 val = 0xff; |
| 2626 | 2564 | |
| 2627 | if (!BIT(state->m_keyb, 0)) val = input_port_read(space->machine(), offset ? "KEY5" : "KEY0"); | |
| 2628 | else if (!BIT(state->m_keyb, 1)) val = input_port_read(space->machine(), offset ? "KEY6" : "KEY1"); | |
| 2629 | else if (!BIT(state->m_keyb, 2)) val = input_port_read(space->machine(), offset ? "KEY7" : "KEY2"); | |
| 2630 | else if (!BIT(state->m_keyb, 3)) val = input_port_read(space->machine(), offset ? "KEY8" : "KEY3"); | |
| 2631 | else if (!BIT(state->m_keyb, 4)) val = input_port_read(space->machine(), offset ? "KEY9" : "KEY4"); | |
| 2565 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), offset ? "KEY5" : "KEY0"); | |
| 2566 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), offset ? "KEY6" : "KEY1"); | |
| 2567 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), offset ? "KEY7" : "KEY2"); | |
| 2568 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), offset ? "KEY8" : "KEY3"); | |
| 2569 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), offset ? "KEY9" : "KEY4"); | |
| 2632 | 2570 | |
| 2633 | val |= input_port_read( | |
| 2571 | val |= input_port_read( | |
| 2634 | 2572 | |
| 2635 | 2573 | if (offset) |
| 2636 | 2574 | val |= 0x80; // blitter busy |
| r14883 | r14884 | |
| 2638 | 2576 | return val; |
| 2639 | 2577 | } |
| 2640 | 2578 | |
| 2641 | ||
| 2579 | ||
| 2642 | 2580 | { |
| 2643 | 2581 | hanakanz_blitter_reg_w(space, 0, offset >> 8); |
| 2644 | 2582 | hanakanz_blitter_data_w(space, 0, data); |
| r14883 | r14884 | |
| 2661 | 2599 | state->m_romdata[1] = rom[address + 1]; |
| 2662 | 2600 | } |
| 2663 | 2601 | |
| 2664 | ||
| 2602 | ||
| 2665 | 2603 | { |
| 2666 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2667 | mjchuuka_get_romdata(space->machine()); | |
| 2668 | state->m_ddenlovr_blit_address++; | |
| 2669 | return state->m_romdata[0]; | |
| 2604 | mjchuuka_get_romdata(machine()); | |
| 2605 | m_ddenlovr_blit_address++; | |
| 2606 | return m_romdata[0]; | |
| 2670 | 2607 | } |
| 2671 | 2608 | |
| 2672 | ||
| 2609 | ||
| 2673 | 2610 | { |
| 2674 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2675 | return state->m_romdata[1]; | |
| 2611 | return m_romdata[1]; | |
| 2676 | 2612 | } |
| 2677 | 2613 | |
| 2678 | ||
| 2614 | ||
| 2679 | 2615 | { |
| 2680 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2681 | 2616 | UINT16 rgb = (offset & 0xff00) | data; |
| 2682 | 2617 | |
| 2683 | 2618 | if (rgb & 0x8000) |
| 2684 | 2619 | { |
| 2685 | | |
| 2620 | | |
| 2686 | 2621 | } |
| 2687 | 2622 | else |
| 2688 | 2623 | { |
| r14883 | r14884 | |
| 2692 | 2627 | int r = (rgb >> 0) & 0x1f; |
| 2693 | 2628 | int g = (rgb >> 8) & 0x1f; |
| 2694 | 2629 | int b = ((rgb >> 5) & 0x07) | ((rgb & 0x6000) >> 10); |
| 2695 | palette_set_color_rgb( | |
| 2630 | palette_set_color_rgb( | |
| 2696 | 2631 | } |
| 2697 | 2632 | } |
| 2698 | 2633 | |
| 2699 | ||
| 2634 | ||
| 2700 | 2635 | { |
| 2701 | 2636 | // bit 0 = in counter |
| 2702 | 2637 | // bit 1 = out counter |
| 2703 | 2638 | // bit 3 = lockout |
| 2704 | 2639 | // bit 8? |
| 2705 | 2640 | |
| 2706 | coin_counter_w(space->machine(), 0, data & 0x01); | |
| 2707 | coin_lockout_w(space->machine(), 0, (~data) & 0x08); | |
| 2641 | coin_counter_w(machine(), 0, data & 0x01); | |
| 2642 | coin_lockout_w(machine(), 0, (~data) & 0x08); | |
| 2708 | 2643 | |
| 2709 | 2644 | if (data & 0x74) |
| 2710 | logerror("%04x: warning, coin counter = %02x\n", cpu_get_pc(&space | |
| 2645 | logerror("%04x: warning, coin counter = %02x\n", cpu_get_pc(&space. | |
| 2711 | 2646 | |
| 2712 | 2647 | #ifdef MAME_DEBUG |
| 2713 | 2648 | // popmessage("40 = %02x",data); |
| r14883 | r14884 | |
| 2726 | 2661 | } |
| 2727 | 2662 | |
| 2728 | 2663 | static ADDRESS_MAP_START( mjchuuka_portmap, AS_IO, 8, dynax_state ) // 16 bit I/O |
| 2729 | AM_RANGE(0x13, 0x13) AM_MIRROR(0xff00) AM_READ_LEGACY(hanakanz_rand_r) | |
| 2730 | AM_RANGE(0x1c, 0x1c) AM_MIRROR(0xff00) AM_WRITE_LEGACY(hanakanz_rombank_w) | |
| 2664 | AM_RANGE(0x13, 0x13) AM_MIRROR(0xff00) AM_READ(hanakanz_rand_r) | |
| 2665 | AM_RANGE(0x1c, 0x1c) AM_MIRROR(0xff00) AM_WRITE(hanakanz_rombank_w) | |
| 2731 | 2666 | AM_RANGE(0x1e, 0x1e) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY("oki", mjchuuka_oki_bank_w ) |
| 2732 | AM_RANGE(0x20, 0x20) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_WRITE_LEGACY(mjchuuka_blitter_w) | |
| 2733 | AM_RANGE(0x21, 0x21) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_WRITE_LEGACY(mjchuuka_palette_w) | |
| 2734 | AM_RANGE(0x23, 0x23) AM_MIRROR(0xff00) AM_READ_LEGACY(mjchuuka_gfxrom_0_r) | |
| 2735 | AM_RANGE(0x40, 0x40) AM_MIRROR(0xff00) AM_WRITE_LEGACY(mjchuuka_coincounter_w) | |
| 2736 | AM_RANGE(0x41, 0x41) AM_MIRROR(0xff00) AM_WRITE_LEGACY(hanakanz_keyb_w) | |
| 2667 | AM_RANGE(0x20, 0x20) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_WRITE(mjchuuka_blitter_w) | |
| 2668 | AM_RANGE(0x21, 0x21) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_WRITE(mjchuuka_palette_w) | |
| 2669 | AM_RANGE(0x23, 0x23) AM_MIRROR(0xff00) AM_READ(mjchuuka_gfxrom_0_r) | |
| 2670 | AM_RANGE(0x40, 0x40) AM_MIRROR(0xff00) AM_WRITE(mjchuuka_coincounter_w) | |
| 2671 | AM_RANGE(0x41, 0x41) AM_MIRROR(0xff00) AM_WRITE(hanakanz_keyb_w) | |
| 2737 | 2672 | AM_RANGE(0x42, 0x42) AM_MIRROR(0xff00) AM_READ_PORT("SYSTEM") |
| 2738 | AM_RANGE(0x43, 0x44) AM_MIRROR(0xff00) AM_READ_LEGACY(mjchuuka_keyb_r) | |
| 2739 | AM_RANGE(0x45, 0x45) AM_MIRROR(0xff00) AM_READ_LEGACY(mjchuuka_gfxrom_1_r) | |
| 2673 | AM_RANGE(0x43, 0x44) AM_MIRROR(0xff00) AM_READ(mjchuuka_keyb_r) | |
| 2674 | AM_RANGE(0x45, 0x45) AM_MIRROR(0xff00) AM_READ(mjchuuka_gfxrom_1_r) | |
| 2740 | 2675 | AM_RANGE(0x60, 0x60) AM_MIRROR(0xff00) AM_READ_PORT("DSW1") |
| 2741 | 2676 | AM_RANGE(0x61, 0x61) AM_MIRROR(0xff00) AM_READ_PORT("DSW2") |
| 2742 | 2677 | AM_RANGE(0x62, 0x62) AM_MIRROR(0xff00) AM_READ_PORT("DSW3") |
| r14883 | r14884 | |
| 2758 | 2693 | AM_RANGE(0x6000, 0x6fff) AM_RAM // RAM |
| 2759 | 2694 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 2760 | 2695 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") // ROM/RAM (Banked) |
| 2761 | AM_RANGE(0xf000, 0xf1ff) AM_WRITE | |
| 2696 | AM_RANGE(0xf000, 0xf1ff) AM_WRITE | |
| 2762 | 2697 | AM_RANGE(0xf200, 0xffff) AM_WRITENOP // "" |
| 2763 | 2698 | ADDRESS_MAP_END |
| 2764 | 2699 | |
| 2765 | ||
| 2700 | ||
| 2766 | 2701 | { |
| 2767 | memory_set_bank(space->machine(), "bank2", data & 0x07); | |
| 2768 | //logerror("%04x: rambank = %02x\n", cpu_get_pc(&space->device()), data); | |
| 2702 | memory_set_bank(machine(), "bank2", data & 0x07); | |
| 2703 | //logerror("%04x: rambank = %02x\n", cpu_get_pc(&space.device()), data); | |
| 2769 | 2704 | } |
| 2770 | 2705 | |
| 2771 | ||
| 2706 | ||
| 2772 | 2707 | { |
| 2773 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2774 | state->m_input_sel = data; | |
| 2708 | m_input_sel = data; | |
| 2775 | 2709 | |
| 2776 | 2710 | if (data & 0x80) |
| 2777 | | |
| 2711 | | |
| 2778 | 2712 | } |
| 2779 | 2713 | |
| 2780 | ||
| 2714 | ||
| 2781 | 2715 | { |
| 2782 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2783 | 2716 | |
| 2784 | switch ( | |
| 2717 | switch ( | |
| 2785 | 2718 | { |
| 2786 | case 0x00: return input_port_read( | |
| 2719 | case 0x00: return input_port_read( | |
| 2787 | 2720 | case 0x01: return 0xff; |
| 2788 | 2721 | case 0x02: return 0xff; // bit 7 = 0 -> blitter busy, + hopper switch |
| 2789 | 2722 | case 0x03: return 0xff; |
| 2790 | 2723 | } |
| 2791 | 2724 | |
| 2792 | logerror("%06x: warning, unknown bits read, ddenlovr_select2 = %02x\n", cpu_get_pc(&space | |
| 2725 | logerror("%06x: warning, unknown bits read, ddenlovr_select2 = %02x\n", cpu_get_pc(&space. | |
| 2793 | 2726 | |
| 2794 | 2727 | return 0xff; |
| 2795 | 2728 | } |
| 2796 | 2729 | |
| 2797 | ||
| 2730 | ||
| 2798 | 2731 | { |
| 2799 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2800 | 2732 | UINT8 ret = 0xff; |
| 2801 | 2733 | |
| 2802 | if (BIT(state->m_keyb, 0)) ret = input_port_read(space->machine(), "KEY0"); | |
| 2803 | else if (BIT(state->m_keyb, 1)) ret = input_port_read(space->machine(), "KEY1"); | |
| 2804 | else if (BIT(state->m_keyb, 2)) ret = input_port_read(space->machine(), "KEY2"); | |
| 2805 | else if (BIT(state->m_keyb, 3)) ret = input_port_read(space->machine(), "KEY3"); | |
| 2806 | else if (BIT(state->m_keyb, 4)) ret = input_port_read(space->machine(), "KEY4"); | |
| 2807 | else logerror("%06x: warning, unknown bits read, keyb = %02x\n", cpu_get_pc(&space->device()), state->m_keyb); | |
| 2734 | if (BIT(m_keyb, 0)) ret = input_port_read(machine(), "KEY0"); | |
| 2735 | else if (BIT(m_keyb, 1)) ret = input_port_read(machine(), "KEY1"); | |
| 2736 | else if (BIT(m_keyb, 2)) ret = input_port_read(machine(), "KEY2"); | |
| 2737 | else if (BIT(m_keyb, 3)) ret = input_port_read(machine(), "KEY3"); | |
| 2738 | else if (BIT(m_keyb, 4)) ret = input_port_read(machine(), "KEY4"); | |
| 2739 | else logerror("%06x: warning, unknown bits read, keyb = %02x\n", cpu_get_pc(&space.device()), m_keyb); | |
| 2808 | 2740 | |
| 2809 | | |
| 2741 | | |
| 2810 | 2742 | |
| 2811 | 2743 | return ret; |
| 2812 | 2744 | } |
| 2813 | 2745 | |
| 2814 | ||
| 2746 | ||
| 2815 | 2747 | { |
| 2816 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2817 | 2748 | |
| 2818 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(space->machine(), "DSW4"); | |
| 2819 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(space->machine(), "DSW3"); | |
| 2820 | if (!BIT(state->m_dsw_sel, 2)) return input_port_read(space->machine(), "DSW2"); | |
| 2821 | if (!BIT(state->m_dsw_sel, 3)) return input_port_read(space->machine(), "DSW1"); | |
| 2822 | if (!BIT(state->m_dsw_sel, 4)) return input_port_read(space->machine(), "DSW5"); | |
| 2823 | logerror("%06x: warning, unknown bits read, ddenlovr_select = %02x\n", cpu_get_pc(&space->device()), state->m_dsw_sel); | |
| 2749 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW4"); | |
| 2750 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW3"); | |
| 2751 | if (!BIT(m_dsw_sel, 2)) return input_port_read(machine(), "DSW2"); | |
| 2752 | if (!BIT(m_dsw_sel, 3)) return input_port_read(machine(), "DSW1"); | |
| 2753 | if (!BIT(m_dsw_sel, 4)) return input_port_read(machine(), "DSW5"); | |
| 2754 | logerror("%06x: warning, unknown bits read, ddenlovr_select = %02x\n", cpu_get_pc(&space.device()), m_dsw_sel); | |
| 2824 | 2755 | return 0xff; |
| 2825 | 2756 | } |
| 2826 | 2757 | |
| 2827 | ||
| 2758 | ||
| 2828 | 2759 | { |
| 2829 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2830 | 2760 | |
| 2831 | switch ( | |
| 2761 | switch ( | |
| 2832 | 2762 | { |
| 2833 | 2763 | case 0x0c: |
| 2834 | coin_counter_w(space->machine(), 0, (~data) & 0x01); // coin in | |
| 2835 | coin_counter_w(space->machine(), 0, (~data) & 0x02); // coin out actually | |
| 2764 | coin_counter_w(machine(), 0, (~data) & 0x01); // coin in | |
| 2765 | coin_counter_w(machine(), 0, (~data) & 0x02); // coin out actually | |
| 2836 | 2766 | #ifdef MAME_DEBUG |
| 2837 | 2767 | // popmessage("cc: %02x",data); |
| 2838 | 2768 | #endif |
| r14883 | r14884 | |
| 2840 | 2770 | break; |
| 2841 | 2771 | |
| 2842 | 2772 | default: |
| 2843 | logerror("%06x: warning, unknown bits written, ddenlovr_select2 = %02x, data = %02x\n", cpu_get_pc(&space | |
| 2773 | logerror("%06x: warning, unknown bits written, ddenlovr_select2 = %02x, data = %02x\n", cpu_get_pc(&space. | |
| 2844 | 2774 | } |
| 2845 | 2775 | } |
| 2846 | 2776 | |
| 2847 | ||
| 2777 | ||
| 2848 | 2778 | { |
| 2849 | blitter_w(space, 0, offset, data, 0xfc); | |
| 2779 | blitter_w(&space, 0, offset, data, 0xfc); | |
| 2850 | 2780 | } |
| 2851 | 2781 | |
| 2852 | 2782 | static ADDRESS_MAP_START( mjmyster_portmap, AS_IO, 8, dynax_state ) |
| 2853 | 2783 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 2854 | AM_RANGE(0x00, 0x01) AM_WRITE_LEGACY(mjmyster_blitter_w) | |
| 2855 | AM_RANGE(0x03, 0x03) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 2856 | AM_RANGE(0x1c, 0x1c) AM_WRITE_LEGACY(mjmyster_rambank_w) | |
| 2857 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(mmpanic_rombank_w) | |
| 2858 | AM_RANGE(0x20, 0x20) AM_WRITE_LEGACY(mjmyster_select2_w) | |
| 2859 | AM_RANGE(0x21, 0x21) AM_WRITE_LEGACY(mjmyster_coincounter_w) | |
| 2860 | AM_RANGE(0x22, 0x22) AM_READ_LEGACY(mjmyster_coins_r) | |
| 2861 | AM_RANGE(0x23, 0x23) AM_READ_LEGACY(mjmyster_keyb_r) | |
| 2784 | AM_RANGE(0x00, 0x01) AM_WRITE(mjmyster_blitter_w) | |
| 2785 | AM_RANGE(0x03, 0x03) AM_READ(rongrong_gfxrom_r) | |
| 2786 | AM_RANGE(0x1c, 0x1c) AM_WRITE(mjmyster_rambank_w) | |
| 2787 | AM_RANGE(0x1e, 0x1e) AM_WRITE(mmpanic_rombank_w) | |
| 2788 | AM_RANGE(0x20, 0x20) AM_WRITE(mjmyster_select2_w) | |
| 2789 | AM_RANGE(0x21, 0x21) AM_WRITE(mjmyster_coincounter_w) | |
| 2790 | AM_RANGE(0x22, 0x22) AM_READ(mjmyster_coins_r) | |
| 2791 | AM_RANGE(0x23, 0x23) AM_READ(mjmyster_keyb_r) | |
| 2862 | 2792 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 2863 | 2793 | AM_RANGE(0x42, 0x43) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 2864 | 2794 | AM_RANGE(0x44, 0x44) AM_DEVREAD_LEGACY("aysnd", ay8910_r) |
| 2865 | 2795 | AM_RANGE(0x46, 0x46) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) |
| 2866 | 2796 | AM_RANGE(0x48, 0x48) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) |
| 2867 | 2797 | AM_RANGE(0x60, 0x6f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 2868 | AM_RANGE(0x80, 0x83) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 2869 | AM_RANGE(0x84, 0x87) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 2870 | AM_RANGE(0x88, 0x8b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 2871 | AM_RANGE(0x8c, 0x8f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 2872 | AM_RANGE(0x94, 0x94) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 2873 | AM_RANGE(0x95, 0x95) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 2874 | AM_RANGE(0x96, 0x96) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 2875 | AM_RANGE(0x98, 0x98) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 2876 | AM_RANGE(0xc2, 0xc2) AM_READ_LEGACY(hanakanz_rand_r) | |
| 2877 | AM_RANGE(0xc3, 0xc3) AM_READ_LEGACY(mjmyster_dsw_r) | |
| 2798 | AM_RANGE(0x80, 0x83) AM_WRITE(ddenlovr_palette_base_w) | |
| 2799 | AM_RANGE(0x84, 0x87) AM_WRITE(ddenlovr_palette_mask_w) | |
| 2800 | AM_RANGE(0x88, 0x8b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 2801 | AM_RANGE(0x8c, 0x8f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 2802 | AM_RANGE(0x94, 0x94) AM_WRITE(ddenlovr_bgcolor_w) | |
| 2803 | AM_RANGE(0x95, 0x95) AM_WRITE(ddenlovr_priority_w) | |
| 2804 | AM_RANGE(0x96, 0x96) AM_WRITE(ddenlovr_layer_enable_w) | |
| 2805 | AM_RANGE(0x98, 0x98) AM_READ(unk_r) // ? must be 78 on startup | |
| 2806 | AM_RANGE(0xc2, 0xc2) AM_READ(hanakanz_rand_r) | |
| 2807 | AM_RANGE(0xc3, 0xc3) AM_READ(mjmyster_dsw_r) | |
| 2878 | 2808 | ADDRESS_MAP_END |
| 2879 | 2809 | |
| 2880 | 2810 | /*************************************************************************** |
| 2881 | 2811 | Hanafuda Hana Ginga |
| 2882 | 2812 | ***************************************************************************/ |
| 2883 | 2813 | |
| 2884 | ||
| 2814 | ||
| 2885 | 2815 | { |
| 2886 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2887 | memory_set_bank(space->machine(), "bank1", data & 0x7); | |
| 2888 | state->m_hginga_rombank = data; | |
| 2816 | memory_set_bank(machine(), "bank1", data & 0x7); | |
| 2817 | m_hginga_rombank = data; | |
| 2889 | 2818 | } |
| 2890 | 2819 | |
| 2891 | 2820 | // similar to rongrong |
| 2892 | ||
| 2821 | ||
| 2893 | 2822 | { |
| 2894 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2895 | UINT8 *rom = space->machine().region("maincpu")->base(); | |
| 2823 | UINT8 *rom = machine().region("maincpu")->base(); | |
| 2896 | 2824 | |
| 2897 | if ( | |
| 2825 | if ( | |
| 2898 | 2826 | return hanakanz_rand_r(space, 0); |
| 2899 | return rom[0x10000 + 0x8000 * ( | |
| 2827 | return rom[0x10000 + 0x8000 * ( | |
| 2900 | 2828 | } |
| 2901 | 2829 | |
| 2902 | 2830 | static ADDRESS_MAP_START( hginga_map, AS_PROGRAM, 8, dynax_state ) |
| 2903 | 2831 | AM_RANGE(0x0000, 0x5fff) AM_ROM // ROM |
| 2904 | 2832 | AM_RANGE(0x6000, 0x6fff) AM_RAM // RAM |
| 2905 | 2833 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 2906 | AM_RANGE(0xf601, 0xf601) AM_READ | |
| 2834 | AM_RANGE(0xf601, 0xf601) AM_READ | |
| 2907 | 2835 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") // ROM/RAM (Banked) |
| 2908 | AM_RANGE(0xf000, 0xf1ff) AM_WRITE | |
| 2836 | AM_RANGE(0xf000, 0xf1ff) AM_WRITE | |
| 2909 | 2837 | AM_RANGE(0xf700, 0xf706) AM_WRITENOP |
| 2910 | 2838 | ADDRESS_MAP_END |
| 2911 | 2839 | |
| r14883 | r14884 | |
| 2923 | 2851 | return 0xff; |
| 2924 | 2852 | } |
| 2925 | 2853 | |
| 2926 | ||
| 2854 | ||
| 2927 | 2855 | { |
| 2928 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2929 | state->m_input_sel = data; | |
| 2930 | state->m_keyb = 0; | |
| 2856 | m_input_sel = data; | |
| 2857 | m_keyb = 0; | |
| 2931 | 2858 | } |
| 2932 | 2859 | |
| 2933 | ||
| 2860 | ||
| 2934 | 2861 | { |
| 2935 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2936 | 2862 | |
| 2937 | switch ( | |
| 2863 | switch ( | |
| 2938 | 2864 | { |
| 2939 | case 0x20: return input_port_read(space->machine(), "SYSTEM"); | |
| 2940 | case 0x21: return input_port_read(space->machine(), "BET"); | |
| 2865 | case 0x20: return input_port_read(machine(), "SYSTEM"); | |
| 2866 | case 0x21: return input_port_read(machine(), "BET"); | |
| 2941 | 2867 | case 0x22: return 0x7f; // bit 7 = blitter busy, bit 6 = hopper |
| 2942 | case 0x23: return | |
| 2868 | case 0x23: return | |
| 2943 | 2869 | } |
| 2944 | logerror("%04x: coins_r with select = %02x\n", cpu_get_pc(&space | |
| 2870 | logerror("%04x: coins_r with select = %02x\n", cpu_get_pc(&space. | |
| 2945 | 2871 | return 0xff; |
| 2946 | 2872 | } |
| 2947 | 2873 | |
| 2948 | ||
| 2874 | ||
| 2949 | 2875 | { |
| 2950 | 2876 | // popmessage("port 80 = %02x", data); |
| 2951 | 2877 | } |
| 2952 | 2878 | |
| 2953 | ||
| 2879 | ||
| 2954 | 2880 | { |
| 2955 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2956 | 2881 | |
| 2957 | switch ( | |
| 2882 | switch ( | |
| 2958 | 2883 | { |
| 2959 | 2884 | case 0x2d: |
| 2960 | 2885 | break; |
| r14883 | r14884 | |
| 2964 | 2889 | // bit 2 = 1 if bet on |
| 2965 | 2890 | // bit 3 = 1 if bet on |
| 2966 | 2891 | // bit 7? |
| 2967 | coin_counter_w( | |
| 2892 | coin_counter_w( | |
| 2968 | 2893 | #ifdef MAME_DEBUG |
| 2969 | 2894 | // popmessage("COINS %02x", data); |
| 2970 | 2895 | #endif |
| 2971 | | |
| 2896 | | |
| 2972 | 2897 | break; |
| 2973 | 2898 | default: |
| 2974 | logerror("%04x: coins_w with select = %02x, data = %02x\n", cpu_get_pc(&space | |
| 2899 | logerror("%04x: coins_w with select = %02x, data = %02x\n", cpu_get_pc(&space. | |
| 2975 | 2900 | } |
| 2976 | 2901 | } |
| 2977 | 2902 | |
| 2978 | ||
| 2903 | ||
| 2979 | 2904 | { |
| 2980 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 2981 | 2905 | static const char *const keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" }; |
| 2982 | 2906 | static const char *const keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" }; |
| 2983 | 2907 | |
| 2984 | switch ( | |
| 2908 | switch ( | |
| 2985 | 2909 | { |
| 2986 | 2910 | case 0x2d: |
| 2987 | 2911 | return 0xff; |
| 2988 | 2912 | |
| 2989 | 2913 | // player 1 |
| 2990 | 2914 | case 0xa1: |
| 2991 | return input_port_read( | |
| 2915 | return input_port_read( | |
| 2992 | 2916 | |
| 2993 | 2917 | // player 2 |
| 2994 | 2918 | case 0xa2: |
| 2995 | return input_port_read( | |
| 2919 | return input_port_read( | |
| 2996 | 2920 | } |
| 2997 | logerror("%04x: input_r with select = %02x\n", cpu_get_pc(&space | |
| 2921 | logerror("%04x: input_r with select = %02x\n", cpu_get_pc(&space. | |
| 2998 | 2922 | return 0xff; |
| 2999 | 2923 | } |
| 3000 | 2924 | |
| 3001 | ||
| 2925 | ||
| 3002 | 2926 | { |
| 3003 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3004 | 2927 | if (offset == 0) |
| 3005 | 2928 | { |
| 3006 | | |
| 2929 | | |
| 3007 | 2930 | } |
| 3008 | 2931 | else |
| 3009 | 2932 | { |
| 3010 | switch ( | |
| 2933 | switch ( | |
| 3011 | 2934 | { |
| 3012 | 2935 | case 0x00: |
| 3013 | 2936 | switch (data & 0xf) |
| r14883 | r14884 | |
| 3026 | 2949 | break; |
| 3027 | 2950 | } |
| 3028 | 2951 | } |
| 3029 | blitter_w(space, 0, offset, data, 0xfc); | |
| 2952 | blitter_w(&space, 0, offset, data, 0xfc); | |
| 3030 | 2953 | } |
| 3031 | 2954 | |
| 3032 | 2955 | static ADDRESS_MAP_START( hginga_portmap, AS_IO, 8, dynax_state ) |
| 3033 | 2956 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3034 | AM_RANGE(0x00, 0x01) AM_WRITE_LEGACY(hginga_blitter_w) | |
| 3035 | AM_RANGE(0x03, 0x03) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 3036 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE_LEGACY(mjmyster_rambank_w) | |
| 3037 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(hginga_rombank_w) | |
| 2957 | AM_RANGE(0x00, 0x01) AM_WRITE(hginga_blitter_w) | |
| 2958 | AM_RANGE(0x03, 0x03) AM_READ(rongrong_gfxrom_r) | |
| 2959 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE(mjmyster_rambank_w) | |
| 2960 | AM_RANGE(0x1e, 0x1e) AM_WRITE(hginga_rombank_w) | |
| 3038 | 2961 | AM_RANGE(0x22, 0x23) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3039 | 2962 | AM_RANGE(0x24, 0x24) AM_DEVREAD_LEGACY("aysnd", ay8910_r) |
| 3040 | 2963 | AM_RANGE(0x26, 0x26) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) |
| 3041 | 2964 | AM_RANGE(0x28, 0x28) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) |
| 3042 | AM_RANGE(0x40, 0x40) AM_WRITE_LEGACY(hginga_input_w) | |
| 3043 | AM_RANGE(0x41, 0x41) AM_WRITE_LEGACY(hginga_coins_w) | |
| 3044 | AM_RANGE(0x42, 0x42) AM_READ_LEGACY(hginga_coins_r) | |
| 3045 | AM_RANGE(0x43, 0x43) AM_READ_LEGACY(hginga_input_r) | |
| 2965 | AM_RANGE(0x40, 0x40) AM_WRITE(hginga_input_w) | |
| 2966 | AM_RANGE(0x41, 0x41) AM_WRITE(hginga_coins_w) | |
| 2967 | AM_RANGE(0x42, 0x42) AM_READ(hginga_coins_r) | |
| 2968 | AM_RANGE(0x43, 0x43) AM_READ(hginga_input_r) | |
| 3046 | 2969 | AM_RANGE(0x60, 0x6f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3047 | AM_RANGE(0x80, 0x80) AM_WRITE_LEGACY(hginga_80_w) | |
| 3048 | AM_RANGE(0xa0, 0xa3) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 3049 | AM_RANGE(0xa4, 0xa7) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 3050 | AM_RANGE(0xa8, 0xab) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 3051 | AM_RANGE(0xac, 0xaf) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 3052 | AM_RANGE(0xb4, 0xb4) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 3053 | AM_RANGE(0xb5, 0xb5) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 3054 | AM_RANGE(0xb6, 0xb6) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 3055 | AM_RANGE(0xb8, 0xb8) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 2970 | AM_RANGE(0x80, 0x80) AM_WRITE(hginga_80_w) | |
| 2971 | AM_RANGE(0xa0, 0xa3) AM_WRITE(ddenlovr_palette_base_w) | |
| 2972 | AM_RANGE(0xa4, 0xa7) AM_WRITE(ddenlovr_palette_mask_w) | |
| 2973 | AM_RANGE(0xa8, 0xab) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 2974 | AM_RANGE(0xac, 0xaf) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 2975 | AM_RANGE(0xb4, 0xb4) AM_WRITE(ddenlovr_bgcolor_w) | |
| 2976 | AM_RANGE(0xb5, 0xb5) AM_WRITE(ddenlovr_priority_w) | |
| 2977 | AM_RANGE(0xb6, 0xb6) AM_WRITE(ddenlovr_layer_enable_w) | |
| 2978 | AM_RANGE(0xb8, 0xb8) AM_READ(unk_r) // ? must be 78 on startup | |
| 3056 | 2979 | ADDRESS_MAP_END |
| 3057 | 2980 | |
| 3058 | 2981 | |
| r14883 | r14884 | |
| 3074 | 2997 | return 0x7f; // bit 7 = blitter busy, bit 6 = hopper |
| 3075 | 2998 | } |
| 3076 | 2999 | |
| 3077 | ||
| 3000 | ||
| 3078 | 3001 | { |
| 3079 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3080 | state->m_dsw_sel = data; | |
| 3002 | m_dsw_sel = data; | |
| 3081 | 3003 | } |
| 3082 | 3004 | |
| 3083 | ||
| 3005 | ||
| 3084 | 3006 | { |
| 3085 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3086 | 3007 | |
| 3087 | switch ( | |
| 3008 | switch ( | |
| 3088 | 3009 | { |
| 3089 | case 0x20: return input_port_read(space->machine(), "SYSTEM"); | |
| 3090 | case 0x21: return hgokou_player_r(space, 1); | |
| 3091 | case 0x22: return hgokou_player_r(space, 0); | |
| 3092 | case 0x23: return state->m_coins; | |
| 3010 | case 0x20: return input_port_read(machine(), "SYSTEM"); | |
| 3011 | case 0x21: return hgokou_player_r(&space, 1); | |
| 3012 | case 0x22: return hgokou_player_r(&space, 0); | |
| 3013 | case 0x23: return m_coins; | |
| 3093 | 3014 | } |
| 3094 | logerror("%06x: warning, unknown bits read, dsw_sel = %02x\n", cpu_get_pc(&space | |
| 3015 | logerror("%06x: warning, unknown bits read, dsw_sel = %02x\n", cpu_get_pc(&space. | |
| 3095 | 3016 | return 0xff; |
| 3096 | 3017 | } |
| 3097 | 3018 | |
| 3098 | ||
| 3019 | ||
| 3099 | 3020 | { |
| 3100 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3101 | 3021 | |
| 3102 | switch ( | |
| 3022 | switch ( | |
| 3103 | 3023 | { |
| 3104 | 3024 | case 0x2c: |
| 3105 | 3025 | // bit 0 = coin counter |
| 3106 | 3026 | // bit 1 = out counter |
| 3107 | 3027 | // bit 2 = hopper |
| 3108 | 3028 | // bit 7 = ? |
| 3109 | coin_counter_w(space->machine(), 0, data & 1); | |
| 3110 | state->m_hopper = data & 0x04; | |
| 3029 | coin_counter_w(machine(), 0, data & 1); | |
| 3030 | m_hopper = data & 0x04; | |
| 3111 | 3031 | #ifdef MAME_DEBUG |
| 3112 | 3032 | // popmessage("COINS %02x",data); |
| 3113 | 3033 | #endif |
| 3114 | | |
| 3034 | | |
| 3115 | 3035 | break; |
| 3116 | 3036 | |
| 3117 | case 0x2d: | |
| 3037 | case 0x2d: | |
| 3118 | 3038 | |
| 3119 | 3039 | case 0x2f: break; // ? written with 2f (hgokou) |
| 3120 | 3040 | |
| 3121 | 3041 | default: |
| 3122 | logerror("%04x: input_w with select = %02x, data = %02x\n", cpu_get_pc(&space | |
| 3042 | logerror("%04x: input_w with select = %02x, data = %02x\n", cpu_get_pc(&space. | |
| 3123 | 3043 | } |
| 3124 | 3044 | } |
| 3125 | 3045 | |
| 3126 | 3046 | // similar to rongrong |
| 3127 | ||
| 3047 | ||
| 3128 | 3048 | { |
| 3129 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3130 | UINT8 *rom = space->machine().region("maincpu")->base(); | |
| 3049 | UINT8 *rom = machine().region("maincpu")->base(); | |
| 3131 | 3050 | |
| 3132 | if ( | |
| 3051 | if ( | |
| 3133 | 3052 | return hanakanz_rand_r(space, 0); |
| 3134 | return rom[0x10000 + 0x8000 * ( | |
| 3053 | return rom[0x10000 + 0x8000 * ( | |
| 3135 | 3054 | } |
| 3136 | 3055 | |
| 3137 | 3056 | static ADDRESS_MAP_START( hgokou_map, AS_PROGRAM, 8, dynax_state ) |
| 3138 | 3057 | AM_RANGE(0x0000, 0x5fff) AM_ROM // ROM |
| 3139 | 3058 | AM_RANGE(0x6000, 0x6fff) AM_RAM // RAM |
| 3140 | 3059 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 3141 | AM_RANGE(0xe601, 0xe601) AM_READ | |
| 3060 | AM_RANGE(0xe601, 0xe601) AM_READ | |
| 3142 | 3061 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") // ROM (Banked) |
| 3143 | AM_RANGE(0xe000, 0xe1ff) AM_WRITE | |
| 3062 | AM_RANGE(0xe000, 0xe1ff) AM_WRITE | |
| 3144 | 3063 | AM_RANGE(0xe700, 0xe706) AM_WRITENOP |
| 3145 | 3064 | ADDRESS_MAP_END |
| 3146 | 3065 | |
| 3147 | 3066 | |
| 3148 | 3067 | static ADDRESS_MAP_START( hgokou_portmap, AS_IO, 8, dynax_state ) |
| 3149 | 3068 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3150 | AM_RANGE(0x00, 0x01) AM_WRITE_LEGACY(hginga_blitter_w) | |
| 3151 | AM_RANGE(0x03, 0x03) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 3152 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE_LEGACY(mjmyster_rambank_w) // ? ack on RTC int | |
| 3153 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(hginga_rombank_w) | |
| 3069 | AM_RANGE(0x00, 0x01) AM_WRITE(hginga_blitter_w) | |
| 3070 | AM_RANGE(0x03, 0x03) AM_READ(rongrong_gfxrom_r) | |
| 3071 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE(mjmyster_rambank_w) // ? ack on RTC int | |
| 3072 | AM_RANGE(0x1e, 0x1e) AM_WRITE(hginga_rombank_w) | |
| 3154 | 3073 | AM_RANGE(0x20, 0x2f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3155 | AM_RANGE(0x40, 0x43) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 3156 | AM_RANGE(0x44, 0x47) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 3157 | AM_RANGE(0x48, 0x4b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 3158 | AM_RANGE(0x4c, 0x4f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 3159 | AM_RANGE(0x54, 0x54) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 3160 | AM_RANGE(0x55, 0x55) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 3161 | AM_RANGE(0x56, 0x56) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 3162 | AM_RANGE(0x58, 0x58) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 3163 | AM_RANGE(0x60, 0x60) AM_WRITE_LEGACY(hgokou_dsw_sel_w) | |
| 3164 | AM_RANGE(0x61, 0x61) AM_WRITE_LEGACY(hgokou_input_w) | |
| 3165 | AM_RANGE(0x62, 0x62) AM_READ_LEGACY(hgokou_input_r) | |
| 3074 | AM_RANGE(0x40, 0x43) AM_WRITE(ddenlovr_palette_base_w) | |
| 3075 | AM_RANGE(0x44, 0x47) AM_WRITE(ddenlovr_palette_mask_w) | |
| 3076 | AM_RANGE(0x48, 0x4b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 3077 | AM_RANGE(0x4c, 0x4f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 3078 | AM_RANGE(0x54, 0x54) AM_WRITE(ddenlovr_bgcolor_w) | |
| 3079 | AM_RANGE(0x55, 0x55) AM_WRITE(ddenlovr_priority_w) | |
| 3080 | AM_RANGE(0x56, 0x56) AM_WRITE(ddenlovr_layer_enable_w) | |
| 3081 | AM_RANGE(0x58, 0x58) AM_READ(unk_r) // ? must be 78 on startup | |
| 3082 | AM_RANGE(0x60, 0x60) AM_WRITE(hgokou_dsw_sel_w) | |
| 3083 | AM_RANGE(0x61, 0x61) AM_WRITE(hgokou_input_w) | |
| 3084 | AM_RANGE(0x62, 0x62) AM_READ(hgokou_input_r) | |
| 3166 | 3085 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3167 | 3086 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3168 | 3087 | AM_RANGE(0x84, 0x84) AM_DEVREAD_LEGACY("aysnd", ay8910_r) |
| 3169 | 3088 | AM_RANGE(0x86, 0x86) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) |
| 3170 | 3089 | AM_RANGE(0x88, 0x88) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) |
| 3171 | AM_RANGE(0xb0, 0xb0) AM_READ | |
| 3090 | AM_RANGE(0xb0, 0xb0) AM_READ | |
| 3172 | 3091 | ADDRESS_MAP_END |
| 3173 | 3092 | |
| 3174 | 3093 | |
| r14883 | r14884 | |
| 3176 | 3095 | Hanafuda Hana Gokou Bangaihen |
| 3177 | 3096 | ***************************************************************************/ |
| 3178 | 3097 | |
| 3179 | ||
| 3098 | ||
| 3180 | 3099 | { |
| 3181 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3182 | 3100 | |
| 3183 | 3101 | UINT8 ret; |
| 3184 | switch ( | |
| 3102 | switch ( | |
| 3185 | 3103 | { |
| 3186 | 3104 | case 0x2d: |
| 3187 | if (state->m_input_sel == 0xff) // reset auto-incrementing input_sel | |
| 3188 | state->m_input_sel = 0xfe; | |
| 3105 | if (m_input_sel == 0xff) // reset auto-incrementing input_sel | |
| 3106 | m_input_sel = 0xfe; | |
| 3189 | 3107 | return 0; // discarded |
| 3190 | 3108 | case 0xa1: |
| 3191 | ret = hgokou_player_r(space, 1); | |
| 3192 | state->m_input_sel <<= 1; // auto-increment input_sel | |
| 3193 | state->m_input_sel |= 1; | |
| 3109 | ret = hgokou_player_r(&space, 1); | |
| 3110 | m_input_sel <<= 1; // auto-increment input_sel | |
| 3111 | m_input_sel |= 1; | |
| 3194 | 3112 | return ret; |
| 3195 | 3113 | case 0xa2: |
| 3196 | ret = hgokou_player_r(space, 0); | |
| 3197 | state->m_input_sel <<= 1; // auto-increment input_sel | |
| 3198 | state->m_input_sel |= 1; | |
| 3114 | ret = hgokou_player_r(&space, 0); | |
| 3115 | m_input_sel <<= 1; // auto-increment input_sel | |
| 3116 | m_input_sel |= 1; | |
| 3199 | 3117 | return ret; |
| 3200 | 3118 | } |
| 3201 | logerror("%06x: warning, unknown bits read, dsw_sel = %02x\n", cpu_get_pc(&space | |
| 3119 | logerror("%06x: warning, unknown bits read, dsw_sel = %02x\n", cpu_get_pc(&space. | |
| 3202 | 3120 | return 0xff; |
| 3203 | 3121 | } |
| 3204 | 3122 | |
| 3205 | 3123 | static ADDRESS_MAP_START( hgokbang_portmap, AS_IO, 8, dynax_state ) |
| 3206 | 3124 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3207 | AM_RANGE(0x00, 0x01) AM_WRITE_LEGACY(hginga_blitter_w) | |
| 3208 | AM_RANGE(0x03, 0x03) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 3209 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE_LEGACY(mjmyster_rambank_w) // ? ack on RTC int | |
| 3210 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(hginga_rombank_w) | |
| 3125 | AM_RANGE(0x00, 0x01) AM_WRITE(hginga_blitter_w) | |
| 3126 | AM_RANGE(0x03, 0x03) AM_READ(rongrong_gfxrom_r) | |
| 3127 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE(mjmyster_rambank_w) // ? ack on RTC int | |
| 3128 | AM_RANGE(0x1e, 0x1e) AM_WRITE(hginga_rombank_w) | |
| 3211 | 3129 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3212 | 3130 | AM_RANGE(0x22, 0x23) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3213 | 3131 | AM_RANGE(0x24, 0x24) AM_DEVREAD_LEGACY("aysnd", ay8910_r) |
| 3214 | 3132 | AM_RANGE(0x26, 0x26) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) |
| 3215 | 3133 | AM_RANGE(0x28, 0x28) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) |
| 3216 | AM_RANGE(0x40, 0x40) AM_WRITE_LEGACY(hgokou_dsw_sel_w) | |
| 3217 | AM_RANGE(0x41, 0x41) AM_WRITE_LEGACY(hgokou_input_w) | |
| 3218 | AM_RANGE(0x42, 0x42) AM_READ_LEGACY(hgokou_input_r) | |
| 3219 | AM_RANGE(0x43, 0x43) AM_READ_LEGACY(hgokbang_input_r) | |
| 3134 | AM_RANGE(0x40, 0x40) AM_WRITE(hgokou_dsw_sel_w) | |
| 3135 | AM_RANGE(0x41, 0x41) AM_WRITE(hgokou_input_w) | |
| 3136 | AM_RANGE(0x42, 0x42) AM_READ(hgokou_input_r) | |
| 3137 | AM_RANGE(0x43, 0x43) AM_READ(hgokbang_input_r) | |
| 3220 | 3138 | AM_RANGE(0x60, 0x6f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3221 | AM_RANGE(0xa0, 0xa3) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 3222 | AM_RANGE(0xa4, 0xa7) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 3223 | AM_RANGE(0xa8, 0xab) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 3224 | AM_RANGE(0xac, 0xaf) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 3225 | AM_RANGE(0xb4, 0xb4) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 3226 | AM_RANGE(0xb5, 0xb5) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 3227 | AM_RANGE(0xb6, 0xb6) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 3228 | AM_RANGE(0xb8, 0xb8) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 3229 | AM_RANGE(0xe0, 0xe0) AM_READ_LEGACY(hanakanz_rand_r) | |
| 3139 | AM_RANGE(0xa0, 0xa3) AM_WRITE(ddenlovr_palette_base_w) | |
| 3140 | AM_RANGE(0xa4, 0xa7) AM_WRITE(ddenlovr_palette_mask_w) | |
| 3141 | AM_RANGE(0xa8, 0xab) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 3142 | AM_RANGE(0xac, 0xaf) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 3143 | AM_RANGE(0xb4, 0xb4) AM_WRITE(ddenlovr_bgcolor_w) | |
| 3144 | AM_RANGE(0xb5, 0xb5) AM_WRITE(ddenlovr_priority_w) | |
| 3145 | AM_RANGE(0xb6, 0xb6) AM_WRITE(ddenlovr_layer_enable_w) | |
| 3146 | AM_RANGE(0xb8, 0xb8) AM_READ(unk_r) // ? must be 78 on startup | |
| 3147 | AM_RANGE(0xe0, 0xe0) AM_READ(hanakanz_rand_r) | |
| 3230 | 3148 | ADDRESS_MAP_END |
| 3231 | 3149 | |
| 3232 | 3150 | |
| r14883 | r14884 | |
| 3234 | 3152 | Super Hana Paradise |
| 3235 | 3153 | ***************************************************************************/ |
| 3236 | 3154 | |
| 3237 | ||
| 3155 | ||
| 3238 | 3156 | { |
| 3239 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3240 | 3157 | |
| 3241 | state->m_dsw_sel = data; | |
| 3242 | state->m_keyb = 0; | |
| 3158 | m_dsw_sel = data; | |
| 3159 | m_keyb = 0; | |
| 3243 | 3160 | |
| 3244 | memory_set_bank(space->machine(), "bank1", data & 0x07); | |
| 3245 | memory_set_bank(space->machine(), "bank2", ((data & 0xe0) >> 5)); | |
| 3161 | memory_set_bank(machine(), "bank1", data & 0x07); | |
| 3162 | memory_set_bank(machine(), "bank2", ((data & 0xe0) >> 5)); | |
| 3246 | 3163 | } |
| 3247 | 3164 | |
| 3248 | 3165 | |
| 3249 | ||
| 3166 | ||
| 3250 | 3167 | { |
| 3251 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3252 | 3168 | static const char *const keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" }; |
| 3253 | 3169 | static const char *const keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" }; |
| 3254 | 3170 | |
| 3255 | switch ( | |
| 3171 | switch ( | |
| 3256 | 3172 | { |
| 3257 | case 0x00: return input_port_read(space->machine(), "P1"); | |
| 3258 | case 0x01: return input_port_read(space->machine(), "P2"); | |
| 3259 | case 0x02: return input_port_read(space->machine(), "SYSTEM"); | |
| 3173 | case 0x00: return input_port_read(machine(), "P1"); | |
| 3174 | case 0x01: return input_port_read(machine(), "P2"); | |
| 3175 | case 0x02: return input_port_read(machine(), "SYSTEM"); | |
| 3260 | 3176 | case 0x0d: return 0x00; |
| 3261 | case 0x80: return input_port_read(space->machine(), keynames0[state->m_keyb++]); // P1 (Keys) | |
| 3262 | case 0x81: return input_port_read(space->machine(), keynames1[state->m_keyb++]); // P2 (Keys) | |
| 3177 | case 0x80: return input_port_read(machine(), keynames0[m_keyb++]); // P1 (Keys) | |
| 3178 | case 0x81: return input_port_read(machine(), keynames1[m_keyb++]); // P2 (Keys) | |
| 3263 | 3179 | } |
| 3264 | logerror("%06x: warning, unknown bits read, input_sel = %02x\n", cpu_get_pc(&space | |
| 3180 | logerror("%06x: warning, unknown bits read, input_sel = %02x\n", cpu_get_pc(&space. | |
| 3265 | 3181 | return 0xff; |
| 3266 | 3182 | } |
| 3267 | 3183 | |
| 3268 | ||
| 3184 | ||
| 3269 | 3185 | { |
| 3270 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3271 | 3186 | |
| 3272 | if (!BIT(state->m_dsw_sel, 0)) return input_port_read(space->machine(), "DSW1"); | |
| 3273 | if (!BIT(state->m_dsw_sel, 1)) return input_port_read(space->machine(), "DSW2"); | |
| 3274 | if (!BIT(state->m_dsw_sel, 2)) return 0xff; | |
| 3275 | if (!BIT(state->m_dsw_sel, 3)) return 0xff; | |
| 3276 | if (!BIT(state->m_dsw_sel, 4)) return input_port_read(space->machine(), "DSW3"); | |
| 3187 | if (!BIT(m_dsw_sel, 0)) return input_port_read(machine(), "DSW1"); | |
| 3188 | if (!BIT(m_dsw_sel, 1)) return input_port_read(machine(), "DSW2"); | |
| 3189 | if (!BIT(m_dsw_sel, 2)) return 0xff; | |
| 3190 | if (!BIT(m_dsw_sel, 3)) return 0xff; | |
| 3191 | if (!BIT(m_dsw_sel, 4)) return input_port_read(machine(), "DSW3"); | |
| 3277 | 3192 | return 0xff; |
| 3278 | 3193 | } |
| 3279 | 3194 | |
| 3280 | ||
| 3195 | ||
| 3281 | 3196 | { |
| 3282 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3283 | 3197 | |
| 3284 | switch ( | |
| 3198 | switch ( | |
| 3285 | 3199 | { |
| 3286 | case 0x0c: coin_counter_w( | |
| 3200 | case 0x0c: coin_counter_w( | |
| 3287 | 3201 | case 0x0d: break; |
| 3288 | 3202 | default: |
| 3289 | logerror("%04x: coins_w with select = %02x, data = %02x\n",cpu_get_pc(&space | |
| 3203 | logerror("%04x: coins_w with select = %02x, data = %02x\n",cpu_get_pc(&space. | |
| 3290 | 3204 | } |
| 3291 | 3205 | } |
| 3292 | 3206 | |
| r14883 | r14884 | |
| 3295 | 3209 | AM_RANGE(0x6000, 0x6fff) AM_RAM // RAM |
| 3296 | 3210 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 3297 | 3211 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") // ROM (Banked) |
| 3298 | AM_RANGE(0xc000, 0xc1ff) AM_WRITE | |
| 3212 | AM_RANGE(0xc000, 0xc1ff) AM_WRITE | |
| 3299 | 3213 | ADDRESS_MAP_END |
| 3300 | 3214 | |
| 3301 | 3215 | // the RTC seems unused |
| 3302 | 3216 | static ADDRESS_MAP_START( hparadis_portmap, AS_IO, 8, dynax_state ) |
| 3303 | 3217 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3304 | AM_RANGE(0x00, 0x01) AM_WRITE_LEGACY(rongrong_blitter_w) | |
| 3305 | AM_RANGE(0x03, 0x03) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 3306 | AM_RANGE(0x1b, 0x1b) AM_READWRITE_LEGACY(rongrong_blitter_busy_r, rongrong_blitter_busy_w) | |
| 3307 | AM_RANGE(0x1c, 0x1c) AM_READ_LEGACY(hparadis_dsw_r) | |
| 3308 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(hparadis_select_w) | |
| 3218 | AM_RANGE(0x00, 0x01) AM_WRITE(rongrong_blitter_w) | |
| 3219 | AM_RANGE(0x03, 0x03) AM_READ(rongrong_gfxrom_r) | |
| 3220 | AM_RANGE(0x1b, 0x1b) AM_READWRITE(rongrong_blitter_busy_r, rongrong_blitter_busy_w) | |
| 3221 | AM_RANGE(0x1c, 0x1c) AM_READ(hparadis_dsw_r) | |
| 3222 | AM_RANGE(0x1e, 0x1e) AM_WRITE(hparadis_select_w) | |
| 3309 | 3223 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3310 | 3224 | AM_RANGE(0x60, 0x61) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3311 | AM_RANGE(0x80, 0x83) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 3312 | AM_RANGE(0x84, 0x87) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 3313 | AM_RANGE(0x88, 0x8b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 3314 | AM_RANGE(0x8c, 0x8f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 3315 | AM_RANGE(0x94, 0x94) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 3316 | AM_RANGE(0x95, 0x95) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 3317 | AM_RANGE(0x96, 0x96) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 3318 | AM_RANGE(0x98, 0x98) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 3319 | AM_RANGE(0xa0, 0xa0) AM_WRITE_LEGACY(hginga_input_w) | |
| 3320 | AM_RANGE(0xa1, 0xa1) AM_WRITE_LEGACY(hparadis_coin_w) | |
| 3321 | AM_RANGE(0xa2, 0xa3) AM_READ_LEGACY(hparadis_input_r) | |
| 3225 | AM_RANGE(0x80, 0x83) AM_WRITE(ddenlovr_palette_base_w) | |
| 3226 | AM_RANGE(0x84, 0x87) AM_WRITE(ddenlovr_palette_mask_w) | |
| 3227 | AM_RANGE(0x88, 0x8b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 3228 | AM_RANGE(0x8c, 0x8f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 3229 | AM_RANGE(0x94, 0x94) AM_WRITE(ddenlovr_bgcolor_w) | |
| 3230 | AM_RANGE(0x95, 0x95) AM_WRITE(ddenlovr_priority_w) | |
| 3231 | AM_RANGE(0x96, 0x96) AM_WRITE(ddenlovr_layer_enable_w) | |
| 3232 | AM_RANGE(0x98, 0x98) AM_READ(unk_r) // ? must be 78 on startup | |
| 3233 | AM_RANGE(0xa0, 0xa0) AM_WRITE(hginga_input_w) | |
| 3234 | AM_RANGE(0xa1, 0xa1) AM_WRITE(hparadis_coin_w) | |
| 3235 | AM_RANGE(0xa2, 0xa3) AM_READ(hparadis_input_r) | |
| 3322 | 3236 | AM_RANGE(0xc2, 0xc2) AM_WRITENOP // enables palette RAM at c000 |
| 3323 | 3237 | ADDRESS_MAP_END |
| 3324 | 3238 | |
| r14883 | r14884 | |
| 3327 | 3241 | Mahjong Mysterious World |
| 3328 | 3242 | ***************************************************************************/ |
| 3329 | 3243 | |
| 3330 | ||
| 3244 | ||
| 3331 | 3245 | { |
| 3332 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3333 | 3246 | |
| 3334 | switch ( | |
| 3247 | switch ( | |
| 3335 | 3248 | { |
| 3336 | case 0x80: return input_port_read( | |
| 3249 | case 0x80: return input_port_read( | |
| 3337 | 3250 | case 0x81: return 0x00; |
| 3338 | 3251 | case 0x82: return 0xff; // bit 7 = 0 -> blitter busy, + hopper switch |
| 3339 | 3252 | case 0x83: return 0x00; |
| 3340 | 3253 | } |
| 3341 | 3254 | |
| 3342 | logerror("%06x: warning, unknown bits read, input_sel = %02x\n", cpu_get_pc(&space | |
| 3255 | logerror("%06x: warning, unknown bits read, input_sel = %02x\n", cpu_get_pc(&space. | |
| 3343 | 3256 | |
| 3344 | 3257 | return 0xff; |
| 3345 | 3258 | } |
| 3346 | 3259 | |
| 3347 | 3260 | static ADDRESS_MAP_START( mjmywrld_portmap, AS_IO, 8, dynax_state ) |
| 3348 | 3261 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3349 | AM_RANGE(0x00, 0x01) AM_WRITE_LEGACY(mjmyster_blitter_w) | |
| 3350 | AM_RANGE(0x03, 0x03) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 3351 | AM_RANGE(0x1c, 0x1c) AM_WRITE_LEGACY(mjmyster_rambank_w) | |
| 3352 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(hginga_rombank_w) | |
| 3353 | AM_RANGE(0x20, 0x20) AM_WRITE_LEGACY(mjmyster_select2_w) | |
| 3354 | AM_RANGE(0x21, 0x21) AM_WRITE_LEGACY(mjmyster_coincounter_w) | |
| 3355 | AM_RANGE(0x22, 0x22) AM_READ_LEGACY(mjmywrld_coins_r) | |
| 3356 | AM_RANGE(0x23, 0x23) AM_READ_LEGACY(mjmyster_keyb_r) | |
| 3262 | AM_RANGE(0x00, 0x01) AM_WRITE(mjmyster_blitter_w) | |
| 3263 | AM_RANGE(0x03, 0x03) AM_READ(rongrong_gfxrom_r) | |
| 3264 | AM_RANGE(0x1c, 0x1c) AM_WRITE(mjmyster_rambank_w) | |
| 3265 | AM_RANGE(0x1e, 0x1e) AM_WRITE(hginga_rombank_w) | |
| 3266 | AM_RANGE(0x20, 0x20) AM_WRITE(mjmyster_select2_w) | |
| 3267 | AM_RANGE(0x21, 0x21) AM_WRITE(mjmyster_coincounter_w) | |
| 3268 | AM_RANGE(0x22, 0x22) AM_READ(mjmywrld_coins_r) | |
| 3269 | AM_RANGE(0x23, 0x23) AM_READ(mjmyster_keyb_r) | |
| 3357 | 3270 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3358 | 3271 | AM_RANGE(0x42, 0x43) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3359 | 3272 | AM_RANGE(0x44, 0x44) AM_DEVREAD_LEGACY("aysnd", ay8910_r) |
| 3360 | 3273 | AM_RANGE(0x46, 0x46) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) |
| 3361 | 3274 | AM_RANGE(0x48, 0x48) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) |
| 3362 | 3275 | AM_RANGE(0x60, 0x6f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3363 | AM_RANGE(0x80, 0x83) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 3364 | AM_RANGE(0x84, 0x87) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 3365 | AM_RANGE(0x88, 0x8b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 3366 | AM_RANGE(0x8c, 0x8f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 3367 | AM_RANGE(0x94, 0x94) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 3368 | AM_RANGE(0x95, 0x95) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 3369 | AM_RANGE(0x96, 0x96) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 3370 | AM_RANGE(0x98, 0x98) AM_READ_LEGACY(unk_r) // ? must be 78 on startup | |
| 3371 | AM_RANGE(0xc0, 0xc0) AM_READ_LEGACY(hanakanz_rand_r) | |
| 3372 | AM_RANGE(0xe0, 0xe0) AM_READ_LEGACY(mjmyster_dsw_r) | |
| 3276 | AM_RANGE(0x80, 0x83) AM_WRITE(ddenlovr_palette_base_w) | |
| 3277 | AM_RANGE(0x84, 0x87) AM_WRITE(ddenlovr_palette_mask_w) | |
| 3278 | AM_RANGE(0x88, 0x8b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 3279 | AM_RANGE(0x8c, 0x8f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 3280 | AM_RANGE(0x94, 0x94) AM_WRITE(ddenlovr_bgcolor_w) | |
| 3281 | AM_RANGE(0x95, 0x95) AM_WRITE(ddenlovr_priority_w) | |
| 3282 | AM_RANGE(0x96, 0x96) AM_WRITE(ddenlovr_layer_enable_w) | |
| 3283 | AM_RANGE(0x98, 0x98) AM_READ(unk_r) // ? must be 78 on startup | |
| 3284 | AM_RANGE(0xc0, 0xc0) AM_READ(hanakanz_rand_r) | |
| 3285 | AM_RANGE(0xe0, 0xe0) AM_READ(mjmyster_dsw_r) | |
| 3373 | 3286 | ADDRESS_MAP_END |
| 3374 | 3287 | |
| 3375 | 3288 | |
| r14883 | r14884 | |
| 3377 | 3290 | Panel & Variety Akamaru Q Jousyou Dont-R |
| 3378 | 3291 | ***************************************************************************/ |
| 3379 | 3292 | |
| 3380 | ||
| 3293 | ||
| 3381 | 3294 | { |
| 3382 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3383 | return (state->m_prot_16 & 0x0008) ? 0x0001 : 0x0000; | |
| 3295 | return (m_prot_16 & 0x0008) ? 0x0001 : 0x0000; | |
| 3384 | 3296 | } |
| 3385 | 3297 | |
| 3386 | ||
| 3298 | ||
| 3387 | 3299 | { |
| 3388 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3389 | 3300 | int bank; |
| 3390 | 3301 | |
| 3391 | COMBINE_DATA(& | |
| 3302 | COMBINE_DATA(& | |
| 3392 | 3303 | // BCD number? |
| 3393 | bank = (((state->m_prot_16 >> 4) & 0x0f) % 10) * 10 + ((state->m_prot_16 & 0x0f) % 10); | |
| 3394 | state->m_oki->set_bank_base(bank * 0x40000); | |
| 3304 | bank = (((m_prot_16 >> 4) & 0x0f) % 10) * 10 + ((m_prot_16 & 0x0f) % 10); | |
| 3305 | m_oki->set_bank_base(bank * 0x40000); | |
| 3395 | 3306 | |
| 3396 | // popmessage("bank $%0x (%d)", | |
| 3307 | // popmessage("bank $%0x (%d)", | |
| 3397 | 3308 | } |
| 3398 | 3309 | |
| 3399 | ||
| 3310 | ||
| 3400 | 3311 | { |
| 3401 | 3312 | return 0x55; |
| 3402 | 3313 | } |
| 3403 | 3314 | |
| 3404 | ||
| 3315 | ||
| 3405 | 3316 | { |
| 3406 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3407 | 3317 | UINT16 dsw = 0; |
| 3408 | 3318 | |
| 3409 | if (state->m_dsw_sel16[1] == 0xff) dsw |= input_port_read(space->machine(), "DSW1"); | |
| 3410 | if (state->m_dsw_sel16[0] == 0xff) dsw |= input_port_read(space->machine(), "DSW2"); | |
| 3319 | if (m_dsw_sel16[1] == 0xff) dsw |= input_port_read(machine(), "DSW1"); | |
| 3320 | if (m_dsw_sel16[0] == 0xff) dsw |= input_port_read(machine(), "DSW2"); | |
| 3411 | 3321 | return dsw; |
| 3412 | 3322 | } |
| 3413 | 3323 | |
| 3414 | ||
| 3324 | ||
| 3415 | 3325 | { |
| 3416 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3417 | return state->m_ddenlovr_blitter_irq_flag << 6; // bit 7 = 1 -> blitter busy | |
| 3326 | return m_ddenlovr_blitter_irq_flag << 6; // bit 7 = 1 -> blitter busy | |
| 3418 | 3327 | } |
| 3419 | 3328 | |
| 3420 | ||
| 3329 | ||
| 3421 | 3330 | { |
| 3422 | 3331 | return 0xffff; // read but not used, it seems |
| 3423 | 3332 | } |
| r14883 | r14884 | |
| 3425 | 3334 | static ADDRESS_MAP_START( akamaru_map, AS_PROGRAM, 16, dynax_state ) |
| 3426 | 3335 | AM_RANGE(0x000000, 0x1fffff) AM_ROM // ROM |
| 3427 | 3336 | |
| 3428 | AM_RANGE(0x213570, 0x213571) AM_WRITE_LEGACY(akamaru_protection1_w) // OKI bank | |
| 3429 | AM_RANGE(0x624680, 0x624681) AM_READ_LEGACY(akamaru_protection1_r) | |
| 3337 | AM_RANGE(0x213570, 0x213571) AM_WRITE(akamaru_protection1_w) // OKI bank | |
| 3338 | AM_RANGE(0x624680, 0x624681) AM_READ(akamaru_protection1_r) | |
| 3430 | 3339 | |
| 3431 | AM_RANGE(0xd00000, 0xd003ff) AM_WRITE | |
| 3340 | AM_RANGE(0xd00000, 0xd003ff) AM_WRITE | |
| 3432 | 3341 | // AM_RANGE(0xd01000, 0xd017ff) AM_WRITEONLY // 0 |
| 3433 | 3342 | |
| 3434 | AM_RANGE(0xe00040, 0xe00047) AM_WRITE_LEGACY(ddenlovr16_palette_base_w) | |
| 3435 | AM_RANGE(0xe00048, 0xe0004f) AM_WRITE_LEGACY(ddenlovr16_palette_mask_w) | |
| 3436 | AM_RANGE(0xe00050, 0xe00057) AM_WRITE_LEGACY(ddenlovr16_transparency_pen_w) | |
| 3437 | AM_RANGE(0xe00058, 0xe0005f) AM_WRITE_LEGACY(ddenlovr16_transparency_mask_w) | |
| 3438 | AM_RANGE(0xe00068, 0xe00069) AM_WRITE_LEGACY(ddenlovr16_bgcolor_w) | |
| 3439 | AM_RANGE(0xe0006a, 0xe0006b) AM_WRITE_LEGACY(ddenlovr16_priority_w) | |
| 3440 | AM_RANGE(0xe0006c, 0xe0006d) AM_WRITE_LEGACY(ddenlovr16_layer_enable_w) | |
| 3441 | AM_RANGE(0xe00070, 0xe00071) AM_READ_LEGACY(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 3442 | AM_RANGE(0xe00080, 0xe00083) AM_WRITE_LEGACY(ddenlovr_blitter_w) | |
| 3443 | AM_RANGE(0xe00086, 0xe00087) AM_READ_LEGACY(ddenlovr_gfxrom_r) // Video Chip | |
| 3343 | AM_RANGE(0xe00040, 0xe00047) AM_WRITE(ddenlovr16_palette_base_w) | |
| 3344 | AM_RANGE(0xe00048, 0xe0004f) AM_WRITE(ddenlovr16_palette_mask_w) | |
| 3345 | AM_RANGE(0xe00050, 0xe00057) AM_WRITE(ddenlovr16_transparency_pen_w) | |
| 3346 | AM_RANGE(0xe00058, 0xe0005f) AM_WRITE(ddenlovr16_transparency_mask_w) | |
| 3347 | AM_RANGE(0xe00068, 0xe00069) AM_WRITE(ddenlovr16_bgcolor_w) | |
| 3348 | AM_RANGE(0xe0006a, 0xe0006b) AM_WRITE(ddenlovr16_priority_w) | |
| 3349 | AM_RANGE(0xe0006c, 0xe0006d) AM_WRITE(ddenlovr16_layer_enable_w) | |
| 3350 | AM_RANGE(0xe00070, 0xe00071) AM_READ(unk16_r) // ? must be 78 on startup (not necessary in ddlover) | |
| 3351 | AM_RANGE(0xe00080, 0xe00083) AM_WRITE(ddenlovr_blitter_w) | |
| 3352 | AM_RANGE(0xe00086, 0xe00087) AM_READ(ddenlovr_gfxrom_r) // Video Chip | |
| 3444 | 3353 | |
| 3445 | 3354 | AM_RANGE(0xe00100, 0xe00101) AM_READ_PORT("P1") |
| 3446 | 3355 | AM_RANGE(0xe00102, 0xe00103) AM_READ_PORT("P2") |
| 3447 | 3356 | AM_RANGE(0xe00104, 0xe00105) AM_READ_PORT("SYSTEM") |
| 3448 | 3357 | |
| 3449 | AM_RANGE(0xe00106, 0xe00107) AM_READ | |
| 3358 | AM_RANGE(0xe00106, 0xe00107) AM_READ | |
| 3450 | 3359 | AM_RANGE(0xe00108, 0xe0010b) AM_WRITEONLY AM_BASE(m_protection2) |
| 3451 | 3360 | |
| 3452 | AM_RANGE(0xe0010c, 0xe0010d) AM_READ_LEGACY(akamaru_e0010d_r) | |
| 3453 | AM_RANGE(0xe00200, 0xe00201) AM_READ_LEGACY(akamaru_dsw_r) // DSW | |
| 3361 | AM_RANGE(0xe0010c, 0xe0010d) AM_READ(akamaru_e0010d_r) | |
| 3362 | AM_RANGE(0xe00200, 0xe00201) AM_READ(akamaru_dsw_r) // DSW | |
| 3454 | 3363 | |
| 3455 | AM_RANGE(0xe00204, 0xe00205) AM_READ_LEGACY(akamaru_blitter_r) // Blitter Busy & IRQ | |
| 3456 | AM_RANGE(0xe00302, 0xe00303) AM_WRITE_LEGACY(ddenlovr_blitter_irq_ack_w) // Blitter irq acknowledge | |
| 3364 | AM_RANGE(0xe00204, 0xe00205) AM_READ(akamaru_blitter_r) // Blitter Busy & IRQ | |
| 3365 | AM_RANGE(0xe00302, 0xe00303) AM_WRITE(ddenlovr_blitter_irq_ack_w) // Blitter irq acknowledge | |
| 3457 | 3366 | |
| 3458 | 3367 | AM_RANGE(0xe00304, 0xe00307) AM_WRITEONLY AM_BASE(m_dsw_sel16) // DSW select |
| 3459 | AM_RANGE(0xe00308, 0xe00309) AM_WRITE_LEGACY(ddenlovr_coincounter_0_w) // Coin Counters | |
| 3460 | AM_RANGE(0xe0030c, 0xe0030d) AM_WRITE_LEGACY(ddenlovr_coincounter_1_w) // | |
| 3368 | AM_RANGE(0xe00308, 0xe00309) AM_WRITE(ddenlovr_coincounter_0_w) // Coin Counters | |
| 3369 | AM_RANGE(0xe0030c, 0xe0030d) AM_WRITE(ddenlovr_coincounter_1_w) // | |
| 3461 | 3370 | |
| 3462 | 3371 | AM_RANGE(0xe00400, 0xe00403) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 3463 | 3372 | AM_RANGE(0xe00500, 0xe0051f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write, 0x00ff) |
| r14883 | r14884 | |
| 3472 | 3381 | Mahjong Fantasic Love |
| 3473 | 3382 | ***************************************************************************/ |
| 3474 | 3383 | |
| 3475 | ||
| 3384 | ||
| 3476 | 3385 | { |
| 3477 | memory_set_bank( | |
| 3386 | memory_set_bank( | |
| 3478 | 3387 | } |
| 3479 | 3388 | |
| 3480 | 3389 | static WRITE8_DEVICE_HANDLER( mjflove_okibank_w ) |
| r14883 | r14884 | |
| 3484 | 3393 | //popmessage("SOUND = %02x", data); |
| 3485 | 3394 | } |
| 3486 | 3395 | |
| 3487 | ||
| 3396 | ||
| 3488 | 3397 | { |
| 3489 | 3398 | return 0x27; |
| 3490 | 3399 | } |
| 3491 | 3400 | |
| 3492 | ||
| 3401 | ||
| 3493 | 3402 | { |
| 3494 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3495 | 3403 | UINT8 val = 0xff; |
| 3496 | 3404 | |
| 3497 | if (!BIT(state->m_keyb, 0)) val = input_port_read(space->machine(), offset ? "KEY5" : "KEY0"); | |
| 3498 | else if (!BIT(state->m_keyb, 1)) val = input_port_read(space->machine(), offset ? "KEY6" : "KEY1"); | |
| 3499 | else if (!BIT(state->m_keyb, 2)) val = input_port_read(space->machine(), offset ? "KEY7" : "KEY2"); | |
| 3500 | else if (!BIT(state->m_keyb, 3)) val = input_port_read(space->machine(), offset ? "KEY8" : "KEY3"); | |
| 3501 | else if (!BIT(state->m_keyb, 4)) val = input_port_read(space->machine(), offset ? "KEY9" : "KEY4"); | |
| 3405 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), offset ? "KEY5" : "KEY0"); | |
| 3406 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), offset ? "KEY6" : "KEY1"); | |
| 3407 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), offset ? "KEY7" : "KEY2"); | |
| 3408 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), offset ? "KEY8" : "KEY3"); | |
| 3409 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), offset ? "KEY9" : "KEY4"); | |
| 3502 | 3410 | |
| 3503 | 3411 | return val; |
| 3504 | 3412 | } |
| 3505 | 3413 | |
| 3506 | ||
| 3414 | ||
| 3507 | 3415 | { |
| 3508 | dynax_state *state = field.machine().driver_data<dynax_state>(); | |
| 3509 | 3416 | |
| 3510 | 3417 | // bit 7 = 1 -> blitter busy |
| 3511 | 3418 | // bit 6 = 0 -> VBLANK? |
| 3512 | 3419 | // bit 5 = 0 -> RTC? |
| 3513 | return | |
| 3420 | return | |
| 3514 | 3421 | } |
| 3515 | 3422 | |
| 3516 | ||
| 3423 | ||
| 3517 | 3424 | { |
| 3518 | blitter_w(space, 0, offset, data, 0); | |
| 3425 | blitter_w(&space, 0, offset, data, 0); | |
| 3519 | 3426 | } |
| 3520 | 3427 | |
| 3521 | ||
| 3428 | ||
| 3522 | 3429 | { |
| 3523 | 3430 | // bit 0 = in counter |
| 3524 | coin_counter_w( | |
| 3431 | coin_counter_w( | |
| 3525 | 3432 | |
| 3526 | 3433 | if (data & 0xfe) |
| 3527 | 3434 | { |
| 3528 | logerror("%04x: warning, coin counter = %02x\n", cpu_get_pc(&space | |
| 3435 | logerror("%04x: warning, coin counter = %02x\n", cpu_get_pc(&space. | |
| 3529 | 3436 | // popmessage("COIN = %02x", data); |
| 3530 | 3437 | } |
| 3531 | 3438 | } |
| 3532 | 3439 | |
| 3533 | 3440 | static ADDRESS_MAP_START( mjflove_portmap, AS_IO, 8, dynax_state ) // 16 bit I/O |
| 3534 | AM_RANGE(0x0010, 0x0010) AM_READ | |
| 3441 | AM_RANGE(0x0010, 0x0010) AM_READ | |
| 3535 | 3442 | AM_RANGE(0x001c, 0x001c) AM_READ_PORT("DSW2") AM_MIRROR(0xff00) |
| 3536 | AM_RANGE(0x001e, 0x001e) AM_WRITE_LEGACY(hanakanz_keyb_w) AM_MIRROR(0xff00) | |
| 3537 | AM_RANGE(0x0020, 0x0023) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 3538 | AM_RANGE(0x0024, 0x0027) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 3539 | AM_RANGE(0x0028, 0x002b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 3540 | AM_RANGE(0x002c, 0x002f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 3541 | AM_RANGE(0x0034, 0x0034) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 3542 | AM_RANGE(0x0035, 0x0035) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 3543 | AM_RANGE(0x0036, 0x0036) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 3443 | AM_RANGE(0x001e, 0x001e) AM_WRITE(hanakanz_keyb_w) AM_MIRROR(0xff00) | |
| 3444 | AM_RANGE(0x0020, 0x0023) AM_WRITE(ddenlovr_palette_base_w) | |
| 3445 | AM_RANGE(0x0024, 0x0027) AM_WRITE(ddenlovr_palette_mask_w) | |
| 3446 | AM_RANGE(0x0028, 0x002b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 3447 | AM_RANGE(0x002c, 0x002f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 3448 | AM_RANGE(0x0034, 0x0034) AM_WRITE(ddenlovr_bgcolor_w) | |
| 3449 | AM_RANGE(0x0035, 0x0035) AM_WRITE(ddenlovr_priority_w) | |
| 3450 | AM_RANGE(0x0036, 0x0036) AM_WRITE(ddenlovr_layer_enable_w) | |
| 3544 | 3451 | AM_RANGE(0x0038, 0x0038) AM_READNOP // ? ack or watchdog |
| 3545 | AM_RANGE(0x0040, 0x0041) AM_WRITE_LEGACY(mjflove_blitter_w) AM_MIRROR(0xff00) | |
| 3546 | AM_RANGE(0x0043, 0x0043) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 3547 | AM_RANGE(0x0080, 0x0081) AM_READ_LEGACY(mjflove_keyb_r) | |
| 3452 | AM_RANGE(0x0040, 0x0041) AM_WRITE(mjflove_blitter_w) AM_MIRROR(0xff00) | |
| 3453 | AM_RANGE(0x0043, 0x0043) AM_READ(rongrong_gfxrom_r) | |
| 3454 | AM_RANGE(0x0080, 0x0081) AM_READ(mjflove_keyb_r) | |
| 3548 | 3455 | AM_RANGE(0x0082, 0x0082) AM_READ_PORT("SYSTEM") |
| 3549 | AM_RANGE(0x00da, 0x00da) AM_READ_LEGACY(mjflove_protection_r) AM_MIRROR(0xff00) | |
| 3550 | AM_RANGE(0x00f2, 0x00f2) AM_WRITE_LEGACY(mjmyster_rambank_w) AM_MIRROR(0xff00) | |
| 3551 | AM_RANGE(0x00f8, 0x00f8) AM_WRITE_LEGACY(mjflove_rombank_w) AM_MIRROR(0xff00) | |
| 3456 | AM_RANGE(0x00da, 0x00da) AM_READ(mjflove_protection_r) AM_MIRROR(0xff00) | |
| 3457 | AM_RANGE(0x00f2, 0x00f2) AM_WRITE(mjmyster_rambank_w) AM_MIRROR(0xff00) | |
| 3458 | AM_RANGE(0x00f8, 0x00f8) AM_WRITE(mjflove_rombank_w) AM_MIRROR(0xff00) | |
| 3552 | 3459 | AM_RANGE(0x00fa, 0x00fa) AM_DEVWRITE_LEGACY("oki", mjflove_okibank_w) |
| 3553 | 3460 | AM_RANGE(0x0100, 0x0100) AM_READ_PORT("DSW1") |
| 3554 | 3461 | AM_RANGE(0x0181, 0x0181) AM_WRITENOP // ? int. enable |
| 3555 | AM_RANGE(0x0184, 0x0184) AM_WRITE | |
| 3462 | AM_RANGE(0x0184, 0x0184) AM_WRITE | |
| 3556 | 3463 | AM_RANGE(0x0200, 0x0201) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3557 | 3464 | AM_RANGE(0x0280, 0x028f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3558 | 3465 | AM_RANGE(0x0300, 0x0301) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) |
| r14883 | r14884 | |
| 3570 | 3477 | oki->set_bank_base(((data >> 4) & 0x07) * 0x40000); |
| 3571 | 3478 | } |
| 3572 | 3479 | |
| 3573 | ||
| 3480 | ||
| 3574 | 3481 | { |
| 3575 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3576 | state->m_dsw_sel = data; | |
| 3577 | state->m_keyb = data; | |
| 3482 | m_dsw_sel = data; | |
| 3483 | m_keyb = data; | |
| 3578 | 3484 | } |
| 3579 | 3485 | |
| 3580 | ||
| 3486 | ||
| 3581 | 3487 | { |
| 3582 | 3488 | return 0x04; // !bit 2 = blitter busy |
| 3583 | 3489 | } |
| 3584 | 3490 | |
| 3585 | 3491 | static ADDRESS_MAP_START( jongtei_portmap, AS_IO, 8, dynax_state ) |
| 3586 | 3492 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3587 | AM_RANGE(0x2c, 0x2c) AM_READ_LEGACY(jongtei_busy_r) AM_DEVWRITE_LEGACY("oki", jongtei_okibank_w) | |
| 3588 | AM_RANGE(0x2e, 0x2e) AM_WRITE_LEGACY(hanakanz_blitter_reg_w) | |
| 3589 | AM_RANGE(0x30, 0x30) AM_WRITE_LEGACY(hanakanz_rombank_w) | |
| 3590 | AM_RANGE(0x31, 0x31) AM_WRITE_LEGACY(jongtei_dsw_keyb_w) | |
| 3591 | AM_RANGE(0x32, 0x32) AM_READ_LEGACY(hanakanz_dsw_r) | |
| 3493 | AM_RANGE(0x2c, 0x2c) AM_READ(jongtei_busy_r) AM_DEVWRITE_LEGACY("oki", jongtei_okibank_w) | |
| 3494 | AM_RANGE(0x2e, 0x2e) AM_WRITE(hanakanz_blitter_reg_w) | |
| 3495 | AM_RANGE(0x30, 0x30) AM_WRITE(hanakanz_rombank_w) | |
| 3496 | AM_RANGE(0x31, 0x31) AM_WRITE(jongtei_dsw_keyb_w) | |
| 3497 | AM_RANGE(0x32, 0x32) AM_READ(hanakanz_dsw_r) | |
| 3592 | 3498 | AM_RANGE(0x40, 0x40) AM_READ_PORT("SYSTEM") |
| 3593 | AM_RANGE(0x41, 0x42) AM_READ_LEGACY(hanakanz_keyb_r) | |
| 3594 | AM_RANGE(0x43, 0x43) AM_WRITE_LEGACY(hanakanz_coincounter_w) | |
| 3595 | AM_RANGE(0x46, 0x46) AM_READ_LEGACY(hanakanz_rand_r) | |
| 3596 | AM_RANGE(0x60, 0x60) AM_WRITE_LEGACY(hanakanz_blitter_data_w) | |
| 3597 | AM_RANGE(0x61, 0x61) AM_WRITE_LEGACY(hanakanz_palette_w) | |
| 3598 | AM_RANGE(0x63, 0x64) AM_READ_LEGACY(hanakanz_gfxrom_r) | |
| 3499 | AM_RANGE(0x41, 0x42) AM_READ(hanakanz_keyb_r) | |
| 3500 | AM_RANGE(0x43, 0x43) AM_WRITE(hanakanz_coincounter_w) | |
| 3501 | AM_RANGE(0x46, 0x46) AM_READ(hanakanz_rand_r) | |
| 3502 | AM_RANGE(0x60, 0x60) AM_WRITE(hanakanz_blitter_data_w) | |
| 3503 | AM_RANGE(0x61, 0x61) AM_WRITE(hanakanz_palette_w) | |
| 3504 | AM_RANGE(0x63, 0x64) AM_READ(hanakanz_gfxrom_r) | |
| 3599 | 3505 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3600 | 3506 | AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3601 | 3507 | AM_RANGE(0xc0, 0xcf) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| r14883 | r14884 | |
| 3611 | 3517 | AM_RANGE(0x6000, 0x6fff) AM_RAM // RAM |
| 3612 | 3518 | AM_RANGE(0x7000, 0x7fff) AM_RAMBANK("bank2") // RAM (Banked) |
| 3613 | 3519 | AM_RANGE(0x8000, 0xffff) AM_ROMBANK("bank1") // ROM (Banked) |
| 3614 | AM_RANGE(0xe000, 0xe1ff) AM_WRITE | |
| 3520 | AM_RANGE(0xe000, 0xe1ff) AM_WRITE | |
| 3615 | 3521 | ADDRESS_MAP_END |
| 3616 | 3522 | |
| 3617 | ||
| 3523 | ||
| 3618 | 3524 | { |
| 3619 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3620 | 3525 | UINT8 val = 0x3f; |
| 3621 | 3526 | |
| 3622 | if (!BIT(state->m_keyb, 0)) val = input_port_read(space->machine(), offset ? "KEY5" : "KEY0"); | |
| 3623 | else if (!BIT(state->m_keyb, 1)) val = input_port_read(space->machine(), offset ? "KEY6" : "KEY1"); | |
| 3624 | else if (!BIT(state->m_keyb, 2)) val = input_port_read(space->machine(), offset ? "KEY7" : "KEY2"); | |
| 3625 | else if (!BIT(state->m_keyb, 3)) val = input_port_read(space->machine(), offset ? "KEY8" : "KEY3"); | |
| 3626 | else if (!BIT(state->m_keyb, 4)) val = input_port_read(space->machine(), offset ? "KEY9" : "KEY4"); | |
| 3527 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), offset ? "KEY5" : "KEY0"); | |
| 3528 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), offset ? "KEY6" : "KEY1"); | |
| 3529 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), offset ? "KEY7" : "KEY2"); | |
| 3530 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), offset ? "KEY8" : "KEY3"); | |
| 3531 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), offset ? "KEY9" : "KEY4"); | |
| 3627 | 3532 | |
| 3628 | val |= input_port_read( | |
| 3533 | val |= input_port_read( | |
| 3629 | 3534 | if (offset) |
| 3630 | 3535 | val &= 0x7f; // bit 7 = blitter busy |
| 3631 | 3536 | return val; |
| 3632 | 3537 | } |
| 3633 | 3538 | |
| 3634 | ||
| 3539 | ||
| 3635 | 3540 | { |
| 3636 | 3541 | // bit 0 = coin counter |
| 3637 | 3542 | // bit 1 = out counter |
| r14883 | r14884 | |
| 3639 | 3544 | // bit 4 |
| 3640 | 3545 | // bit 7 = ? mostly on |
| 3641 | 3546 | |
| 3642 | coin_counter_w( | |
| 3547 | coin_counter_w( | |
| 3643 | 3548 | |
| 3644 | 3549 | if (data & 0x68) |
| 3645 | logerror("%04x: warning, coin counter = %02x\n", cpu_get_pc(&space | |
| 3550 | logerror("%04x: warning, coin counter = %02x\n", cpu_get_pc(&space. | |
| 3646 | 3551 | |
| 3647 | 3552 | #ifdef MAME_DEBUG |
| 3648 | 3553 | // popmessage("COIN = %02x", data); |
| 3649 | 3554 | #endif |
| 3650 | 3555 | } |
| 3651 | 3556 | |
| 3652 | ||
| 3557 | ||
| 3653 | 3558 | { |
| 3654 | memory_set_bank(space->machine(), "bank2", data & 0x0f); | |
| 3655 | //logerror("%04x: rambank = %02x\n", cpu_get_pc(&space->device()), data); | |
| 3559 | memory_set_bank(machine(), "bank2", data & 0x0f); | |
| 3560 | //logerror("%04x: rambank = %02x\n", cpu_get_pc(&space.device()), data); | |
| 3656 | 3561 | } |
| 3657 | 3562 | |
| 3658 | 3563 | static ADDRESS_MAP_START( sryudens_portmap, AS_IO, 8, dynax_state ) |
| r14883 | r14884 | |
| 3660 | 3565 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3661 | 3566 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3662 | 3567 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) |
| 3663 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE_LEGACY(sryudens_rambank_w) // ? ack on RTC int | |
| 3664 | AM_RANGE(0x1e, 0x1e) AM_WRITE_LEGACY(mjflove_rombank_w) | |
| 3665 | AM_RANGE(0x20, 0x23) AM_WRITE_LEGACY(ddenlovr_palette_base_w) | |
| 3666 | AM_RANGE(0x24, 0x27) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 3667 | AM_RANGE(0x28, 0x2b) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 3668 | AM_RANGE(0x2c, 0x2f) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 3669 | AM_RANGE(0x34, 0x34) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 3670 | AM_RANGE(0x35, 0x35) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 3671 | AM_RANGE(0x36, 0x36) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 3568 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE(sryudens_rambank_w) // ? ack on RTC int | |
| 3569 | AM_RANGE(0x1e, 0x1e) AM_WRITE(mjflove_rombank_w) | |
| 3570 | AM_RANGE(0x20, 0x23) AM_WRITE(ddenlovr_palette_base_w) | |
| 3571 | AM_RANGE(0x24, 0x27) AM_WRITE(ddenlovr_palette_mask_w) | |
| 3572 | AM_RANGE(0x28, 0x2b) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 3573 | AM_RANGE(0x2c, 0x2f) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 3574 | AM_RANGE(0x34, 0x34) AM_WRITE(ddenlovr_bgcolor_w) | |
| 3575 | AM_RANGE(0x35, 0x35) AM_WRITE(ddenlovr_priority_w) | |
| 3576 | AM_RANGE(0x36, 0x36) AM_WRITE(ddenlovr_layer_enable_w) | |
| 3672 | 3577 | AM_RANGE(0x38, 0x38) AM_READNOP // ? ack or watchdog |
| 3673 | AM_RANGE(0x40, 0x41) AM_WRITE_LEGACY(mjflove_blitter_w) | |
| 3674 | AM_RANGE(0x43, 0x43) AM_READ_LEGACY(rongrong_gfxrom_r) | |
| 3675 | AM_RANGE(0x50, 0x50) AM_READ_LEGACY(hanakanz_rand_r) | |
| 3578 | AM_RANGE(0x40, 0x41) AM_WRITE(mjflove_blitter_w) | |
| 3579 | AM_RANGE(0x43, 0x43) AM_READ(rongrong_gfxrom_r) | |
| 3580 | AM_RANGE(0x50, 0x50) AM_READ(hanakanz_rand_r) | |
| 3676 | 3581 | AM_RANGE(0x70, 0x70) AM_DEVWRITE_LEGACY("oki", quizchq_oki_bank_w) |
| 3677 | 3582 | AM_RANGE(0x80, 0x8f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3678 | 3583 | AM_RANGE(0x90, 0x90) AM_READ_PORT("DSW1") |
| r14883 | r14884 | |
| 3680 | 3585 | AM_RANGE(0x92, 0x92) AM_READ_PORT("DSW4") |
| 3681 | 3586 | AM_RANGE(0x93, 0x93) AM_READ_PORT("DSW3") |
| 3682 | 3587 | AM_RANGE(0x94, 0x94) AM_READ_PORT("DSWTOP") |
| 3683 | AM_RANGE(0x98, 0x98) AM_WRITE_LEGACY(sryudens_coincounter_w) | |
| 3684 | AM_RANGE(0x99, 0x99) AM_WRITE_LEGACY(hanakanz_keyb_w) | |
| 3588 | AM_RANGE(0x98, 0x98) AM_WRITE(sryudens_coincounter_w) | |
| 3589 | AM_RANGE(0x99, 0x99) AM_WRITE(hanakanz_keyb_w) | |
| 3685 | 3590 | AM_RANGE(0x9a, 0x9a) AM_READ_PORT("SYSTEM") |
| 3686 | AM_RANGE(0x9b, 0x9c) AM_READ | |
| 3591 | AM_RANGE(0x9b, 0x9c) AM_READ | |
| 3687 | 3592 | ADDRESS_MAP_END |
| 3688 | 3593 | |
| 3689 | 3594 | |
| r14883 | r14884 | |
| 3691 | 3596 | Mahjong Daimyojin |
| 3692 | 3597 | ***************************************************************************/ |
| 3693 | 3598 | |
| 3694 | ||
| 3599 | ||
| 3695 | 3600 | { |
| 3696 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3697 | 3601 | UINT8 val = 0x3f; |
| 3698 | 3602 | |
| 3699 | if (!BIT(state->m_keyb, 0)) val = input_port_read(space->machine(), "KEY0"); | |
| 3700 | else if (!BIT(state->m_keyb, 1)) val = input_port_read(space->machine(), "KEY1"); | |
| 3701 | else if (!BIT(state->m_keyb, 2)) val = input_port_read(space->machine(), "KEY2"); | |
| 3702 | else if (!BIT(state->m_keyb, 3)) val = input_port_read(space->machine(), "KEY3"); | |
| 3703 | else if (!BIT(state->m_keyb, 4)) val = input_port_read(space->machine(), "KEY4"); | |
| 3603 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), "KEY0"); | |
| 3604 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), "KEY1"); | |
| 3605 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), "KEY2"); | |
| 3606 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), "KEY3"); | |
| 3607 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), "KEY4"); | |
| 3704 | 3608 | |
| 3705 | val |= input_port_read( | |
| 3609 | val |= input_port_read( | |
| 3706 | 3610 | return val; |
| 3707 | 3611 | } |
| 3708 | 3612 | |
| 3709 | ||
| 3613 | ||
| 3710 | 3614 | { |
| 3711 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3712 | 3615 | UINT8 val = 0x3f; |
| 3713 | 3616 | |
| 3714 | if (!BIT(state->m_keyb, 0)) val = input_port_read(space->machine(), "KEY5"); | |
| 3715 | else if (!BIT(state->m_keyb, 1)) val = input_port_read(space->machine(), "KEY6"); | |
| 3716 | else if (!BIT(state->m_keyb, 2)) val = input_port_read(space->machine(), "KEY7"); | |
| 3717 | else if (!BIT(state->m_keyb, 3)) val = input_port_read(space->machine(), "KEY8"); | |
| 3718 | else if (!BIT(state->m_keyb, 4)) val = input_port_read(space->machine(), "KEY9"); | |
| 3617 | if (!BIT(m_keyb, 0)) val = input_port_read(machine(), "KEY5"); | |
| 3618 | else if (!BIT(m_keyb, 1)) val = input_port_read(machine(), "KEY6"); | |
| 3619 | else if (!BIT(m_keyb, 2)) val = input_port_read(machine(), "KEY7"); | |
| 3620 | else if (!BIT(m_keyb, 3)) val = input_port_read(machine(), "KEY8"); | |
| 3621 | else if (!BIT(m_keyb, 4)) val = input_port_read(machine(), "KEY9"); | |
| 3719 | 3622 | |
| 3720 | val |= input_port_read( | |
| 3623 | val |= input_port_read( | |
| 3721 | 3624 | return val; |
| 3722 | 3625 | } |
| 3723 | 3626 | |
| 3724 | 3627 | // 1B18: D4 ED 76 C9 CB |
| 3725 | 3628 | // 1B1D: 96 AF 34 8B 89 |
| 3726 | 3629 | |
| 3727 | ||
| 3630 | ||
| 3728 | 3631 | { |
| 3729 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3730 | state->m_prot_val = data; | |
| 3632 | m_prot_val = data; | |
| 3731 | 3633 | } |
| 3732 | 3634 | |
| 3733 | ||
| 3635 | ||
| 3734 | 3636 | { |
| 3735 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3736 | switch (state->m_prot_val) | |
| 3637 | switch (m_prot_val) | |
| 3737 | 3638 | { |
| 3738 | 3639 | case 0xd4: return 0x96; |
| 3739 | 3640 | case 0xed: return 0xaf; |
| r14883 | r14884 | |
| 3747 | 3648 | // 1ADD: D4 ED 76 C9 CB |
| 3748 | 3649 | // 1AE2: D9 E0 7B C4 C6 |
| 3749 | 3650 | |
| 3750 | ||
| 3651 | ||
| 3751 | 3652 | { |
| 3752 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3753 | 3653 | |
| 3754 | switch ( | |
| 3654 | switch ( | |
| 3755 | 3655 | { |
| 3756 | 3656 | case 0xd4: return 0xd9; |
| 3757 | 3657 | case 0xed: return 0xe0; |
| r14883 | r14884 | |
| 3769 | 3669 | oki->set_bank_base(((data >> 4) & 0x01) * 0x40000); |
| 3770 | 3670 | } |
| 3771 | 3671 | |
| 3772 | ||
| 3672 | ||
| 3773 | 3673 | { |
| 3774 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3775 | state->m_daimyojn_palette_sel = data; | |
| 3674 | m_daimyojn_palette_sel = data; | |
| 3776 | 3675 | } |
| 3777 | 3676 | |
| 3778 | ||
| 3677 | ||
| 3779 | 3678 | { |
| 3780 | dynax_state *state = space->machine().driver_data<dynax_state>(); | |
| 3781 | 3679 | |
| 3782 | if ( | |
| 3680 | if ( | |
| 3783 | 3681 | hanakanz_palette_w(space, offset, data); |
| 3784 | 3682 | else |
| 3785 | 3683 | hanakanz_blitter_data_w(space, offset, data); |
| 3786 | 3684 | } |
| 3787 | 3685 | |
| 3788 | ||
| 3686 | ||
| 3789 | 3687 | { |
| 3790 | 3688 | // See code at C8D7, 633f holds reg B of the RTC |
| 3791 | 3689 | return offset ? 1 : 0; // year = 0x10 (BCD) |
| r14883 | r14884 | |
| 3793 | 3691 | |
| 3794 | 3692 | static ADDRESS_MAP_START( daimyojn_portmap, AS_IO, 8, dynax_state ) |
| 3795 | 3693 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3796 | AM_RANGE(0x2c, 0x2c) AM_READ_LEGACY(jongtei_busy_r) AM_DEVWRITE_LEGACY("oki", daimyojn_okibank_w) | |
| 3797 | AM_RANGE(0x2e, 0x2e) AM_WRITE_LEGACY(daimyojn_palette_sel_w) | |
| 3798 | AM_RANGE(0x30, 0x30) AM_WRITE_LEGACY(hanakanz_blitter_reg_w) | |
| 3799 | AM_RANGE(0x31, 0x31) AM_WRITE_LEGACY(jongtei_dsw_keyb_w) | |
| 3800 | AM_RANGE(0x32, 0x32) AM_READ_LEGACY(hanakanz_dsw_r) | |
| 3801 | AM_RANGE(0x40, 0x40) AM_WRITE_LEGACY(daimyojn_blitter_data_palette_w) | |
| 3802 | AM_RANGE(0x42, 0x44) AM_READ_LEGACY(hanakanz_gfxrom_r) | |
| 3803 | AM_RANGE(0x8a, 0x8b) AM_READ_LEGACY(daimyojn_year_hack_r) // ? | |
| 3694 | AM_RANGE(0x2c, 0x2c) AM_READ(jongtei_busy_r) AM_DEVWRITE_LEGACY("oki", daimyojn_okibank_w) | |
| 3695 | AM_RANGE(0x2e, 0x2e) AM_WRITE(daimyojn_palette_sel_w) | |
| 3696 | AM_RANGE(0x30, 0x30) AM_WRITE(hanakanz_blitter_reg_w) | |
| 3697 | AM_RANGE(0x31, 0x31) AM_WRITE(jongtei_dsw_keyb_w) | |
| 3698 | AM_RANGE(0x32, 0x32) AM_READ(hanakanz_dsw_r) | |
| 3699 | AM_RANGE(0x40, 0x40) AM_WRITE(daimyojn_blitter_data_palette_w) | |
| 3700 | AM_RANGE(0x42, 0x44) AM_READ(hanakanz_gfxrom_r) | |
| 3701 | AM_RANGE(0x8a, 0x8b) AM_READ(daimyojn_year_hack_r) // ? | |
| 3804 | 3702 | AM_RANGE(0x80, 0x8f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3805 | 3703 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3806 | 3704 | AM_RANGE(0xa2, 0xa2) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3807 | 3705 | AM_RANGE(0xa8, 0xa8) AM_READ_PORT("SYSTEM") |
| 3808 | AM_RANGE(0xaa, 0xaa) AM_READ_LEGACY(daimyojn_keyb1_r) | |
| 3809 | AM_RANGE(0xac, 0xac) AM_READ_LEGACY(daimyojn_keyb2_r) | |
| 3810 | AM_RANGE(0xae, 0xae) AM_WRITE_LEGACY(hanakanz_coincounter_w) | |
| 3811 | AM_RANGE(0xb0, 0xb0) AM_WRITE_LEGACY(mjmyster_rambank_w) | |
| 3812 | AM_RANGE(0xc0, 0xc0) AM_WRITE_LEGACY(mjflove_rombank_w) | |
| 3813 | AM_RANGE(0xd0, 0xd0) AM_READ_LEGACY(hanakanz_rand_r) | |
| 3814 | AM_RANGE(0xe0, 0xe0) AM_READWRITE_LEGACY(daimyojn_protection_r, daimyojn_protection_w) | |
| 3706 | AM_RANGE(0xaa, 0xaa) AM_READ(daimyojn_keyb1_r) | |
| 3707 | AM_RANGE(0xac, 0xac) AM_READ(daimyojn_keyb2_r) | |
| 3708 | AM_RANGE(0xae, 0xae) AM_WRITE(hanakanz_coincounter_w) | |
| 3709 | AM_RANGE(0xb0, 0xb0) AM_WRITE(mjmyster_rambank_w) | |
| 3710 | AM_RANGE(0xc0, 0xc0) AM_WRITE(mjflove_rombank_w) | |
| 3711 | AM_RANGE(0xd0, 0xd0) AM_READ(hanakanz_rand_r) | |
| 3712 | AM_RANGE(0xe0, 0xe0) AM_READWRITE(daimyojn_protection_r, daimyojn_protection_w) | |
| 3815 | 3713 | ADDRESS_MAP_END |
| 3816 | 3714 | |
| 3817 | 3715 | |
| r14883 | r14884 | |
| 3843 | 3741 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 3844 | 3742 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */ |
| 3845 | 3743 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag |
| 3846 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ddenlovj_blitter_r, NULL) // blitter irq flag? (bit 5) & RTC (bit 6) | |
| 3744 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dynax_state,ddenlovj_blitter_r, NULL) // blitter irq flag? (bit 5) & RTC (bit 6) | |
| 3847 | 3745 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 3848 | 3746 | |
| 3849 | 3747 | PORT_START("DSW1") |
| r14883 | r14884 | |
| 3949 | 3847 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */ |
| 3950 | 3848 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3951 | 3849 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) // ? quiz365 |
| 3952 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ddenlovr_special_r, NULL) // blitter irq flag | |
| 3850 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dynax_state,ddenlovr_special_r, NULL) // blitter irq flag | |
| 3953 | 3851 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag |
| 3954 | 3852 | |
| 3955 | 3853 | PORT_START("DSW") |
| r14883 | r14884 | |
| 4004 | 3902 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 4005 | 3903 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */ |
| 4006 | 3904 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag |
| 4007 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(nettoqc_special_r, NULL) // ? (bit 5) & blitter irq flag (bit 6) | |
| 3905 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dynax_state,nettoqc_special_r, NULL) // ? (bit 5) & blitter irq flag (bit 6) | |
| 4008 | 3906 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 4009 | 3907 | |
| 4010 | 3908 | PORT_START("DSW1") |
| r14883 | r14884 | |
| 4102 | 4000 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */ |
| 4103 | 4001 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4104 | 4002 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) // ? quiz365 |
| 4105 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ddenlovr_special_r, NULL) // blitter irq flag | |
| 4003 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dynax_state,ddenlovr_special_r, NULL) // blitter irq flag | |
| 4106 | 4004 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag |
| 4107 | 4005 | |
| 4108 | 4006 | PORT_START("DSW1") |
| r14883 | r14884 | |
| 6856 | 6754 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 6857 | 6755 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_TOGGLE |
| 6858 | 6756 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 6859 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mjflove_blitter_r, NULL) // RTC (bit 5) & blitter irq flag (bit 6) | |
| 6757 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dynax_state,mjflove_blitter_r, NULL) // RTC (bit 5) & blitter irq flag (bit 6) | |
| 6860 | 6758 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) // blitter busy flag |
| 6861 | 6759 | |
| 6862 | 6760 | PORT_START("KEY0") |
| r14883 | r14884 | |
| 10491 | 10389 | |
| 10492 | 10390 | static DRIVER_INIT( momotaro ) |
| 10493 | 10391 | { |
| 10494 | machine.device("maincpu")->memory().space(AS_IO)->install_legacy_read_handler(0xe0, 0xe0, FUNC(momotaro_protection_r) ); | |
| 10392 | dynax_state *state = machine.driver_data<dynax_state>(); | |
| 10393 | machine.device("maincpu")->memory().space(AS_IO)->install_read_handler(0xe0, 0xe0, read8_delegate(FUNC(dynax_state::momotaro_protection_r),state)); | |
| 10495 | 10394 | } |
| 10496 | 10395 | |
| 10497 | 10396 | GAME( 1992, mmpanic, 0, mmpanic, mmpanic, 0, ROT0, "Nakanihon / East Technology (Taito license)", "Monkey Mole Panic (USA)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| r14883 | r14884 | |
|---|---|---|
| 176 | 176 | |
| 177 | 177 | /********** READ INPUTS **********/ |
| 178 | 178 | |
| 179 | ||
| 179 | ||
| 180 | 180 | { |
| 181 | ms32_state *state = field.machine().driver_data<ms32_state>(); | |
| 182 | 181 | UINT32 mj_input; |
| 183 | 182 | |
| 184 | switch ( | |
| 183 | switch ( | |
| 185 | 184 | { |
| 186 | 185 | case 0x01: |
| 187 | mj_input = input_port_read( | |
| 186 | mj_input = input_port_read( | |
| 188 | 187 | break; |
| 189 | 188 | case 0x02: |
| 190 | mj_input = input_port_read( | |
| 189 | mj_input = input_port_read( | |
| 191 | 190 | break; |
| 192 | 191 | case 0x04: |
| 193 | mj_input = input_port_read( | |
| 192 | mj_input = input_port_read( | |
| 194 | 193 | break; |
| 195 | 194 | case 0x08: |
| 196 | mj_input = input_port_read( | |
| 195 | mj_input = input_port_read( | |
| 197 | 196 | break; |
| 198 | 197 | case 0x10: |
| 199 | mj_input = input_port_read( | |
| 198 | mj_input = input_port_read( | |
| 200 | 199 | break; |
| 201 | 200 | default: |
| 202 | 201 | mj_input = 0; |
| r14883 | r14884 | |
| 624 | 623 | PORT_INCLUDE( ms32 ) |
| 625 | 624 | |
| 626 | 625 | PORT_MODIFY("INPUTS") |
| 627 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mahjong_ctrl_r, NULL) // here we read mahjong keys | |
| 626 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ms32_state,mahjong_ctrl_r, NULL) // here we read mahjong keys | |
| 628 | 627 | PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 629 | 628 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 630 | 629 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r14883 | r14884 | |
|---|---|---|
| 139 | 139 | PORT_DIPUNUSED( 0x8000, IP_ACTIVE_LOW ) |
| 140 | 140 | |
| 141 | 141 | PORT_START("COIN") /* 0x30c002 & 0x30c003 */ |
| 142 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE") | |
| 143 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE") | |
| 142 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE") | |
| 143 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE") | |
| 144 | 144 | |
| 145 | 145 | PORT_START("FAKE") |
| 146 | 146 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* related to music/sound */ |
| r14883 | r14884 | |
|---|---|---|
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | ||
| 274 | ||
| 275 | 275 | { |
| 276 | wwfsstar_state *state = field.machine().driver_data<wwfsstar_state>(); | |
| 277 | 276 | |
| 278 | return | |
| 277 | return | |
| 279 | 278 | } |
| 280 | 279 | |
| 281 | 280 | /******************************************************************************* |
| r14883 | r14884 | |
| 308 | 307 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Button B (1P VS 2P - Buy-in)") |
| 309 | 308 | |
| 310 | 309 | PORT_START("SYSTEM") |
| 311 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(wwfsstar_vblank_r, NULL) /* VBlank */ | |
| 310 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfsstar_state,wwfsstar_vblank_r, NULL) /* VBlank */ | |
| 312 | 311 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 313 | 312 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 314 | 313 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| r14883 | r14884 | |
|---|---|---|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | |
| 316 | ||
| 316 | ||
| 317 | 317 | { |
| 318 | return input_port_read(field.machine(), SEAWOLF_ERASE_SW_PORT_TAG) & | |
| 319 | input_port_read(field.machine(), SEAWOLF_ERASE_DIP_PORT_TAG); | |
| 318 | return input_port_read(machine(), SEAWOLF_ERASE_SW_PORT_TAG) & | |
| 319 | input_port_read(machine(), SEAWOLF_ERASE_DIP_PORT_TAG); | |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | |
| r14883 | r14884 | |
| 371 | 371 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| 372 | 372 | PORT_DIPSETTING( 0x0c, DEF_STR( 2C_3C ) ) |
| 373 | 373 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) |
| 374 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(seawolf_erase_input_r, NULL) | |
| 374 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,seawolf_erase_input_r, NULL) | |
| 375 | 375 | PORT_DIPNAME( 0xe0, 0x60, "Extended Time At" ) PORT_DIPLOCATION("G4:6,7,8") |
| 376 | 376 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 377 | 377 | PORT_DIPSETTING( 0x20, "2000" ) |
| r14883 | r14884 | |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | |
| 555 | ||
| 555 | ||
| 556 | 556 | { |
| 557 | return input_port_read( | |
| 557 | return input_port_read( | |
| 558 | 558 | } |
| 559 | 559 | |
| 560 | 560 | |
| 561 | ||
| 561 | ||
| 562 | 562 | { |
| 563 | 563 | UINT32 ret; |
| 564 | 564 | |
| 565 | switch (tornbase_get_cabinet_type( | |
| 565 | switch (tornbase_get_cabinet_type( | |
| 566 | 566 | { |
| 567 | 567 | case TORNBASE_CAB_TYPE_UPRIGHT_OLD: |
| 568 | ret = input_port_read( | |
| 568 | ret = input_port_read( | |
| 569 | 569 | break; |
| 570 | 570 | |
| 571 | 571 | case TORNBASE_CAB_TYPE_UPRIGHT_NEW: |
| 572 | 572 | case TORNBASE_CAB_TYPE_COCKTAIL: |
| 573 | 573 | default: |
| 574 | ret = input_port_read( | |
| 574 | ret = input_port_read( | |
| 575 | 575 | break; |
| 576 | 576 | } |
| 577 | 577 | |
| r14883 | r14884 | |
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | |
| 582 | ||
| 582 | ||
| 583 | 583 | { |
| 584 | 584 | UINT32 ret; |
| 585 | 585 | |
| 586 | switch (tornbase_get_cabinet_type( | |
| 586 | switch (tornbase_get_cabinet_type( | |
| 587 | 587 | { |
| 588 | 588 | case TORNBASE_CAB_TYPE_UPRIGHT_OLD: |
| 589 | 589 | case TORNBASE_CAB_TYPE_UPRIGHT_NEW: |
| 590 | ret = input_port_read( | |
| 590 | ret = input_port_read( | |
| 591 | 591 | break; |
| 592 | 592 | |
| 593 | 593 | case TORNBASE_CAB_TYPE_COCKTAIL: |
| 594 | 594 | default: |
| 595 | ret = input_port_read( | |
| 595 | ret = input_port_read( | |
| 596 | 596 | break; |
| 597 | 597 | } |
| 598 | 598 | |
| r14883 | r14884 | |
| 600 | 600 | } |
| 601 | 601 | |
| 602 | 602 | |
| 603 | ||
| 603 | ||
| 604 | 604 | { |
| 605 | return input_port_read( | |
| 605 | return input_port_read( | |
| 606 | 606 | } |
| 607 | 607 | |
| 608 | 608 | |
| 609 | ||
| 609 | ||
| 610 | 610 | { |
| 611 | return input_port_read(field.machine(), TORNBASE_SCORE_SW_PORT_TAG) & | |
| 612 | input_port_read(field.machine(), TORNBASE_SCORE_DIP_PORT_TAG); | |
| 611 | return input_port_read(machine(), TORNBASE_SCORE_SW_PORT_TAG) & | |
| 612 | input_port_read(machine(), TORNBASE_SCORE_DIP_PORT_TAG); | |
| 613 | 613 | } |
| 614 | 614 | |
| 615 | 615 | |
| r14883 | r14884 | |
| 641 | 641 | |
| 642 | 642 | static INPUT_PORTS_START( tornbase ) |
| 643 | 643 | PORT_START("IN0") |
| 644 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tornbase_hit_left_input_r, NULL) | |
| 645 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tornbase_pitch_left_input_r, NULL) | |
| 644 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_left_input_r, NULL) | |
| 645 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_left_input_r, NULL) | |
| 646 | 646 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, PORTCOND_EQUALS, 0x00) PORT_DIPLOCATION("B1:7") |
| 647 | 647 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 648 | 648 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 649 | 649 | |
| 650 | 650 | PORT_START("IN1") |
| 651 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tornbase_hit_right_input_r, NULL) | |
| 652 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tornbase_pitch_right_input_r, NULL) | |
| 651 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_right_input_r, NULL) | |
| 652 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_right_input_r, NULL) | |
| 653 | 653 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED) /* not connected */ |
| 654 | 654 | |
| 655 | 655 | PORT_START("IN2") |
| 656 | 656 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 657 | 657 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* schematics shows it as "START", but not used by the software */ |
| 658 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tornbase_score_input_r, NULL) | |
| 658 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_score_input_r, NULL) | |
| 659 | 659 | PORT_DIPNAME( 0x78, 0x40, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, PORTCOND_EQUALS, 0x00) PORT_DIPLOCATION("B1:2,3,4,5") |
| 660 | 660 | PORT_DIPSETTING( 0x18, "4 Coins/1 Inning" ) |
| 661 | 661 | PORT_DIPSETTING( 0x10, "3 Coins/1 Inning" ) |
| r14883 | r14884 | |
| 1185 | 1185 | } |
| 1186 | 1186 | |
| 1187 | 1187 | |
| 1188 | ||
| 1188 | ||
| 1189 | 1189 | { |
| 1190 | mw8080bw_state *state = field.machine().driver_data<mw8080bw_state>(); | |
| 1191 | 1190 | UINT32 ret; |
| 1192 | 1191 | |
| 1193 | if (state->m_desertgun_controller_select) | |
| 1194 | ret = input_port_read(field.machine(), DESERTGU_GUN_X_PORT_TAG); | |
| 1192 | if (m_desertgun_controller_select) | |
| 1193 | ret = input_port_read(machine(), DESERTGU_GUN_X_PORT_TAG); | |
| 1195 | 1194 | else |
| 1196 | ret = input_port_read( | |
| 1195 | ret = input_port_read( | |
| 1197 | 1196 | |
| 1198 | 1197 | return ret; |
| 1199 | 1198 | } |
| 1200 | 1199 | |
| 1201 | 1200 | |
| 1202 | ||
| 1201 | ||
| 1203 | 1202 | { |
| 1204 | mw8080bw_state *state = field.machine().driver_data<mw8080bw_state>(); | |
| 1205 | 1203 | UINT32 ret; |
| 1206 | 1204 | |
| 1207 | if (state->m_desertgun_controller_select) | |
| 1208 | ret = input_port_read(field.machine(), DESERTGU_DIP_SW_0_1_SET_2_TAG); | |
| 1205 | if (m_desertgun_controller_select) | |
| 1206 | ret = input_port_read(machine(), DESERTGU_DIP_SW_0_1_SET_2_TAG); | |
| 1209 | 1207 | else |
| 1210 | ret = input_port_read( | |
| 1208 | ret = input_port_read( | |
| 1211 | 1209 | |
| 1212 | 1210 | return ret; |
| 1213 | 1211 | } |
| r14883 | r14884 | |
| 1232 | 1230 | |
| 1233 | 1231 | static INPUT_PORTS_START( desertgu ) |
| 1234 | 1232 | PORT_START("IN0") |
| 1235 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(desertgu_gun_input_r, NULL) | |
| 1233 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_gun_input_r, NULL) | |
| 1236 | 1234 | |
| 1237 | 1235 | PORT_START("IN1") |
| 1238 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(desertgu_dip_sw_0_1_r, NULL) | |
| 1236 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_dip_sw_0_1_r, NULL) | |
| 1239 | 1237 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN1", 0x30, PORTCOND_NOTEQUALS, 0x30) PORT_DIPLOCATION("C2:5,6") |
| 1240 | 1238 | PORT_DIPSETTING( 0x00, DEF_STR( English ) ) |
| 1241 | 1239 | PORT_DIPSETTING( 0x04, DEF_STR( German ) ) |
| r14883 | r14884 | |
| 1316 | 1314 | #define DPLAY_CAB_TYPE_COCKTAIL (1) |
| 1317 | 1315 | |
| 1318 | 1316 | |
| 1319 | ||
| 1317 | ||
| 1320 | 1318 | { |
| 1321 | 1319 | UINT32 ret; |
| 1322 | 1320 | |
| 1323 | if (input_port_read(field.machine(), DPLAY_CAB_TYPE_PORT_TAG) == DPLAY_CAB_TYPE_UPRIGHT) | |
| 1324 | ret = input_port_read(field.machine(), DPLAY_L_PITCH_PORT_TAG); | |
| 1321 | if (input_port_read(machine(), DPLAY_CAB_TYPE_PORT_TAG) == DPLAY_CAB_TYPE_UPRIGHT) | |
| 1322 | ret = input_port_read(machine(), DPLAY_L_PITCH_PORT_TAG); | |
| 1325 | 1323 | else |
| 1326 | ret = input_port_read( | |
| 1324 | ret = input_port_read( | |
| 1327 | 1325 | |
| 1328 | 1326 | return ret; |
| 1329 | 1327 | } |
| 1330 | 1328 | |
| 1331 | 1329 | |
| 1332 | ||
| 1330 | ||
| 1333 | 1331 | { |
| 1334 | return input_port_read( | |
| 1332 | return input_port_read( | |
| 1335 | 1333 | } |
| 1336 | 1334 | |
| 1337 | 1335 | |
| r14883 | r14884 | |
| 1354 | 1352 | static INPUT_PORTS_START( dplay ) |
| 1355 | 1353 | PORT_START("IN0") |
| 1356 | 1354 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Hit") PORT_PLAYER(1) |
| 1357 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dplay_pitch_left_input_r, NULL) | |
| 1355 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_left_input_r, NULL) | |
| 1358 | 1356 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 1359 | 1357 | |
| 1360 | 1358 | PORT_START("IN1") |
| 1361 | 1359 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Hit") PORT_PLAYER(2) |
| 1362 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dplay_pitch_right_input_r, NULL) | |
| 1360 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_right_input_r, NULL) | |
| 1363 | 1361 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1364 | 1362 | |
| 1365 | 1363 | PORT_START("IN2") |
| r14883 | r14884 | |
| 1418 | 1416 | static INPUT_PORTS_START( einning ) |
| 1419 | 1417 | PORT_START("IN0") |
| 1420 | 1418 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Hit") PORT_PLAYER(1) |
| 1421 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dplay_pitch_left_input_r, NULL) | |
| 1419 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_left_input_r, NULL) | |
| 1422 | 1420 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 1423 | 1421 | |
| 1424 | 1422 | PORT_START("IN1") |
| 1425 | 1423 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Hit") PORT_PLAYER(2) |
| 1426 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dplay_pitch_right_input_r, NULL) | |
| 1424 | PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_right_input_r, NULL) | |
| 1427 | 1425 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1428 | 1426 | |
| 1429 | 1427 | PORT_START("IN2") |
| r14883 | r14884 | |
| 1707 | 1705 | } |
| 1708 | 1706 | |
| 1709 | 1707 | |
| 1710 | ||
| 1708 | ||
| 1711 | 1709 | { |
| 1712 | mw8080bw_state *state = field.machine().driver_data<mw8080bw_state>(); | |
| 1713 | 1710 | UINT32 ret; |
| 1714 | 1711 | |
| 1715 | if ( | |
| 1712 | if ( | |
| 1716 | 1713 | { |
| 1717 | ret = input_port_read( | |
| 1714 | ret = input_port_read( | |
| 1718 | 1715 | } |
| 1719 | 1716 | else |
| 1720 | 1717 | { |
| 1721 | ret = input_port_read( | |
| 1718 | ret = input_port_read( | |
| 1722 | 1719 | } |
| 1723 | 1720 | |
| 1724 | 1721 | return ret; |
| r14883 | r14884 | |
| 1744 | 1741 | |
| 1745 | 1742 | static INPUT_PORTS_START( clowns ) |
| 1746 | 1743 | PORT_START("IN0") |
| 1747 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clowns_controller_r, NULL) | |
| 1744 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, NULL) | |
| 1748 | 1745 | |
| 1749 | 1746 | PORT_START("IN1") |
| 1750 | 1747 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* not connected */ |
| r14883 | r14884 | |
| 1793 | 1790 | |
| 1794 | 1791 | static INPUT_PORTS_START( clowns1 ) |
| 1795 | 1792 | PORT_START("IN0") |
| 1796 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clowns_controller_r, NULL) | |
| 1793 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, NULL) | |
| 1797 | 1794 | |
| 1798 | 1795 | PORT_START("IN1") |
| 1799 | 1796 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 1881 | 1878 | |
| 1882 | 1879 | static INPUT_PORTS_START( spacwalk ) |
| 1883 | 1880 | PORT_START("IN0") |
| 1884 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clowns_controller_r, NULL) | |
| 1881 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, NULL) | |
| 1885 | 1882 | |
| 1886 | 1883 | PORT_START("IN1") |
| 1887 | 1884 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 2535 | 2532 | |
| 2536 | 2533 | |
| 2537 | 2534 | |
| 2538 | ||
| 2535 | ||
| 2539 | 2536 | { |
| 2540 | UINT32 ret = input_port_read( | |
| 2537 | UINT32 ret = input_port_read( | |
| 2541 | 2538 | |
| 2542 | coin_counter_w( | |
| 2539 | coin_counter_w( | |
| 2543 | 2540 | |
| 2544 | 2541 | return ret; |
| 2545 | 2542 | } |
| 2546 | 2543 | |
| 2547 | 2544 | |
| 2548 | ||
| 2545 | ||
| 2549 | 2546 | { |
| 2550 | 2547 | UINT32 ret; |
| 2551 | 2548 | |
| 2552 | 2549 | /* upright PCB : switches visible |
| 2553 | 2550 | cocktail PCB: HI */ |
| 2554 | 2551 | |
| 2555 | if (invaders_is_cabinet_cocktail( | |
| 2552 | if (invaders_is_cabinet_cocktail( | |
| 2556 | 2553 | ret = 0x03; |
| 2557 | 2554 | else |
| 2558 | ret = input_port_read( | |
| 2555 | ret = input_port_read( | |
| 2559 | 2556 | |
| 2560 | 2557 | return ret; |
| 2561 | 2558 | } |
| 2562 | 2559 | |
| 2563 | 2560 | |
| 2564 | ||
| 2561 | ||
| 2565 | 2562 | { |
| 2566 | 2563 | UINT32 ret; |
| 2567 | 2564 | |
| 2568 | 2565 | /* upright PCB : switch visible |
| 2569 | 2566 | cocktail PCB: HI */ |
| 2570 | 2567 | |
| 2571 | if (invaders_is_cabinet_cocktail( | |
| 2568 | if (invaders_is_cabinet_cocktail( | |
| 2572 | 2569 | ret = 0x01; |
| 2573 | 2570 | else |
| 2574 | ret = input_port_read( | |
| 2571 | ret = input_port_read( | |
| 2575 | 2572 | |
| 2576 | 2573 | return ret; |
| 2577 | 2574 | } |
| 2578 | 2575 | |
| 2579 | 2576 | |
| 2580 | ||
| 2577 | ||
| 2581 | 2578 | { |
| 2582 | 2579 | UINT32 ret; |
| 2583 | 2580 | |
| 2584 | 2581 | /* upright PCB : P1 controls |
| 2585 | 2582 | cocktail PCB: HI */ |
| 2586 | 2583 | |
| 2587 | if (invaders_is_cabinet_cocktail( | |
| 2584 | if (invaders_is_cabinet_cocktail( | |
| 2588 | 2585 | ret = 0x07; |
| 2589 | 2586 | else |
| 2590 | ret = input_port_read( | |
| 2587 | ret = input_port_read( | |
| 2591 | 2588 | |
| 2592 | 2589 | return ret; |
| 2593 | 2590 | } |
| 2594 | 2591 | |
| 2595 | 2592 | |
| 2596 | CUSTOM_INPUT( | |
| 2593 | CUSTOM_INPUT_MEMBER(mw8080bw_state::invaders_in1_control_r | |
| 2597 | 2594 | { |
| 2598 | return input_port_read( | |
| 2595 | return input_port_read( | |
| 2599 | 2596 | } |
| 2600 | 2597 | |
| 2601 | 2598 | |
| 2602 | CUSTOM_INPUT( | |
| 2599 | CUSTOM_INPUT_MEMBER(mw8080bw_state::invaders_in2_control_r | |
| 2603 | 2600 | { |
| 2604 | 2601 | UINT32 ret; |
| 2605 | 2602 | |
| 2606 | 2603 | /* upright PCB : P1 controls |
| 2607 | 2604 | cocktail PCB: P2 controls */ |
| 2608 | 2605 | |
| 2609 | if (invaders_is_cabinet_cocktail(field.machine())) | |
| 2610 | ret = input_port_read(field.machine(), INVADERS_P2_CONTROL_PORT_TAG); | |
| 2606 | if (invaders_is_cabinet_cocktail(machine())) | |
| 2607 | ret = input_port_read(machine(), INVADERS_P2_CONTROL_PORT_TAG); | |
| 2611 | 2608 | else |
| 2612 | ret = input_port_read( | |
| 2609 | ret = input_port_read( | |
| 2613 | 2610 | |
| 2614 | 2611 | return ret; |
| 2615 | 2612 | } |
| r14883 | r14884 | |
| 2641 | 2638 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:8") |
| 2642 | 2639 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 2643 | 2640 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 2644 | PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_sw6_sw7_r, NULL) | |
| 2641 | PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw6_sw7_r, NULL) | |
| 2645 | 2642 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2646 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in0_control_r, NULL) | |
| 2647 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_sw5_r, NULL) | |
| 2643 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in0_control_r, NULL) | |
| 2644 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw5_r, NULL) | |
| 2648 | 2645 | |
| 2649 | 2646 | PORT_START("IN1") |
| 2650 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_coin_input_r, NULL) | |
| 2647 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, NULL) | |
| 2651 | 2648 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 2652 | 2649 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 2653 | 2650 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2654 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in1_control_r, NULL) | |
| 2651 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL) | |
| 2655 | 2652 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 2656 | 2653 | |
| 2657 | 2654 | PORT_START("IN2") |
| r14883 | r14884 | |
| 2664 | 2661 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:2") |
| 2665 | 2662 | PORT_DIPSETTING( 0x08, "1000" ) |
| 2666 | 2663 | PORT_DIPSETTING( 0x00, "1500" ) |
| 2667 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, NULL) | |
| 2664 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL) | |
| 2668 | 2665 | PORT_DIPNAME( 0x80, 0x00, "Display Coinage" ) PORT_DIPLOCATION("SW:1") |
| 2669 | 2666 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 2670 | 2667 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r14883 | r14884 | |
| 2742 | 2739 | #define BLUESHRK_COIN_INPUT_PORT_TAG ("COIN") |
| 2743 | 2740 | |
| 2744 | 2741 | |
| 2745 | ||
| 2742 | ||
| 2746 | 2743 | { |
| 2747 | UINT32 ret = input_port_read( | |
| 2744 | UINT32 ret = input_port_read( | |
| 2748 | 2745 | |
| 2749 | coin_counter_w( | |
| 2746 | coin_counter_w( | |
| 2750 | 2747 | |
| 2751 | 2748 | return ret; |
| 2752 | 2749 | } |
| r14883 | r14884 | |
| 2772 | 2769 | |
| 2773 | 2770 | PORT_START("IN1") |
| 2774 | 2771 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2775 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(blueshrk_coin_input_r, NULL) | |
| 2772 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,blueshrk_coin_input_r, NULL) | |
| 2776 | 2773 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x80, PORTCOND_EQUALS, 0x80) PORT_DIPLOCATION("SW:3") |
| 2777 | 2774 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2778 | 2775 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r14883 | r14884 | |
| 2861 | 2858 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2862 | 2859 | |
| 2863 | 2860 | PORT_START("IN1") |
| 2864 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_coin_input_r, NULL) | |
| 2861 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, NULL) | |
| 2865 | 2862 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 2866 | 2863 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 2867 | 2864 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 132 | 132 | *************************************/ |
| 133 | 133 | |
| 134 | 134 | |
| 135 | ||
| 135 | ||
| 136 | 136 | { |
| 137 | nova2001_state *state = field.machine().driver_data<nova2001_state>(); | |
| 138 | return state->m_ninjakun_io_a002_ctrl; | |
| 137 | return m_ninjakun_io_a002_ctrl; | |
| 139 | 138 | } |
| 140 | 139 | |
| 141 | 140 | WRITE8_MEMBER(nova2001_state::ninjakun_cpu1_io_A002_w) |
| r14883 | r14884 | |
| 383 | 382 | |
| 384 | 383 | PORT_START("IN2") /* 0xa002 */ |
| 385 | 384 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 386 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ninjakun_io_A002_ctrl_r, NULL) | |
| 385 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nova2001_state,ninjakun_io_A002_ctrl_r, NULL) | |
| 387 | 386 | |
| 388 | 387 | PORT_START("DSW1") // printed "SW 2" |
| 389 | 388 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1") |
| r14883 | r14884 | |
|---|---|---|
| 414 | 414 | * |
| 415 | 415 | *************************************/ |
| 416 | 416 | |
| 417 | ||
| 417 | ||
| 418 | 418 | { |
| 419 | gaelco3d_state *state = field.machine().driver_data<gaelco3d_state>(); | |
| 420 | 419 | int which = (FPTR)param; |
| 421 | return ( | |
| 420 | return ( | |
| 422 | 421 | } |
| 423 | 422 | |
| 424 | 423 | |
| r14883 | r14884 | |
| 877 | 876 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // checked after reading analog from port 1 |
| 878 | 877 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) // checked after reading analog from port 2 |
| 879 | 878 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // checked after reading analog from port 3 |
| 880 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)0) | |
| 881 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)1) | |
| 882 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)2) | |
| 883 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)3) | |
| 879 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0) | |
| 880 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1) | |
| 881 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2) | |
| 882 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3) | |
| 884 | 883 | |
| 885 | 884 | PORT_START("IN3") |
| 886 | 885 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) // verified |
| r14883 | r14884 | |
| 916 | 915 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 917 | 916 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 918 | 917 | PORT_SERVICE_NO_TOGGLE( 0x0800, IP_ACTIVE_LOW ) |
| 919 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)0) | |
| 920 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)1) | |
| 921 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)2) | |
| 922 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)3) | |
| 918 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0) | |
| 919 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1) | |
| 920 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2) | |
| 921 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3) | |
| 923 | 922 | |
| 924 | 923 | PORT_START("IN3") |
| 925 | 924 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 953 | 952 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 954 | 953 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 955 | 954 | PORT_SERVICE_NO_TOGGLE( 0x08000000, IP_ACTIVE_LOW ) |
| 956 | PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)0) | |
| 957 | PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)1) | |
| 958 | PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)2) | |
| 959 | PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(analog_bit_r, (void *)3) | |
| 955 | PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0) | |
| 956 | PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1) | |
| 957 | PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2) | |
| 958 | PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3) | |
| 960 | 959 | |
| 961 | 960 | PORT_START("IN3") |
| 962 | 961 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 329 | 329 | return soundlatch_r(space, 0); |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | ||
| 332 | ||
| 333 | 333 | { |
| 334 | snk_state *state = field.machine().driver_data<snk_state>(); | |
| 335 | 334 | |
| 336 | return | |
| 335 | return | |
| 337 | 336 | } |
| 338 | 337 | |
| 339 | 338 | READ8_MEMBER(snk_state::marvins_sound_nmi_ack_r) |
| r14883 | r14884 | |
| 496 | 495 | machine().scheduler().synchronize(FUNC(sndirq_update_callback), CMDIRQ_BUSY_ASSERT); |
| 497 | 496 | } |
| 498 | 497 | |
| 499 | ||
| 498 | ||
| 500 | 499 | { |
| 501 | snk_state *state = field.machine().driver_data<snk_state>(); | |
| 502 | 500 | |
| 503 | return ( | |
| 501 | return ( | |
| 504 | 502 | } |
| 505 | 503 | |
| 506 | 504 | |
| r14883 | r14884 | |
| 739 | 737 | |
| 740 | 738 | *****************************************************************************/ |
| 741 | 739 | |
| 742 | ||
| 740 | ||
| 743 | 741 | { |
| 744 | snk_state *state = field.machine().driver_data<snk_state>(); | |
| 745 | 742 | static const char *const ports[] = { "P1ROT", "P2ROT" }; |
| 746 | 743 | int which = (int)(FPTR)param; |
| 747 | int value = input_port_read( | |
| 744 | int value = input_port_read( | |
| 748 | 745 | |
| 749 | if (( | |
| 746 | if (( | |
| 750 | 747 | { |
| 751 | if (! | |
| 748 | if (! | |
| 752 | 749 | value = 0xf; |
| 753 | | |
| 750 | | |
| 754 | 751 | } |
| 755 | | |
| 752 | | |
| 756 | 753 | |
| 757 | 754 | return value; |
| 758 | 755 | } |
| 759 | 756 | |
| 760 | ||
| 757 | ||
| 761 | 758 | { |
| 762 | if (input_port_read( | |
| 759 | if (input_port_read( | |
| 763 | 760 | { |
| 764 | return gwar_rotary( | |
| 761 | return gwar_rotary( | |
| 765 | 762 | } |
| 766 | 763 | else |
| 767 | 764 | { |
| r14883 | r14884 | |
| 805 | 802 | m_countryc_trackball = data & 1; |
| 806 | 803 | } |
| 807 | 804 | |
| 808 | ||
| 805 | ||
| 809 | 806 | { |
| 810 | snk_state *state = field.machine().driver_data<snk_state>(); | |
| 811 | 807 | |
| 812 | return input_port_read( | |
| 808 | return input_port_read( | |
| 813 | 809 | } |
| 814 | 810 | |
| 815 | ||
| 811 | ||
| 816 | 812 | { |
| 817 | snk_state *state = field.machine().driver_data<snk_state>(); | |
| 818 | 813 | |
| 819 | return input_port_read( | |
| 814 | return input_port_read( | |
| 820 | 815 | } |
| 821 | 816 | |
| 822 | 817 | |
| 823 | 818 | /************************************************************************/ |
| 824 | 819 | |
| 825 | ||
| 820 | ||
| 826 | 821 | { |
| 827 | 822 | int bit_mask = (FPTR)param; |
| 828 | 823 | |
| 829 | 824 | switch (bit_mask) |
| 830 | 825 | { |
| 831 | 826 | case 0x01: /* older games : "Occurrence" Dip Switch (DSW2:1) */ |
| 832 | return ((input_port_read( | |
| 827 | return ((input_port_read( | |
| 833 | 828 | case 0xc0: /* older games : "Bonus Life" Dip Switches (DSW1:7,8) */ |
| 834 | return ((input_port_read( | |
| 829 | return ((input_port_read( | |
| 835 | 830 | |
| 836 | 831 | case 0x04: /* later games : "Occurrence" Dip Switch (DSW1:3) */ |
| 837 | return ((input_port_read( | |
| 832 | return ((input_port_read( | |
| 838 | 833 | case 0x30: /* later games : "Bonus Life" Dip Switches (DSW2:5,6) */ |
| 839 | return ((input_port_read( | |
| 834 | return ((input_port_read( | |
| 840 | 835 | |
| 841 | 836 | default: |
| 842 | 837 | logerror("snk_bonus_r : invalid %02X bit_mask\n",bit_mask); |
| r14883 | r14884 | |
| 1518 | 1513 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1519 | 1514 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1520 | 1515 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1521 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1516 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1522 | 1517 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // service switch according to schematics, see code at 0x0453. Goes to garbage. |
| 1523 | 1518 | |
| 1524 | 1519 | PORT_START("IN1") |
| r14883 | r14884 | |
| 1600 | 1595 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1601 | 1596 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1602 | 1597 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1603 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1598 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1604 | 1599 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1605 | 1600 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1606 | 1601 | |
| r14883 | r14884 | |
| 1684 | 1679 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1685 | 1680 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1686 | 1681 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1687 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1688 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1682 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1683 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, NULL) /* sound CPU status */ | |
| 1689 | 1684 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 1690 | 1685 | |
| 1691 | 1686 | PORT_START("IN1") |
| r14883 | r14884 | |
| 1762 | 1757 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1763 | 1758 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1764 | 1759 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1765 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 1760 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 1766 | 1761 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1767 | 1762 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1768 | 1763 | |
| r14883 | r14884 | |
| 1805 | 1800 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1806 | 1801 | // PORT_DIPSETTING( 0x10, "INVALID !" ) /* settings table at 0x0378 is only 5 bytes wide */ |
| 1807 | 1802 | // PORT_DIPSETTING( 0x08, "INVALID !" ) /* settings table at 0x0378 is only 5 bytes wide */ |
| 1808 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0xc0) | |
| 1803 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0) | |
| 1809 | 1804 | |
| 1810 | 1805 | PORT_START("DSW2") |
| 1811 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 1806 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01) | |
| 1812 | 1807 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") |
| 1813 | 1808 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) |
| 1814 | 1809 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) |
| r14883 | r14884 | |
| 1847 | 1842 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1848 | 1843 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1849 | 1844 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1850 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 1845 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 1851 | 1846 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1852 | 1847 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) /* code at 0x054e */ |
| 1853 | 1848 | |
| r14883 | r14884 | |
| 1888 | 1883 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) |
| 1889 | 1884 | PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) |
| 1890 | 1885 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1891 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0xc0) | |
| 1886 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0) | |
| 1892 | 1887 | |
| 1893 | 1888 | PORT_START("DSW2") |
| 1894 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 1889 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01) | |
| 1895 | 1890 | PORT_DIPNAME( 0x02, 0x02, "Time" ) PORT_DIPLOCATION("DSW2:2") |
| 1896 | 1891 | PORT_DIPSETTING( 0x02, "More" ) /* Hazard race 2:30 / Chariot race 3:30 */ |
| 1897 | 1892 | PORT_DIPSETTING( 0x00, "Less" ) /* Hazard race 2:00 / Chariot race 3:00 */ |
| r14883 | r14884 | |
| 1931 | 1926 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1932 | 1927 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 1933 | 1928 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 1934 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 1929 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 1935 | 1930 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1936 | 1931 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1937 | 1932 | |
| r14883 | r14884 | |
| 1972 | 1967 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) |
| 1973 | 1968 | PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) |
| 1974 | 1969 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 1975 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0xc0) | |
| 1970 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0) | |
| 1976 | 1971 | |
| 1977 | 1972 | PORT_START("DSW2") |
| 1978 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 1973 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01) | |
| 1979 | 1974 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") |
| 1980 | 1975 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) |
| 1981 | 1976 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) |
| r14883 | r14884 | |
| 2014 | 2009 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coinage" settings - code at 0x2e04 */ |
| 2015 | 2010 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 2016 | 2011 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 2017 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2012 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2018 | 2013 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2019 | 2014 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2020 | 2015 | |
| r14883 | r14884 | |
| 2057 | 2052 | PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) |
| 2058 | 2053 | PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C ) ) |
| 2059 | 2054 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) ) |
| 2060 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0xc0) | |
| 2055 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0) | |
| 2061 | 2056 | |
| 2062 | 2057 | PORT_START("DSW2") |
| 2063 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 2058 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01) | |
| 2064 | 2059 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") |
| 2065 | 2060 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) |
| 2066 | 2061 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) |
| r14883 | r14884 | |
| 2100 | 2095 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x2e17 */ |
| 2101 | 2096 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 2102 | 2097 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 2103 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2098 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2104 | 2099 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2105 | 2100 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2106 | 2101 | |
| r14883 | r14884 | |
| 2147 | 2142 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW1:8" ) |
| 2148 | 2143 | |
| 2149 | 2144 | PORT_START("DSW2") |
| 2150 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 2145 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01) | |
| 2151 | 2146 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") |
| 2152 | 2147 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) |
| 2153 | 2148 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) |
| r14883 | r14884 | |
| 2182 | 2177 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2183 | 2178 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 2184 | 2179 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 2185 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2180 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2186 | 2181 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2187 | 2182 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2188 | 2183 | |
| r14883 | r14884 | |
| 2229 | 2224 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) |
| 2230 | 2225 | PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) |
| 2231 | 2226 | PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) |
| 2232 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0xc0) | |
| 2227 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0) | |
| 2233 | 2228 | |
| 2234 | 2229 | PORT_START("DSW2") |
| 2235 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x01) | |
| 2230 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01) | |
| 2236 | 2231 | PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3") |
| 2237 | 2232 | PORT_DIPSETTING( 0x06, DEF_STR( Easy ) ) |
| 2238 | 2233 | PORT_DIPSETTING( 0x04, DEF_STR( Normal ) ) |
| r14883 | r14884 | |
| 2266 | 2261 | |
| 2267 | 2262 | static INPUT_PORTS_START( athena ) |
| 2268 | 2263 | PORT_START("IN0") |
| 2269 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2264 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2270 | 2265 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x09d4 */ |
| 2271 | 2266 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2272 | 2267 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 2303 | 2298 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") |
| 2304 | 2299 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* Single Controls */ |
| 2305 | 2300 | PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) ) |
| 2306 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04) | |
| 2301 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04) | |
| 2307 | 2302 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") |
| 2308 | 2303 | PORT_DIPSETTING( 0x08, "3" ) |
| 2309 | 2304 | PORT_DIPSETTING( 0x00, "5" ) |
| r14883 | r14884 | |
| 2330 | 2325 | PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("DSW2:4") |
| 2331 | 2326 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2332 | 2327 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2333 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30) | |
| 2328 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30) | |
| 2334 | 2329 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" ) |
| 2335 | 2330 | PORT_DIPNAME( 0x80, 0x80, "Energy" ) PORT_DIPLOCATION("DSW2:8") |
| 2336 | 2331 | PORT_DIPSETTING( 0x80, "12" ) |
| r14883 | r14884 | |
| 2351 | 2346 | |
| 2352 | 2347 | static INPUT_PORTS_START( fitegolf ) |
| 2353 | 2348 | PORT_START("IN0") |
| 2354 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2349 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2355 | 2350 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x045b */ |
| 2356 | 2351 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 2357 | 2352 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch */ |
| r14883 | r14884 | |
| 2436 | 2431 | |
| 2437 | 2432 | static INPUT_PORTS_START( countryc ) |
| 2438 | 2433 | PORT_START("IN0") |
| 2439 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2434 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2440 | 2435 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0450 */ |
| 2441 | 2436 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 2442 | 2437 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch */ |
| r14883 | r14884 | |
| 2446 | 2441 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 2447 | 2442 | |
| 2448 | 2443 | PORT_START("IN1") |
| 2449 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(countryc_trackball_x, 0) | |
| 2444 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,countryc_trackball_x, 0) | |
| 2450 | 2445 | |
| 2451 | 2446 | PORT_START("IN2") |
| 2452 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(countryc_trackball_y, 0) | |
| 2447 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,countryc_trackball_y, 0) | |
| 2453 | 2448 | |
| 2454 | 2449 | PORT_START("IN3") |
| 2455 | 2450 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 2518 | 2513 | |
| 2519 | 2514 | static INPUT_PORTS_START( ikari ) |
| 2520 | 2515 | PORT_START("IN0") |
| 2521 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2516 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2522 | 2517 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a15 */ |
| 2523 | 2518 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2524 | 2519 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 2558 | 2553 | PORT_DIPNAME( 0x02, 0x02, "P1 & P2 Fire Buttons" ) PORT_DIPLOCATION("DSW1:2") |
| 2559 | 2554 | PORT_DIPSETTING( 0x02, "Separate" ) |
| 2560 | 2555 | PORT_DIPSETTING( 0x00, "Common" ) |
| 2561 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04) | |
| 2556 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04) | |
| 2562 | 2557 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") |
| 2563 | 2558 | PORT_DIPSETTING( 0x08, "3" ) |
| 2564 | 2559 | PORT_DIPSETTING( 0x00, "5" ) |
| r14883 | r14884 | |
| 2584 | 2579 | PORT_DIPSETTING( 0x08, "Demo Sounds On" ) |
| 2585 | 2580 | PORT_DIPSETTING( 0x04, "Freeze" ) |
| 2586 | 2581 | PORT_DIPSETTING( 0x00, "Infinite Lives (Cheat)") |
| 2587 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30) | |
| 2582 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30) | |
| 2588 | 2583 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" ) /* read at 0x07c4, but strange test at 0x07cc */ |
| 2589 | 2584 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:8") |
| 2590 | 2585 | PORT_DIPSETTING( 0x80, DEF_STR( No ) ) |
| r14883 | r14884 | |
| 2613 | 2608 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a00 */ |
| 2614 | 2609 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 2615 | 2610 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 ) |
| 2616 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2611 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2617 | 2612 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2618 | 2613 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 2619 | 2614 | INPUT_PORTS_END |
| r14883 | r14884 | |
| 2650 | 2645 | |
| 2651 | 2646 | static INPUT_PORTS_START( victroad ) |
| 2652 | 2647 | PORT_START("IN0") |
| 2653 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2648 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2654 | 2649 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a19 */ |
| 2655 | 2650 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 2656 | 2651 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 2690 | 2685 | PORT_DIPNAME( 0x02, 0x02, "P1 & P2 Fire Buttons" ) PORT_DIPLOCATION("DSW1:2") |
| 2691 | 2686 | PORT_DIPSETTING( 0x02, "Separate" ) |
| 2692 | 2687 | PORT_DIPSETTING( 0x00, "Common" ) |
| 2693 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04) | |
| 2688 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04) | |
| 2694 | 2689 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") |
| 2695 | 2690 | PORT_DIPSETTING( 0x08, "3" ) |
| 2696 | 2691 | PORT_DIPSETTING( 0x00, "5" ) |
| r14883 | r14884 | |
| 2716 | 2711 | PORT_DIPSETTING( 0x08, "Demo Sounds On" ) |
| 2717 | 2712 | PORT_DIPSETTING( 0x00, "Freeze" ) |
| 2718 | 2713 | PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)") |
| 2719 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30) | |
| 2714 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30) | |
| 2720 | 2715 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7") |
| 2721 | 2716 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) |
| 2722 | 2717 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| r14883 | r14884 | |
| 2754 | 2749 | |
| 2755 | 2750 | static INPUT_PORTS_START( bermudat ) |
| 2756 | 2751 | PORT_START("IN0") |
| 2757 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2752 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2758 | 2753 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0a0a */ |
| 2759 | 2754 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 2760 | 2755 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 2792 | 2787 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2") |
| 2793 | 2788 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 2794 | 2789 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2795 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04) | |
| 2790 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04) | |
| 2796 | 2791 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") |
| 2797 | 2792 | PORT_DIPSETTING( 0x08, "3" ) |
| 2798 | 2793 | PORT_DIPSETTING( 0x00, "5" ) |
| r14883 | r14884 | |
| 2818 | 2813 | PORT_DIPSETTING( 0x08, "Demo Sounds On" ) |
| 2819 | 2814 | PORT_DIPSETTING( 0x00, "Freeze" ) |
| 2820 | 2815 | PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)") |
| 2821 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30) | |
| 2816 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30) | |
| 2822 | 2817 | PORT_DIPNAME( 0xc0, 0x80, "Game Style" ) PORT_DIPLOCATION("DSW2:7,8") |
| 2823 | 2818 | PORT_DIPSETTING( 0xc0, "Normal without continue" ) |
| 2824 | 2819 | PORT_DIPSETTING( 0x80, "Normal with continue" ) |
| r14883 | r14884 | |
| 2883 | 2878 | |
| 2884 | 2879 | static INPUT_PORTS_START( psychos ) |
| 2885 | 2880 | PORT_START("IN0") |
| 2886 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2881 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2887 | 2882 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2888 | 2883 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 2889 | 2884 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 2920 | 2915 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2") |
| 2921 | 2916 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 2922 | 2917 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2923 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04) | |
| 2918 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04) | |
| 2924 | 2919 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") |
| 2925 | 2920 | PORT_DIPSETTING( 0x08, "3" ) |
| 2926 | 2921 | PORT_DIPSETTING( 0x00, "5" ) |
| r14883 | r14884 | |
| 2947 | 2942 | PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("DSW2:4") |
| 2948 | 2943 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 2949 | 2944 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2950 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30) | |
| 2945 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30) | |
| 2951 | 2946 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7") |
| 2952 | 2947 | PORT_DIPSETTING( 0x40, DEF_STR( No ) ) |
| 2953 | 2948 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| r14883 | r14884 | |
| 2968 | 2963 | |
| 2969 | 2964 | static INPUT_PORTS_START( gwar ) |
| 2970 | 2965 | PORT_START("IN0") |
| 2971 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 2966 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 2972 | 2967 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x08c8 */ |
| 2973 | 2968 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 2974 | 2969 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) |
| r14883 | r14884 | |
| 2982 | 2977 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 2983 | 2978 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 2984 | 2979 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 2985 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwar_rotary, (void*)0) | |
| 2980 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwar_rotary, (void*)0) | |
| 2986 | 2981 | |
| 2987 | 2982 | PORT_START("P1ROT") |
| 2988 | 2983 | PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12) |
| r14883 | r14884 | |
| 2992 | 2987 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 2993 | 2988 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 2994 | 2989 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 2995 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwar_rotary, (void*)1) | |
| 2990 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwar_rotary, (void*)1) | |
| 2996 | 2991 | |
| 2997 | 2992 | PORT_START("P2ROT") |
| 2998 | 2993 | PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12) |
| r14883 | r14884 | |
| 3014 | 3009 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2") |
| 3015 | 3010 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 3016 | 3011 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 3017 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04) | |
| 3012 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04) | |
| 3018 | 3013 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") |
| 3019 | 3014 | PORT_DIPSETTING( 0x08, "3" ) |
| 3020 | 3015 | PORT_DIPSETTING( 0x00, "5" ) |
| r14883 | r14884 | |
| 3040 | 3035 | PORT_DIPSETTING( 0x08, "Demo Sounds On" ) |
| 3041 | 3036 | PORT_DIPSETTING( 0x00, "Freeze" ) |
| 3042 | 3037 | PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)") |
| 3043 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30) | |
| 3038 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30) | |
| 3044 | 3039 | PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" ) |
| 3045 | 3040 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW2:8" ) |
| 3046 | 3041 | |
| r14883 | r14884 | |
| 3063 | 3058 | // connected. If rotary is not connected, player fires in the direction he's facing. |
| 3064 | 3059 | |
| 3065 | 3060 | PORT_MODIFY("IN1") |
| 3066 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwarb_rotary, (void*)0) | |
| 3061 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwarb_rotary, (void*)0) | |
| 3067 | 3062 | |
| 3068 | 3063 | PORT_MODIFY("IN2") |
| 3069 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwarb_rotary, (void*)1) | |
| 3064 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwarb_rotary, (void*)1) | |
| 3070 | 3065 | |
| 3071 | 3066 | PORT_START("JOYSTICK_MODE") |
| 3072 | 3067 | PORT_CONFNAME( 0x01, 0x00, "Joystick mode" ) |
| r14883 | r14884 | |
| 3077 | 3072 | |
| 3078 | 3073 | static INPUT_PORTS_START( chopper ) |
| 3079 | 3074 | PORT_START("IN0") |
| 3080 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 3075 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 3081 | 3076 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0849 */ |
| 3082 | 3077 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */ |
| 3083 | 3078 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) |
| r14883 | r14884 | |
| 3116 | 3111 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2") |
| 3117 | 3112 | PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) /* Single Controls */ |
| 3118 | 3113 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| 3119 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04) | |
| 3114 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04) | |
| 3120 | 3115 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4") |
| 3121 | 3116 | PORT_DIPSETTING( 0x08, "3" ) |
| 3122 | 3117 | PORT_DIPSETTING( 0x00, "5" ) |
| r14883 | r14884 | |
| 3142 | 3137 | PORT_DIPSETTING( 0x0c, "Demo Sounds On" ) |
| 3143 | 3138 | PORT_DIPSETTING( 0x00, "Freeze" ) |
| 3144 | 3139 | PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)") |
| 3145 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30) | |
| 3140 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30) | |
| 3146 | 3141 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7") |
| 3147 | 3142 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 3148 | 3143 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
| r14883 | r14884 | |
| 3198 | 3193 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3199 | 3194 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* also reset - code at 0x074a */ |
| 3200 | 3195 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x1065 */ |
| 3201 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 3196 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 3202 | 3197 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3203 | 3198 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 3204 | 3199 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start Game A") |
| r14883 | r14884 | |
| 3339 | 3334 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3340 | 3335 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch / also reset - code at 0x00cc */ |
| 3341 | 3336 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x677f */ |
| 3342 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0) | |
| 3337 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, 0) | |
| 3343 | 3338 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 3344 | 3339 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 3345 | 3340 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start Game A") |
| r14883 | r14884 | |
|---|---|---|
| 458 | 458 | return (space->machine().primary_screen->frame_number() & 1) << 2; |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | ||
| 461 | ||
| 462 | 462 | { |
| 463 | model2_state *state = field.machine().driver_data<model2_state>(); | |
| 464 | UINT32 ret = input_port_read(field.machine(), "IN0"); | |
| 463 | UINT32 ret = input_port_read(machine(), "IN0"); | |
| 465 | 464 | |
| 466 | if( | |
| 465 | if( | |
| 467 | 466 | { |
| 468 | 467 | return ret; |
| 469 | 468 | } |
| 470 | 469 | else |
| 471 | 470 | { |
| 472 | 471 | ret &= ~0x0030; |
| 473 | return ret | 0x00d0 | ( | |
| 472 | return ret | 0x00d0 | ( | |
| 474 | 473 | } |
| 475 | 474 | } |
| 476 | 475 | |
| 477 | ||
| 476 | ||
| 478 | 477 | { |
| 479 | model2_state *state = field.machine().driver_data<model2_state>(); | |
| 480 | 478 | UINT32 iptval = 0x00ff; |
| 481 | if( | |
| 479 | if( | |
| 482 | 480 | { |
| 483 | 481 | static const char *const ports[] = { "ANA0", "ANA1", "ANA2", "ANA3" }; |
| 484 | iptval = input_port_read_safe(field.machine(), ports[state->m_analog_channel], 0); | |
| 485 | ++state->m_analog_channel; | |
| 482 | iptval = input_port_read_safe(machine(), ports[m_analog_channel], 0); | |
| 483 | ++m_analog_channel; | |
| 486 | 484 | } |
| 487 | 485 | return iptval; |
| 488 | 486 | } |
| r14883 | r14884 | |
| 558 | 556 | */ |
| 559 | 557 | |
| 560 | 558 | |
| 561 | ||
| 559 | ||
| 562 | 560 | { |
| 563 | 561 | return 0xffff; |
| 564 | 562 | } |
| r14883 | r14884 | |
| 1533 | 1531 | static INPUT_PORTS_START( model2 ) |
| 1534 | 1532 | PORT_START("1c00000") |
| 1535 | 1533 | PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1536 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c00000_r, NULL) | |
| 1534 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL) | |
| 1537 | 1535 | |
| 1538 | 1536 | PORT_START("1c00004") |
| 1539 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 1540 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2") | |
| 1537 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 1538 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") | |
| 1541 | 1539 | |
| 1542 | 1540 | PORT_START("1c00010") |
| 1543 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0") | |
| 1544 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 1541 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN0") | |
| 1542 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 1545 | 1543 | |
| 1546 | 1544 | PORT_START("1c00014") |
| 1547 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2") | |
| 1545 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") | |
| 1548 | 1546 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1549 | 1547 | |
| 1550 | 1548 | PORT_START("1c0001c") |
| 1551 | 1549 | PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high |
| 1552 | 1550 | PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1553 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c0001c_r, NULL) | |
| 1551 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL) | |
| 1554 | 1552 | |
| 1555 | 1553 | PORT_START("IN0") |
| 1556 | 1554 | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 1574 | 1572 | |
| 1575 | 1573 | static INPUT_PORTS_START( desert ) |
| 1576 | 1574 | PORT_START("1c00000") |
| 1577 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "STEER") | |
| 1578 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "ACCEL") | |
| 1575 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "STEER") | |
| 1576 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "ACCEL") | |
| 1579 | 1577 | |
| 1580 | 1578 | PORT_START("1c00004") |
| 1581 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "BRAKE") | |
| 1579 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "BRAKE") | |
| 1582 | 1580 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1583 | 1581 | |
| 1584 | 1582 | PORT_START("1c00010") |
| 1585 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0") | |
| 1586 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 1583 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN0") | |
| 1584 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 1587 | 1585 | |
| 1588 | 1586 | PORT_START("1c00014") |
| 1589 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2") | |
| 1587 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") | |
| 1590 | 1588 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1591 | 1589 | |
| 1592 | 1590 | PORT_START("IN0") |
| r14883 | r14884 | |
| 1621 | 1619 | |
| 1622 | 1620 | static INPUT_PORTS_START( daytona ) |
| 1623 | 1621 | PORT_START("1c00000") |
| 1624 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "STEER") | |
| 1625 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "ACCEL") | |
| 1622 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "STEER") | |
| 1623 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "ACCEL") | |
| 1626 | 1624 | |
| 1627 | 1625 | PORT_START("1c00004") |
| 1628 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "BRAKE") | |
| 1626 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "BRAKE") | |
| 1629 | 1627 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1630 | 1628 | |
| 1631 | 1629 | PORT_START("1c00010") |
| 1632 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0") | |
| 1633 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 1630 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN0") | |
| 1631 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 1634 | 1632 | |
| 1635 | 1633 | PORT_START("1c00014") |
| 1636 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2") | |
| 1634 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") | |
| 1637 | 1635 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1638 | 1636 | |
| 1639 | 1637 | PORT_START("IN0") |
| r14883 | r14884 | |
| 1670 | 1668 | static INPUT_PORTS_START( srallyc ) |
| 1671 | 1669 | PORT_START("1c00000") |
| 1672 | 1670 | PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1673 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c00000_r, NULL) | |
| 1671 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL) | |
| 1674 | 1672 | |
| 1675 | 1673 | PORT_START("1c00004") |
| 1676 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 1677 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2") | |
| 1674 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 1675 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") | |
| 1678 | 1676 | |
| 1679 | 1677 | PORT_START("1c00010") |
| 1680 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0") | |
| 1681 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 1678 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN0") | |
| 1679 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 1682 | 1680 | |
| 1683 | 1681 | PORT_START("1c00014") |
| 1684 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2") | |
| 1682 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") | |
| 1685 | 1683 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1686 | 1684 | |
| 1687 | 1685 | PORT_START("1c0001c") |
| 1688 | 1686 | PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high |
| 1689 | 1687 | PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1690 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c0001c_r, NULL) | |
| 1688 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL) | |
| 1691 | 1689 | |
| 1692 | 1690 | PORT_START("IN0") |
| 1693 | 1691 | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 1721 | 1719 | static INPUT_PORTS_START( bel ) |
| 1722 | 1720 | PORT_START("1c00000") |
| 1723 | 1721 | PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1724 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c00000_r, NULL) | |
| 1722 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL) | |
| 1725 | 1723 | |
| 1726 | 1724 | PORT_START("1c00004") |
| 1727 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 1728 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2") | |
| 1725 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 1726 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") | |
| 1729 | 1727 | |
| 1730 | 1728 | PORT_START("1c00010") |
| 1731 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0") | |
| 1732 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 1729 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN0") | |
| 1730 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 1733 | 1731 | |
| 1734 | 1732 | PORT_START("1c00014") |
| 1735 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2") | |
| 1733 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") | |
| 1736 | 1734 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1737 | 1735 | |
| 1738 | 1736 | PORT_START("1c0001c") |
| 1739 | 1737 | PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high |
| 1740 | 1738 | PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1741 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c0001c_r, NULL) | |
| 1739 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL) | |
| 1742 | 1740 | |
| 1743 | 1741 | PORT_START("IN0") |
| 1744 | 1742 | PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 1769 | 1767 | PORT_BIT( 0xfffc, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1770 | 1768 | |
| 1771 | 1769 | PORT_MODIFY("IN2") |
| 1772 | PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(rchase2_devices_r, NULL) | |
| 1770 | PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,rchase2_devices_r, NULL) | |
| 1773 | 1771 | |
| 1774 | 1772 | /* FIXME: don't know yet if min max values are really correct, we'll see ... */ |
| 1775 | 1773 | PORT_START("ANA0") |
| r14883 | r14884 | |
|---|---|---|
| 469 | 469 | |
| 470 | 470 | tilemap_t *m_bg_tilemap, *m_fg_tilemap; |
| 471 | 471 | |
| 472 | UINT8 | |
| 472 | UINT8 | |
| 473 | 473 | |
| 474 | 474 | required_device<okim6295_device> oki; |
| 475 | 475 | |
| r14883 | r14884 | |
| 594 | 594 | |
| 595 | 595 | WRITE8_MEMBER(majorpkr_state::vram_bank_w) |
| 596 | 596 | { |
| 597 | m_vram_bank = data; | |
| 597 | m_vram_bank = data & 1; | |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | READ8_MEMBER(majorpkr_state::vram_r) |
| r14883 | r14884 | |
|---|---|---|
| 170 | 170 | DECLARE_WRITE32_MEMBER(gstream_oki_banking_w); |
| 171 | 171 | DECLARE_WRITE32_MEMBER(gstream_oki_4040_w); |
| 172 | 172 | DECLARE_READ32_MEMBER(gstream_speedup_r); |
| 173 | DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_service_r); | |
| 174 | DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_r); | |
| 173 | 175 | }; |
| 174 | 176 | |
| 175 | 177 | |
| 176 | 178 | |
| 177 | ||
| 179 | ||
| 178 | 180 | { |
| 179 | 181 | int result; |
| 180 | 182 | |
| 181 | 183 | /* PORT_SERVICE_NO_TOGGLE */ |
| 182 | result = (input_port_read( | |
| 184 | result = (input_port_read( | |
| 183 | 185 | |
| 184 | 186 | return ~result; |
| 185 | 187 | } |
| 186 | 188 | |
| 187 | ||
| 189 | ||
| 188 | 190 | { |
| 189 | 191 | int result; |
| 190 | 192 | |
| 191 | 193 | /* IPT_COIN1 */ |
| 192 | result = ((input_port_read( | |
| 194 | result = ((input_port_read( | |
| 193 | 195 | /* IPT_COIN2 */ |
| 194 | result |= ((input_port_read( | |
| 196 | result |= ((input_port_read( | |
| 195 | 197 | /* IPT_START1 */ |
| 196 | result |= ((input_port_read( | |
| 198 | result |= ((input_port_read( | |
| 197 | 199 | /* IPT_START2 */ |
| 198 | result |= ((input_port_read( | |
| 200 | result |= ((input_port_read( | |
| 199 | 201 | /* PORT_SERVICE_NO_TOGGLE */ |
| 200 | result |= ((input_port_read( | |
| 202 | result |= ((input_port_read( | |
| 201 | 203 | |
| 202 | 204 | return ~result; |
| 203 | 205 | } |
| r14883 | r14884 | |
| 394 | 396 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 ) |
| 395 | 397 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| 396 | 398 | PORT_BIT( 0x7000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 397 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(gstream_mirror_service_r, NULL) | |
| 399 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_service_r, NULL) | |
| 398 | 400 | |
| 399 | 401 | PORT_START("IN2") |
| 400 | PORT_BIT( 0x004f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(gstream_mirror_r, NULL) | |
| 402 | PORT_BIT( 0x004f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_r, NULL) | |
| 401 | 403 | PORT_BIT( 0xffb0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 402 | 404 | INPUT_PORTS_END |
| 403 | 405 |
| r14883 | r14884 | |
|---|---|---|
| 472 | 472 | |
| 473 | 473 | |
| 474 | 474 | /* ckongs coinage DIPs are spread across two input ports */ |
| 475 | ||
| 475 | ||
| 476 | 476 | { |
| 477 | 477 | int bit_mask = (FPTR)param; |
| 478 | return (input_port_read( | |
| 478 | return (input_port_read( | |
| 479 | 479 | } |
| 480 | 480 | |
| 481 | 481 | |
| r14883 | r14884 | |
| 491 | 491 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 492 | 492 | |
| 493 | 493 | PORT_START("IN1") |
| 494 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongs_coinage_r, (void *)0x01) | |
| 495 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongs_coinage_r, (void *)0x02) | |
| 494 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scramble_state,ckongs_coinage_r, (void *)0x01) | |
| 495 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scramble_state,ckongs_coinage_r, (void *)0x02) | |
| 496 | 496 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 497 | 497 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 498 | 498 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| r14883 | r14884 | |
| 508 | 508 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) |
| 509 | 509 | PORT_DIPSETTING( 0x04, "3" ) |
| 510 | 510 | PORT_DIPSETTING( 0x00, "4" ) |
| 511 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongs_coinage_r, (void *)0x04) | |
| 511 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scramble_state,ckongs_coinage_r, (void *)0x04) | |
| 512 | 512 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY |
| 513 | 513 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 514 | 514 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| r14883 | r14884 | |
|---|---|---|
| 170 | 170 | DECLARE_WRITE8_MEMBER(c001_w); |
| 171 | 171 | DECLARE_READ8_MEMBER(atamanot_prot_r); |
| 172 | 172 | DECLARE_WRITE8_MEMBER(atamanot_prot_w); |
| 173 | DECLARE_CUSTOM_INPUT_MEMBER(controls_r); | |
| 173 | 174 | }; |
| 174 | 175 | |
| 175 | 176 | //fake palette |
| r14883 | r14884 | |
| 338 | 339 | m_prot_data^=data^0x11; |
| 339 | 340 | } |
| 340 | 341 | |
| 341 | ||
| 342 | ||
| 342 | 343 | { |
| 343 | 344 | int data = 7; |
| 344 | switch(input_port_read( | |
| 345 | switch(input_port_read( | |
| 345 | 346 | { |
| 346 | 347 | case 0x01: data = 1; break; |
| 347 | 348 | case 0x02: data = 2; break; |
| r14883 | r14884 | |
| 441 | 442 | PORT_START("INPUTS") |
| 442 | 443 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 443 | 444 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) //must be LOW |
| 444 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(controls_r, NULL) | |
| 445 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ssingles_state,controls_r, NULL) | |
| 445 | 446 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON4 ) |
| 446 | 447 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) |
| 447 | 448 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) |
| r14883 | r14884 | |
|---|---|---|
| 55 | 55 | device_set_input_line(device, 0, ASSERT_LINE); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | ||
| 58 | ||
| 59 | 59 | { |
| 60 | battlex_state *state = field.machine().driver_data<battlex_state>(); | |
| 61 | UINT32 ret = state->m_in0_b4; | |
| 62 | if (state->m_in0_b4) | |
| 60 | UINT32 ret = m_in0_b4; | |
| 61 | if (m_in0_b4) | |
| 63 | 62 | { |
| 64 | cputag_set_input_line(field.machine(), "maincpu", 0, CLEAR_LINE); | |
| 65 | state->m_in0_b4 = 0; | |
| 63 | cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE); | |
| 64 | m_in0_b4 = 0; | |
| 66 | 65 | } |
| 67 | 66 | |
| 68 | 67 | return ret; |
| r14883 | r14884 | |
| 119 | 118 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) |
| 120 | 119 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 121 | 120 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 122 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(battlex_in0_b4_r, NULL) | |
| 121 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, battlex_state,battlex_in0_b4_r, NULL) | |
| 123 | 122 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) ) |
| 124 | 123 | PORT_DIPSETTING( 0x20, DEF_STR( Upright ) ) |
| 125 | 124 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r14883 | r14884 | |
|---|---|---|
| 646 | 646 | } |
| 647 | 647 | |
| 648 | 648 | |
| 649 | ||
| 649 | ||
| 650 | 650 | { |
| 651 | toaplan2_state *state = field.machine().driver_data<toaplan2_state>(); | |
| 652 | 651 | |
| 653 | 652 | // For Teki Paki hardware |
| 654 | 653 | // bit 4 high signifies secondary CPU is ready |
| 655 | 654 | // bit 5 is tested low before V-Blank bit ??? |
| 656 | | |
| 655 | | |
| 657 | 656 | |
| 658 | return ( | |
| 657 | return ( | |
| 659 | 658 | } |
| 660 | 659 | |
| 661 | 660 | |
| r14883 | r14884 | |
| 1673 | 1672 | // PORT_DIPSETTING( 0x000d, DEF_STR( Japan ) ) |
| 1674 | 1673 | // PORT_DIPSETTING( 0x000e, DEF_STR( Japan ) ) |
| 1675 | 1674 | PORT_DIPSETTING( 0x000f, "Japan (Distributed by Tecmo)" ) |
| 1676 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(c2map_r, NULL) | |
| 1675 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state,c2map_r, NULL) | |
| 1677 | 1676 | INPUT_PORTS_END |
| 1678 | 1677 | |
| 1679 | 1678 | |
| r14883 | r14884 | |
| 2019 | 2018 | PORT_INCLUDE( pipibibs ) |
| 2020 | 2019 | |
| 2021 | 2020 | PORT_MODIFY("JMPR") |
| 2022 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(c2map_r, NULL) // bit 0x10 sound ready | |
| 2021 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state,c2map_r, NULL) // bit 0x10 sound ready | |
| 2023 | 2022 | INPUT_PORTS_END |
| 2024 | 2023 | |
| 2025 | 2024 |
| r14883 | r14884 | |
|---|---|---|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | |
| 70 | ||
| 70 | ||
| 71 | 71 | { |
| 72 | crbaloon_state *state = field.machine().driver_data<crbaloon_state>(); | |
| 73 | 72 | UINT32 ret; |
| 74 | 73 | |
| 75 | 74 | /* enable coin & start input? Wild guess!!! */ |
| 76 | if (state->m_pc3092_data[1] & 0x02) | |
| 77 | ret = input_port_read(field.machine(), "PC3092"); | |
| 75 | if (m_pc3092_data[1] & 0x02) | |
| 76 | ret = input_port_read(machine(), "PC3092"); | |
| 78 | 77 | else |
| 79 | 78 | ret = 0x00; |
| 80 | 79 | |
| 81 | if (LOG_PC3092) logerror("%s: read PC3092 = 0x%02x\n", | |
| 80 | if (LOG_PC3092) logerror("%s: read PC3092 = 0x%02x\n", | |
| 82 | 81 | |
| 83 | 82 | return ret; |
| 84 | 83 | } |
| r14883 | r14884 | |
| 296 | 295 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Name Reset") |
| 297 | 296 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 298 | 297 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) |
| 299 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(pc3092_r, NULL) | |
| 298 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, crbaloon_state,pc3092_r, NULL) | |
| 300 | 299 | |
| 301 | 300 | PORT_START("PC3092") |
| 302 | 301 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| r14883 | r14884 | |
|---|---|---|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | |
| 84 | ||
| 84 | ||
| 85 | 85 | { |
| 86 | vicdual_state *state = field.machine().driver_data<vicdual_state>(); | |
| 87 | return state->m_coin_status; | |
| 86 | return m_coin_status; | |
| 88 | 87 | } |
| 89 | 88 | |
| 90 | 89 | |
| r14883 | r14884 | |
| 135 | 134 | } |
| 136 | 135 | |
| 137 | 136 | |
| 138 | ||
| 137 | ||
| 139 | 138 | { |
| 140 | return (get_vcounter( | |
| 139 | return (get_vcounter( | |
| 141 | 140 | } |
| 142 | 141 | |
| 143 | 142 | |
| 144 | ||
| 143 | ||
| 145 | 144 | { |
| 146 | return (get_vcounter( | |
| 145 | return (get_vcounter( | |
| 147 | 146 | } |
| 148 | 147 | |
| 149 | 148 | |
| 150 | ||
| 149 | ||
| 151 | 150 | { |
| 152 | return (vicdual_get_vblank_comp( | |
| 151 | return (vicdual_get_vblank_comp( | |
| 153 | 152 | } |
| 154 | 153 | |
| 155 | 154 | |
| 156 | ||
| 155 | ||
| 157 | 156 | { |
| 158 | 157 | /* return the state of the timer (old code claims "4MHz square wave", but it was toggled once every 2msec, or 500Hz) */ |
| 159 | return | |
| 158 | return | |
| 160 | 159 | } |
| 161 | 160 | |
| 162 | 161 | |
| r14883 | r14884 | |
| 279 | 278 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 280 | 279 | |
| 281 | 280 | PORT_START("IN1") |
| 282 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) | |
| 281 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_64v, NULL) | |
| 283 | 282 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 284 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 283 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 285 | 284 | |
| 286 | 285 | PORT_COIN |
| 287 | 286 | INPUT_PORTS_END |
| r14883 | r14884 | |
| 361 | 360 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 362 | 361 | |
| 363 | 362 | PORT_START("IN1") |
| 364 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) | |
| 363 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_64v, NULL) | |
| 365 | 364 | PORT_BIT( 0x0e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 366 | 365 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) |
| 367 | 366 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) |
| r14883 | r14884 | |
| 369 | 368 | PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) ) |
| 370 | 369 | PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) |
| 371 | 370 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 372 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 371 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 373 | 372 | |
| 374 | 373 | PORT_COIN |
| 375 | 374 | INPUT_PORTS_END |
| r14883 | r14884 | |
| 451 | 450 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 452 | 451 | |
| 453 | 452 | PORT_START("IN1") |
| 454 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) | |
| 453 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_64v, NULL) | |
| 455 | 454 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 456 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 455 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 457 | 456 | |
| 458 | 457 | PORT_COIN |
| 459 | 458 | |
| r14883 | r14884 | |
| 579 | 578 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY |
| 580 | 579 | |
| 581 | 580 | PORT_START("IN1") |
| 582 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) | |
| 581 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_64v, NULL) | |
| 583 | 582 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 584 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 583 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 585 | 584 | |
| 586 | 585 | PORT_CABINET_COLOR_OR_BW |
| 587 | 586 | |
| r14883 | r14884 | |
| 609 | 608 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 610 | 609 | |
| 611 | 610 | PORT_START("IN1") |
| 612 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 611 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 613 | 612 | PORT_DIPNAME( 0x04, 0x04, "Rom Test" ) |
| 614 | 613 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 615 | 614 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 616 | 615 | PORT_BIT( 0x7a, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 617 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 616 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 618 | 617 | |
| 619 | 618 | PORT_CABINET_COLOR_OR_BW |
| 620 | 619 | |
| r14883 | r14884 | |
| 656 | 655 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 657 | 656 | |
| 658 | 657 | PORT_START("IN2") |
| 659 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 658 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 660 | 659 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 661 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 660 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 662 | 661 | |
| 663 | 662 | PORT_CABINET_COLOR_OR_BW |
| 664 | 663 | |
| r14883 | r14884 | |
| 803 | 802 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 804 | 803 | |
| 805 | 804 | PORT_START("IN2") |
| 806 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 805 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 807 | 806 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) |
| 808 | 807 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 809 | 808 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 810 | 809 | PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 811 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 810 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 812 | 811 | |
| 813 | 812 | PORT_COIN |
| 814 | 813 | INPUT_PORTS_END |
| r14883 | r14884 | |
| 836 | 835 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused */ |
| 837 | 836 | |
| 838 | 837 | PORT_START("IN2") |
| 839 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 838 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 840 | 839 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) |
| 841 | 840 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 842 | 841 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 843 | 842 | PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 844 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 843 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 845 | 844 | |
| 846 | 845 | PORT_COIN |
| 847 | 846 | INPUT_PORTS_END |
| r14883 | r14884 | |
| 878 | 877 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 879 | 878 | |
| 880 | 879 | PORT_START("IN2") |
| 881 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 880 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 882 | 881 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 883 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 882 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 884 | 883 | |
| 885 | 884 | PORT_COIN |
| 886 | 885 | INPUT_PORTS_END |
| r14883 | r14884 | |
| 1203 | 1202 | PORT_DIPNAME( 0x04, 0x00, "Head On Lives (2/2)" ) |
| 1204 | 1203 | PORT_DIPSETTING( 0x04, "+0" ) |
| 1205 | 1204 | PORT_DIPSETTING( 0x00, "+1" ) |
| 1206 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1205 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1207 | 1206 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1208 | 1207 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1209 | 1208 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1214 | 1213 | PORT_DIPNAME( 0x04, 0x00, "Invinco Lives" ) |
| 1215 | 1214 | PORT_DIPSETTING( 0x00, "5" ) |
| 1216 | 1215 | PORT_DIPSETTING( 0x04, "6" ) |
| 1217 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1216 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1218 | 1217 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1219 | 1218 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1220 | 1219 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) /* probably unused */ |
| r14883 | r14884 | |
| 1228 | 1227 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1229 | 1228 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1230 | 1229 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1231 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1230 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1232 | 1231 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE |
| 1233 | 1232 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1234 | 1233 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1257 | 1256 | PORT_DIPNAME( 0x04, 0x00, "Invinco Lives (2/2)" ) |
| 1258 | 1257 | PORT_DIPSETTING( 0x00, "+0" ) |
| 1259 | 1258 | PORT_DIPSETTING( 0x04, "+2" ) |
| 1260 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1259 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1261 | 1260 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 1262 | 1261 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 1263 | 1262 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1268 | 1267 | PORT_DIPNAME( 0x04, 0x00, "Deep Scan Lives (1/2)" ) |
| 1269 | 1268 | PORT_DIPSETTING( 0x00, "+0" ) |
| 1270 | 1269 | PORT_DIPSETTING( 0x04, "+1" ) |
| 1271 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1270 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1272 | 1271 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1273 | 1272 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1274 | 1273 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1280 | 1279 | PORT_DIPNAME( 0x04, 0x00, "Deep Scan Lives (2/2)" ) |
| 1281 | 1280 | PORT_DIPSETTING( 0x04, "+0" ) |
| 1282 | 1281 | PORT_DIPSETTING( 0x00, "+2" ) |
| 1283 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1282 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1284 | 1283 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Game Select") PORT_TOGGLE |
| 1285 | 1284 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1286 | 1285 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1309 | 1308 | PORT_DIPNAME( 0x04, 0x00, "S.A. Lives (2/2)" ) |
| 1310 | 1309 | PORT_DIPSETTING( 0x00, "+0" ) |
| 1311 | 1310 | PORT_DIPSETTING( 0x04, "+2" ) |
| 1312 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1311 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1313 | 1312 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1314 | 1313 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1315 | 1314 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1320 | 1319 | PORT_DIPNAME( 0x04, 0x00, "S.A. Bonus Life" ) |
| 1321 | 1320 | PORT_DIPSETTING( 0x00, "10000" ) |
| 1322 | 1321 | PORT_DIPSETTING( 0x04, "15000" ) |
| 1323 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1322 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1324 | 1323 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1325 | 1324 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1326 | 1325 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1331 | 1330 | PORT_DIPNAME( 0x04, 0x00, "S.A. Bonus Life For Final UFO" ) |
| 1332 | 1331 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1333 | 1332 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1334 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1333 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1335 | 1334 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE |
| 1336 | 1335 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1337 | 1336 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1360 | 1359 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) |
| 1361 | 1360 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1362 | 1361 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1363 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_vblank_comp, NULL) | |
| 1362 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_vblank_comp, NULL) | |
| 1364 | 1363 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1365 | 1364 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1366 | 1365 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1371 | 1370 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) |
| 1372 | 1371 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1373 | 1372 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1374 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1373 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1375 | 1374 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1376 | 1375 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1377 | 1376 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1382 | 1381 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) |
| 1383 | 1382 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1384 | 1383 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1385 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1384 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1386 | 1385 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1387 | 1386 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1388 | 1387 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1411 | 1410 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) /* unknown, but used */ |
| 1412 | 1411 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1413 | 1412 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1414 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1413 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1415 | 1414 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 1416 | 1415 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 1417 | 1416 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1422 | 1421 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) ) |
| 1423 | 1422 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1424 | 1423 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 1425 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1424 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1426 | 1425 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1427 | 1426 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1428 | 1427 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1433 | 1432 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1434 | 1433 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1435 | 1434 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1436 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1435 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1437 | 1436 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1438 | 1437 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1439 | 1438 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1462 | 1461 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) /* unknown, but used */ |
| 1463 | 1462 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1464 | 1463 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1465 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1464 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1466 | 1465 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 1467 | 1466 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 1468 | 1467 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1473 | 1472 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) ) |
| 1474 | 1473 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1475 | 1474 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 1476 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1475 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1477 | 1476 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1478 | 1477 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1479 | 1478 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1484 | 1483 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1485 | 1484 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1486 | 1485 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1487 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1486 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1488 | 1487 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1489 | 1488 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1490 | 1489 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1515 | 1514 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1516 | 1515 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1517 | 1516 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1518 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1517 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1519 | 1518 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 1520 | 1519 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 1521 | 1520 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1526 | 1525 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1527 | 1526 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1528 | 1527 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1529 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1528 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1530 | 1529 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1531 | 1530 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1532 | 1531 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1537 | 1536 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1538 | 1537 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1539 | 1538 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1540 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1539 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1541 | 1540 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1542 | 1541 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1543 | 1542 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1563 | 1562 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY |
| 1564 | 1563 | |
| 1565 | 1564 | PORT_START("IN1") |
| 1566 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) | |
| 1565 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_64v, NULL) | |
| 1567 | 1566 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1568 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1567 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1569 | 1568 | |
| 1570 | 1569 | PORT_CABINET_COLOR_OR_BW |
| 1571 | 1570 | |
| r14883 | r14884 | |
| 1595 | 1594 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1596 | 1595 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1597 | 1596 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1598 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1597 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1599 | 1598 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY |
| 1600 | 1599 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| 1601 | 1600 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1606 | 1605 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1607 | 1606 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1608 | 1607 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1609 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1608 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1610 | 1609 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1611 | 1610 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1612 | 1611 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1617 | 1616 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1618 | 1617 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1619 | 1618 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1620 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1619 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1621 | 1620 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1622 | 1621 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1623 | 1622 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1626 | 1625 | INPUT_PORTS_END |
| 1627 | 1626 | |
| 1628 | 1627 | /* brdrline lives DIPs are spread across two input ports */ |
| 1629 | ||
| 1628 | ||
| 1630 | 1629 | { |
| 1631 | 1630 | int bit_mask = (FPTR)param; |
| 1632 | return (input_port_read( | |
| 1631 | return (input_port_read( | |
| 1633 | 1632 | } |
| 1634 | 1633 | |
| 1635 | 1634 | static INPUT_PORTS_START( brdrline ) |
| r14883 | r14884 | |
| 1654 | 1653 | PORT_START("IN1") |
| 1655 | 1654 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1656 | 1655 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1657 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(brdrline_lives, (void *)0x01) | |
| 1658 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_vblank_comp, NULL) | |
| 1656 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,brdrline_lives, (void *)0x01) | |
| 1657 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_vblank_comp, NULL) | |
| 1659 | 1658 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1660 | 1659 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1661 | 1660 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1663 | 1662 | PORT_START("IN2") |
| 1664 | 1663 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL |
| 1665 | 1664 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1666 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(brdrline_lives, (void *)0x02) | |
| 1667 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) /* yes, this is different */ | |
| 1665 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,brdrline_lives, (void *)0x02) | |
| 1666 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_64v, NULL) /* yes, this is different */ | |
| 1668 | 1667 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1669 | 1668 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1670 | 1669 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1675 | 1674 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1676 | 1675 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1677 | 1676 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1678 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1677 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1679 | 1678 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1680 | 1679 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1681 | 1680 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1711 | 1710 | PORT_START("IN1") |
| 1712 | 1711 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| 1713 | 1712 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1714 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(brdrline_lives, (void *)0x01) | |
| 1715 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_vblank_comp, NULL) | |
| 1713 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,brdrline_lives, (void *)0x01) | |
| 1714 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_vblank_comp, NULL) | |
| 1716 | 1715 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 1717 | 1716 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY |
| 1718 | 1717 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1720 | 1719 | PORT_START("IN2") |
| 1721 | 1720 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1722 | 1721 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1723 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(brdrline_lives, (void *)0x02) | |
| 1724 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) /* yes, this is different */ | |
| 1722 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,brdrline_lives, (void *)0x02) | |
| 1723 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_64v, NULL) /* yes, this is different */ | |
| 1725 | 1724 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1726 | 1725 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1727 | 1726 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1732 | 1731 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1733 | 1732 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1734 | 1733 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1735 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1734 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1736 | 1735 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1737 | 1736 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1738 | 1737 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1766 | 1765 | PORT_DIPNAME( 0x04, 0x04, "Lives (2/2)" ) |
| 1767 | 1766 | PORT_DIPSETTING( 0x04, "+0" ) |
| 1768 | 1767 | PORT_DIPSETTING( 0x00, "+1" ) |
| 1769 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1768 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1770 | 1769 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1771 | 1770 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1772 | 1771 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1777 | 1776 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1778 | 1777 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1779 | 1778 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1780 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1779 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1781 | 1780 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1782 | 1781 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1783 | 1782 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1788 | 1787 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 1789 | 1788 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1790 | 1789 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1791 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1790 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1792 | 1791 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1793 | 1792 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1794 | 1793 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1817 | 1816 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) /* bonus life? */ |
| 1818 | 1817 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1819 | 1818 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1820 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1819 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1821 | 1820 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1822 | 1821 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 1823 | 1822 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1828 | 1827 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) /* bonus life? */ |
| 1829 | 1828 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1830 | 1829 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1831 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1830 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1832 | 1831 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 1833 | 1832 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* has to be 0, protection? */ |
| 1834 | 1833 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) /* probably unused */ |
| r14883 | r14884 | |
| 1839 | 1838 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) |
| 1840 | 1839 | PORT_DIPSETTING( 0x00, "3" ) |
| 1841 | 1840 | PORT_DIPSETTING( 0x04, "5" ) |
| 1842 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1841 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1843 | 1842 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1844 | 1843 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 1845 | 1844 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1868 | 1867 | PORT_DIPNAME( 0x04, 0x00, "Alpha Fighter Lives (2/2)" ) |
| 1869 | 1868 | PORT_DIPSETTING( 0x00, "+0" ) |
| 1870 | 1869 | PORT_DIPSETTING( 0x04, "+2" ) |
| 1871 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 1870 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 1872 | 1871 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 1873 | 1872 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 1874 | 1873 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| r14883 | r14884 | |
| 1877 | 1876 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL |
| 1878 | 1877 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1879 | 1878 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 1880 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 1879 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 1881 | 1880 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1882 | 1881 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1883 | 1882 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| r14883 | r14884 | |
| 1888 | 1887 | PORT_DIPNAME( 0x04, 0x00, "Alpha Fighter Unknown" ) // related to soccer frequency (code at 0x4950) |
| 1889 | 1888 | PORT_DIPSETTING( 0x00, DEF_STR ( Off ) ) |
| 1890 | 1889 | PORT_DIPSETTING( 0x04, DEF_STR ( On ) ) |
| 1891 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 1890 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 1892 | 1891 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE |
| 1893 | 1892 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1894 | 1893 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| r14883 | r14884 | |
| 2047 | 2046 | } |
| 2048 | 2047 | |
| 2049 | 2048 | |
| 2050 | ||
| 2049 | ||
| 2051 | 2050 | { |
| 2052 | vicdual_state *state = field.machine().driver_data<vicdual_state>(); | |
| 2053 | 2051 | int offset = (FPTR)param; |
| 2054 | 2052 | UINT32 answer = 0; |
| 2055 | 2053 | |
| 2056 | if ( | |
| 2054 | if ( | |
| 2057 | 2055 | answer = 0x02; |
| 2058 | else if ( | |
| 2056 | else if ( | |
| 2059 | 2057 | answer = 0x0c; |
| 2060 | 2058 | |
| 2061 | 2059 | return (answer >> offset) & 0x01; |
| r14883 | r14884 | |
| 2109 | 2107 | |
| 2110 | 2108 | PORT_START("IN1") |
| 2111 | 2109 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 2112 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(samurai_protection_r, (void *)1) | |
| 2110 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,samurai_protection_r, (void *)1) | |
| 2113 | 2111 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) /* unknown, but used */ |
| 2114 | 2112 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2115 | 2113 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2116 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 2114 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 2117 | 2115 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 2118 | 2116 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 2119 | 2117 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2120 | 2118 | |
| 2121 | 2119 | PORT_START("IN2") |
| 2122 | 2120 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 2123 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(samurai_protection_r, (void *)2) | |
| 2121 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,samurai_protection_r, (void *)2) | |
| 2124 | 2122 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 2125 | 2123 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2126 | 2124 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2127 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_timer_value, NULL) | |
| 2125 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_timer_value, NULL) | |
| 2128 | 2126 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 2129 | 2127 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 2130 | 2128 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2131 | 2129 | |
| 2132 | 2130 | PORT_START("IN3") |
| 2133 | 2131 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 2134 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(samurai_protection_r, (void *)3) | |
| 2132 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,samurai_protection_r, (void *)3) | |
| 2135 | 2133 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) |
| 2136 | 2134 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 2137 | 2135 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2138 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 2136 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 2139 | 2137 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 2140 | 2138 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 2141 | 2139 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 2214 | 2212 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 2215 | 2213 | |
| 2216 | 2214 | PORT_START("IN1") |
| 2217 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 2215 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 2218 | 2216 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| 2219 | 2217 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 2220 | 2218 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r14883 | r14884 | |
| 2233 | 2231 | PORT_DIPNAME(0x40, 0x40, DEF_STR( Unknown ) ) |
| 2234 | 2232 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 2235 | 2233 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2236 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 2234 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 2237 | 2235 | |
| 2238 | 2236 | PORT_COIN |
| 2239 | 2237 | INPUT_PORTS_END |
| r14883 | r14884 | |
| 2330 | 2328 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 2331 | 2329 | |
| 2332 | 2330 | PORT_START("IN2") |
| 2333 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_composite_blank_comp, NULL) | |
| 2331 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_get_composite_blank_comp, NULL) | |
| 2334 | 2332 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 2335 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL) | |
| 2333 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,vicdual_read_coin_status, NULL) | |
| 2336 | 2334 | |
| 2337 | 2335 | PORT_COIN |
| 2338 | 2336 | INPUT_PORTS_END |
| r14883 | r14884 | |
|---|---|---|
| 339 | 339 | } |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | ||
| 342 | ||
| 343 | 343 | { |
| 344 | welltris_state *state = field.machine().driver_data<welltris_state>(); | |
| 345 | return state->m_pending_command ? 1 : 0; | |
| 344 | return m_pending_command ? 1 : 0; | |
| 346 | 345 | } |
| 347 | 346 | |
| 348 | 347 | WRITE8_MEMBER(welltris_state::pending_command_clear_w) |
| r14883 | r14884 | |
| 399 | 398 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Test (used to go through tests in service mode) */ |
| 400 | 399 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) /* Tested at start of irq 1 */ |
| 401 | 400 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service (adds a coin) */ |
| 402 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(pending_sound_r, NULL) /* pending sound command */ | |
| 401 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, welltris_state,pending_sound_r, NULL) /* pending sound command */ | |
| 403 | 402 | |
| 404 | 403 | PORT_START("P1") |
| 405 | 404 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r14883 | r14884 | |
|---|---|---|
| 381 | 381 | return (m_busy_sndcpu ? 0x00 : 0x01); |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | ||
| 384 | ||
| 385 | 385 | { |
| 386 | metro_state *state = field.machine().driver_data<metro_state>(); | |
| 387 | return (state->m_busy_sndcpu ? 0x01 : 0x00); | |
| 386 | return (m_busy_sndcpu ? 0x01 : 0x00); | |
| 388 | 387 | } |
| 389 | 388 | |
| 390 | 389 | WRITE16_MEMBER(metro_state::metro_soundstatus_w) |
| r14883 | r14884 | |
| 1951 | 1950 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) \ |
| 1952 | 1951 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) \ |
| 1953 | 1952 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \ |
| 1954 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_soundstatus_r, NULL) /* From Sound CPU */ | |
| 1953 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, metro_state,custom_soundstatus_r, NULL) /* From Sound CPU */ | |
| 1955 | 1954 | |
| 1956 | 1955 | |
| 1957 | 1956 | #define COINAGE_SERVICE_LOC(DIPBANK) \ |
| r14883 | r14884 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | static VIDEO_START(gal3) |
| 164 | 164 | { |
| 165 | gal3_state *state = machine.driver_data<gal3_state>(); | |
| 166 | state->m_generic_paletteram_16.allocate(0x10000); | |
| 167 | ||
| 165 | 168 | namco_obj_init(machine, |
| 166 | 169 | 0, /* gfx bank */ |
| 167 | 170 | 0xf, /* reverse palette mapping */ |
| r14883 | r14884 | |
| 389 | 392 | /// AM_RANGE(0xf1480000, 0xf14807ff) AM_READWRITE_LEGACY(namcos21_depthcue_r,namcos21_depthcue_w) |
| 390 | 393 | AM_RANGE(0xf1700000, 0xf170ffff) AM_READWRITE_LEGACY(namco_obj32_r,namco_obj32_w) |
| 391 | 394 | AM_RANGE(0xf1720000, 0xf1720007) AM_READWRITE_LEGACY(namco_spritepos32_r,namco_spritepos32_w) |
| 392 | AM_RANGE(0xf1740000, 0xf175ffff) AM_READWRITE(paletteram32_r,paletteram32_w) | |
| 395 | AM_RANGE(0xf1740000, 0xf175ffff) AM_READWRITE(paletteram32_r,paletteram32_w) | |
| 393 | 396 | AM_RANGE(0xf1760000, 0xf1760003) AM_READWRITE(namcos21_video_enable_r,namcos21_video_enable_w) |
| 394 | 397 | |
| 395 | 398 | AM_RANGE(0xf2200000, 0xf220ffff) AM_RAM |
| r14883 | r14884 | |
|---|---|---|
| 28 | 28 | UINT8 *m_vram; |
| 29 | 29 | UINT8 *m_cram; |
| 30 | 30 | UINT8 m_hbeat; |
| 31 | DECLARE_CUSTOM_INPUT_MEMBER(rgum_heartbeat_r); | |
| 31 | 32 | }; |
| 32 | 33 | |
| 33 | 34 | |
| r14883 | r14884 | |
| 79 | 80 | ADDRESS_MAP_END |
| 80 | 81 | |
| 81 | 82 | |
| 82 | ||
| 83 | ||
| 83 | 84 | { |
| 84 | rgum_state *state = field.machine().driver_data<rgum_state>(); | |
| 85 | 85 | |
| 86 | | |
| 86 | | |
| 87 | 87 | |
| 88 | return | |
| 88 | return | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | |
| r14883 | r14884 | |
| 106 | 106 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 107 | 107 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 108 | 108 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 109 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(rgum_heartbeat_r, NULL) | |
| 109 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rgum_state,rgum_heartbeat_r, NULL) | |
| 110 | 110 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 111 | 111 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 112 | 112 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r14883 | r14884 | |
|---|---|---|
| 338 | 338 | ADDRESS_MAP_END |
| 339 | 339 | |
| 340 | 340 | |
| 341 | ||
| 341 | ||
| 342 | 342 | { |
| 343 | zaccaria_state *state = field.machine().driver_data<zaccaria_state>(); | |
| 344 | return (state->m_acs & 0x08) ? 1 : 0; | |
| 343 | return (m_acs & 0x08) ? 1 : 0; | |
| 345 | 344 | } |
| 346 | 345 | |
| 347 | 346 | static INPUT_PORTS_START( monymony ) |
| r14883 | r14884 | |
| 449 | 448 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 450 | 449 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 451 | 450 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 452 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(acs_r, NULL) /* "ACS" - from pin 13 of a PIA on the sound board */ | |
| 451 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaccaria_state,acs_r, NULL) /* "ACS" - from pin 13 of a PIA on the sound board */ | |
| 453 | 452 | /* other bits come from a protection device */ |
| 454 | 453 | INPUT_PORTS_END |
| 455 | 454 |
| r14883 | r14884 | |
|---|---|---|
| 106 | 106 | DECLARE_WRITE16_MEMBER(littlerb_vdp_w); |
| 107 | 107 | DECLARE_WRITE16_MEMBER(littlerb_l_sound_w); |
| 108 | 108 | DECLARE_WRITE16_MEMBER(littlerb_r_sound_w); |
| 109 | DECLARE_CUSTOM_INPUT_MEMBER(littlerb_frame_step_r); | |
| 109 | 110 | }; |
| 110 | 111 | |
| 111 | 112 | |
| r14883 | r14884 | |
| 130 | 131 | AM_RANGE(0x00800002 ,0x00800003) AM_DEVWRITE8("^ramdac", ramdac_device, pal_w, 0x00ff) |
| 131 | 132 | AM_RANGE(0x00800004 ,0x00800005) AM_DEVWRITE8("^ramdac", ramdac_device, mask_w, 0x00ff) |
| 132 | 133 | |
| 133 | AM_RANGE(0x1ff80804, 0x1ff80805) AM_READ(buffer_status_r) | |
| 134 | AM_RANGE(0x1ff80804, 0x1ff80805) AM_DEVREAD("^", littlerb_state, buffer_status_r) | |
| 134 | 135 | // most gfx end up here including the sprite list |
| 135 | AM_RANGE(0x1ff80000, 0x1fffffff) AM_RAM_WRITE(region4_w) AM_BASE(m_region4) | |
| 136 | AM_RANGE(0x1ff80000, 0x1fffffff) AM_RAM AM_DEVWRITE("^", littlerb_state, region4_w) AM_BASE(m_region4) | |
| 136 | 137 | ADDRESS_MAP_END |
| 137 | 138 | |
| 138 | 139 | static ADDRESS_MAP_START( ramdac_map, AS_0, 8, littlerb_state ) |
| r14883 | r14884 | |
| 349 | 350 | ADDRESS_MAP_END |
| 350 | 351 | |
| 351 | 352 | /* guess according to DASM code and checking the gameplay speed, could be different */ |
| 352 | ||
| 353 | ||
| 353 | 354 | { |
| 354 | UINT32 ret = | |
| 355 | UINT32 ret = | |
| 355 | 356 | |
| 356 | 357 | return (ret) & 7; |
| 357 | 358 | } |
| r14883 | r14884 | |
| 422 | 423 | PORT_DIPNAME( 0x1000, 0x1000, "???" ) |
| 423 | 424 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) |
| 424 | 425 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 425 | PORT_BIT( 0xe000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(littlerb_frame_step_r, NULL) | |
| 426 | PORT_BIT( 0xe000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, littlerb_state,littlerb_frame_step_r, NULL) | |
| 426 | 427 | |
| 427 | 428 | PORT_START("P2") /* 16bit */ |
| 428 | 429 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| r14883 | r14884 | |
|---|---|---|
| 167 | 167 | PORT_BIT( 0x00000008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 168 | 168 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 169 | 169 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 170 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(eolith_speedup_getvblank, NULL) | |
| 170 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, eolith_speedup_getvblank, NULL) | |
| 171 | 171 | PORT_BIT( 0x00003f80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 172 | 172 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 173 | 173 | PORT_SERVICE_NO_TOGGLE( 0x00008000, IP_ACTIVE_LOW ) |
| r14883 | r14884 | |
| 205 | 205 | PORT_BIT( 0x00000008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 206 | 206 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 207 | 207 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 208 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(eolith_speedup_getvblank, NULL) | |
| 208 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, eolith_speedup_getvblank, NULL) | |
| 209 | 209 | PORT_BIT( 0x00003f80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 210 | 210 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 211 | 211 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 388 | 388 | PORT_BIT( 0x00000008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 389 | 389 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 390 | 390 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 391 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(stealsee_speedup_getvblank, NULL) | |
| 391 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, stealsee_speedup_getvblank, NULL) | |
| 392 | 392 | PORT_BIT( 0x00003f80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 393 | 393 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 394 | 394 | PORT_SERVICE_NO_TOGGLE( 0x00008000, IP_ACTIVE_LOW ) |
| r14883 | r14884 | |
|---|---|---|
| 1367 | 1367 | PORT_BIT( 0xfe000000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1368 | 1368 | |
| 1369 | 1369 | PORT_START("SYSTEM") |
| 1370 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1371 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1370 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE0") | |
| 1371 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE0") | |
| 1372 | 1372 | |
| 1373 | 1373 | PORT_START("FAKE0") |
| 1374 | 1374 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 1425 | 1425 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 1426 | 1426 | |
| 1427 | 1427 | PORT_START("SYSTEM") |
| 1428 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1429 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1428 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE0") | |
| 1429 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE0") | |
| 1430 | 1430 | |
| 1431 | 1431 | PORT_START("FAKE0") |
| 1432 | 1432 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 1469 | 1469 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 1470 | 1470 | |
| 1471 | 1471 | PORT_START("SYSTEM") |
| 1472 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1473 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1472 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE0") | |
| 1473 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE0") | |
| 1474 | 1474 | |
| 1475 | 1475 | PORT_START("FAKE0") |
| 1476 | 1476 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 1519 | 1519 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 1520 | 1520 | |
| 1521 | 1521 | PORT_START("SYSTEM") |
| 1522 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1523 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE0") | |
| 1522 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE0") | |
| 1523 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE0") | |
| 1524 | 1524 | |
| 1525 | 1525 | PORT_START("FAKE0") |
| 1526 | 1526 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
|---|---|---|
| 306 | 306 | * |
| 307 | 307 | *************************************/ |
| 308 | 308 | |
| 309 | ||
| 309 | ||
| 310 | 310 | { |
| 311 | return ( | |
| 311 | return ( | |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | static INPUT_PORTS_START( asteroid ) |
| 315 | 315 | PORT_START("IN0") |
| 316 | 316 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 317 | 317 | /* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */ |
| 318 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 318 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, NULL) | |
| 319 | 319 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 320 | 320 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */ |
| 321 | 321 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */ |
| r14883 | r14884 | |
| 397 | 397 | /* Bit 0 is VG_HALT and Bit 2 is the 3 KHz source */ |
| 398 | 398 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 399 | 399 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 400 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 400 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, NULL) | |
| 401 | 401 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */ |
| 402 | 402 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */ |
| 403 | 403 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1) |
| r14883 | r14884 | |
| 437 | 437 | PORT_START("IN0") |
| 438 | 438 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* According to schematics */ |
| 439 | 439 | /* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */ |
| 440 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 440 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, NULL) | |
| 441 | 441 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 442 | 442 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */ |
| 443 | 443 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */ |
| r14883 | r14884 | |
| 525 | 525 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) |
| 526 | 526 | /* Of the rest, Bit 6 is the 3KHz source. 3,4 and 5 are unknown */ |
| 527 | 527 | PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 528 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 528 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, NULL) | |
| 529 | 529 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Diagnostic Step") PORT_CODE(KEYCODE_F1) |
| 530 | 530 | |
| 531 | 531 | PORT_START("IN1") |
| r14883 | r14884 | |
|---|---|---|
| 116 | 116 | DECLARE_READ16_MEMBER(dtfamily_speedup_r); |
| 117 | 117 | DECLARE_READ16_MEMBER(toyland_speedup_r); |
| 118 | 118 | DECLARE_READ16_MEMBER(boonggab_speedup_r); |
| 119 | DECLARE_CUSTOM_INPUT_MEMBER(boonggab_photo_sensors_r); | |
| 119 | 120 | }; |
| 120 | 121 | |
| 121 | 122 | static READ16_DEVICE_HANDLER( eeprom_r ) |
| r14883 | r14884 | |
| 641 | 642 | return 0; |
| 642 | 643 | } |
| 643 | 644 | |
| 644 | ||
| 645 | ||
| 645 | 646 | { |
| 646 | 647 | static const UINT16 photo_sensors_table[8] = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; |
| 647 | UINT8 res = input_port_read( | |
| 648 | UINT8 res = input_port_read( | |
| 648 | 649 | |
| 649 | 650 | switch(res) |
| 650 | 651 | { |
| r14883 | r14884 | |
| 790 | 791 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 1 |
| 791 | 792 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 2 |
| 792 | 793 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 3 |
| 793 | PORT_BIT( 0x3800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(boonggab_photo_sensors_r, NULL) // photo sensors 1, 2 and 3 | |
| 794 | PORT_BIT( 0x3800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vamphalf_state,boonggab_photo_sensors_r, NULL) // photo sensors 1, 2 and 3 | |
| 794 | 795 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 795 | 796 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 796 | 797 |
| r14883 | r14884 | |
|---|---|---|
| 15 | 15 | #include "emu.h" |
| 16 | 16 | #include "cpu/e132xs/e132xs.h" |
| 17 | 17 | #include "machine/at28c16.h" |
| 18 | #include "includes/eolith.h" | |
| 18 | 19 | #include "includes/eolithsp.h" |
| 19 | 20 | |
| 20 | 21 | |
| 21 | class vegaeo_state : public | |
| 22 | class vegaeo_state : public | |
| 22 | 23 | { |
| 23 | 24 | public: |
| 24 | 25 | vegaeo_state(const machine_config &mconfig, device_type type, const char *tag) |
| 25 | : | |
| 26 | : | |
| 26 | 27 | |
| 27 | 28 | UINT32 *m_vega_vram; |
| 28 | 29 | UINT8 m_vega_vbuffer; |
| r14883 | r14884 | |
| 117 | 118 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_START2 ) |
| 118 | 119 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 119 | 120 | PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW ) |
| 120 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(eolith_speedup_getvblank, NULL) | |
| 121 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vegaeo_state, eolith_speedup_getvblank, NULL) | |
| 121 | 122 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 122 | 123 | PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 123 | 124 |
| r14883 | r14884 | |
|---|---|---|
| 70 | 70 | return ret; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | ||
| 73 | ||
| 74 | 74 | { |
| 75 | fromanc2_state *state = field.machine().driver_data<fromanc2_state>(); | |
| 76 | return state->m_subcpu_int_flag & 0x01; | |
| 75 | return m_subcpu_int_flag & 0x01; | |
| 77 | 76 | } |
| 78 | 77 | |
| 79 | ||
| 78 | ||
| 80 | 79 | { |
| 81 | fromanc2_state *state = field.machine().driver_data<fromanc2_state>(); | |
| 82 | return state->m_sndcpu_nmi_flag & 0x01; | |
| 80 | return m_sndcpu_nmi_flag & 0x01; | |
| 83 | 81 | } |
| 84 | 82 | |
| 85 | ||
| 83 | ||
| 86 | 84 | { |
| 87 | fromanc2_state *state = field.machine().driver_data<fromanc2_state>(); | |
| 88 | return state->m_subcpu_nmi_flag & 0x01; | |
| 85 | return m_subcpu_nmi_flag & 0x01; | |
| 89 | 86 | } |
| 90 | 87 | |
| 91 | 88 | WRITE16_MEMBER(fromanc2_state::fromanc2_eeprom_w) |
| r14883 | r14884 | |
| 314 | 311 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 315 | 312 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 316 | 313 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 317 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(subcpu_int_r, NULL) // SUBCPU INT FLAG | |
| 318 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sndcpu_nmi_r, NULL) // SNDCPU NMI FLAG | |
| 319 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(subcpu_nmi_r, NULL) // SUBCPU NMI FLAG | |
| 314 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_int_r, NULL) // SUBCPU INT FLAG | |
| 315 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, NULL) // SNDCPU NMI FLAG | |
| 316 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_nmi_r, NULL) // SUBCPU NMI FLAG | |
| 320 | 317 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 321 | 318 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (1P)" ) PORT_CODE(KEYCODE_F2) // TEST (1P) |
| 322 | 319 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (2P)" ) PORT_CODE(KEYCODE_F2) // TEST (2P) |
| r14883 | r14884 | |
| 425 | 422 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 426 | 423 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 427 | 424 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 428 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sndcpu_nmi_r, NULL) // SNDCPU NMI FLAG | |
| 425 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, NULL) // SNDCPU NMI FLAG | |
| 429 | 426 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 430 | 427 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 431 | 428 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 64 | 64 | |
| 65 | 65 | UINT8 coin_counter[2]; |
| 66 | 66 | DECLARE_WRITE16_MEMBER(arcadia_multibios_change_game); |
| 67 | DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r); | |
| 67 | 68 | }; |
| 68 | 69 | |
| 69 | 70 | |
| r14883 | r14884 | |
| 156 | 157 | * |
| 157 | 158 | *************************************/ |
| 158 | 159 | |
| 159 | ||
| 160 | ||
| 160 | 161 | { |
| 161 | 162 | int coin = (FPTR)param; |
| 162 | UINT8 *coin_counter = field.machine().driver_data<arcadia_amiga_state>()->coin_counter; | |
| 163 | 163 | |
| 164 | 164 | /* return coin counter values */ |
| 165 | 165 | return coin_counter[coin] & 3; |
| r14883 | r14884 | |
| 229 | 229 | PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) |
| 230 | 230 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 231 | 231 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) |
| 232 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(coin_counter_r, 0) | |
| 233 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(coin_counter_r, 1) | |
| 232 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_counter_r, 0) | |
| 233 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_counter_r, 1) | |
| 234 | 234 | |
| 235 | 235 | PORT_START("JOY0DAT") |
| 236 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P1JOY") | |
| 236 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, "P1JOY") | |
| 237 | 237 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 238 | 238 | |
| 239 | 239 | PORT_START("JOY1DAT") |
| 240 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P2JOY") | |
| 240 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, "P2JOY") | |
| 241 | 241 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 242 | 242 | |
| 243 | 243 | PORT_START("POTGO") |
| r14883 | r14884 | |
|---|---|---|
| 271 | 271 | cputag_set_input_line(machine(), "mcu", 0, ASSERT_LINE); |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | ||
| 274 | ||
| 275 | 275 | { |
| 276 | xain_state *state = field.machine().driver_data<xain_state>(); | |
| 277 | return state->m_vblank; | |
| 276 | return m_vblank; | |
| 278 | 277 | } |
| 279 | 278 | |
| 280 | 279 | |
| r14883 | r14884 | |
| 354 | 353 | m_ddr_c = data; |
| 355 | 354 | } |
| 356 | 355 | |
| 357 | ||
| 356 | ||
| 358 | 357 | { |
| 359 | xain_state *state = field.machine().driver_data<xain_state>(); | |
| 360 | 358 | UINT8 res = 0; |
| 361 | 359 | |
| 362 | if ( | |
| 360 | if ( | |
| 363 | 361 | { |
| 364 | if ( | |
| 362 | if ( | |
| 365 | 363 | res |= 0x01; |
| 366 | if ( | |
| 364 | if ( | |
| 367 | 365 | res |= 0x02; |
| 368 | 366 | } |
| 369 | 367 | else |
| r14883 | r14884 | |
| 516 | 514 | PORT_START("VBLANK") |
| 517 | 515 | PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 518 | 516 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 519 | PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(mcu_status_r, NULL) | |
| 520 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xain_vblank_r, NULL) /* VBLANK */ | |
| 517 | PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, xain_state,mcu_status_r, NULL) | |
| 518 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xain_state,xain_vblank_r, NULL) /* VBLANK */ | |
| 521 | 519 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 522 | 520 | INPUT_PORTS_END |
| 523 | 521 |
| r14883 | r14884 | |
|---|---|---|
| 350 | 350 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 351 | 351 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 352 | 352 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 353 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(azurian_port_r, (void *)0) /* "linked" with bit 2 of IN2 */ | |
| 353 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, azurian_port_r, (void *)0) /* "linked" with bit 2 of IN2 */ | |
| 354 | 354 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Lives ) ) |
| 355 | 355 | PORT_DIPSETTING( 0x00, "3" ) |
| 356 | 356 | PORT_DIPSETTING( 0x80, "5" ) |
| r14883 | r14884 | |
| 362 | 362 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Bonus_Life ) ) |
| 363 | 363 | PORT_DIPSETTING( 0x00, "5000" ) |
| 364 | 364 | PORT_DIPSETTING( 0x02, "7000" ) |
| 365 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(azurian_port_r, (void *)1) /* "linked" with bit 6 of IN1 */ | |
| 365 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, azurian_port_r, (void *)1) /* "linked" with bit 6 of IN1 */ | |
| 366 | 366 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) |
| 367 | 367 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 368 | 368 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) |
| r14883 | r14884 | |
| 889 | 889 | |
| 890 | 890 | static INPUT_PORTS_START( gmgalax ) |
| 891 | 891 | PORT_START("IN0") |
| 892 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(gmgalax_port_r, "GMIN0\0GLIN0") | |
| 892 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN0\0GLIN0") | |
| 893 | 893 | |
| 894 | 894 | PORT_START("IN1") |
| 895 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(gmgalax_port_r, "GMIN1\0GLIN1") | |
| 895 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN1\0GLIN1") | |
| 896 | 896 | |
| 897 | 897 | PORT_START("IN2") |
| 898 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(gmgalax_port_r, "GMIN2\0GLIN2") | |
| 898 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN2\0GLIN2") | |
| 899 | 899 | |
| 900 | 900 | PORT_START("GMIN0") /* Ghost Muncher - IN0 */ |
| 901 | 901 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CONDITION("GAMESEL",0x01,PORTCOND_NOTEQUALS,0x01) |
| r14883 | r14884 | |
| 1619 | 1619 | PORT_INCLUDE(galaxian) |
| 1620 | 1620 | |
| 1621 | 1621 | PORT_MODIFY("IN0") |
| 1622 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kingball_muxbit_r, NULL) | |
| 1622 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_muxbit_r, NULL) | |
| 1623 | 1623 | /* Relating to above port:Hack? - possibly multiplexed via writes to $b003 */ |
| 1624 | 1624 | //PORT_DIPNAME( 0x40, 0x40, "Speech" ) |
| 1625 | 1625 | //PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1626 | 1626 | //PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1627 | 1627 | |
| 1628 | 1628 | PORT_MODIFY("IN1") |
| 1629 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kingball_noise_r, NULL) /* NOISE line */ | |
| 1629 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_noise_r, NULL) /* NOISE line */ | |
| 1630 | 1630 | PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Coinage ) ) |
| 1631 | 1631 | PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) ) |
| 1632 | 1632 | PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) |
| r14883 | r14884 | |
| 2055 | 2055 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 2056 | 2056 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) |
| 2057 | 2057 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| 2058 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(scramble_protection_alt_r, (void *)0) /* protection bit */ | |
| 2058 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, scramble_protection_alt_r, (void *)0) /* protection bit */ | |
| 2059 | 2059 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 2060 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(scramble_protection_alt_r, (void *)1) /* protection bit */ | |
| 2060 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, scramble_protection_alt_r, (void *)1) /* protection bit */ | |
| 2061 | 2061 | |
| 2062 | 2062 | PORT_START("IN3") /* need for some PPI accesses */ |
| 2063 | 2063 | PORT_BIT( 0xff, 0x00, IPT_UNUSED ) |
| r14883 | r14884 | |
| 2481 | 2481 | INPUT_PORTS_END |
| 2482 | 2482 | |
| 2483 | 2483 | |
| 2484 | ||
| 2484 | ||
| 2485 | 2485 | { |
| 2486 | galaxian_state *state = field.machine().driver_data<galaxian_state>(); | |
| 2487 | 2486 | static const char *const dialname[2] = { "P1_DIAL", "P2_DIAL" }; |
| 2488 | int p = (~ | |
| 2487 | int p = (~ | |
| 2489 | 2488 | |
| 2490 | 2489 | // see http://www.cityofberwyn.com/schematics/stern/MoonWar_opto.tiff for schematic |
| 2491 | 2490 | // I.e. a 74ls161 counts from 0 to 15 which is the absolute number of bars passed on the quadrature |
| 2492 | 2491 | |
| 2493 | signed char dialread = input_port_read( | |
| 2492 | signed char dialread = input_port_read( | |
| 2494 | 2493 | |
| 2495 | 2494 | UINT8 ret; |
| 2496 | 2495 | |
| 2497 | if (dialread < 0) state->m_direction[p] = 0x00; | |
| 2498 | else if (dialread > 0) state->m_direction[p] = 0x10; | |
| 2496 | if (dialread < 0) m_direction[p] = 0x00; | |
| 2497 | else if (dialread > 0) m_direction[p] = 0x10; | |
| 2499 | 2498 | |
| 2500 | state->m_counter_74ls161[p] += abs(dialread); | |
| 2501 | state->m_counter_74ls161[p] &= 0xf; | |
| 2499 | m_counter_74ls161[p] += abs(dialread); | |
| 2500 | m_counter_74ls161[p] &= 0xf; | |
| 2502 | 2501 | |
| 2503 | ret = state->m_counter_74ls161[p] | state->m_direction[p]; | |
| 2504 | //fprintf(stderr, "dialread1: %02x, counter_74ls161: %02x, spinner ret is %02x\n", dialread, state->m_counter_74ls161[p], ret); | |
| 2502 | ret = m_counter_74ls161[p] | m_direction[p]; | |
| 2503 | //fprintf(stderr, "dialread1: %02x, counter_74ls161: %02x, spinner ret is %02x\n", dialread, m_counter_74ls161[p], ret); | |
| 2505 | 2504 | |
| 2506 | 2505 | return ret; |
| 2507 | 2506 | } |
| r14883 | r14884 | |
| 2509 | 2508 | /* verified from Z80 code */ |
| 2510 | 2509 | static INPUT_PORTS_START( moonwar ) |
| 2511 | 2510 | PORT_START("IN0") |
| 2512 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(moonwar_dial_r, (void *)0) | |
| 2511 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, moonwar_dial_r, (void *)0) | |
| 2513 | 2512 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // cocktail: p2 shield |
| 2514 | 2513 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2515 | 2514 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
|---|---|---|
| 86 | 86 | DECLARE_WRITE8_MEMBER(self_reset_w); |
| 87 | 87 | DECLARE_WRITE8_MEMBER(led_w); |
| 88 | 88 | DECLARE_WRITE8_MEMBER(firefox_coin_counter_w); |
| 89 | DECLARE_CUSTOM_INPUT_MEMBER(mainflag_r); | |
| 90 | DECLARE_CUSTOM_INPUT_MEMBER(soundflag_r); | |
| 89 | 91 | }; |
| 90 | 92 | |
| 91 | 93 | |
| r14883 | r14884 | |
| 282 | 284 | * |
| 283 | 285 | *************************************/ |
| 284 | 286 | |
| 285 | ||
| 287 | ||
| 286 | 288 | { |
| 287 | firefox_state *state = field.machine().driver_data<firefox_state>(); | |
| 288 | return state->m_main_to_sound_flag; | |
| 289 | return m_main_to_sound_flag; | |
| 289 | 290 | } |
| 290 | 291 | |
| 291 | ||
| 292 | ||
| 292 | 293 | { |
| 293 | firefox_state *state = field.machine().driver_data<firefox_state>(); | |
| 294 | return state->m_sound_to_main_flag; | |
| 294 | return m_sound_to_main_flag; | |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | READ8_MEMBER(firefox_state::sound_to_main_r) |
| r14883 | r14884 | |
| 573 | 573 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 574 | 574 | |
| 575 | 575 | PORT_START("rdin1") |
| 576 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mainflag_r, NULL) | |
| 577 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(soundflag_r, NULL) | |
| 576 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,mainflag_r, NULL) | |
| 577 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,soundflag_r, NULL) | |
| 578 | 578 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 579 | 579 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 580 | 580 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 593 | 593 | } |
| 594 | 594 | } |
| 595 | 595 | |
| 596 | ||
| 596 | ||
| 597 | 597 | { |
| 598 | renegade_state *state = field.machine().driver_data<renegade_state>(); | |
| 599 | 598 | UINT8 res = 0; |
| 600 | 599 | |
| 601 | if ( | |
| 600 | if ( | |
| 602 | 601 | { |
| 603 | 602 | res = 1; |
| 604 | 603 | } |
| 605 | 604 | else |
| 606 | 605 | { |
| 607 | if (! | |
| 606 | if (! | |
| 608 | 607 | res |= 0x01; |
| 609 | if (! | |
| 608 | if (! | |
| 610 | 609 | res |= 0x02; |
| 611 | 610 | } |
| 612 | 611 | |
| r14883 | r14884 | |
| 717 | 716 | |
| 718 | 717 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* attack right */ |
| 719 | 718 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* attack right */ |
| 720 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(mcu_status_r, NULL) | |
| 719 | PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, renegade_state,mcu_status_r, NULL) | |
| 721 | 720 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 722 | 721 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 723 | 722 |
| r14883 | r14884 | |
|---|---|---|
| 266 | 266 | WRITE8_MEMBER(junofrst_state::flip_screen_w) |
| 267 | 267 | { |
| 268 | 268 | |
| 269 | tutankhm_flip_screen_x_w(*&space, 0, data); | |
| 270 | tutankhm_flip_screen_y_w(*&space, 0, data); | |
| 269 | tutankhm_flip_screen_x_w(space, 0, data); | |
| 270 | tutankhm_flip_screen_y_w(space, 0, data); | |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 |
| r14883 | r14884 | |
|---|---|---|
| 369 | 369 | UINT16 m_madsel_lastpc; |
| 370 | 370 | DECLARE_WRITE8_MEMBER(missile_w); |
| 371 | 371 | DECLARE_READ8_MEMBER(missile_r); |
| 372 | DECLARE_CUSTOM_INPUT_MEMBER(get_vblank); | |
| 372 | 373 | }; |
| 373 | 374 | |
| 374 | 375 | |
| r14883 | r14884 | |
| 450 | 451 | } |
| 451 | 452 | |
| 452 | 453 | |
| 453 | ||
| 454 | ||
| 454 | 455 | { |
| 455 | missile_state *state = field.machine().driver_data<missile_state>(); | |
| 456 | int v = scanline_to_v(state, field.machine().primary_screen->vpos()); | |
| 456 | missile_state *state = machine().driver_data<missile_state>(); | |
| 457 | int v = scanline_to_v(state, machine().primary_screen->vpos()); | |
| 457 | 458 | return v < 24; |
| 458 | 459 | } |
| 459 | 460 | |
| r14883 | r14884 | |
| 857 | 858 | PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 858 | 859 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) |
| 859 | 860 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 860 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_vblank, NULL) | |
| 861 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, missile_state,get_vblank, NULL) | |
| 861 | 862 | |
| 862 | 863 | PORT_START("R10") /* IN2 */ |
| 863 | 864 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("R10:1,2") |
| r14883 | r14884 | |
| 939 | 940 | PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 940 | 941 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) |
| 941 | 942 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 942 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_vblank, NULL) | |
| 943 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, missile_state,get_vblank, NULL) | |
| 943 | 944 | |
| 944 | 945 | PORT_START("R10") /* IN2 */ |
| 945 | 946 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("R10:1,2") |
| r14883 | r14884 | |
|---|---|---|
| 78 | 78 | m_joinem_snd_bit = data & 1; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | ||
| 81 | ||
| 82 | 82 | { |
| 83 | jack_state *state = field.machine().driver_data<jack_state>(); | |
| 84 | 83 | UINT8 ret = 0; |
| 85 | 84 | |
| 86 | if ((input_port_read( | |
| 85 | if ((input_port_read( | |
| 87 | 86 | ret = 1; |
| 88 | 87 | |
| 89 | 88 | return ret; |
| r14883 | r14884 | |
| 574 | 573 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW2:!3" ) |
| 575 | 574 | PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW2:!4" ) |
| 576 | 575 | PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:!5" ) |
| 577 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sound_check_r, NULL) // sound check | |
| 576 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jack_state,sound_check_r, NULL) // sound check | |
| 578 | 577 | PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "SW2:!7" ) |
| 579 | 578 | PORT_DIPNAME( 0x80, 0x00, "Infinite Lives" ) PORT_DIPLOCATION("SW2:!8") |
| 580 | 579 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r14883 | r14884 | |
|---|---|---|
| 190 | 190 | state->m_input_port_4_f0 = data >> 4; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | ||
| 193 | ||
| 194 | 194 | { |
| 195 | taitosj_state *state = field.machine().driver_data<taitosj_state>(); | |
| 196 | return state->m_input_port_4_f0; | |
| 195 | return m_input_port_4_f0; | |
| 197 | 196 | } |
| 198 | 197 | |
| 199 | 198 | |
| r14883 | r14884 | |
| 279 | 278 | |
| 280 | 279 | /* seems the most logical way to do the gears */ |
| 281 | 280 | |
| 282 | ||
| 281 | ||
| 283 | 282 | { |
| 284 | taitosj_state *state = field.machine().driver_data<taitosj_state>(); | |
| 285 | 283 | const char *port_tag; |
| 286 | 284 | |
| 287 | 285 | int player = (int)(FPTR)param; |
| r14883 | r14884 | |
| 292 | 290 | port_tag = "GEARP2"; |
| 293 | 291 | |
| 294 | 292 | /* gear MUST be 1, 2 or 3 */ |
| 295 | if (input_port_read(field.machine(), port_tag) & 0x01) state->m_kikstart_gears[player] = 0x02; | |
| 296 | if (input_port_read(field.machine(), port_tag) & 0x02) state->m_kikstart_gears[player] = 0x03; | |
| 297 | if (input_port_read(field.machine(), port_tag) & 0x04) state->m_kikstart_gears[player] = 0x01; | |
| 293 | if (input_port_read(machine(), port_tag) & 0x01) m_kikstart_gears[player] = 0x02; | |
| 294 | if (input_port_read(machine(), port_tag) & 0x02) m_kikstart_gears[player] = 0x03; | |
| 295 | if (input_port_read(machine(), port_tag) & 0x04) m_kikstart_gears[player] = 0x01; | |
| 298 | 296 | |
| 299 | return | |
| 297 | return | |
| 300 | 298 | } |
| 301 | 299 | |
| 302 | 300 | |
| r14883 | r14884 | |
| 491 | 489 | |
| 492 | 490 | PORT_START("IN4") |
| 493 | 491 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 494 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 492 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 495 | 493 | |
| 496 | 494 | PORT_START("DSW1") |
| 497 | 495 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| r14883 | r14884 | |
| 573 | 571 | |
| 574 | 572 | PORT_START("IN4") |
| 575 | 573 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 576 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 574 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 577 | 575 | |
| 578 | 576 | PORT_START("DSW1") |
| 579 | 577 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| r14883 | r14884 | |
| 657 | 655 | |
| 658 | 656 | PORT_START("IN4") |
| 659 | 657 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 660 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 658 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 661 | 659 | |
| 662 | 660 | PORT_START("DSW1") |
| 663 | 661 | PORT_DIPNAME( 0x03, 0x03, "Finish Bonus" ) |
| r14883 | r14884 | |
| 779 | 777 | |
| 780 | 778 | PORT_START("IN4") |
| 781 | 779 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 782 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 780 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 783 | 781 | |
| 784 | 782 | PORT_START("DSW1") |
| 785 | 783 | PORT_DIPNAME( 0x03, 0x03, "Jump Bonus" ) |
| r14883 | r14884 | |
| 864 | 862 | |
| 865 | 863 | PORT_START("IN4") |
| 866 | 864 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 867 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 865 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 868 | 866 | |
| 869 | 867 | PORT_START("DSW1") |
| 870 | 868 | PORT_DIPNAME( 0x03, 0x03, "Jump Bonus" ) |
| r14883 | r14884 | |
| 942 | 940 | |
| 943 | 941 | PORT_START("IN4") |
| 944 | 942 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 945 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 943 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 946 | 944 | |
| 947 | 945 | PORT_START("DSW1") |
| 948 | 946 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| r14883 | r14884 | |
| 1142 | 1140 | |
| 1143 | 1141 | PORT_START("IN4") |
| 1144 | 1142 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1145 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 1143 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 1146 | 1144 | |
| 1147 | 1145 | PORT_START("DSW1") |
| 1148 | 1146 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) |
| r14883 | r14884 | |
| 1225 | 1223 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 1226 | 1224 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 1227 | 1225 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL |
| 1228 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 1226 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 1229 | 1227 | |
| 1230 | 1228 | PORT_START("DSW1") |
| 1231 | 1229 | PORT_DIPNAME( 0x03, 0x03, "Bonus Life?" ) |
| r14883 | r14884 | |
| 1308 | 1306 | |
| 1309 | 1307 | PORT_START("IN4") |
| 1310 | 1308 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1311 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 1309 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 1312 | 1310 | |
| 1313 | 1311 | PORT_START("DSW1") |
| 1314 | 1312 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| r14883 | r14884 | |
| 1397 | 1395 | |
| 1398 | 1396 | PORT_START("IN4") |
| 1399 | 1397 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1400 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 1398 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 1401 | 1399 | |
| 1402 | 1400 | PORT_START("DSW1") /* d50a */ |
| 1403 | 1401 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) |
| r14883 | r14884 | |
| 1464 | 1462 | |
| 1465 | 1463 | PORT_START("IN4") |
| 1466 | 1464 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1467 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 1465 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 1468 | 1466 | |
| 1469 | 1467 | PORT_START("DSW1") |
| 1470 | 1468 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| r14883 | r14884 | |
| 1532 | 1530 | |
| 1533 | 1531 | PORT_START("IN4") |
| 1534 | 1532 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1535 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(input_port_4_f0_r, NULL) // from sound CPU | |
| 1533 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, NULL) // from sound CPU | |
| 1536 | 1534 | |
| 1537 | 1535 | PORT_START("DSW1") |
| 1538 | 1536 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| r14883 | r14884 | |
| 1609 | 1607 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 1610 | 1608 | |
| 1611 | 1609 | PORT_START("IN3") /* Service */ |
| 1612 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kikstart_gear_r, (void *)0) | |
| 1610 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)0) | |
| 1613 | 1611 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1614 | 1612 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* needs to be 0, otherwise cannot shift */ |
| 1615 | 1613 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| r14883 | r14884 | |
| 1618 | 1616 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1619 | 1617 | |
| 1620 | 1618 | PORT_START("IN4") |
| 1621 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(kikstart_gear_r, (void *)1) | |
| 1619 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)1) | |
| 1622 | 1620 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1623 | 1621 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* needs to be 0, otherwise cannot shift */ |
| 1624 | 1622 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 319 | 319 | * |
| 320 | 320 | *************************************/ |
| 321 | 321 | |
| 322 | ||
| 322 | ||
| 323 | 323 | { |
| 324 | return (snk6502_music0_playing( | |
| 324 | return (snk6502_music0_playing( | |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | ||
| 327 | ||
| 328 | 328 | { |
| 329 | snk6502_state *state = field.machine().driver_data<snk6502_state>(); | |
| 330 | 329 | |
| 331 | return ( | |
| 330 | return ( | |
| 332 | 331 | } |
| 333 | 332 | |
| 334 | 333 | |
| r14883 | r14884 | |
| 518 | 517 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 519 | 518 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 520 | 519 | PORT_BIT( 0x7c, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 521 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk6502_music0_r, NULL) /* music0 playing */ | |
| 520 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,snk6502_music0_r, NULL) /* music0 playing */ | |
| 522 | 521 | |
| 523 | 522 | PORT_START("IN2") |
| 524 | 523 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED(coin_inserted, 0) |
| 525 | 524 | PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* NC */ |
| 526 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sasuke_count_r, NULL) /* connected to a binary counter */ | |
| 525 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,sasuke_count_r, NULL) /* connected to a binary counter */ | |
| 527 | 526 | |
| 528 | 527 | PORT_START("DSW") |
| 529 | 528 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!1") |
| r14883 | r14884 | |
| 583 | 582 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL /* fire left */ |
| 584 | 583 | |
| 585 | 584 | PORT_MODIFY("IN2") |
| 586 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk6502_music0_r, NULL) /* music0 playing */ | |
| 585 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,snk6502_music0_r, NULL) /* music0 playing */ | |
| 587 | 586 | INPUT_PORTS_END |
| 588 | 587 | |
| 589 | 588 | static INPUT_PORTS_START( fantasy ) |
| r14883 | r14884 | |
|---|---|---|
| 267 | 267 | * |
| 268 | 268 | *************************************/ |
| 269 | 269 | |
| 270 | ||
| 270 | ||
| 271 | 271 | { |
| 272 | exidy440_state *state = field.machine().driver_data<exidy440_state>(); | |
| 273 | return state->m_firq_beam; | |
| 272 | return m_firq_beam; | |
| 274 | 273 | } |
| 275 | 274 | |
| 276 | 275 | |
| 277 | ||
| 276 | ||
| 278 | 277 | { |
| 279 | exidy440_state *state = field.machine().driver_data<exidy440_state>(); | |
| 280 | return state->m_firq_vblank; | |
| 278 | return m_firq_vblank; | |
| 281 | 279 | } |
| 282 | 280 | |
| 283 | 281 | |
| 284 | ||
| 282 | ||
| 285 | 283 | { |
| 286 | 284 | /* button 1 shows up in two bits */ |
| 287 | UINT32 button1 = input_port_read( | |
| 285 | UINT32 button1 = input_port_read( | |
| 288 | 286 | return (button1 << 1) | button1; |
| 289 | 287 | } |
| 290 | 288 | |
| r14883 | r14884 | |
| 532 | 530 | PORT_DIPSETTING( 0x30, DEF_STR( Normal ) ) |
| 533 | 531 | PORT_DIPSETTING( 0x20, DEF_STR( Hard ) ) |
| 534 | 532 | PORT_DIPSETTING( 0x10, DEF_STR( Hardest ) ) |
| 535 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 536 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 533 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 534 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 537 | 535 | |
| 538 | 536 | PORT_START("IN1") /* audio board dips */ |
| 539 | 537 | COINAGE |
| r14883 | r14884 | |
| 573 | 571 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 574 | 572 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 575 | 573 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 576 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 577 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 574 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 575 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 578 | 576 | |
| 579 | 577 | PORT_START("IN1") /* audio board dips */ |
| 580 | 578 | COINAGE |
| r14883 | r14884 | |
| 614 | 612 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 615 | 613 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 616 | 614 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 617 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 618 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 615 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 616 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 619 | 617 | |
| 620 | 618 | PORT_START("IN1") /* audio board dips */ |
| 621 | 619 | COINAGE |
| r14883 | r14884 | |
| 655 | 653 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 656 | 654 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 657 | 655 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 658 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 659 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 656 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 657 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 660 | 658 | |
| 661 | 659 | PORT_START("IN1") /* audio board dips */ |
| 662 | 660 | COINAGE |
| r14883 | r14884 | |
| 698 | 696 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 699 | 697 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 700 | 698 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 701 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 702 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 699 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 700 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 703 | 701 | |
| 704 | 702 | PORT_START("IN1") /* audio board dips */ |
| 705 | 703 | COINAGE |
| r14883 | r14884 | |
| 736 | 734 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 737 | 735 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 738 | 736 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 739 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 740 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 737 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 738 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 741 | 739 | |
| 742 | 740 | PORT_START("IN1") /* audio board dips */ |
| 743 | 741 | COINAGE |
| r14883 | r14884 | |
| 778 | 776 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 779 | 777 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 780 | 778 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 781 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 782 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 779 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 780 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 783 | 781 | |
| 784 | 782 | PORT_START("IN1") /* audio board dips */ |
| 785 | 783 | COINAGE |
| r14883 | r14884 | |
| 817 | 815 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 818 | 816 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 819 | 817 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 820 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 821 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 818 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 819 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 822 | 820 | |
| 823 | 821 | PORT_START("IN1") /* audio board dips */ |
| 824 | 822 | COINAGE |
| r14883 | r14884 | |
| 854 | 852 | |
| 855 | 853 | static INPUT_PORTS_START( hitnmiss ) |
| 856 | 854 | PORT_START("IN0") /* player inputs and logic board dips */ |
| 857 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(hitnmiss_button1_r, NULL) | |
| 855 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,hitnmiss_button1_r, NULL) | |
| 858 | 856 | PORT_DIPNAME( 0x0c, 0x00, "Seconds" ) |
| 859 | 857 | PORT_DIPSETTING( 0x04, "20" ) |
| 860 | 858 | PORT_DIPSETTING( 0x00, "30" ) |
| r14883 | r14884 | |
| 865 | 863 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 866 | 864 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 867 | 865 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 868 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 869 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 866 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 867 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 870 | 868 | |
| 871 | 869 | PORT_START("IN1") /* audio board dips */ |
| 872 | 870 | COINAGE |
| r14883 | r14884 | |
| 898 | 896 | |
| 899 | 897 | static INPUT_PORTS_START( whodunit ) |
| 900 | 898 | PORT_START("IN0") /* player inputs and logic board dips */ |
| 901 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 899 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 902 | 900 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 903 | 901 | PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) ) |
| 904 | 902 | PORT_DIPSETTING( 0x04, "2" ) |
| r14883 | r14884 | |
| 910 | 908 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 911 | 909 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 912 | 910 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 913 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 914 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 911 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 912 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 915 | 913 | |
| 916 | 914 | PORT_START("IN1") /* audio board dips */ |
| 917 | 915 | COINAGE |
| r14883 | r14884 | |
| 949 | 947 | PORT_DIPSETTING( 0x00, DEF_STR( Normal ) ) |
| 950 | 948 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 951 | 949 | PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) ) |
| 952 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_beam_r, NULL) | |
| 953 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(firq_vblank_r, NULL) | |
| 950 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, NULL) | |
| 951 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, NULL) | |
| 954 | 952 | |
| 955 | 953 | PORT_START("IN1") /* audio board dips */ |
| 956 | 954 | COINAGE |
| r14883 | r14884 | |
|---|---|---|
| 65 | 65 | DECLARE_WRITE8_MEMBER(audio_command_w); |
| 66 | 66 | DECLARE_READ8_MEMBER(audio_answer_r); |
| 67 | 67 | DECLARE_WRITE8_MEMBER(audio_answer_w); |
| 68 | DECLARE_CUSTOM_INPUT_MEMBER(get_ttl74123_output); | |
| 68 | 69 | }; |
| 69 | 70 | |
| 70 | 71 | |
| r14883 | r14884 | |
| 230 | 231 | } |
| 231 | 232 | |
| 232 | 233 | |
| 233 | ||
| 234 | ||
| 234 | 235 | { |
| 235 | r2dtank_state *state = field.machine().driver_data<r2dtank_state>(); | |
| 236 | return state->m_ttl74123_output; | |
| 236 | return m_ttl74123_output; | |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | |
| r14883 | r14884 | |
| 453 | 453 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| 454 | 454 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 455 | 455 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 456 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_ttl74123_output, NULL) | |
| 456 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, r2dtank_state,get_ttl74123_output, NULL) | |
| 457 | 457 | |
| 458 | 458 | PORT_START("IN1") |
| 459 | 459 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL |
| r14883 | r14884 | |
|---|---|---|
| 718 | 718 | Wheels Runner |
| 719 | 719 | ***************************************************************************/ |
| 720 | 720 | |
| 721 | ||
| 721 | ||
| 722 | 722 | { |
| 723 | 723 | int player = (FPTR)param; |
| 724 | int delta = input_port_read( | |
| 724 | int delta = input_port_read( | |
| 725 | 725 | delta = (delta & 0x7f) - (delta & 0x80) + 4; |
| 726 | 726 | |
| 727 | 727 | if (delta > 7) delta = 7; |
| r14883 | r14884 | |
| 737 | 737 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 738 | 738 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 739 | 739 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 740 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(wheelrun_wheel_r, (void *)0) | |
| 740 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)0) | |
| 741 | 741 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 742 | 742 | |
| 743 | 743 | PORT_START("53001") /* 53001 */ |
| r14883 | r14884 | |
| 745 | 745 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 746 | 746 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 747 | 747 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 748 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(wheelrun_wheel_r, (void *)1) | |
| 748 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)1) | |
| 749 | 749 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 750 | 750 | |
| 751 | 751 | PORT_START("53002") /* 53002 */ |
| r14883 | r14884 | |
|---|---|---|
| 79 | 79 | DECLARE_WRITE16_MEMBER(galaxi_500000_w); |
| 80 | 80 | DECLARE_WRITE16_MEMBER(galaxi_500002_w); |
| 81 | 81 | DECLARE_WRITE16_MEMBER(galaxi_500004_w); |
| 82 | DECLARE_CUSTOM_INPUT_MEMBER(ticket_r); | |
| 83 | DECLARE_CUSTOM_INPUT_MEMBER(hopper_r); | |
| 82 | 84 | }; |
| 83 | 85 | |
| 84 | 86 | |
| r14883 | r14884 | |
| 259 | 261 | show_out(machine()); |
| 260 | 262 | } |
| 261 | 263 | |
| 262 | ||
| 264 | ||
| 263 | 265 | { |
| 264 | galaxi_state *state = field.machine().driver_data<galaxi_state>(); | |
| 265 | return state->m_ticket && !(field.machine().primary_screen->frame_number() % 10); | |
| 266 | return m_ticket && !(machine().primary_screen->frame_number() % 10); | |
| 266 | 267 | } |
| 267 | 268 | |
| 268 | ||
| 269 | ||
| 269 | 270 | { |
| 270 | galaxi_state *state = field.machine().driver_data<galaxi_state>(); | |
| 271 | return state->m_hopper && !(field.machine().primary_screen->frame_number() % 10); | |
| 271 | return m_hopper && !(machine().primary_screen->frame_number() % 10); | |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | |
| r14883 | r14884 | |
| 308 | 308 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_POKER_HOLD5 ) |
| 309 | 309 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 ) |
| 310 | 310 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT ) |
| 311 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM( hopper_r, (void *)0 ) // hopper sensor | |
| 311 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state,hopper_r, (void *)0 ) // hopper sensor | |
| 312 | 312 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a |
| 313 | 313 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token) |
| 314 | 314 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_COIN3 ) // pin 25LC |
| 315 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( ticket_r, (void *)0 ) // ticket sensor | |
| 315 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state,ticket_r, (void *)0 ) // ticket sensor | |
| 316 | 316 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // hopper out (pin 14LS) |
| 317 | 317 | PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test |
| 318 | 318 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // (pin 26LC) |
| r14883 | r14884 | |
| 328 | 328 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_POKER_HOLD5 ) |
| 329 | 329 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 ) |
| 330 | 330 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT ) |
| 331 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) | |
| 331 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) | |
| 332 | 332 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a |
| 333 | 333 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token) |
| 334 | 334 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper Refill") PORT_CODE(KEYCODE_H) |
| 335 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( ticket_r, (void *)0 ) // ticket sensor | |
| 335 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state,ticket_r, (void *)0 ) // ticket sensor | |
| 336 | 336 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL ) // hopper out (pin 14LS) |
| 337 | 337 | PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test |
| 338 | 338 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_GAMBLE_KEYOUT ) // (pin 26LC) |
| r14883 | r14884 | |
|---|---|---|
| 229 | 229 | return potgor; |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | ||
| 232 | ||
| 233 | 233 | { |
| 234 | cd32_state *state = field.machine().driver_data<cd32_state>(); | |
| 235 | return handle_joystick_potgor(field.machine(), state->m_potgo_value) >> 10; | |
| 234 | return handle_joystick_potgor(machine(), m_potgo_value) >> 10; | |
| 236 | 235 | } |
| 237 | 236 | |
| 238 | 237 | static INPUT_PORTS_START( cd32 ) |
| r14883 | r14884 | |
| 243 | 242 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 244 | 243 | |
| 245 | 244 | PORT_START("JOY0DAT") |
| 246 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P2JOY") | |
| 245 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,amiga_joystick_convert, "P2JOY") | |
| 247 | 246 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 248 | 247 | |
| 249 | 248 | PORT_START("JOY1DAT") |
| 250 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P1JOY") | |
| 249 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,amiga_joystick_convert, "P1JOY") | |
| 251 | 250 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 252 | 251 | |
| 253 | 252 | PORT_START("POTGO") |
| 254 | PORT_BIT( 0x4400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cubo_input, 0) | |
| 253 | PORT_BIT( 0x4400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state,cubo_input, 0) | |
| 255 | 254 | PORT_BIT( 0xbbff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 256 | 255 | |
| 257 | 256 | PORT_START("P1JOY") |
| r14883 | r14884 | |
|---|---|---|
| 132 | 132 | PORT_INCLUDE( micro3d ) |
| 133 | 133 | |
| 134 | 134 | PORT_MODIFY("INPUTS_A_B") |
| 135 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(botssa_hwchk_r, NULL) | |
| 135 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, micro3d_state,botssa_hwchk_r, NULL) | |
| 136 | 136 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 137 | 137 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Shield") |
| 138 | 138 | PORT_SERVICE( 0x0400, IP_ACTIVE_LOW ) |
| r14883 | r14884 | |
|---|---|---|
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | |
| 21 | ||
| 21 | ||
| 22 | 22 | { |
| 23 | ultratnk_state *state = field.machine().driver_data<ultratnk_state>(); | |
| 24 | return state->m_collision[(FPTR) param]; | |
| 23 | return m_collision[(FPTR) param]; | |
| 25 | 24 | } |
| 26 | 25 | |
| 27 | 26 | |
| 28 | ||
| 27 | ||
| 29 | 28 | { |
| 30 | ultratnk_state *state = field.machine().driver_data<ultratnk_state>(); | |
| 31 | UINT8 joy = input_port_read(field.machine(), (const char *)param) & 3; | |
| 29 | UINT8 joy = input_port_read(machine(), (const char *)param) & 3; | |
| 32 | 30 | |
| 33 | 31 | if (joy == 1) |
| 34 | 32 | { |
| 35 | return ( | |
| 33 | return ( | |
| 36 | 34 | } |
| 37 | 35 | if (joy == 2) |
| 38 | 36 | { |
| r14883 | r14884 | |
| 190 | 188 | |
| 191 | 189 | PORT_START("COLLISION") |
| 192 | 190 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 193 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_collision, (void *)0 ) | |
| 191 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)0 ) | |
| 194 | 192 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 195 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_collision, (void *)1 ) | |
| 193 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)1 ) | |
| 196 | 194 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* VCC */ |
| 197 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_collision, (void *)2 ) | |
| 195 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)2 ) | |
| 198 | 196 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) /* SLAM */ |
| 199 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_collision, (void *)3 ) | |
| 197 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)3 ) | |
| 200 | 198 | |
| 201 | 199 | PORT_START("COIN") |
| 202 | 200 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 229 | 227 | |
| 230 | 228 | PORT_START("ANALOG") |
| 231 | 229 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 232 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_joystick, "JOY-W" ) | |
| 230 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_joystick, "JOY-W" ) | |
| 233 | 231 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 234 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_joystick, "JOY-Y" ) | |
| 232 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_joystick, "JOY-Y" ) | |
| 235 | 233 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 236 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_joystick, "JOY-X" ) | |
| 234 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_joystick, "JOY-X" ) | |
| 237 | 235 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 238 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_joystick, "JOY-Z" ) | |
| 236 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_joystick, "JOY-Z" ) | |
| 239 | 237 | |
| 240 | 238 | PORT_START("JOY-W") |
| 241 | 239 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(1) |
| r14883 | r14884 | |
|---|---|---|
| 79 | 79 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 80 | 80 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) |
| 81 | 81 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 82 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(player_input_r, NULL) | |
| 82 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,player_input_r, NULL) | |
| 83 | 83 | |
| 84 | 84 | PORT_START("DSW0") |
| 85 | 85 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" ) |
| r14883 | r14884 | |
| 162 | 162 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) |
| 163 | 163 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) |
| 164 | 164 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 165 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(player_input_r, NULL) | |
| 165 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,player_input_r, NULL) | |
| 166 | 166 | |
| 167 | 167 | PORT_START("DSW0") |
| 168 | 168 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" ) |
| r14883 | r14884 | |
| 292 | 292 | PORT_INCLUDE( phoenix ) |
| 293 | 293 | |
| 294 | 294 | PORT_MODIFY("IN0") |
| 295 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(pleiads_protection_r, NULL) /* Protection. See 0x0552 */ | |
| 295 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,pleiads_protection_r, NULL) /* Protection. See 0x0552 */ | |
| 296 | 296 | |
| 297 | 297 | PORT_MODIFY("DSW0") |
| 298 | 298 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" ) |
| r14883 | r14884 | |
| 315 | 315 | PORT_INCLUDE( phoenix ) |
| 316 | 316 | |
| 317 | 317 | PORT_MODIFY("IN0") |
| 318 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(pleiads_protection_r, NULL) /* Protection. See 0x0552 */ | |
| 318 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,pleiads_protection_r, NULL) /* Protection. See 0x0552 */ | |
| 319 | 319 | |
| 320 | 320 | PORT_MODIFY("DSW0") |
| 321 | 321 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" ) |
| r14883 | r14884 | |
|---|---|---|
| 9005 | 9005 | PORT_DIPNAME( 0x0080, 0x0080, "Freeze" ) PORT_DIPLOCATION("SW:8") |
| 9006 | 9006 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 9007 | 9007 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 9008 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mahjong_controller_r, NULL) | |
| 9008 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,mahjong_controller_r, NULL) | |
| 9009 | 9009 | |
| 9010 | 9010 | STANDARD_IN1 |
| 9011 | 9011 | |
| r14883 | r14884 | |
| 9064 | 9064 | static INPUT_PORTS_START( irrmaze ) |
| 9065 | 9065 | PORT_START("IN0") |
| 9066 | 9066 | STANDARD_DIPS |
| 9067 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(multiplexed_controller_r, (void *)0) | |
| 9067 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)0) | |
| 9068 | 9068 | |
| 9069 | 9069 | PORT_START("IN1") |
| 9070 | 9070 | PORT_BIT( 0x0fff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 9079 | 9079 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 9080 | 9080 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 ) |
| 9081 | 9081 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 9082 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) | |
| 9082 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_memcard_status, NULL) | |
| 9083 | 9083 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 9084 | 9084 | |
| 9085 | 9085 | STANDARD_IN3 |
| r14883 | r14884 | |
| 9106 | 9106 | static INPUT_PORTS_START( popbounc ) |
| 9107 | 9107 | PORT_START("IN0") |
| 9108 | 9108 | STANDARD_DIPS |
| 9109 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(multiplexed_controller_r, (void *)0) | |
| 9109 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)0) | |
| 9110 | 9110 | |
| 9111 | 9111 | PORT_START("IN1") |
| 9112 | 9112 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 9113 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(multiplexed_controller_r, (void *)1) | |
| 9113 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)1) | |
| 9114 | 9114 | |
| 9115 | 9115 | STANDARD_IN2 |
| 9116 | 9116 | |
| r14883 | r14884 | |
| 9166 | 9166 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* this bit is used.. */ |
| 9167 | 9167 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 9168 | 9168 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* this bit is used.. */ |
| 9169 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) | |
| 9169 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_memcard_status, NULL) | |
| 9170 | 9170 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 9171 | 9171 | |
| 9172 | 9172 | PORT_START("IN3") |
| 9173 | 9173 | PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 9174 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_calendar_status, NULL) | |
| 9175 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_audio_result, NULL) | |
| 9174 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_calendar_status, NULL) | |
| 9175 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_audio_result, NULL) | |
| 9176 | 9176 | |
| 9177 | 9177 | STANDARD_IN4 |
| 9178 | 9178 | |
| r14883 | r14884 | |
| 9205 | 9205 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Next Game") PORT_CODE(KEYCODE_7) |
| 9206 | 9206 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* game freezes with this bit enabled */ |
| 9207 | 9207 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Previous Game") PORT_CODE(KEYCODE_8) |
| 9208 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) | |
| 9208 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_memcard_status, NULL) | |
| 9209 | 9209 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 9210 | 9210 | |
| 9211 | 9211 | STANDARD_IN3 |
| r14883 | r14884 | |
|---|---|---|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | CUSTOM_INPUT( | |
| 101 | CUSTOM_INPUT_MEMBER( | |
| 102 | 102 | { |
| 103 | 103 | |
| 104 | // printf("%s:eolith speedup_read data %02x\n", | |
| 104 | // printf("%s:eolith speedup_read data %02x\n", | |
| 105 | 105 | |
| 106 | 106 | |
| 107 | return ( | |
| 107 | return ( | |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | // StealSee doesn't use interrupts, just the vblank |
| 111 | CUSTOM_INPUT( | |
| 111 | CUSTOM_INPUT_MEMBER(eolith_state::stealsee_speedup_getvblank | |
| 112 | 112 | { |
| 113 | | |
| 113 | | |
| 114 | 114 | |
| 115 | int pc = cpu_get_pc(state->m_maincpu); | |
| 116 | ||
| 117 | 115 | if (pc==0x400081ec) |
| 118 | 116 | if(!eolith_vblank) |
| 119 | device_eat_cycles( | |
| 117 | device_eat_cycles( | |
| 120 | 118 | |
| 121 | return ( | |
| 119 | return ( | |
| 122 | 120 | } |
| r14883 | r14884 | |
|---|---|---|
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | |
| 380 | ||
| 380 | ||
| 381 | 381 | { |
| 382 | neogeo_state *state = field.machine().driver_data<neogeo_state>(); | |
| 383 | 382 | int port = (FPTR)param; |
| 384 | 383 | |
| 385 | 384 | static const char *const cntrl[2][2] = |
| r14883 | r14884 | |
| 387 | 386 | { "IN0-0", "IN0-1" }, { "IN1-0", "IN1-1" } |
| 388 | 387 | }; |
| 389 | 388 | |
| 390 | return input_port_read_safe( | |
| 389 | return input_port_read_safe( | |
| 391 | 390 | } |
| 392 | 391 | |
| 393 | 392 | #if 1 // this needs to be added dynamically somehow |
| 394 | ||
| 393 | ||
| 395 | 394 | { |
| 396 | neogeo_state *state = field.machine().driver_data<neogeo_state>(); | |
| 397 | 395 | UINT32 ret; |
| 398 | 396 | |
| 399 | 397 | /* |
| r14883 | r14884 | |
| 403 | 401 | cpu #0 (PC=00C18D6C): unmapped memory word write to 00380000 = 0009 & 00FF |
| 404 | 402 | cpu #0 (PC=00C18C40): unmapped memory word write to 00380000 = 0000 & 00FF |
| 405 | 403 | */ |
| 406 | switch ( | |
| 404 | switch ( | |
| 407 | 405 | { |
| 408 | 406 | default: |
| 409 | 407 | case 0x00: ret = 0x0000; break; /* nothing? */ |
| 410 | case 0x09: ret = input_port_read(field.machine(), "MAHJONG1"); break; | |
| 411 | case 0x12: ret = input_port_read(field.machine(), "MAHJONG2"); break; | |
| 412 | case 0x1b: ret = input_port_read(field.machine(), "MAHJONG3"); break; /* player 1 normal inputs? */ | |
| 413 | case 0x24: ret = input_port_read(field.machine(), "MAHJONG4"); break; | |
| 408 | case 0x09: ret = input_port_read(machine(), "MAHJONG1"); break; | |
| 409 | case 0x12: ret = input_port_read(machine(), "MAHJONG2"); break; | |
| 410 | case 0x1b: ret = input_port_read(machine(), "MAHJONG3"); break; /* player 1 normal inputs? */ | |
| 411 | case 0x24: ret = input_port_read(machine(), "MAHJONG4"); break; | |
| 414 | 412 | } |
| 415 | 413 | |
| 416 | 414 | return ret; |
| r14883 | r14884 | |
| 472 | 470 | * |
| 473 | 471 | *************************************/ |
| 474 | 472 | |
| 475 | ||
| 473 | ||
| 476 | 474 | { |
| 477 | neogeo_state *state = field.machine().driver_data<neogeo_state>(); | |
| 478 | return (upd4990a_databit_r(state->m_upd4990a, 0) << 1) | upd4990a_testbit_r(state->m_upd4990a, 0); | |
| 475 | return (upd4990a_databit_r(m_upd4990a, 0) << 1) | upd4990a_testbit_r(m_upd4990a, 0); | |
| 479 | 476 | } |
| 480 | 477 | |
| 481 | 478 | |
| r14883 | r14884 | |
| 511 | 508 | #define MEMCARD_SIZE 0x0800 |
| 512 | 509 | |
| 513 | 510 | |
| 514 | ||
| 511 | ||
| 515 | 512 | { |
| 516 | 513 | /* D0 and D1 are memcard presence indicators, D2 indicates memcard |
| 517 | 514 | write protect status (we are always write enabled) */ |
| 518 | return (memcard_present( | |
| 515 | return (memcard_present( | |
| 519 | 516 | } |
| 520 | 517 | |
| 521 | 518 | |
| r14883 | r14884 | |
| 608 | 605 | } |
| 609 | 606 | |
| 610 | 607 | |
| 611 | ||
| 608 | ||
| 612 | 609 | { |
| 613 | neogeo_state *state = field.machine().driver_data<neogeo_state>(); | |
| 614 | UINT32 ret = state->m_audio_result; | |
| 610 | UINT32 ret = m_audio_result; | |
| 615 | 611 | |
| 616 | // if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_result_r %02x\n", cpu_get_pc( | |
| 612 | // if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_result_r %02x\n", cpu_get_pc( | |
| 617 | 613 | |
| 618 | 614 | return ret; |
| 619 | 615 | } |
| r14883 | r14884 | |
| 1227 | 1223 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Next Game") PORT_CODE(KEYCODE_7) \ |
| 1228 | 1224 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 ) \ |
| 1229 | 1225 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Previous Game") PORT_CODE(KEYCODE_8) \ |
| 1230 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) \ | |
| 1226 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_memcard_status, NULL) \ | |
| 1231 | 1227 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* In AES 'mode' nitd, kof2000, sengoku3, matrim and mslug5 check if this is ACTIVE_HIGH */ |
| 1232 | 1228 | |
| 1233 | 1229 | |
| r14883 | r14884 | |
| 1239 | 1235 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* having this ACTIVE_HIGH causes you to start with 2 credits using USA bios roms; if ACTIVE_HIGH + IN4 bit 6 ACTIVE_HIGH = AES 'mode' */ \ |
| 1240 | 1236 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* having this ACTIVE_HIGH causes you to start with 2 credits using USA bios roms; if ACTIVE_HIGH + IN4 bit 6 ACTIVE_HIGH = AES 'mode' */ \ |
| 1241 | 1237 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) /* what is this? When ACTIVE_HIGH + IN4 bit 6 ACTIVE_LOW MVS-4 slot is detected */ \ |
| 1242 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_calendar_status, NULL) \ | |
| 1243 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_audio_result, NULL) | |
| 1238 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_calendar_status, NULL) \ | |
| 1239 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,get_audio_result, NULL) | |
| 1244 | 1240 | |
| 1245 | 1241 | |
| 1246 | 1242 | #define STANDARD_IN4 \ |
| r14883 | r14884 | |
|---|---|---|
| 94 | 94 | DECLARE_READ8_MEMBER(question_data_r); |
| 95 | 95 | DECLARE_READ8_MEMBER(laserdisc_io_r); |
| 96 | 96 | DECLARE_WRITE8_MEMBER(laserdisc_io_w); |
| 97 | DECLARE_CUSTOM_INPUT_MEMBER(latched_coin_r); | |
| 97 | 98 | }; |
| 98 | 99 | |
| 99 | 100 | |
| r14883 | r14884 | |
| 244 | 245 | * |
| 245 | 246 | *************************************/ |
| 246 | 247 | |
| 247 | ||
| 248 | ||
| 248 | 249 | { |
| 249 | statriv2_state *state = field.machine().driver_data<statriv2_state>(); | |
| 250 | return state->m_latched_coin; | |
| 250 | return m_latched_coin; | |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | |
| r14883 | r14884 | |
| 337 | 337 | PORT_START("IN1") |
| 338 | 338 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 339 | 339 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 340 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(latched_coin_r, "COIN") | |
| 340 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state,latched_coin_r, "COIN") | |
| 341 | 341 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 342 | 342 | PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coinage ) ) |
| 343 | 343 | PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) |
| r14883 | r14884 | |
| 370 | 370 | PORT_START("IN1") |
| 371 | 371 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_4) |
| 372 | 372 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Select Game") PORT_CODE(KEYCODE_S) |
| 373 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(latched_coin_r, "COIN") | |
| 373 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state,latched_coin_r, "COIN") | |
| 374 | 374 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 375 | 375 | PORT_DIPNAME( 0x10, 0x10, "DIP switch? 10" ) |
| 376 | 376 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r14883 | r14884 | |
| 445 | 445 | PORT_START("IN1") |
| 446 | 446 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Play 1000") |
| 447 | 447 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 448 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(latched_coin_r, "COIN") | |
| 448 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state,latched_coin_r, "COIN") | |
| 449 | 449 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 450 | 450 | PORT_SERVICE( 0x10, IP_ACTIVE_HIGH ) |
| 451 | 451 | PORT_DIPNAME( 0x20, 0x20, "Show Correct Answer" ) |
| r14883 | r14884 | |
|---|---|---|
| 203 | 203 | #define LADYBUG_P1_CONTROL_PORT_TAG ("CONTP1") |
| 204 | 204 | #define LADYBUG_P2_CONTROL_PORT_TAG ("CONTP2") |
| 205 | 205 | |
| 206 | ||
| 206 | ||
| 207 | 207 | { |
| 208 | return input_port_read( | |
| 208 | return input_port_read( | |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | ||
| 211 | ||
| 212 | 212 | { |
| 213 | 213 | UINT32 ret; |
| 214 | 214 | |
| 215 | 215 | /* upright cabinet only uses a single set of controls */ |
| 216 | if (input_port_read(field.machine(), "DSW0") & 0x20) | |
| 217 | ret = input_port_read(field.machine(), LADYBUG_P2_CONTROL_PORT_TAG); | |
| 216 | if (input_port_read(machine(), "DSW0") & 0x20) | |
| 217 | ret = input_port_read(machine(), LADYBUG_P2_CONTROL_PORT_TAG); | |
| 218 | 218 | else |
| 219 | ret = input_port_read( | |
| 219 | ret = input_port_read( | |
| 220 | 220 | |
| 221 | 221 | return ret; |
| 222 | 222 | } |
| r14883 | r14884 | |
| 224 | 224 | |
| 225 | 225 | static INPUT_PORTS_START( ladybug ) |
| 226 | 226 | PORT_START("IN0") |
| 227 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ladybug_p1_control_r, NULL) | |
| 227 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state,ladybug_p1_control_r, NULL) | |
| 228 | 228 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 229 | 229 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 230 | 230 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) |
| 231 | 231 | |
| 232 | 232 | PORT_START("IN1") |
| 233 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ladybug_p2_control_r, NULL) | |
| 233 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state,ladybug_p2_control_r, NULL) | |
| 234 | 234 | /* This should be connected to the 4V clock. I don't think the game uses it. */ |
| 235 | 235 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 236 | 236 | /* Note that there are TWO VBlank inputs, one is active low, the other active */ |
| r14883 | r14884 | |
|---|---|---|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | |
| 67 | ||
| 67 | ||
| 68 | 68 | { |
| 69 | starshp1_state *state = field.machine().driver_data<starshp1_state>(); | |
| 70 | 69 | int val = 0; |
| 71 | 70 | |
| 72 | switch ( | |
| 71 | switch ( | |
| 73 | 72 | { |
| 74 | 73 | case 0: |
| 75 | val = input_port_read( | |
| 74 | val = input_port_read( | |
| 76 | 75 | break; |
| 77 | 76 | case 1: |
| 78 | val = input_port_read( | |
| 77 | val = input_port_read( | |
| 79 | 78 | break; |
| 80 | 79 | case 2: |
| 81 | 80 | val = 0x20; /* DAC feedback, not used */ |
| 82 | 81 | break; |
| 83 | 82 | case 3: |
| 84 | val = input_port_read( | |
| 83 | val = input_port_read( | |
| 85 | 84 | break; |
| 86 | 85 | } |
| 87 | 86 | |
| r14883 | r14884 | |
| 89 | 88 | } |
| 90 | 89 | |
| 91 | 90 | |
| 92 | ||
| 91 | ||
| 93 | 92 | { |
| 94 | starshp1_state *state = field.machine().driver_data<starshp1_state>(); | |
| 95 | return state->m_collision_latch & 0x0f; | |
| 93 | return m_collision_latch & 0x0f; | |
| 96 | 94 | } |
| 97 | 95 | |
| 98 | 96 | |
| r14883 | r14884 | |
| 202 | 200 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 203 | 201 | |
| 204 | 202 | PORT_START("VBLANK") |
| 205 | PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(starshp1_analog_r, NULL) /* analog in */ | |
| 203 | PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,starshp1_analog_r, NULL) /* analog in */ | |
| 206 | 204 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 207 | 205 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 208 | 206 | |
| 209 | 207 | PORT_START("COINAGE") |
| 210 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(collision_latch_r, NULL) /* collision latch */ | |
| 208 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,collision_latch_r, NULL) /* collision latch */ | |
| 211 | 209 | PORT_DIPNAME( 0x70, 0x20, DEF_STR( Coinage ) ) |
| 212 | 210 | PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) |
| 213 | 211 | PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) ) |
| r14883 | r14884 | |
|---|---|---|
| 290 | 290 | * |
| 291 | 291 | *************************************/ |
| 292 | 292 | |
| 293 | ||
| 293 | ||
| 294 | 294 | { |
| 295 | gottlieb_state *state = field.machine().driver_data<gottlieb_state>(); | |
| 296 | 295 | const char *string = (const char *)param; |
| 297 | 296 | int which = string[0] - '0'; |
| 298 | 297 | |
| 299 | return input_port_read( | |
| 298 | return input_port_read( | |
| 300 | 299 | } |
| 301 | 300 | |
| 302 | 301 | |
| r14883 | r14884 | |
| 308 | 307 | } |
| 309 | 308 | |
| 310 | 309 | |
| 311 | ||
| 310 | ||
| 312 | 311 | { |
| 313 | gottlieb_state *state = field.machine().driver_data<gottlieb_state>(); | |
| 314 | 312 | static const char *const joyport[] = { "P2JOY", "P3JOY", "P1JOY", NULL }; |
| 315 | return (joyport[ | |
| 313 | return (joyport[ | |
| 316 | 314 | } |
| 317 | 315 | |
| 318 | 316 | |
| r14883 | r14884 | |
| 778 | 776 | PORT_BIT ( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 779 | 777 | |
| 780 | 778 | PORT_START("IN2") /* trackball H */ |
| 781 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM(analog_delta_r, "0TRACKX") | |
| 779 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "0TRACKX") | |
| 782 | 780 | |
| 783 | 781 | PORT_START("IN3") /* trackball V */ |
| 784 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM(analog_delta_r, "1TRACKY") | |
| 782 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY") | |
| 785 | 783 | |
| 786 | 784 | PORT_START("IN4") |
| 787 | 785 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| r14883 | r14884 | |
| 989 | 987 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 990 | 988 | |
| 991 | 989 | PORT_START("IN2") /* trackball H */ |
| 992 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM(analog_delta_r, "0TRACKX") | |
| 990 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "0TRACKX") | |
| 993 | 991 | |
| 994 | 992 | PORT_START("IN3") /* trackball V */ |
| 995 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM(analog_delta_r, "1TRACKY") | |
| 993 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY") | |
| 996 | 994 | |
| 997 | 995 | /* NOTE: Buttons are shared for both players; are mirrored to each side of the controller */ |
| 998 | 996 | PORT_START("IN4") |
| r14883 | r14884 | |
| 1046 | 1044 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1047 | 1045 | |
| 1048 | 1046 | PORT_START("IN3") /* trackball V (dial) */ |
| 1049 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM(analog_delta_r, "1TRACKY") | |
| 1047 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY") | |
| 1050 | 1048 | |
| 1051 | 1049 | PORT_START("IN4") |
| 1052 | 1050 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY |
| r14883 | r14884 | |
| 1525 | 1523 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1526 | 1524 | |
| 1527 | 1525 | PORT_START("IN4") /* joystick inputs */ |
| 1528 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stooges_joystick_r, NULL) | |
| 1526 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,stooges_joystick_r, NULL) | |
| 1529 | 1527 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 1530 | 1528 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 1531 | 1529 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(3) |
| r14883 | r14884 | |
| 1637 | 1635 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1638 | 1636 | |
| 1639 | 1637 | PORT_START("IN3") /* trackball V is a dial input */ |
| 1640 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM(analog_delta_r, "1TRACKY") | |
| 1638 | PORT_BIT( 0xff, 0, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY") | |
| 1641 | 1639 | |
| 1642 | 1640 | PORT_START("IN4") /* ? */ |
| 1643 | 1641 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| r14883 | r14884 | |
|---|---|---|
| 355 | 355 | * |
| 356 | 356 | *************************************/ |
| 357 | 357 | |
| 358 | ||
| 358 | ||
| 359 | 359 | { |
| 360 | ddragon_state *state = field.machine().driver_data<ddragon_state>(); | |
| 361 | return state->m_dd_sub_cpu_busy; | |
| 360 | return m_dd_sub_cpu_busy; | |
| 362 | 361 | } |
| 363 | 362 | |
| 364 | 363 | |
| r14883 | r14884 | |
| 707 | 706 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 708 | 707 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 709 | 708 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 710 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sub_cpu_busy, NULL) | |
| 709 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddragon_state,sub_cpu_busy, NULL) | |
| 711 | 710 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 712 | 711 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 713 | 712 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 19 | 19 | memory_set_bank(machine(), "bank1", data & 7); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | ||
| 22 | ||
| 23 | 23 | { |
| 24 | xxmissio_state *state = field.machine().driver_data<xxmissio_state>(); | |
| 25 | 24 | int bit_mask = (FPTR)param; |
| 26 | return ( | |
| 25 | return ( | |
| 27 | 26 | } |
| 28 | 27 | |
| 29 | 28 | WRITE8_MEMBER(xxmissio_state::xxmissio_status_m_w) |
| r14883 | r14884 | |
| 199 | 198 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Shown as "Unused" in the manual */ |
| 200 | 199 | |
| 201 | 200 | PORT_START("STATUS") |
| 202 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x01) | |
| 201 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x01) | |
| 203 | 202 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 204 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x04) | |
| 205 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x08) | |
| 206 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x10) | |
| 207 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x20) | |
| 208 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x40) | |
| 209 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xxmissio_status_r, (void *)0x80) | |
| 203 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x04) | |
| 204 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x08) | |
| 205 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x10) | |
| 206 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x20) | |
| 207 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x40) | |
| 208 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state,xxmissio_status_r, (void *)0x80) | |
| 210 | 209 | INPUT_PORTS_END |
| 211 | 210 | |
| 212 | 211 | /****************************************************************************/ |
| r14883 | r14884 | |
|---|---|---|
| 80 | 80 | DECLARE_WRITE8_MEMBER(ec_port16_out_w); |
| 81 | 81 | DECLARE_WRITE8_MEMBER(ec_port17_out_w); |
| 82 | 82 | DECLARE_WRITE8_MEMBER(ec_port18_out_w); |
| 83 | DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel1_opto_r); | |
| 84 | DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel2_opto_r); | |
| 85 | DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel3_opto_r); | |
| 83 | 86 | }; |
| 84 | 87 | |
| 85 | 88 | |
| r14883 | r14884 | |
| 389 | 392 | AM_RANGE(0x18, 0x18) AM_WRITE(ec_port18_out_w) // 24 (Watchdog) |
| 390 | 393 | ADDRESS_MAP_END |
| 391 | 394 | |
| 392 | ||
| 395 | ||
| 393 | 396 | { |
| 394 | 397 | return 0; |
| 395 | 398 | } |
| 396 | 399 | |
| 397 | ||
| 400 | ||
| 398 | 401 | { |
| 399 | 402 | return 0; |
| 400 | 403 | } |
| 401 | 404 | |
| 402 | ||
| 405 | ||
| 403 | 406 | { |
| 404 | 407 | return 0; |
| 405 | 408 | } |
| r14883 | r14884 | |
| 432 | 435 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 433 | 436 | |
| 434 | 437 | PORT_START("IN1") |
| 435 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ecoinfr_reel1_opto_r, NULL) | |
| 438 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel1_opto_r, NULL) | |
| 436 | 439 | PORT_DIPNAME( 0x02, 0x02, "IN1:02" ) |
| 437 | 440 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 438 | 441 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 439 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ecoinfr_reel3_opto_r, NULL) | |
| 440 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ecoinfr_reel2_opto_r, NULL) | |
| 442 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel3_opto_r, NULL) | |
| 443 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel2_opto_r, NULL) | |
| 441 | 444 | PORT_DIPNAME( 0x10, 0x10, "IN1:10" ) |
| 442 | 445 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 443 | 446 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| r14883 | r14884 | |
|---|---|---|
| 12 | 12 | #include "emu.h" |
| 13 | 13 | #include "cpu/e132xs/e132xs.h" |
| 14 | 14 | #include "machine/eeprom.h" |
| 15 | ||
| 15 | 16 | #include "sound/okim6295.h" |
| 17 | #include "includes/eolith.h" | |
| 16 | 18 | #include "includes/eolithsp.h" |
| 17 | 19 | |
| 18 | 20 | |
| 19 | class eolith16_state : public | |
| 21 | class eolith16_state : public | |
| 20 | 22 | { |
| 21 | 23 | public: |
| 22 | 24 | eolith16_state(const machine_config &mconfig, device_type type, const char *tag) |
| 23 | : | |
| 25 | : | |
| 24 | 26 | |
| 25 | 27 | UINT16 *m_vram; |
| 26 | 28 | int m_vbuffer; |
| r14883 | r14884 | |
| 89 | 91 | static INPUT_PORTS_START( eolith16 ) |
| 90 | 92 | PORT_START("SPECIAL") |
| 91 | 93 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 92 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(eolith_speedup_getvblank, NULL) | |
| 94 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith16_state, eolith_speedup_getvblank, NULL) | |
| 93 | 95 | PORT_BIT( 0xff6f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 94 | 96 | |
| 95 | 97 | PORT_START("SYSTEM") |
| r14883 | r14884 | |
|---|---|---|
| 124 | 124 | GAME INPUTS |
| 125 | 125 | **********************************************************/ |
| 126 | 126 | |
| 127 | ||
| 127 | ||
| 128 | 128 | { |
| 129 | groundfx_state *state = field.machine().driver_data<groundfx_state>(); | |
| 130 | return state->m_frame_counter; | |
| 129 | return m_frame_counter; | |
| 131 | 130 | } |
| 132 | 131 | |
| 133 | ||
| 132 | ||
| 134 | 133 | { |
| 135 | groundfx_state *state = field.machine().driver_data<groundfx_state>(); | |
| 136 | return state->m_coin_word; | |
| 134 | return m_coin_word; | |
| 137 | 135 | } |
| 138 | 136 | |
| 139 | 137 | WRITE32_MEMBER(groundfx_state::groundfx_input_w) |
| r14883 | r14884 | |
| 240 | 238 | |
| 241 | 239 | static INPUT_PORTS_START( groundfx ) |
| 242 | 240 | PORT_START("BUTTONS") |
| 243 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(frame_counter_r, NULL) | |
| 241 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, groundfx_state,frame_counter_r, NULL) | |
| 244 | 242 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 245 | 243 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 246 | 244 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 272 | 270 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 273 | 271 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 274 | 272 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 275 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(coin_word_r, NULL) | |
| 273 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, groundfx_state,coin_word_r, NULL) | |
| 276 | 274 | |
| 277 | 275 | PORT_START("AN0") /* IN 2, steering wheel */ |
| 278 | 276 | PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1) |
| r14883 | r14884 | |
|---|---|---|
| 287 | 287 | } |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | ||
| 290 | ||
| 291 | 291 | { |
| 292 | m92_state *state = field.machine().driver_data<m92_state>(); | |
| 293 | return state->m_sprite_buffer_busy; | |
| 292 | return m_sprite_buffer_busy; | |
| 294 | 293 | } |
| 295 | 294 | |
| 296 | 295 | /*****************************************************************************/ |
| r14883 | r14884 | |
| 420 | 419 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 421 | 420 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 422 | 421 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 423 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(m92_sprite_busy_r, NULL) | |
| 422 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, m92_state,m92_sprite_busy_r, NULL) | |
| 424 | 423 | /* DIP switch bank 3 */ |
| 425 | 424 | PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" ) |
| 426 | 425 | PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" ) |
| r14883 | r14884 | |
|---|---|---|
| 174 | 174 | *******************************************************************************/ |
| 175 | 175 | |
| 176 | 176 | /* DIPs are spread across the other input ports */ |
| 177 | ||
| 177 | ||
| 178 | 178 | { |
| 179 | 179 | const char *tag = (const char *)param; |
| 180 | return input_port_read( | |
| 180 | return input_port_read( | |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | ||
| 183 | ||
| 184 | 184 | { |
| 185 | 185 | const char *tag = (const char *)param; |
| 186 | return (input_port_read( | |
| 186 | return (input_port_read( | |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | |
| r14883 | r14884 | |
| 201 | 201 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 202 | 202 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 203 | 203 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 204 | PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dsw_c0_r, "DSW2") | |
| 204 | PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_c0_r, "DSW2") | |
| 205 | 205 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 206 | 206 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 207 | 207 | |
| r14883 | r14884 | |
| 214 | 214 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 215 | 215 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 216 | 216 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 217 | PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dsw_3f_r, "DSW2") | |
| 217 | PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_3f_r, "DSW2") | |
| 218 | 218 | |
| 219 | 219 | PORT_START("P3") |
| 220 | 220 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) |
| r14883 | r14884 | |
| 225 | 225 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| 226 | 226 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 227 | 227 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 ) |
| 228 | PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dsw_3f_r, "DSW1") | |
| 228 | PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_3f_r, "DSW1") | |
| 229 | 229 | |
| 230 | 230 | PORT_START("P4") |
| 231 | 231 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) |
| r14883 | r14884 | |
| 236 | 236 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) |
| 237 | 237 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 238 | 238 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START4 ) |
| 239 | PORT_BIT( 0x0300, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dsw_c0_r, "DSW1") | |
| 239 | PORT_BIT( 0x0300, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_c0_r, "DSW1") | |
| 240 | 240 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 241 | 241 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 242 | 242 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 112 | 112 | int m_vrom4k; |
| 113 | 113 | UINT8 m_supergm3_prg_bank; |
| 114 | 114 | UINT8 m_supergm3_chr_bank; |
| 115 | DECLARE_CUSTOM_INPUT_MEMBER(multigam_inputs_r); | |
| 115 | 116 | }; |
| 116 | 117 | |
| 117 | 118 | |
| r14883 | r14884 | |
| 261 | 262 | return ((state->m_in_1 >> state->m_in_1_shift++) & 0x01) | 0x40; |
| 262 | 263 | } |
| 263 | 264 | |
| 264 | ||
| 265 | ||
| 265 | 266 | { |
| 266 | multigam_state *state = field.machine().driver_data<multigam_state>(); | |
| 267 | 267 | /* bit 0: serial input (dsw) |
| 268 | 268 | bit 1: coin */ |
| 269 | return ( | |
| 269 | return ( | |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | |
| r14883 | r14884 | |
| 978 | 978 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 979 | 979 | |
| 980 | 980 | PORT_START("IN0") |
| 981 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(multigam_inputs_r, NULL) | |
| 981 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, multigam_state,multigam_inputs_r, NULL) | |
| 982 | 982 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 983 | 983 | INPUT_PORTS_END |
| 984 | 984 |
| r14883 | r14884 | |
|---|---|---|
| 117 | 117 | * |
| 118 | 118 | *************************************/ |
| 119 | 119 | |
| 120 | ||
| 120 | ||
| 121 | 121 | { |
| 122 | dcheese_state *state = field.machine().driver_data<dcheese_state>(); | |
| 123 | return state->m_soundlatch_full; | |
| 122 | return m_soundlatch_full; | |
| 124 | 123 | } |
| 125 | 124 | |
| 126 | 125 | |
| r14883 | r14884 | |
| 273 | 272 | PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */ |
| 274 | 273 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("ticket", ticket_dispenser_line_r) |
| 275 | 274 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sound->main buffer status (0=empty) */ |
| 276 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(sound_latch_state_r, NULL) | |
| 275 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, NULL) | |
| 277 | 276 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 278 | 277 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN ) |
| 279 | 278 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 322 | 321 | PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */ |
| 323 | 322 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("ticket", ticket_dispenser_line_r) |
| 324 | 323 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sound->main buffer status (0=empty) */ |
| 325 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(sound_latch_state_r, NULL) | |
| 324 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, NULL) | |
| 326 | 325 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 327 | 326 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN ) |
| 328 | 327 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 369 | 368 | PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */ |
| 370 | 369 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("ticket", ticket_dispenser_line_r) |
| 371 | 370 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* sound->main buffer status (0=empty) */ |
| 372 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(sound_latch_state_r, NULL) | |
| 371 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, NULL) | |
| 373 | 372 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 374 | 373 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN ) |
| 375 | 374 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | |
| 143 | ||
| 143 | ||
| 144 | 144 | { |
| 145 | cloud9_state *state = field.machine().driver_data<cloud9_state>(); | |
| 146 | int scanline = field.machine().primary_screen->vpos(); | |
| 147 | return (~state->m_syncprom[scanline & 0xff] >> 1) & 1; | |
| 145 | int scanline = machine().primary_screen->vpos(); | |
| 146 | return (~m_syncprom[scanline & 0xff] >> 1) & 1; | |
| 148 | 147 | } |
| 149 | 148 | |
| 150 | 149 | |
| r14883 | r14884 | |
| 302 | 301 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 303 | 302 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 304 | 303 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 305 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(get_vblank, NULL) | |
| 304 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, NULL) | |
| 306 | 305 | |
| 307 | 306 | PORT_START("IN1") |
| 308 | 307 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 343 | 342 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 344 | 343 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 345 | 344 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 346 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(get_vblank, NULL) | |
| 345 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, NULL) | |
| 347 | 346 | |
| 348 | 347 | PORT_START("IN1") |
| 349 | 348 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 144 | 144 | * |
| 145 | 145 | *************************************/ |
| 146 | 146 | |
| 147 | ||
| 147 | ||
| 148 | 148 | { |
| 149 | return input_port_read( | |
| 149 | return input_port_read( | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | |
| r14883 | r14884 | |
| 275 | 275 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 276 | 276 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 277 | 277 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 278 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(hi_bits_r, NULL) | |
| 278 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rpunch_state,hi_bits_r, NULL) | |
| 279 | 279 | |
| 280 | 280 | PORT_START("P2") /* c001a lower 8 bits */ |
| 281 | 281 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| r14883 | r14884 | |
| 285 | 285 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 286 | 286 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 287 | 287 | PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 288 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(hi_bits_r, NULL) | |
| 288 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rpunch_state,hi_bits_r, NULL) | |
| 289 | 289 | |
| 290 | 290 | PORT_START("SERVICE") /* c0018/c001a upper 8 bits */ |
| 291 | 291 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| r14883 | r14884 | |
|---|---|---|
| 232 | 232 | /* Bit 6 is VG_HALT */ |
| 233 | 233 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 234 | 234 | /* Bit 7 is MATH_RUN - see machine/starwars.c */ |
| 235 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(matrix_flag_r, NULL) | |
| 235 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starwars_state,matrix_flag_r, NULL) | |
| 236 | 236 | |
| 237 | 237 | PORT_START("DSW0") |
| 238 | 238 | PORT_DIPNAME( 0x03, 0x02, "Starting Shields" ) PORT_DIPLOCATION("10D:1,2") |
| r14883 | r14884 | |
|---|---|---|
| 130 | 130 | *************************************/ |
| 131 | 131 | |
| 132 | 132 | /* Players inputs are muxed at 0xa000 */ |
| 133 | ||
| 133 | ||
| 134 | 134 | { |
| 135 | 135 | static const char *const inname[2] = { "P1", "P2" }; |
| 136 | exerion_state *state = field.machine().driver_data<exerion_state>(); | |
| 137 | return input_port_read(field.machine(), inname[state->m_cocktail_flip]) & 0x3f; | |
| 136 | return input_port_read(machine(), inname[m_cocktail_flip]) & 0x3f; | |
| 138 | 137 | } |
| 139 | 138 | |
| 140 | 139 | |
| r14883 | r14884 | |
| 234 | 233 | /* verified from Z80 code */ |
| 235 | 234 | static INPUT_PORTS_START( exerion ) |
| 236 | 235 | PORT_START("IN0") |
| 237 | PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(exerion_controls_r, (void *)0) | |
| 236 | PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exerion_state,exerion_controls_r, (void *)0) | |
| 238 | 237 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) |
| 239 | 238 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 240 | 239 |
| r14883 | r14884 | |
|---|---|---|
| 292 | 292 | DECLARE_WRITE8_MEMBER(wdclr_w); |
| 293 | 293 | DECLARE_WRITE8_MEMBER(tempest_led_w); |
| 294 | 294 | DECLARE_WRITE8_MEMBER(tempest_coin_w); |
| 295 | DECLARE_CUSTOM_INPUT_MEMBER(tempest_knob_r); | |
| 296 | DECLARE_CUSTOM_INPUT_MEMBER(tempest_buttons_r); | |
| 297 | DECLARE_CUSTOM_INPUT_MEMBER(clock_r); | |
| 295 | 298 | }; |
| 296 | 299 | |
| 297 | 300 | |
| r14883 | r14884 | |
| 329 | 332 | * |
| 330 | 333 | *************************************/ |
| 331 | 334 | |
| 332 | ||
| 335 | ||
| 333 | 336 | { |
| 334 | tempest_state *state = field.machine().driver_data<tempest_state>(); | |
| 335 | return input_port_read(field.machine(), (state->m_player_select == 0) ? | |
| 337 | return input_port_read(machine(), (m_player_select == 0) ? | |
| 336 | 338 | TEMPEST_KNOB_P1_TAG : TEMPEST_KNOB_P2_TAG); |
| 337 | 339 | } |
| 338 | 340 | |
| 339 | ||
| 341 | ||
| 340 | 342 | { |
| 341 | tempest_state *state = field.machine().driver_data<tempest_state>(); | |
| 342 | return input_port_read(field.machine(), (state->m_player_select == 0) ? | |
| 343 | return input_port_read(machine(), (m_player_select == 0) ? | |
| 343 | 344 | TEMPEST_BUTTONS_P1_TAG : TEMPEST_BUTTONS_P2_TAG); |
| 344 | 345 | } |
| 345 | 346 | |
| 346 | 347 | |
| 347 | ||
| 348 | ||
| 348 | 349 | { |
| 349 | 350 | /* Emulate the 3kHz source on bit 7 (divide 1.5MHz by 512) */ |
| 350 | return ( | |
| 351 | return ( | |
| 351 | 352 | } |
| 352 | 353 | |
| 353 | 354 | |
| r14883 | r14884 | |
| 440 | 441 | /* per default (busy vector processor). */ |
| 441 | 442 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 442 | 443 | /* bit 7 is tied to a 3kHz (?) clock */ |
| 443 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 444 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,clock_r, NULL) | |
| 444 | 445 | |
| 445 | 446 | PORT_START("IN1/DSW0") |
| 446 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tempest_knob_r, NULL) | |
| 447 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,tempest_knob_r, NULL) | |
| 447 | 448 | /* The next one is reponsible for cocktail mode. |
| 448 | 449 | * According to the documentation, this is not a switch, although |
| 449 | 450 | * it may have been planned to put it on the Math Box PCB, D/E2 ) |
| r14883 | r14884 | |
| 464 | 465 | PORT_DIPNAME( 0x04, 0x04, "Rating" ) PORT_DIPLOCATION("DE2:2") |
| 465 | 466 | PORT_DIPSETTING( 0x04, "1, 3, 5, 7, 9" ) |
| 466 | 467 | PORT_DIPSETTING( 0x00, "tied to high score" ) |
| 467 | PORT_BIT(0x18, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tempest_buttons_r, NULL) | |
| 468 | PORT_BIT(0x18, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,tempest_buttons_r, NULL) | |
| 468 | 469 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 469 | 470 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 470 | 471 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 99 | 99 | DECLARE_READ8_MEMBER(famibox_IN1_r); |
| 100 | 100 | DECLARE_READ8_MEMBER(famibox_system_r); |
| 101 | 101 | DECLARE_WRITE8_MEMBER(famibox_system_w); |
| 102 | DECLARE_CUSTOM_INPUT_MEMBER(famibox_coin_r); | |
| 102 | 103 | }; |
| 103 | 104 | |
| 104 | 105 | /****************************************************** |
| r14883 | r14884 | |
| 424 | 425 | } |
| 425 | 426 | } |
| 426 | 427 | |
| 427 | ||
| 428 | ||
| 428 | 429 | { |
| 429 | famibox_state *state = field.machine().driver_data<famibox_state>(); | |
| 430 | return state->m_coins > 0; | |
| 430 | return m_coins > 0; | |
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | static INPUT_PORTS_START( famibox ) |
| r14883 | r14884 | |
| 484 | 484 | PORT_DIPSETTING( 0x08, "Key position 4" ) |
| 485 | 485 | PORT_DIPSETTING( 0x10, "Key position 5" ) |
| 486 | 486 | PORT_DIPSETTING( 0x20, "Key position 6" ) |
| 487 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(famibox_coin_r, NULL) | |
| 487 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, famibox_state,famibox_coin_r, NULL) | |
| 488 | 488 | |
| 489 | 489 | PORT_START("COIN") |
| 490 | 490 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0) |
| r14883 | r14884 | |
|---|---|---|
| 31 | 31 | DECLARE_WRITE32_MEMBER(int_ack_w); |
| 32 | 32 | DECLARE_READ16_MEMBER(K056800_68k_r); |
| 33 | 33 | DECLARE_WRITE16_MEMBER(K056800_68k_w); |
| 34 | DECLARE_CUSTOM_INPUT_MEMBER(analog_ctrl_r); | |
| 34 | 35 | }; |
| 35 | 36 | |
| 36 | 37 | |
| r14883 | r14884 | |
| 86 | 87 | input_port_write(machine(), "EEPROMOUT", data, 0xffffffff); |
| 87 | 88 | } |
| 88 | 89 | |
| 89 | ||
| 90 | ||
| 90 | 91 | { |
| 91 | 92 | const char *tag = (const char *)param; |
| 92 | return input_port_read( | |
| 93 | return input_port_read( | |
| 93 | 94 | } |
| 94 | 95 | |
| 95 | 96 | WRITE32_MEMBER(ultrsprt_state::int_ack_w) |
| r14883 | r14884 | |
| 164 | 165 | |
| 165 | 166 | static INPUT_PORTS_START( ultrsprt ) |
| 166 | 167 | PORT_START("P1") |
| 167 | PORT_BIT( 0x00000fff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(analog_ctrl_r, "STICKY1") | |
| 168 | PORT_BIT( 0x0fff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(analog_ctrl_r, "STICKX1") | |
| 168 | PORT_BIT( 0x00000fff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultrsprt_state,analog_ctrl_r, "STICKY1") | |
| 169 | PORT_BIT( 0x0fff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultrsprt_state,analog_ctrl_r, "STICKX1") | |
| 169 | 170 | PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 170 | 171 | PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 171 | 172 | PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_START1 ) |
| 172 | 173 | |
| 173 | 174 | PORT_START("P2") |
| 174 | PORT_BIT( 0x00000fff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(analog_ctrl_r, "STICKY2") | |
| 175 | PORT_BIT( 0x0fff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(analog_ctrl_r, "STICKX2") | |
| 175 | PORT_BIT( 0x00000fff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultrsprt_state,analog_ctrl_r, "STICKY2") | |
| 176 | PORT_BIT( 0x0fff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultrsprt_state,analog_ctrl_r, "STICKX2") | |
| 176 | 177 | PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| 177 | 178 | PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 178 | 179 | PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_START2 ) |
| r14883 | r14884 | |
|---|---|---|
| 150 | 150 | * |
| 151 | 151 | *************************************/ |
| 152 | 152 | |
| 153 | ||
| 153 | ||
| 154 | 154 | { |
| 155 | return (williams_narc_talkback_r( | |
| 155 | return (williams_narc_talkback_r( | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | |
| 159 | ||
| 159 | ||
| 160 | 160 | { |
| 161 | return williams_narc_talkback_r( | |
| 161 | return williams_narc_talkback_r( | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | |
| 165 | ||
| 165 | ||
| 166 | 166 | { |
| 167 | return williams_adpcm_sound_irq_r( | |
| 167 | return williams_adpcm_sound_irq_r( | |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | |
| r14883 | r14884 | |
| 237 | 237 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 238 | 238 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) |
| 239 | 239 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 ) |
| 240 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(narc_talkback_strobe_r, NULL) | |
| 240 | PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,narc_talkback_strobe_r, NULL) | |
| 241 | 241 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) /* memory protect interlock */ |
| 242 | 242 | PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 243 | 243 | PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 253 | 253 | */ |
| 254 | 254 | |
| 255 | 255 | PORT_START("IN2") |
| 256 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(narc_talkback_data_r, NULL) | |
| 256 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,narc_talkback_data_r, NULL) | |
| 257 | 257 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 258 | 258 | |
| 259 | 259 | PORT_START("DSW") |
| r14883 | r14884 | |
| 591 | 591 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Block 2") PORT_PLAYER(2) |
| 592 | 592 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1) |
| 593 | 593 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1) |
| 594 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(adpcm_irq_state_r, NULL) | |
| 594 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, NULL) | |
| 595 | 595 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Block 2") PORT_PLAYER(1) |
| 596 | 596 | |
| 597 | 597 | PORT_START("IN2") |
| r14883 | r14884 | |
| 683 | 683 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Block 2") PORT_PLAYER(2) |
| 684 | 684 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1) |
| 685 | 685 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1) |
| 686 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(adpcm_irq_state_r, NULL) | |
| 686 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, NULL) | |
| 687 | 687 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Block 2") PORT_PLAYER(1) |
| 688 | 688 | |
| 689 | 689 | PORT_START("IN2") |
| r14883 | r14884 | |
| 769 | 769 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 770 | 770 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 771 | 771 | PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 772 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(adpcm_irq_state_r, NULL) | |
| 772 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, NULL) | |
| 773 | 773 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 774 | 774 | |
| 775 | 775 | PORT_START("DSW") |
| r14883 | r14884 | |
| 874 | 874 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) /* video freeze */ |
| 875 | 875 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 876 | 876 | PORT_BIT( 0x3c00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 877 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(adpcm_irq_state_r, NULL) | |
| 877 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, NULL) | |
| 878 | 878 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 879 | 879 | |
| 880 | 880 | PORT_START("IN2") |
| r14883 | r14884 | |
|---|---|---|
| 256 | 256 | * |
| 257 | 257 | *************************************/ |
| 258 | 258 | |
| 259 | ||
| 259 | ||
| 260 | 260 | { |
| 261 | return ( | |
| 261 | return ( | |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | |
| r14883 | r14884 | |
| 359 | 359 | /* per default (busy vector processor). */\ |
| 360 | 360 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL)\ |
| 361 | 361 | /* bit 7 is tied to a 3kHz clock */\ |
| 362 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 362 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bzone_state,clock_r, NULL) | |
| 363 | 363 | |
| 364 | 364 | |
| 365 | 365 | #define BZONEDSW0\ |
| r14883 | r14884 | |
|---|---|---|
| 317 | 317 | * |
| 318 | 318 | *************************************/ |
| 319 | 319 | |
| 320 | ||
| 320 | ||
| 321 | 321 | { |
| 322 | 322 | /* 2.4kHz (divide 2.5MHz by 1024) */ |
| 323 | return ( | |
| 323 | return ( | |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | |
| r14883 | r14884 | |
| 337 | 337 | /* Bit 1 = 2.4kHz (divide 2.5MHz by 1024) */ |
| 338 | 338 | /* Bit 0 = Vector generator halt flag */ |
| 339 | 339 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 340 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 341 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gamma_xmtd_r, NULL) | |
| 342 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gamma_rcvd_r, NULL) | |
| 340 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,clock_r, NULL) | |
| 341 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,gamma_xmtd_r, NULL) | |
| 342 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,gamma_rcvd_r, NULL) | |
| 343 | 343 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 344 | 344 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diag Step/Coin C") PORT_CODE(KEYCODE_F1) |
| 345 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mhavoc_bit67_r, "COIN\0SERVICE") | |
| 345 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,mhavoc_bit67_r, "COIN\0SERVICE") | |
| 346 | 346 | |
| 347 | 347 | PORT_START("IN1") /* gamma */ |
| 348 | 348 | /* Bits 7-2 = input switches */ |
| 349 | 349 | /* Bit 1 = Alpha rcvd flag */ |
| 350 | 350 | /* Bit 0 = Alpha xmtd flag */ |
| 351 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(alpha_xmtd_r, NULL) | |
| 352 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(alpha_rcvd_r, NULL) | |
| 351 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,alpha_xmtd_r, NULL) | |
| 352 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,alpha_rcvd_r, NULL) | |
| 353 | 353 | PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 354 | 354 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 355 | 355 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| r14883 | r14884 | |
| 418 | 418 | PORT_INCLUDE( mhavoc ) |
| 419 | 419 | |
| 420 | 420 | PORT_MODIFY("IN1") |
| 421 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tms5220_r, NULL) | |
| 421 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,tms5220_r, NULL) | |
| 422 | 422 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 423 | 423 | INPUT_PORTS_END |
| 424 | 424 | |
| r14883 | r14884 | |
| 436 | 436 | static INPUT_PORTS_START( alphaone ) |
| 437 | 437 | PORT_START("IN0") /* alpha (player_1 = 0) */ |
| 438 | 438 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 439 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 439 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,clock_r, NULL) | |
| 440 | 440 | PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 441 | 441 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 442 | 442 |
| r14883 | r14884 | |
|---|---|---|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | |
| 386 | ||
| 386 | ||
| 387 | 387 | { |
| 388 | artmagic_state *state = field.machine().driver_data<artmagic_state>(); | |
| 389 | return state->m_prot_output_bit; | |
| 388 | return m_prot_output_bit; | |
| 390 | 389 | } |
| 391 | 390 | |
| 392 | 391 | |
| r14883 | r14884 | |
| 629 | 628 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 630 | 629 | |
| 631 | 630 | PORT_START("30000a") |
| 632 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(prot_r, NULL) /* protection data */ | |
| 631 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, NULL) /* protection data */ | |
| 633 | 632 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* protection ready */ |
| 634 | 633 | PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 635 | 634 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 821 | 820 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 822 | 821 | |
| 823 | 822 | PORT_START("3c000a") |
| 824 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(prot_r, NULL) /* protection data */ | |
| 823 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, NULL) /* protection data */ | |
| 825 | 824 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* protection ready */ |
| 826 | 825 | PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 827 | 826 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 211 | 211 | DECLARE_WRITE8_MEMBER(multfish_counters_w); |
| 212 | 212 | DECLARE_WRITE8_MEMBER(multfish_f3_w); |
| 213 | 213 | DECLARE_WRITE8_MEMBER(multfish_dispenable_w); |
| 214 | DECLARE_CUSTOM_INPUT_MEMBER(multfish_hopper_r); | |
| 214 | 215 | }; |
| 215 | 216 | |
| 216 | 217 | static TILE_GET_INFO( get_multfish_tile_info ) |
| r14883 | r14884 | |
| 386 | 387 | return machine().primary_screen->vpos(); |
| 387 | 388 | } |
| 388 | 389 | |
| 389 | ||
| 390 | ||
| 390 | 391 | { |
| 391 | multfish_state *state = field.machine().driver_data<multfish_state>(); | |
| 392 | 392 | |
| 393 | if ( | |
| 393 | if ( | |
| 394 | 394 | { |
| 395 | state->m_hopper++; | |
| 396 | return state->m_hopper>>4; | |
| 395 | m_hopper++; | |
| 396 | return m_hopper>>4; | |
| 397 | 397 | } |
| 398 | 398 | else |
| 399 | 399 | { |
| r14883 | r14884 | |
| 704 | 704 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) // unused? |
| 705 | 705 | |
| 706 | 706 | PORT_START("IN1") |
| 707 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM | |
| 707 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, multfish_state,multfish_hopper_r, NULL )// Hopper SW (22 B) | |
| 708 | 708 | PORT_DIPNAME( 0x02, 0x02, "BK Door (17 A)" ) |
| 709 | 709 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 710 | 710 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r14883 | r14884 | |
| 797 | 797 | PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 798 | 798 | |
| 799 | 799 | PORT_START("IN1") |
| 800 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM | |
| 800 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, multfish_state,multfish_hopper_r, NULL )// Hopper SW (22 B) | |
| 801 | 801 | PORT_DIPNAME( 0x02, 0x02, "BK Door (17 A)" ) |
| 802 | 802 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 803 | 803 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r14883 | r14884 | |
|---|---|---|
| 936 | 936 | return 0xffffffff; |
| 937 | 937 | } |
| 938 | 938 | |
| 939 | ||
| 939 | ||
| 940 | 940 | { |
| 941 | seibuspi_state *state = field.machine().driver_data<seibuspi_state>(); | |
| 942 | switch(state->m_ejsakura_input_port) | |
| 941 | switch(m_ejsakura_input_port) | |
| 943 | 942 | { |
| 944 | 943 | case 0x01: |
| 945 | return input_port_read( | |
| 944 | return input_port_read( | |
| 946 | 945 | case 0x02: |
| 947 | return input_port_read( | |
| 946 | return input_port_read( | |
| 948 | 947 | case 0x04: |
| 949 | return input_port_read( | |
| 948 | return input_port_read( | |
| 950 | 949 | case 0x08: |
| 951 | return input_port_read( | |
| 950 | return input_port_read( | |
| 952 | 951 | case 0x10: |
| 953 | return input_port_read( | |
| 952 | return input_port_read( | |
| 954 | 953 | default: |
| 955 | return input_port_read( | |
| 954 | return input_port_read( | |
| 956 | 955 | } |
| 957 | 956 | return 0xffffffff; |
| 958 | 957 | } |
| r14883 | r14884 | |
| 1295 | 1294 | Start - 000111 port 0 |
| 1296 | 1295 | */ |
| 1297 | 1296 | |
| 1298 | ||
| 1297 | ||
| 1299 | 1298 | { |
| 1300 | 1299 | static const UINT8 encoding[] = { 0x02, 0x10, 0x03, 0x18, 0x04, 0x20, 0x05, 0x28, 0x06, 0x30, 0x07 }; |
| 1301 | input_port_value state = input_port_read( | |
| 1300 | input_port_value state = input_port_read( | |
| 1302 | 1301 | int bit; |
| 1303 | 1302 | |
| 1304 | 1303 | for (bit = 0; bit < ARRAY_LENGTH(encoding); bit++) |
| r14883 | r14884 | |
| 1309 | 1308 | |
| 1310 | 1309 | static INPUT_PORTS_START( spi_ejanhs ) |
| 1311 | 1310 | PORT_START("INPUTS") |
| 1312 | PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ejanhs_encode, "IN0BITS") | |
| 1313 | PORT_BIT( 0x00003f00, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(ejanhs_encode, "IN1BITS") | |
| 1311 | PORT_BIT( 0x0000003f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, "IN0BITS") | |
| 1312 | PORT_BIT( 0x00003f00, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, "IN1BITS") | |
| 1314 | 1313 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1315 | 1314 | |
| 1316 | 1315 | PORT_START("SYSTEM") |
| r14883 | r14884 | |
| 1358 | 1357 | |
| 1359 | 1358 | static INPUT_PORTS_START( spi_ejsakura ) |
| 1360 | 1359 | PORT_START("INPUTS") |
| 1361 | PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(ejsakura_keyboard_r, NULL) | |
| 1360 | PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejsakura_keyboard_r, NULL) | |
| 1362 | 1361 | |
| 1363 | 1362 | PORT_START("INPUT01") |
| 1364 | 1363 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 439 | 439 | * |
| 440 | 440 | *************************************/ |
| 441 | 441 | |
| 442 | ||
| 442 | ||
| 443 | 443 | { |
| 444 | system1_state *state = field.machine().driver_data<system1_state>(); | |
| 445 | 444 | static const char *const ports[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6" }; |
| 446 | return input_port_read( | |
| 445 | return input_port_read( | |
| 447 | 446 | } |
| 448 | 447 | |
| 449 | 448 | |
| 450 | ||
| 449 | ||
| 451 | 450 | { |
| 452 | system1_state *state = field.machine().driver_data<system1_state>(); | |
| 453 | 451 | /* reads from here indicate which mux port is selected */ |
| 454 | return 1 << ( | |
| 452 | return 1 << ( | |
| 455 | 453 | } |
| 456 | 454 | |
| 457 | 455 | |
| r14883 | r14884 | |
| 1955 | 1953 | PORT_INCLUDE( choplift ) |
| 1956 | 1954 | |
| 1957 | 1955 | PORT_MODIFY("P1") |
| 1958 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dakkochn_mux_data_r, NULL) | |
| 1956 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, system1_state,dakkochn_mux_data_r, NULL) | |
| 1959 | 1957 | |
| 1960 | 1958 | PORT_MODIFY("P2") |
| 1961 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(dakkochn_mux_status_r, NULL) | |
| 1959 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, system1_state,dakkochn_mux_status_r, NULL) | |
| 1962 | 1960 | |
| 1963 | 1961 | PORT_MODIFY("SYSTEM") |
| 1964 | 1962 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* start 1 & 2 not connected. */ |
| r14883 | r14884 | |
|---|---|---|
| 314 | 314 | return (portdata); |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | ||
| 317 | ||
| 318 | 318 | { |
| 319 | niyanpai_state *state = field.machine().driver_data<niyanpai_state>(); | |
| 320 | address_space *space = field.machine().device("maincpu")->memory().space(AS_PROGRAM); | |
| 319 | address_space *space = machine().device("maincpu")->memory().space(AS_PROGRAM); | |
| 321 | 320 | // tmp68301_parallel_interface[0x05] |
| 322 | 321 | // bit 0 coin counter |
| 323 | 322 | // bit 2 motor on |
| 324 | 323 | // bit 3 coin lock |
| 325 | 324 | |
| 326 | if (tmp68301_parallel_interface_r(space, 0x0005, 0x00ff) & 0x0004) state->m_musobana_outcoin_flag ^= 1; | |
| 327 | else state->m_musobana_outcoin_flag = 1; | |
| 325 | if (tmp68301_parallel_interface_r(space, 0x0005, 0x00ff) & 0x0004) m_musobana_outcoin_flag ^= 1; | |
| 326 | else m_musobana_outcoin_flag = 1; | |
| 328 | 327 | |
| 329 | return | |
| 328 | return | |
| 330 | 329 | } |
| 331 | 330 | |
| 332 | 331 | WRITE16_MEMBER(niyanpai_state::musobana_inputport_w) |
| r14883 | r14884 | |
| 690 | 689 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR |
| 691 | 690 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET |
| 692 | 691 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER |
| 693 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(musobana_outcoin_flag_r, NULL) // OUT COIN | |
| 692 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, NULL) // OUT COIN | |
| 694 | 693 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 695 | 694 | PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST |
| 696 | 695 | |
| r14883 | r14884 | |
| 756 | 755 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR |
| 757 | 756 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET |
| 758 | 757 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER |
| 759 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(musobana_outcoin_flag_r, NULL) // OUT COIN | |
| 758 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, NULL) // OUT COIN | |
| 760 | 759 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 761 | 760 | PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST |
| 762 | 761 | |
| r14883 | r14884 | |
| 822 | 821 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR |
| 823 | 822 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET |
| 824 | 823 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER |
| 825 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(musobana_outcoin_flag_r, NULL) // OUT COIN | |
| 824 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, NULL) // OUT COIN | |
| 826 | 825 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 827 | 826 | PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST |
| 828 | 827 |
| r14883 | r14884 | |
|---|---|---|
| 455 | 455 | |
| 456 | 456 | **********************************************************************************/ |
| 457 | 457 | |
| 458 | ||
| 458 | ||
| 459 | 459 | { |
| 460 | 460 | const char *tag = (const char *)param; |
| 461 | return input_port_read( | |
| 461 | return input_port_read( | |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | static INPUT_PORTS_START( skns ) /* 3 buttons, 2 players */ |
| r14883 | r14884 | |
| 513 | 513 | PORT_DIPNAME( 0x00000080, 0x00000080, "Freeze" ) |
| 514 | 514 | PORT_DIPSETTING( 0x00000000, "Freezes the game") |
| 515 | 515 | PORT_DIPSETTING( 0x00000080, "Right value") |
| 516 | PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(paddle_r, "Paddle C") | |
| 517 | PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(paddle_r, "Paddle B") | |
| 518 | PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(paddle_r, "Paddle A") | |
| 516 | PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, skns_state,paddle_r, "Paddle C") | |
| 517 | PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, skns_state,paddle_r, "Paddle B") | |
| 518 | PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, skns_state,paddle_r, "Paddle A") | |
| 519 | 519 | |
| 520 | 520 | PORT_START("40000c") |
| 521 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(paddle_r, "Paddle D") | |
| 521 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, skns_state,paddle_r, "Paddle D") | |
| 522 | 522 | PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 523 | 523 | |
| 524 | 524 | PORT_START("Paddle A") |
| r14883 | r14884 | |
|---|---|---|
| 1205 | 1205 | logerror("%04x: unmapped romregion=%02X\n", cpu_get_pc(&space.device()), data); |
| 1206 | 1206 | } |
| 1207 | 1207 | |
| 1208 | READ8_MEMBER(dynax_state::unk_r) | |
| 1209 | { | |
| 1210 | return 0x78; | |
| 1211 | } | |
| 1212 | ||
| 1213 | 1208 | static ADDRESS_MAP_START( htengoku_io_map, AS_IO, 8, dynax_state ) |
| 1214 | 1209 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1215 | 1210 | AM_RANGE( 0x01, 0x07 ) AM_WRITE(dynax_blitter_rev2_w) // Blitter |
| r14883 | r14884 | |
| 1222 | 1217 | AM_RANGE( 0x44, 0x44 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // |
| 1223 | 1218 | AM_RANGE( 0x46, 0x47 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 1224 | 1219 | AM_RANGE( 0x80, 0x8f ) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 1225 | AM_RANGE( 0xa0, 0xa3 ) AM_WRITE_LEGACY(ddenlovr_palette_base_w) // ddenlovr mixer chip | |
| 1226 | AM_RANGE( 0xa4, 0xa7 ) AM_WRITE_LEGACY(ddenlovr_palette_mask_w) | |
| 1227 | AM_RANGE( 0xa8, 0xab ) AM_WRITE_LEGACY(ddenlovr_transparency_pen_w) | |
| 1228 | AM_RANGE( 0xac, 0xaf ) AM_WRITE_LEGACY(ddenlovr_transparency_mask_w) | |
| 1220 | AM_RANGE( 0xa0, 0xa3 ) AM_WRITE(ddenlovr_palette_base_w) // ddenlovr mixer chip | |
| 1221 | AM_RANGE( 0xa4, 0xa7 ) AM_WRITE(ddenlovr_palette_mask_w) | |
| 1222 | AM_RANGE( 0xa8, 0xab ) AM_WRITE(ddenlovr_transparency_pen_w) | |
| 1223 | AM_RANGE( 0xac, 0xaf ) AM_WRITE(ddenlovr_transparency_mask_w) | |
| 1229 | 1224 | // b0-b3 ? |
| 1230 | AM_RANGE( 0xb4, 0xb4 ) AM_WRITE_LEGACY(ddenlovr_bgcolor_w) | |
| 1231 | AM_RANGE( 0xb5, 0xb5 ) AM_WRITE_LEGACY(ddenlovr_priority_w) | |
| 1232 | AM_RANGE( 0xb6, 0xb6 ) AM_WRITE_LEGACY(ddenlovr_layer_enable_w) | |
| 1225 | AM_RANGE( 0xb4, 0xb4 ) AM_WRITE(ddenlovr_bgcolor_w) | |
| 1226 | AM_RANGE( 0xb5, 0xb5 ) AM_WRITE(ddenlovr_priority_w) | |
| 1227 | AM_RANGE( 0xb6, 0xb6 ) AM_WRITE(ddenlovr_layer_enable_w) | |
| 1233 | 1228 | AM_RANGE( 0xb8, 0xb8 ) AM_READ(unk_r) // ? must be 78 on startup |
| 1234 | 1229 | AM_RANGE( 0xc2, 0xc2 ) AM_WRITE(htengoku_rombank_w) // BANK ROM Select |
| 1235 | 1230 | AM_RANGE( 0xc0, 0xc0 ) AM_WRITE(dynax_extra_scrollx_w) // screen scroll X |
| r14883 | r14884 | |
|---|---|---|
| 464 | 464 | *************************************/ |
| 465 | 465 | |
| 466 | 466 | |
| 467 | ||
| 467 | ||
| 468 | 468 | { |
| 469 | itech32_state *state = field.machine().driver_data<itech32_state>(); | |
| 470 | if (state->m_sound_int_state) | |
| 471 | state->m_special_result ^= 1; | |
| 469 | if (m_sound_int_state) | |
| 470 | m_special_result ^= 1; | |
| 472 | 471 | |
| 473 | return | |
| 472 | return | |
| 474 | 473 | } |
| 475 | 474 | |
| 476 | 475 | READ16_MEMBER(itech32_state::trackball_r) |
| r14883 | r14884 | |
| 1117 | 1116 | PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW ) |
| 1118 | 1117 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1119 | 1118 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1120 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_port_r, NULL) | |
| 1119 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL) | |
| 1121 | 1120 | PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:1") |
| 1122 | 1121 | PORT_DIPSETTING( 0x0000, "-" ) |
| 1123 | 1122 | PORT_DIPSETTING( 0x0010, "+" ) |
| r14883 | r14884 | |
| 1162 | 1161 | PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW ) |
| 1163 | 1162 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1164 | 1163 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1165 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_port_r, NULL) | |
| 1164 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL) | |
| 1166 | 1165 | PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:4") |
| 1167 | 1166 | PORT_DIPSETTING( 0x0000, "-" ) |
| 1168 | 1167 | PORT_DIPSETTING( 0x0010, "+" ) |
| r14883 | r14884 | |
| 1365 | 1364 | PORT_SERVICE_NO_TOGGLE( 0x00010000, IP_ACTIVE_LOW ) |
| 1366 | 1365 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 1367 | 1366 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_VBLANK ) |
| 1368 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(special_port_r, NULL) | |
| 1367 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, NULL) | |
| 1369 | 1368 | PORT_DIPNAME( 0x00100000, 0x00000000, "Video Sync" ) PORT_DIPLOCATION("SW1:4") |
| 1370 | 1369 | PORT_DIPSETTING( 0x00000000, "-" ) |
| 1371 | 1370 | PORT_DIPSETTING( 0x00100000, "+" ) |
| r14883 | r14884 | |
|---|---|---|
| 251 | 251 | GAME INPUTS |
| 252 | 252 | **********************************************************/ |
| 253 | 253 | |
| 254 | ||
| 254 | ||
| 255 | 255 | { |
| 256 | undrfire_state *state = field.machine().driver_data<undrfire_state>(); | |
| 257 | return state->m_frame_counter; | |
| 256 | return m_frame_counter; | |
| 258 | 257 | } |
| 259 | 258 | |
| 260 | 259 | READ32_MEMBER(undrfire_state::undrfire_input_r) |
| r14883 | r14884 | |
| 527 | 526 | |
| 528 | 527 | static INPUT_PORTS_START( undrfire ) |
| 529 | 528 | PORT_START("INPUTS") |
| 530 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(frame_counter_r, NULL) /* Frame counter */ | |
| 529 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, undrfire_state,frame_counter_r, NULL) /* Frame counter */ | |
| 531 | 530 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 532 | 531 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 533 | 532 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 595 | 594 | |
| 596 | 595 | static INPUT_PORTS_START( cbombers ) |
| 597 | 596 | PORT_START("INPUTS") |
| 598 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(frame_counter_r, NULL) /* Frame counter */ | |
| 597 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, undrfire_state,frame_counter_r, NULL) /* Frame counter */ | |
| 599 | 598 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 600 | 599 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 601 | 600 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 54 | 54 | DECLARE_READ8_MEMBER(quizshow_timing_r); |
| 55 | 55 | DECLARE_READ8_MEMBER(quizshow_tape_signal_r); |
| 56 | 56 | DECLARE_WRITE8_MEMBER(quizshow_main_ram_w); |
| 57 | DECLARE_CUSTOM_INPUT_MEMBER(quizshow_tape_headpos_r); | |
| 57 | 58 | }; |
| 58 | 59 | |
| 59 | 60 | |
| r14883 | r14884 | |
| 234 | 235 | |
| 235 | 236 | ***************************************************************************/ |
| 236 | 237 | |
| 237 | ||
| 238 | ||
| 238 | 239 | { |
| 239 | quizshow_state *state = field.machine().driver_data<quizshow_state>(); | |
| 240 | return 1 << state->m_tape_head_pos; | |
| 240 | return 1 << m_tape_head_pos; | |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | static INPUT_CHANGED(quizshow_category_select) |
| r14883 | r14884 | |
| 252 | 252 | |
| 253 | 253 | static INPUT_PORTS_START( quizshow ) |
| 254 | 254 | PORT_START("IN0") // ADR strobe 0 |
| 255 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(quizshow_tape_headpos_r, NULL) | |
| 255 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, quizshow_state,quizshow_tape_headpos_r, NULL) | |
| 256 | 256 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) |
| 257 | 257 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 ) |
| 258 | 258 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r14883 | r14884 | |
|---|---|---|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | |
| 123 | ||
| 123 | ||
| 124 | 124 | { |
| 125 | return input_port_read( | |
| 125 | return input_port_read( | |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | |
| 129 | ||
| 129 | ||
| 130 | 130 | { |
| 131 | 131 | UINT32 ret; |
| 132 | 132 | |
| 133 | 133 | /* on an upright cabinet, a single set of controls |
| 134 | 134 | is connected to both sets of pins on the edge |
| 135 | 135 | connector */ |
| 136 | if (input_port_read(field.machine(), "CAB")) | |
| 137 | ret = input_port_read(field.machine(), "P2"); | |
| 136 | if (input_port_read(machine(), "CAB")) | |
| 137 | ret = input_port_read(machine(), "P2"); | |
| 138 | 138 | else |
| 139 | ret = input_port_read( | |
| 139 | ret = input_port_read( | |
| 140 | 140 | |
| 141 | 141 | return ret; |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | |
| 145 | ||
| 145 | ||
| 146 | 146 | { |
| 147 | 147 | UINT32 ret; |
| 148 | astrof_state *state = field.machine().driver_data<astrof_state>(); | |
| 149 | 148 | |
| 150 | 149 | /* on a cocktail cabinet, two sets of controls are |
| 151 | 150 | multiplexed on a single set of inputs |
| 152 | 151 | (not verified on pcb) */ |
| 153 | 152 | |
| 154 | if (state->m_flipscreen) | |
| 155 | ret = input_port_read(field.machine(), "P2"); | |
| 153 | if (m_flipscreen) | |
| 154 | ret = input_port_read(machine(), "P2"); | |
| 156 | 155 | else |
| 157 | ret = input_port_read( | |
| 156 | ret = input_port_read( | |
| 158 | 157 | |
| 159 | 158 | return ret; |
| 160 | 159 | } |
| r14883 | r14884 | |
| 659 | 658 | PORT_START("IN") |
| 660 | 659 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 661 | 660 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 662 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p1_controls_r, NULL) | |
| 663 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p2_controls_r, NULL) | |
| 661 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, NULL) | |
| 662 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, NULL) | |
| 664 | 663 | |
| 665 | 664 | PORT_START("P1") |
| 666 | 665 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| r14883 | r14884 | |
| 714 | 713 | PORT_START("IN") |
| 715 | 714 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| 716 | 715 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 717 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p1_controls_r, NULL) | |
| 718 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p2_controls_r, NULL) | |
| 716 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, NULL) | |
| 717 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, NULL) | |
| 719 | 718 | |
| 720 | 719 | PORT_START("P1") |
| 721 | 720 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| r14883 | r14884 | |
| 769 | 768 | PORT_START("IN") |
| 770 | 769 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 771 | 770 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 772 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p1_controls_r, NULL) | |
| 773 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p2_controls_r, NULL) | |
| 771 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, NULL) | |
| 772 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, NULL) | |
| 774 | 773 | |
| 775 | 774 | PORT_START("P1") |
| 776 | 775 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| r14883 | r14884 | |
| 820 | 819 | PORT_START("IN") |
| 821 | 820 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 822 | 821 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 823 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p1_controls_r, NULL) | |
| 824 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(astrof_p2_controls_r, NULL) | |
| 822 | PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, NULL) | |
| 823 | PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, NULL) | |
| 825 | 824 | |
| 826 | 825 | PORT_START("P1") |
| 827 | 826 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY |
| r14883 | r14884 | |
| 874 | 873 | PORT_INCLUDE( astrof_common ) |
| 875 | 874 | |
| 876 | 875 | PORT_START("IN") |
| 877 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(tomahawk_controls_r, NULL) | |
| 876 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,tomahawk_controls_r, NULL) | |
| 878 | 877 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 879 | 878 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) |
| 880 | 879 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 18 | 18 | DECLARE_WRITE8_MEMBER(lamp_w); |
| 19 | 19 | DECLARE_WRITE8_MEMBER(lamp7_w); |
| 20 | 20 | DECLARE_WRITE8_MEMBER(sol_w); |
| 21 | DECLARE_CUSTOM_INPUT_MEMBER(wolfman_replay_hs_r); | |
| 21 | 22 | }; |
| 22 | 23 | |
| 23 | 24 | |
| r14883 | r14884 | |
| 166 | 167 | } |
| 167 | 168 | |
| 168 | 169 | |
| 169 | ||
| 170 | ||
| 170 | 171 | { |
| 171 | 172 | int bit_mask = (FPTR)param; |
| 172 | 173 | |
| 173 | 174 | switch (bit_mask) |
| 174 | 175 | { |
| 175 | 176 | case 0x03: |
| 176 | return ((input_port_read( | |
| 177 | return ((input_port_read( | |
| 177 | 178 | case 0x40: |
| 178 | return ((input_port_read( | |
| 179 | return ((input_port_read( | |
| 179 | 180 | default: |
| 180 | 181 | logerror("wolfman_replay_hs_r : invalid %02X bit_mask\n",bit_mask); |
| 181 | 182 | return 0; |
| r14883 | r14884 | |
| 450 | 451 | PORT_DIPSETTING( 0x20, "01" ) |
| 451 | 452 | // PORT_DIPNAME( 0x18, 0x00, DEF_STR( Coinage ) ) // Partidas/Moneda - code at 0x0a69 - tables at 0x0b30 (4 * 3) - credits BCD stored at 0x6151 |
| 452 | 453 | // PORT_DIPNAME( 0x04, 0x00, "Balls" ) // Bolas/Partida - code at 0x0a5c - stored at 0x60bd |
| 453 | PORT_BIT( 0x03, 0x00, IPT_SPECIAL) PORT_CUSTOM(wolfman_replay_hs_r, (void *)0x03) | |
| 454 | PORT_BIT( 0x03, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, peyper_state,wolfman_replay_hs_r, (void *)0x03) | |
| 454 | 455 | |
| 455 | 456 | /* DSW1 : port 0x24 - DSW1-1 is bit 7 ... DSW1-8 is bit 0 */ |
| 456 | 457 | PORT_START("DSW1") |
| 457 | 458 | PORT_DIPNAME( 0x80, 0x00, "Adjust Replay" ) // Premios por Puntuacion - code at 0x0aa3 - stored at 0x60c4 and 0x60cc (0x00 NO / 0x05 YES) |
| 458 | 459 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 459 | 460 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 460 | PORT_BIT( 0x40, 0x00, IPT_SPECIAL) PORT_CUSTOM(wolfman_replay_hs_r, (void *)0x40) | |
| 461 | PORT_BIT( 0x40, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, peyper_state,wolfman_replay_hs_r, (void *)0x40) | |
| 461 | 462 | PORT_DIPNAME( 0x20, 0x00, "Clear RAM on Reset" ) // Borrador RAM - code at 0x0ace - range 0x6141..0x616f - 0x616d = 0x5a and 0x616e = 0xa5 |
| 462 | 463 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 463 | 464 | PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) |
| r14883 | r14884 | |
|---|---|---|
| 81 | 81 | DECLARE_READ8_MEMBER(dip_switch_r); |
| 82 | 82 | DECLARE_WRITE8_MEMBER(sound_data_w); |
| 83 | 83 | DECLARE_WRITE8_MEMBER(enigma2_flip_screen_w); |
| 84 | DECLARE_CUSTOM_INPUT_MEMBER(p1_controls_r); | |
| 85 | DECLARE_CUSTOM_INPUT_MEMBER(p2_controls_r); | |
| 84 | 86 | }; |
| 85 | 87 | |
| 86 | 88 | |
| r14883 | r14884 | |
| 414 | 416 | } |
| 415 | 417 | |
| 416 | 418 | |
| 417 | ||
| 419 | ||
| 418 | 420 | { |
| 419 | return input_port_read( | |
| 421 | return input_port_read( | |
| 420 | 422 | } |
| 421 | 423 | |
| 422 | 424 | |
| 423 | ||
| 425 | ||
| 424 | 426 | { |
| 425 | enigma2_state *state = field.machine().driver_data<enigma2_state>(); | |
| 426 | if (state->m_flip_screen) | |
| 427 | return input_port_read(field.machine(), "P2CONTROLS"); | |
| 427 | if (m_flip_screen) | |
| 428 | return input_port_read(machine(), "P2CONTROLS"); | |
| 428 | 429 | else |
| 429 | return input_port_read( | |
| 430 | return input_port_read( | |
| 430 | 431 | } |
| 431 | 432 | |
| 432 | 433 | |
| r14883 | r14884 | |
| 497 | 498 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 498 | 499 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 499 | 500 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 500 | PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(p1_controls_r, NULL) | |
| 501 | PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, NULL) | |
| 501 | 502 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 502 | 503 | |
| 503 | 504 | PORT_START("IN1") |
| 504 | 505 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 505 | 506 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 506 | 507 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 507 | PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(p2_controls_r, NULL) | |
| 508 | PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, NULL) | |
| 508 | 509 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 509 | 510 | |
| 510 | 511 | PORT_START("DSW") |
| r14883 | r14884 | |
| 552 | 553 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 553 | 554 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 554 | 555 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 555 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(p1_controls_r, NULL) | |
| 556 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, NULL) | |
| 556 | 557 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 557 | 558 | |
| 558 | 559 | PORT_START("IN1") |
| r14883 | r14884 | |
| 560 | 561 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 561 | 562 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 562 | 563 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 563 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(p2_controls_r, NULL) | |
| 564 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, NULL) | |
| 564 | 565 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 565 | 566 | |
| 566 | 567 | PORT_START("DSW") |
| r14883 | r14884 | |
|---|---|---|
| 102 | 102 | DECLARE_WRITE8_MEMBER(custom_io_w); |
| 103 | 103 | DECLARE_READ8_MEMBER(exp_rom_r); |
| 104 | 104 | void show_out(); |
| 105 | DECLARE_CUSTOM_INPUT_MEMBER(hopper_r); | |
| 105 | 106 | }; |
| 106 | 107 | |
| 107 | 108 | |
| r14883 | r14884 | |
| 332 | 333 | } |
| 333 | 334 | } |
| 334 | 335 | |
| 335 | ||
| 336 | ||
| 336 | 337 | { |
| 337 | igspoker_state *state = field.machine().driver_data<igspoker_state>(); | |
| 338 | if (state->m_hopper) return !(field.machine().primary_screen->frame_number()%10); | |
| 339 | return field.machine().input().code_pressed(KEYCODE_H); | |
| 338 | if (m_hopper) return !(machine().primary_screen->frame_number()%10); | |
| 339 | return machine().input().code_pressed(KEYCODE_H); | |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | READ8_MEMBER(igspoker_state::exp_rom_r) |
| r14883 | r14884 | |
| 481 | 481 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 482 | 482 | |
| 483 | 483 | PORT_START("SERVICE") |
| 484 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 484 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 485 | 485 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 486 | 486 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) |
| 487 | 487 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics") |
| r14883 | r14884 | |
| 615 | 615 | PORT_START("SERVICE") |
| 616 | 616 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 617 | 617 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Attendent") |
| 618 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 618 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 619 | 619 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 620 | 620 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 621 | 621 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 780 | 780 | PORT_START("SERVICE") |
| 781 | 781 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 782 | 782 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 783 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 783 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 784 | 784 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 785 | 785 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 786 | 786 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) |
| r14883 | r14884 | |
| 925 | 925 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 926 | 926 | |
| 927 | 927 | PORT_START("SERVICE") |
| 928 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 928 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 929 | 929 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 930 | 930 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) |
| 931 | 931 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics") |
| r14883 | r14884 | |
| 1077 | 1077 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| 1078 | 1078 | |
| 1079 | 1079 | PORT_START("SERVICE") |
| 1080 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 1080 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 1081 | 1081 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 1082 | 1082 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) |
| 1083 | 1083 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics") |
| r14883 | r14884 | |
| 1397 | 1397 | PORT_DIPSETTING( 0x00, "100:1" ) |
| 1398 | 1398 | |
| 1399 | 1399 | PORT_START("SERVICE") |
| 1400 | PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 1400 | PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 1401 | 1401 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 1402 | 1402 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) |
| 1403 | 1403 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics") |
| r14883 | r14884 | |
| 1532 | 1532 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1533 | 1533 | |
| 1534 | 1534 | PORT_START("SERVICE") |
| 1535 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 1535 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 1536 | 1536 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 1537 | 1537 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) |
| 1538 | 1538 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics") |
| r14883 | r14884 | |
| 1671 | 1671 | |
| 1672 | 1672 | PORT_START("SERVICE") |
| 1673 | 1673 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) |
| 1674 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 1674 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 1675 | 1675 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 1676 | 1676 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) |
| 1677 | 1677 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics") |
| r14883 | r14884 | |
|---|---|---|
| 30 | 30 | DECLARE_WRITE8_MEMBER(acefruit_sound_w); |
| 31 | 31 | DECLARE_WRITE8_MEMBER(acefruit_lamp_w); |
| 32 | 32 | DECLARE_WRITE8_MEMBER(acefruit_solenoid_w); |
| 33 | DECLARE_CUSTOM_INPUT_MEMBER(sidewndr_payout_r); | |
| 34 | DECLARE_CUSTOM_INPUT_MEMBER(starspnr_coinage_r); | |
| 35 | DECLARE_CUSTOM_INPUT_MEMBER(starspnr_payout_r); | |
| 33 | 36 | }; |
| 34 | 37 | |
| 35 | 38 | |
| r14883 | r14884 | |
| 166 | 169 | return 0; |
| 167 | 170 | } |
| 168 | 171 | |
| 169 | ||
| 172 | ||
| 170 | 173 | { |
| 171 | 174 | int bit_mask = (FPTR)param; |
| 172 | 175 | |
| 173 | 176 | switch (bit_mask) |
| 174 | 177 | { |
| 175 | 178 | case 0x01: |
| 176 | return ((input_port_read( | |
| 179 | return ((input_port_read( | |
| 177 | 180 | case 0x02: |
| 178 | return ((input_port_read( | |
| 181 | return ((input_port_read( | |
| 179 | 182 | default: |
| 180 | 183 | logerror("sidewndr_payout_r : invalid %02X bit_mask\n",bit_mask); |
| 181 | 184 | return 0; |
| 182 | 185 | } |
| 183 | 186 | } |
| 184 | 187 | |
| 185 | ||
| 188 | ||
| 186 | 189 | { |
| 187 | 190 | int bit_mask = (FPTR)param; |
| 188 | 191 | |
| 189 | 192 | switch (bit_mask) |
| 190 | 193 | { |
| 191 | 194 | case 0x01: |
| 192 | return ((input_port_read( | |
| 195 | return ((input_port_read( | |
| 193 | 196 | case 0x02: |
| 194 | return ((input_port_read( | |
| 197 | return ((input_port_read( | |
| 195 | 198 | case 0x04: |
| 196 | return ((input_port_read( | |
| 199 | return ((input_port_read( | |
| 197 | 200 | case 0x08: |
| 198 | return ((input_port_read( | |
| 201 | return ((input_port_read( | |
| 199 | 202 | default: |
| 200 | 203 | logerror("starspnr_coinage_r : invalid %02X bit_mask\n",bit_mask); |
| 201 | 204 | return 0; |
| 202 | 205 | } |
| 203 | 206 | } |
| 204 | 207 | |
| 205 | ||
| 208 | ||
| 206 | 209 | { |
| 207 | 210 | int bit_mask = (FPTR)param; |
| 208 | 211 | |
| 209 | 212 | switch (bit_mask) |
| 210 | 213 | { |
| 211 | 214 | case 0x01: |
| 212 | return ((input_port_read( | |
| 215 | return ((input_port_read( | |
| 213 | 216 | case 0x02: |
| 214 | return ((input_port_read( | |
| 217 | return ((input_port_read( | |
| 215 | 218 | case 0x04: |
| 216 | return ((input_port_read( | |
| 219 | return ((input_port_read( | |
| 217 | 220 | default: |
| 218 | 221 | logerror("starspnr_payout_r : invalid %02X bit_mask\n",bit_mask); |
| 219 | 222 | return 0; |
| r14883 | r14884 | |
| 326 | 329 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME( "Cancel/Clear" ) |
| 327 | 330 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME( "Refill" ) PORT_TOGGLE |
| 328 | 331 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) /* "Token in" - also "Refill" when "Refill" mode ON */ |
| 329 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(sidewndr_payout_r, (void *)0x01) | |
| 332 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,sidewndr_payout_r, (void *)0x01) | |
| 330 | 333 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 331 | 334 | |
| 332 | 335 | PORT_START("IN3") // 3 |
| 333 | 336 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME( "Hold/Nudge 1" ) |
| 334 | 337 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME( "Accountancy System" ) PORT_TOGGLE |
| 335 | 338 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN4 ) /* "50P in" */ |
| 336 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(sidewndr_payout_r, (void *)0x02) | |
| 339 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,sidewndr_payout_r, (void *)0x02) | |
| 337 | 340 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 338 | 341 | |
| 339 | 342 | PORT_START("IN4") // 4 |
| r14883 | r14884 | |
| 440 | 443 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Collect/Cancel" ) |
| 441 | 444 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 442 | 445 | /* tested at 0xeed7 with IN1 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */ |
| 443 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_coinage_r, (void *)0x08) /* to be confirmed */ | |
| 446 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x08) /* to be confirmed */ | |
| 444 | 447 | |
| 445 | 448 | PORT_START("IN2") // 2 |
| 446 | 449 | /* tested at 0xe83c */ |
| r14883 | r14884 | |
| 450 | 453 | /* tested at 0xef82 after IN5 bit 1 and after IN1 bit 3 - after coins are tested - table at 0xefa8 (3 bytes) */ |
| 451 | 454 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 452 | 455 | /* tested at 0xeeba with IN3 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */ |
| 453 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_coinage_r, (void *)0x02) /* to be confirmed */ | |
| 456 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x02) /* to be confirmed */ | |
| 454 | 457 | /* tested at 0x1b0f */ |
| 455 | 458 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 456 | 459 | |
| r14883 | r14884 | |
| 459 | 462 | /* tested at 0xe8ea and 0xecbe */ |
| 460 | 463 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 461 | 464 | /* tested at 0xeeba with IN2 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */ |
| 462 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_coinage_r, (void *)0x01) /* to be confirmed */ | |
| 465 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x01) /* to be confirmed */ | |
| 463 | 466 | /* tested at 0x0178 */ |
| 464 | 467 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 465 | 468 | |
| r14883 | r14884 | |
| 470 | 473 | /* tested at 0xed86 */ |
| 471 | 474 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 472 | 475 | /* tested at 0xeed7 with IN1 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */ |
| 473 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_coinage_r, (void *)0x04) /* to be confirmed */ | |
| 476 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x04) /* to be confirmed */ | |
| 474 | 477 | |
| 475 | 478 | PORT_START("IN5") // 5 |
| 476 | 479 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME( "Hold 3" ) |
| r14883 | r14884 | |
| 479 | 482 | /* tested at 0xec6f */ |
| 480 | 483 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 481 | 484 | /* tested at 0x1d60 with IN6 bit 3 and IN7 bit 3 - table at 0x1d90 (8 * 3 bytes) */ |
| 482 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_payout_r, (void *)0x01) /* to be confirmed */ | |
| 485 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x01) /* to be confirmed */ | |
| 483 | 486 | /* tested at 0xe312 and 0xe377 */ |
| 484 | 487 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 485 | 488 | |
| r14883 | r14884 | |
| 488 | 491 | /* tested at 0xee42, 0xee5e and 0xeff5 before IN1 bit 0 - invalid code after 0xf000 */ |
| 489 | 492 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 490 | 493 | /* tested at 0x1d60 with IN5 bit 3 and IN7 bit 3 - table at 0x1d90 (8 * 3 bytes) */ |
| 491 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_payout_r, (void *)0x02) /* to be confirmed */ | |
| 494 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x02) /* to be confirmed */ | |
| 492 | 495 | /* tested at 0xe8dd and 0xec1c */ |
| 493 | 496 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 494 | 497 | |
| r14883 | r14884 | |
| 500 | 503 | /* tested at 0xedcb */ |
| 501 | 504 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 502 | 505 | /* tested at 0x1d60 with IN5 bit 3 and IN6 bit 3 - table at 0x1d90 (8 * 3 bytes) */ |
| 503 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM(starspnr_payout_r, (void *)0x04) /* to be confirmed */ | |
| 506 | PORT_BIT( 0x08, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x04) /* to be confirmed */ | |
| 504 | 507 | /* tested at 0xec2a */ |
| 505 | 508 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 506 | 509 |
| r14883 | r14884 | |
|---|---|---|
| 17 | 17 | #define PIXEL_CLOCK (MASTER_CLOCK / 2) |
| 18 | 18 | |
| 19 | 19 | |
| 20 | ||
| 20 | ||
| 21 | 21 | { |
| 22 | sprint4_state *state = field.machine().driver_data<sprint4_state>(); | |
| 23 | 22 | int n = (FPTR) param; |
| 24 | 23 | |
| 25 | return 4 * | |
| 24 | return 4 * | |
| 26 | 25 | } |
| 27 | 26 | |
| 28 | 27 | |
| 29 | ||
| 28 | ||
| 30 | 29 | { |
| 31 | sprint4_state *state = field.machine().driver_data<sprint4_state>(); | |
| 32 | 30 | int n = (FPTR) param; |
| 33 | 31 | |
| 34 | return 8 * | |
| 32 | return 8 * | |
| 35 | 33 | } |
| 36 | 34 | |
| 37 | 35 | |
| 38 | ||
| 36 | ||
| 39 | 37 | { |
| 40 | sprint4_state *state = field.machine().driver_data<sprint4_state>(); | |
| 41 | 38 | int n = (FPTR) param; |
| 42 | 39 | |
| 43 | return | |
| 40 | return | |
| 44 | 41 | } |
| 45 | 42 | |
| 46 | 43 | |
| r14883 | r14884 | |
| 269 | 266 | |
| 270 | 267 | PORT_START("COLLISION") |
| 271 | 268 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 1 Gas") PORT_PLAYER(1) |
| 272 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_collision, (void *)0 ) | |
| 269 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)0 ) | |
| 273 | 270 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 2 Gas") PORT_PLAYER(2) |
| 274 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_collision, (void *)1 ) | |
| 271 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)1 ) | |
| 275 | 272 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 3 Gas") PORT_PLAYER(3) |
| 276 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_collision, (void *)2 ) | |
| 273 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)2 ) | |
| 277 | 274 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 4 Gas") PORT_PLAYER(4) |
| 278 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_collision, (void *)3 ) | |
| 275 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)3 ) | |
| 279 | 276 | |
| 280 | 277 | PORT_START("COIN") |
| 281 | 278 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 306 | 303 | PORT_DIPSETTING( 0xe0, "150 seconds" ) |
| 307 | 304 | |
| 308 | 305 | PORT_START("ANALOG") |
| 309 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_wheel, (void *)0) | |
| 310 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_lever, (void *)0) | |
| 311 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_wheel, (void *)1) | |
| 312 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_lever, (void *)1) | |
| 313 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_wheel, (void *)2) | |
| 314 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_lever, (void *)2) | |
| 315 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_wheel, (void *)3) | |
| 316 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( get_lever, (void *)3) | |
| 306 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)0) | |
| 307 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)0) | |
| 308 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)1) | |
| 309 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)1) | |
| 310 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)2) | |
| 311 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)2) | |
| 312 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)3) | |
| 313 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)3) | |
| 317 | 314 | |
| 318 | 315 | PORT_START("WHEEL1") |
| 319 | 316 | PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_PLAYER(1) |
| r14883 | r14884 | |
|---|---|---|
| 214 | 214 | PORT_DIPSETTING( 0x8000, DEF_STR( On ) ) |
| 215 | 215 | |
| 216 | 216 | PORT_START("DSW2") |
| 217 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE") | |
| 218 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "FAKE") | |
| 217 | PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE") | |
| 218 | PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "FAKE") | |
| 219 | 219 | |
| 220 | 220 | PORT_START("FAKE") |
| 221 | 221 | PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) |
| r14883 | r14884 | |
|---|---|---|
| 66 | 66 | DECLARE_READ32_MEMBER(legendoh_speedup_r); |
| 67 | 67 | DECLARE_READ32_MEMBER(sb2003_speedup_r); |
| 68 | 68 | DECLARE_READ32_MEMBER(spotty_speedup_r); |
| 69 | DECLARE_CUSTOM_INPUT_MEMBER(spriteram_bit_r); | |
| 69 | 70 | }; |
| 70 | 71 | |
| 71 | 72 | |
| r14883 | r14884 | |
| 121 | 122 | soundlatch_w(space, 0, (data >> 16) & 0xff); |
| 122 | 123 | } |
| 123 | 124 | |
| 124 | ||
| 125 | ||
| 125 | 126 | { |
| 126 | limenko_state *state = field.machine().driver_data<limenko_state>(); | |
| 127 | return state->m_spriteram_bit; | |
| 127 | return m_spriteram_bit; | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | WRITE32_MEMBER(limenko_state::spriteram_buffer_w) |
| r14883 | r14884 | |
| 545 | 545 | PORT_DIPNAME( 0x20000000, 0x00000000, "Sound Enable" ) |
| 546 | 546 | PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) ) |
| 547 | 547 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) |
| 548 | PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(spriteram_bit_r, NULL) //changes spriteram location | |
| 548 | PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, NULL) //changes spriteram location | |
| 549 | 549 | PORT_BIT( 0x4000ffff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 550 | 550 | |
| 551 | 551 | PORT_START( "EEPROMOUT" ) |
| r14883 | r14884 | |
| 589 | 589 | PORT_DIPNAME( 0x20000000, 0x00000000, "Sound Enable" ) |
| 590 | 590 | PORT_DIPSETTING( 0x20000000, DEF_STR( Off ) ) |
| 591 | 591 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) |
| 592 | PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(spriteram_bit_r, NULL) //changes spriteram location | |
| 592 | PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, NULL) //changes spriteram location | |
| 593 | 593 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_SERVICE1 ) // checked in dynabomb I/O test, but doesn't work in game |
| 594 | 594 | PORT_BIT( 0x5f00ffff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 595 | 595 | |
| r14883 | r14884 | |
| 627 | 627 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_START1 ) |
| 628 | 628 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 629 | 629 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 630 | PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(spriteram_bit_r, NULL) //changes spriteram location | |
| 630 | PORT_BIT( 0x00080000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, NULL) //changes spriteram location | |
| 631 | 631 | PORT_SERVICE_NO_TOGGLE( 0x00200000, IP_ACTIVE_LOW ) |
| 632 | 632 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_SPECIAL ) //security bit |
| 633 | 633 | PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| r14883 | r14884 | |
|---|---|---|
| 151 | 151 | jankenmn_state(const machine_config &mconfig, device_type type, const char *tag) |
| 152 | 152 | : driver_device(mconfig, type, tag) { } |
| 153 | 153 | |
| 154 | DECLARE_CUSTOM_INPUT_MEMBER(jankenmn_hopper_status_r); | |
| 154 | 155 | }; |
| 155 | 156 | |
| 156 | 157 | |
| r14883 | r14884 | |
| 214 | 215 | // d0, d6, d7: N/C? |
| 215 | 216 | } |
| 216 | 217 | |
| 217 | ||
| 218 | ||
| 218 | 219 | { |
| 219 | 220 | // temp workaround, needs hopper |
| 220 | return | |
| 221 | return | |
| 221 | 222 | } |
| 222 | 223 | |
| 223 | 224 | |
| r14883 | r14884 | |
| 251 | 252 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("Paa (Paper)") |
| 252 | 253 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 253 | 254 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN3 ) // 100 yen coin |
| 254 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(jankenmn_hopper_status_r, NULL) | |
| 255 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jankenmn_state,jankenmn_hopper_status_r, NULL) | |
| 255 | 256 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) // 10 yen coin |
| 256 | 257 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) // 10 yen coin |
| 257 | 258 |
| r14883 | r14884 | |
|---|---|---|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | |
| 343 | static CUSTOM_INPUT( high_port_r ) { return input_port_read(field.machine(), (const char *)param) >> 4; } | |
| 344 | static CUSTOM_INPUT( low_port_r ) { return input_port_read(field.machine(), (const char *)param) & 0x0f; } | |
| 345 | static CUSTOM_INPUT( auto_start_r ) | |
| 343 | CUSTOM_INPUT_MEMBER(polepos_state::high_port_r){ return input_port_read(field.machine(), (const char *)param) >> 4; } | |
| 344 | CUSTOM_INPUT_MEMBER(polepos_state::low_port_r){ return input_port_read(field.machine(), (const char *)param) & 0x0f; } | |
| 345 | CUSTOM_INPUT_MEMBER(polepos_state::auto_start_r) | |
| 346 | 346 | { |
| 347 | polepos_state *state = field.machine().driver_data<polepos_state>(); | |
| 348 | return state->m_auto_start_mask; | |
| 347 | return m_auto_start_mask; | |
| 349 | 348 | } |
| 350 | 349 | |
| 351 | 350 | static WRITE8_DEVICE_HANDLER( out_0 ) |
| r14883 | r14884 | |
| 533 | 532 | PORT_START("IN0L") |
| 534 | 533 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 535 | 534 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gear Change") PORT_CODE(KEYCODE_SPACE) POLEPOS_TOGGLE /* Gear */ |
| 536 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(auto_start_r, NULL) // start 1, program controlled | |
| 535 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,auto_start_r, NULL) // start 1, program controlled | |
| 537 | 536 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 538 | 537 | |
| 539 | 538 | PORT_START("IN0H") |
| r14883 | r14884 | |
| 567 | 566 | PORT_DIPSETTING( 0x00, "4" ) |
| 568 | 567 | |
| 569 | 568 | PORT_START("DSWA_HI") |
| 570 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM(high_port_r, "DSWA") | |
| 569 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,high_port_r, "DSWA") | |
| 571 | 570 | |
| 572 | 571 | PORT_START("DSWB") |
| 573 | 572 | PORT_DIPNAME( 0x07, 0x07, "Extended Rank" ) |
| r14883 | r14884 | |
| 596 | 595 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 597 | 596 | |
| 598 | 597 | PORT_START("DSWB_HI") |
| 599 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM(high_port_r, "DSWB") | |
| 598 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,high_port_r, "DSWB") | |
| 600 | 599 | |
| 601 | 600 | PORT_START("BRAKE") |
| 602 | 601 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) |
| r14883 | r14884 | |
| 675 | 674 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) |
| 676 | 675 | |
| 677 | 676 | PORT_START("IN0L") |
| 678 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM(low_port_r, "IN0") | |
| 677 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,low_port_r, "IN0") | |
| 679 | 678 | |
| 680 | 679 | PORT_START("IN0H") |
| 681 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM(high_port_r, "IN0") | |
| 680 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,high_port_r, "IN0") | |
| 682 | 681 | |
| 683 | 682 | PORT_START("DSWA") |
| 684 | 683 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) |
| r14883 | r14884 | |
| 705 | 704 | PORT_DIPSETTING( 0x00, "4" ) |
| 706 | 705 | |
| 707 | 706 | PORT_START("DSWA_HI") |
| 708 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM(high_port_r, "DSWA") | |
| 707 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,high_port_r, "DSWA") | |
| 709 | 708 | |
| 710 | 709 | /* FIXME: these dips don't work and may not even exist on this bootleg */ |
| 711 | 710 | PORT_START("DSWB") |
| r14883 | r14884 | |
| 735 | 734 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 736 | 735 | |
| 737 | 736 | PORT_START("DSWB_HI") |
| 738 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM(high_port_r, "DSWB") | |
| 737 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,high_port_r, "DSWB") | |
| 739 | 738 | |
| 740 | 739 | PORT_START("BRAKE") |
| 741 | 740 | PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0,0x90) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) |
| r14883 | r14884 | |
|---|---|---|
| 37 | 37 | * |
| 38 | 38 | *************************************/ |
| 39 | 39 | |
| 40 | ||
| 40 | ||
| 41 | 41 | { |
| 42 | qdrmfgp_state *state = field.machine().driver_data<qdrmfgp_state>(); | |
| 43 | 42 | const char *tag1 = (const char *)param; |
| 44 | 43 | const char *tag2 = tag1 + strlen(tag1) + 1; |
| 45 | return input_port_read( | |
| 44 | return input_port_read( | |
| 46 | 45 | } |
| 47 | 46 | |
| 48 | ||
| 47 | ||
| 49 | 48 | { |
| 50 | 49 | /* bit 0-1 battery power sensor: 3=good, 2=low, other=bad */ |
| 51 | 50 | return 0x0003; |
| r14883 | r14884 | |
| 385 | 384 | |
| 386 | 385 | static INPUT_PORTS_START( qdrmfgp ) |
| 387 | 386 | PORT_START("340000") |
| 388 | PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(inputs_r, "INPUTS\0DSW") | |
| 387 | PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,inputs_r, "INPUTS\0DSW") | |
| 389 | 388 | |
| 390 | 389 | PORT_START("INPUTS") |
| 391 | 390 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) |
| r14883 | r14884 | |
| 460 | 459 | PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) ) |
| 461 | 460 | |
| 462 | 461 | PORT_START("SENSOR") |
| 463 | PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(battery_sensor_r, NULL) /* battery power sensor */ | |
| 462 | PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,battery_sensor_r, NULL) /* battery power sensor */ | |
| 464 | 463 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| 465 | 464 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE3 ) |
| 466 | 465 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 468 | 467 | |
| 469 | 468 | static INPUT_PORTS_START( qdrmfgp2 ) |
| 470 | 469 | PORT_START("340000") |
| 471 | PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(inputs_r, "INPUTS\0DSW") | |
| 470 | PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,inputs_r, "INPUTS\0DSW") | |
| 472 | 471 | |
| 473 | 472 | PORT_START("INPUTS") |
| 474 | 473 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) |
| r14883 | r14884 | |
| 543 | 542 | PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) ) |
| 544 | 543 | |
| 545 | 544 | PORT_START("SENSOR") |
| 546 | PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(battery_sensor_r, NULL) /* battery power sensor */ | |
| 545 | PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,battery_sensor_r, NULL) /* battery power sensor */ | |
| 547 | 546 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE2 ) |
| 548 | 547 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE3 ) |
| 549 | 548 | PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 49 | 49 | UINT8 *m_soundram; |
| 50 | 50 | DECLARE_READ8_MEMBER(scobra_soundram_r); |
| 51 | 51 | DECLARE_WRITE8_MEMBER(scobra_soundram_w); |
| 52 | DECLARE_CUSTOM_INPUT_MEMBER(stratgyx_coinage_r); | |
| 52 | 53 | }; |
| 53 | 54 | |
| 54 | 55 | |
| r14883 | r14884 | |
| 263 | 264 | ADDRESS_MAP_END |
| 264 | 265 | |
| 265 | 266 | /* stratgyx coinage DIPs are spread across two input ports */ |
| 266 | ||
| 267 | ||
| 267 | 268 | { |
| 268 | 269 | int bit_mask = (FPTR)param; |
| 269 | return (input_port_read( | |
| 270 | return (input_port_read( | |
| 270 | 271 | } |
| 271 | 272 | |
| 272 | 273 | |
| r14883 | r14884 | |
| 296 | 297 | |
| 297 | 298 | PORT_START("IN2") |
| 298 | 299 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 299 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stratgyx_coinage_r, (void *)0x01) /* lower 2 coinage DIPs */ | |
| 300 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stratgyx_coinage_r, (void *)0x02) /* lower 2 coinage DIPs */ | |
| 300 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x01) /* lower 2 coinage DIPs */ | |
| 301 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x02) /* lower 2 coinage DIPs */ | |
| 301 | 302 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) |
| 302 | 303 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 303 | 304 | PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) ) |
| r14883 | r14884 | |
| 307 | 308 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 308 | 309 | |
| 309 | 310 | PORT_START("IN3") |
| 310 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stratgyx_coinage_r, (void *)0x04) /* upper 2 coinage DIPs */ | |
| 311 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stratgyx_coinage_r, (void *)0x08) /* upper 2 coinage DIPs */ | |
| 311 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x04) /* upper 2 coinage DIPs */ | |
| 312 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x08) /* upper 2 coinage DIPs */ | |
| 312 | 313 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) /* none of these appear to be used */ |
| 313 | 314 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 314 | 315 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r14883 | r14884 | |
| 367 | 368 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) |
| 368 | 369 | PORT_DIPSETTING( 0x00, "3" ) |
| 369 | 370 | PORT_DIPSETTING( 0x02, "5" ) |
| 370 | PORT_BIT( 0xfc, 0x00, IPT_SPECIAL ) PORT_CUSTOM(darkplnt_custom_r, "DIAL") /* scrambled dial */ | |
| 371 | PORT_BIT( 0xfc, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,scobra_state, darkplnt_custom_r, "DIAL") /* scrambled dial */ | |
| 371 | 372 | |
| 372 | 373 | PORT_START("IN2") |
| 373 | 374 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 53 | 53 | * |
| 54 | 54 | *************************************/ |
| 55 | 55 | |
| 56 | ||
| 56 | ||
| 57 | 57 | { |
| 58 | stactics_state *state = field.machine().driver_data<stactics_state>(); | |
| 59 | 58 | |
| 60 | 59 | /* if the motor is self-centering, but not centered yet */ |
| 61 | return ((*state->m_motor_on & 0x01) == 0) && | |
| 62 | ((state->m_horiz_pos != 0) || (state->m_vert_pos != 0)); | |
| 60 | return ((*m_motor_on & 0x01) == 0) && | |
| 61 | ((m_horiz_pos != 0) || (m_vert_pos != 0)); | |
| 63 | 62 | } |
| 64 | 63 | |
| 65 | 64 | |
| r14883 | r14884 | |
| 125 | 124 | * |
| 126 | 125 | *************************************/ |
| 127 | 126 | |
| 128 | ||
| 127 | ||
| 129 | 128 | { |
| 130 | 129 | /* this is a 555 timer, but cannot read one of the resistor values */ |
| 131 | return | |
| 130 | return | |
| 132 | 131 | } |
| 133 | 132 | |
| 134 | 133 | |
| r14883 | r14884 | |
| 216 | 215 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 217 | 216 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 218 | 217 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 219 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_motor_not_ready, NULL) | |
| 218 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,get_motor_not_ready, NULL) | |
| 220 | 219 | |
| 221 | 220 | PORT_START("IN1") /* IN1 */ |
| 222 | 221 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_B ) ) |
| r14883 | r14884 | |
| 245 | 244 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 246 | 245 | |
| 247 | 246 | PORT_START("IN2") /* IN2 */ |
| 248 | PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_rng, NULL) | |
| 249 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_frame_count_d3, NULL) | |
| 247 | PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,get_rng, NULL) | |
| 248 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,stactics_get_frame_count_d3, NULL) | |
| 250 | 249 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 251 | 250 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 252 | 251 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) |
| r14883 | r14884 | |
| 256 | 255 | |
| 257 | 256 | PORT_START("IN3") /* IN3 */ |
| 258 | 257 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 259 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_shot_standby, NULL) | |
| 258 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,stactics_get_shot_standby, NULL) | |
| 260 | 259 | PORT_DIPNAME( 0x04, 0x04, "Number of Barriers" ) |
| 261 | 260 | PORT_DIPSETTING( 0x04, "4" ) |
| 262 | 261 | PORT_DIPSETTING( 0x00, "6" ) |
| r14883 | r14884 | |
| 268 | 267 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 269 | 268 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 270 | 269 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 271 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(stactics_get_not_shot_arrive, NULL) | |
| 270 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state,stactics_get_not_shot_arrive, NULL) | |
| 272 | 271 | |
| 273 | 272 | PORT_START("FAKE") /* FAKE */ |
| 274 | 273 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r14883 | r14884 | |
|---|---|---|
| 159 | 159 | * |
| 160 | 160 | *************************************/ |
| 161 | 161 | |
| 162 | ||
| 162 | ||
| 163 | 163 | { |
| 164 | int value = input_port_read( | |
| 164 | int value = input_port_read( | |
| 165 | 165 | return ((value << 4) & 0xf00) | (value & 0x00f); |
| 166 | 166 | } |
| 167 | 167 | |
| r14883 | r14884 | |
| 541 | 541 | PORT_DIPSETTING( 0x0000, "3000" ) |
| 542 | 542 | |
| 543 | 543 | PORT_START("IN1") |
| 544 | PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cclownz_paddle, NULL) | |
| 544 | PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, lethalj_state,cclownz_paddle, NULL) | |
| 545 | 545 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE("ticket", ticket_dispenser_line_r) |
| 546 | 546 | PORT_BIT( 0x0060, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 547 | 547 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| r14883 | r14884 | |
|---|---|---|
| 726 | 726 | * |
| 727 | 727 | *************************************/ |
| 728 | 728 | |
| 729 | ||
| 729 | ||
| 730 | 730 | { |
| 731 | itech8_state *state = field.machine().driver_data<itech8_state>(); | |
| 732 | return state->m_pia_portb_data & 0x01; | |
| 731 | return m_pia_portb_data & 0x01; | |
| 733 | 732 | } |
| 734 | 733 | |
| 735 | 734 | |
| r14883 | r14884 | |
| 993 | 992 | |
| 994 | 993 | static INPUT_PORTS_START( wfortune ) |
| 995 | 994 | PORT_START("40") |
| 996 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 995 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 997 | 996 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 998 | 997 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) |
| 999 | 998 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
| r14883 | r14884 | |
| 1022 | 1021 | |
| 1023 | 1022 | static INPUT_PORTS_START( grmatch ) |
| 1024 | 1023 | PORT_START("40") |
| 1025 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1024 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1026 | 1025 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1027 | 1026 | PORT_DIPNAME( 0x08, 0x08, "Adjustments Lockout" ) |
| 1028 | 1027 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| r14883 | r14884 | |
| 1060 | 1059 | |
| 1061 | 1060 | static INPUT_PORTS_START( stratab ) |
| 1062 | 1061 | PORT_START("40") |
| 1063 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1062 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1064 | 1063 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1065 | 1064 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) |
| 1066 | 1065 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
| r14883 | r14884 | |
| 1095 | 1094 | INPUT_PORTS_END |
| 1096 | 1095 | |
| 1097 | 1096 | |
| 1098 | ||
| 1097 | ||
| 1099 | 1098 | { |
| 1100 | 1099 | const char *tag1 = (const char *)param; |
| 1101 | 1100 | const char *tag2 = tag1 + strlen(tag1) + 1; |
| 1102 | return input_port_read( | |
| 1101 | return input_port_read( | |
| 1103 | 1102 | } |
| 1104 | 1103 | |
| 1105 | 1104 | static INPUT_PORTS_START( gtg ) |
| 1106 | 1105 | PORT_START("40") |
| 1107 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1106 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1108 | 1107 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1109 | 1108 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) |
| 1110 | 1109 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
| r14883 | r14884 | |
| 1115 | 1114 | PORT_START("60") |
| 1116 | 1115 | /* it is still unknown how the second player inputs are muxed in */ |
| 1117 | 1116 | /* currently we map both sets of controls to the same inputs */ |
| 1118 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gtg_mux, "P1\0P2") | |
| 1117 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,gtg_mux, "P1\0P2") | |
| 1119 | 1118 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) |
| 1120 | 1119 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1121 | 1120 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 1141 | 1140 | |
| 1142 | 1141 | static INPUT_PORTS_START( gtgt ) |
| 1143 | 1142 | PORT_START("40") |
| 1144 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1143 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1145 | 1144 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1146 | 1145 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 1147 | 1146 | |
| r14883 | r14884 | |
| 1168 | 1167 | |
| 1169 | 1168 | static INPUT_PORTS_START( gtg2t ) |
| 1170 | 1169 | PORT_START("40") |
| 1171 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1170 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1172 | 1171 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1173 | 1172 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) |
| 1174 | 1173 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
| r14883 | r14884 | |
| 1205 | 1204 | |
| 1206 | 1205 | static INPUT_PORTS_START( slikshot ) |
| 1207 | 1206 | PORT_START("40") |
| 1208 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1207 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1209 | 1208 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1210 | 1209 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 1211 | 1210 | |
| r14883 | r14884 | |
| 1232 | 1231 | |
| 1233 | 1232 | static INPUT_PORTS_START( dynobop ) |
| 1234 | 1233 | PORT_START("40") |
| 1235 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1234 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1236 | 1235 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1237 | 1236 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 1238 | 1237 | |
| r14883 | r14884 | |
| 1259 | 1258 | |
| 1260 | 1259 | static INPUT_PORTS_START( sstrike ) |
| 1261 | 1260 | PORT_START("40") |
| 1262 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1261 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1263 | 1262 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1264 | 1263 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 1265 | 1264 | |
| r14883 | r14884 | |
| 1286 | 1285 | |
| 1287 | 1286 | static INPUT_PORTS_START( pokrdice ) |
| 1288 | 1287 | PORT_START("40") |
| 1289 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1288 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1290 | 1289 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Lower Right") PORT_CODE(KEYCODE_3_PAD) |
| 1291 | 1290 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1292 | 1291 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) |
| r14883 | r14884 | |
| 1315 | 1314 | |
| 1316 | 1315 | static INPUT_PORTS_START( hstennis ) |
| 1317 | 1316 | PORT_START("40") |
| 1318 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1317 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1319 | 1318 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1320 | 1319 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) ) |
| 1321 | 1320 | PORT_DIPSETTING( 0x08, DEF_STR( Upright ) ) |
| r14883 | r14884 | |
| 1350 | 1349 | |
| 1351 | 1350 | static INPUT_PORTS_START( arlingtn ) |
| 1352 | 1351 | PORT_START("40") |
| 1353 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1352 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1354 | 1353 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1355 | 1354 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* see code at e23c */ |
| 1356 | 1355 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r14883 | r14884 | |
| 1381 | 1380 | |
| 1382 | 1381 | static INPUT_PORTS_START( peggle ) |
| 1383 | 1382 | PORT_START("40") |
| 1384 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1383 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1385 | 1384 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1386 | 1385 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 1387 | 1386 | |
| r14883 | r14884 | |
| 1403 | 1402 | |
| 1404 | 1403 | static INPUT_PORTS_START( pegglet ) |
| 1405 | 1404 | PORT_START("40") |
| 1406 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1405 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1407 | 1406 | PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1408 | 1407 | PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) |
| 1409 | 1408 | |
| r14883 | r14884 | |
| 1425 | 1424 | |
| 1426 | 1425 | static INPUT_PORTS_START( neckneck ) |
| 1427 | 1426 | PORT_START("40") |
| 1428 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1427 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1429 | 1428 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1430 | 1429 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* see code at e23c */ |
| 1431 | 1430 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r14883 | r14884 | |
| 1466 | 1465 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 1467 | 1466 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 1468 | 1467 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1469 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(special_r, NULL) /* input from sound board */ | |
| 1468 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, NULL) /* input from sound board */ | |
| 1470 | 1469 | |
| 1471 | 1470 | PORT_START("80") |
| 1472 | 1471 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 726 | 726 | } |
| 727 | 727 | |
| 728 | 728 | |
| 729 | ||
| 729 | ||
| 730 | 730 | { |
| 731 | galaxian_state *state = field.machine().driver_data<galaxian_state>(); | |
| 732 | 731 | /* |
| 733 | 732 | There are two additional bits that are derived from bit 7 of |
| 734 | 733 | the protection result. This is just a guess but works well enough |
| 735 | 734 | to boot scrambls. |
| 736 | 735 | */ |
| 737 | return ( | |
| 736 | return ( | |
| 738 | 737 | } |
| 739 | 738 | |
| 740 | 739 | |
| r14883 | r14884 | |
| 1102 | 1101 | } |
| 1103 | 1102 | |
| 1104 | 1103 | |
| 1105 | ||
| 1104 | ||
| 1106 | 1105 | { |
| 1107 | galaxian_state *state = field.machine().driver_data<galaxian_state>(); | |
| 1108 | 1106 | const char *portname = (const char *)param; |
| 1109 | if ( | |
| 1107 | if ( | |
| 1110 | 1108 | portname += strlen(portname) + 1; |
| 1111 | return input_port_read( | |
| 1109 | return input_port_read( | |
| 1112 | 1110 | } |
| 1113 | 1111 | |
| 1114 | 1112 | |
| r14883 | r14884 | |
| 1158 | 1156 | * |
| 1159 | 1157 | *************************************/ |
| 1160 | 1158 | |
| 1161 | ||
| 1159 | ||
| 1162 | 1160 | { |
| 1163 | return (input_port_read( | |
| 1161 | return (input_port_read( | |
| 1164 | 1162 | } |
| 1165 | 1163 | |
| 1166 | 1164 | |
| r14883 | r14884 | |
| 1171 | 1169 | * |
| 1172 | 1170 | *************************************/ |
| 1173 | 1171 | |
| 1174 | ||
| 1172 | ||
| 1175 | 1173 | { |
| 1176 | galaxian_state *state = field.machine().driver_data<galaxian_state>(); | |
| 1177 | 1174 | /* multiplex the service mode switch with a speech DIP switch */ |
| 1178 | return (input_port_read( | |
| 1175 | return (input_port_read( | |
| 1179 | 1176 | } |
| 1180 | 1177 | |
| 1181 | 1178 | |
| 1182 | ||
| 1179 | ||
| 1183 | 1180 | { |
| 1184 | 1181 | /* bit 5 is the NOISE line from the sound circuit. The code just verifies |
| 1185 | 1182 | that it's working, doesn't actually use return value, so we can just use |
| 1186 | 1183 | rand() */ |
| 1187 | return | |
| 1184 | return | |
| 1188 | 1185 | } |
| 1189 | 1186 | |
| 1190 | 1187 |
| r14883 | r14884 | |
|---|---|---|
| 117 | 117 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE(m_workram) /* work RAM */ |
| 118 | 118 | ADDRESS_MAP_END |
| 119 | 119 | |
| 120 | ||
| 120 | ||
| 121 | 121 | { |
| 122 | flstory_state *state = field.machine().driver_data<flstory_state>(); | |
| 123 | address_space *space = state->m_maincpu->memory().space(AS_PROGRAM); | |
| 122 | address_space *space = m_maincpu->memory().space(AS_PROGRAM); | |
| 124 | 123 | |
| 125 | return ( | |
| 124 | return ( | |
| 126 | 125 | } |
| 127 | 126 | |
| 128 | 127 | static ADDRESS_MAP_START( victnine_map, AS_PROGRAM, 8, flstory_state ) |
| r14883 | r14884 | |
| 785 | 784 | /* bits 0,1 are MCU related: |
| 786 | 785 | - bit 0: mcu is ready to receive data from main cpu |
| 787 | 786 | - bit 1: mcu has sent data to the main cpu */ |
| 788 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(victnine_mcu_status_bit01_r, NULL) | |
| 787 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, flstory_state,victnine_mcu_status_bit01_r, NULL) | |
| 789 | 788 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 790 | 789 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) |
| 791 | 790 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) |
| r14883 | r14884 | |
| 928 | 927 | /* bits 0,1 are MCU related: |
| 929 | 928 | - bit 0: mcu is ready to receive data from main cpu |
| 930 | 929 | - bit 1: mcu has sent data to the main cpu */ |
| 931 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(victnine_mcu_status_bit01_r, NULL) | |
| 930 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, flstory_state,victnine_mcu_status_bit01_r, NULL) | |
| 932 | 931 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 933 | 932 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 934 | 933 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 1163 | 1163 | |
| 1164 | 1164 | /* Mascon must always be in a defined state, Densha de Go 2 in particular returns black screen if the Mascon input is undefined |
| 1165 | 1165 | We convert the 6 lever "shifter" into a fake analog port for now. */ |
| 1166 | ||
| 1166 | ||
| 1167 | 1167 | { |
| 1168 | 1168 | static const UINT8 mascon_table[6] = { 0x01, 0x10, 0x02, 0x20, 0x04, 0x40 }; |
| 1169 | UINT8 res = input_port_read( | |
| 1169 | UINT8 res = input_port_read( | |
| 1170 | 1170 | int i; |
| 1171 | 1171 | |
| 1172 | 1172 | //popmessage("%02x",res); |
| r14883 | r14884 | |
| 1205 | 1205 | PORT_START("BUTTONS") |
| 1206 | 1206 | /* TODO: fix this */ |
| 1207 | 1207 | PORT_BIT( 0x88, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1208 | PORT_BIT( 0x77, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(mascon_state_r,NULL) | |
| 1208 | PORT_BIT( 0x77, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitojc_state,mascon_state_r,NULL) | |
| 1209 | 1209 | // PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Mascon 5") // Mascon 5 |
| 1210 | 1210 | // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Mascon 3") // Mascon 3 |
| 1211 | 1211 | // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Mascon 1") // Mascon 1 |
| r14883 | r14884 | |
|---|---|---|
| 224 | 224 | #define SUPRRIDR_P1_CONTROL_PORT_TAG ("CONTP1") |
| 225 | 225 | #define SUPRRIDR_P2_CONTROL_PORT_TAG ("CONTP2") |
| 226 | 226 | |
| 227 | ||
| 227 | ||
| 228 | 228 | { |
| 229 | 229 | UINT32 ret; |
| 230 | 230 | |
| 231 | 231 | /* screen flip multiplexes controls */ |
| 232 | if (suprridr_is_screen_flipped(field.machine())) | |
| 233 | ret = input_port_read(field.machine(), SUPRRIDR_P2_CONTROL_PORT_TAG); | |
| 232 | if (suprridr_is_screen_flipped(machine())) | |
| 233 | ret = input_port_read(machine(), SUPRRIDR_P2_CONTROL_PORT_TAG); | |
| 234 | 234 | else |
| 235 | ret = input_port_read( | |
| 235 | ret = input_port_read( | |
| 236 | 236 | |
| 237 | 237 | return ret; |
| 238 | 238 | } |
| r14883 | r14884 | |
| 240 | 240 | |
| 241 | 241 | static INPUT_PORTS_START( suprridr ) |
| 242 | 242 | PORT_START("INPUTS") |
| 243 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(suprridr_control_r, NULL) | |
| 243 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, suprridr_state,suprridr_control_r, NULL) | |
| 244 | 244 | |
| 245 | 245 | PORT_START("SYSTEM") |
| 246 | 246 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| r14883 | r14884 | |
|---|---|---|
| 60 | 60 | DECLARE_WRITE8_MEMBER(jingbell_magic_w); |
| 61 | 61 | DECLARE_READ8_MEMBER(jingbell_magic_r); |
| 62 | 62 | void show_out(); |
| 63 | DECLARE_CUSTOM_INPUT_MEMBER(hopper_r); | |
| 63 | 64 | }; |
| 64 | 65 | |
| 65 | 66 | |
| r14883 | r14884 | |
| 343 | 344 | ***************************************************************************/ |
| 344 | 345 | |
| 345 | 346 | |
| 346 | ||
| 347 | ||
| 347 | 348 | { |
| 348 | igs009_state *state = field.machine().driver_data<igs009_state>(); | |
| 349 | return state->m_hopper && !(field.machine().primary_screen->frame_number()%10); | |
| 349 | return m_hopper && !(machine().primary_screen->frame_number()%10); | |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | |
| r14883 | r14884 | |
| 549 | 549 | PORT_START("SERVICE") |
| 550 | 550 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 551 | 551 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Memory Clear") // stats, memory |
| 552 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 552 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igs009_state,hopper_r, (void *)0 ) // hopper sensor | |
| 553 | 553 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 554 | 554 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Pay Out") |
| 555 | 555 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot) |
| r14883 | r14884 | |
|---|---|---|
| 77 | 77 | |
| 78 | 78 | ***************************************************************************/ |
| 79 | 79 | |
| 80 | ||
| 80 | ||
| 81 | 81 | { |
| 82 | psikyo_state *state = field.machine().driver_data<psikyo_state>(); | |
| 83 | 82 | int ret = 0x00; |
| 84 | 83 | |
| 85 | if ( | |
| 84 | if ( | |
| 86 | 85 | { |
| 87 | 86 | ret = 0x01; |
| 88 | 87 | |
| 89 | 88 | /* main CPU might be waiting for sound CPU to finish NMI, |
| 90 | 89 | so set a timer to give sound CPU a chance to run */ |
| 91 | | |
| 90 | | |
| 92 | 91 | // logerror("%s - Read coin port during Z80 NMI\n", machine.describe_context()); |
| 93 | 92 | } |
| 94 | 93 | |
| 95 | 94 | return ret; |
| 96 | 95 | } |
| 97 | 96 | |
| 98 | ||
| 97 | ||
| 99 | 98 | { |
| 100 | psikyo_state *state = field.machine().driver_data<psikyo_state>(); | |
| 101 | 99 | int ret = 0x00; |
| 102 | 100 | |
| 103 | 101 | /* Don't know exactly what this bit is, but s1945 and tengai |
| r14883 | r14884 | |
| 114 | 112 | |
| 115 | 113 | Interestingly, s1945jn has the code that spins on this bit, |
| 116 | 114 | but said code is never reached. Prototype? */ |
| 117 | if ( | |
| 115 | if ( | |
| 118 | 116 | ret = 0x01; |
| 119 | 117 | |
| 120 | | |
| 118 | | |
| 121 | 119 | |
| 122 | 120 | return ret; |
| 123 | 121 | } |
| r14883 | r14884 | |
| 582 | 580 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 583 | 581 | PORT_SERVICE_NO_TOGGLE( 0x00200000, IP_ACTIVE_LOW ) |
| 584 | 582 | PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_TILT ) |
| 585 | PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(z80_nmi_r, NULL) // From Sound CPU | |
| 583 | PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU | |
| 586 | 584 | PORT_BIT( 0xff000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused? |
| 587 | 585 | |
| 588 | 586 | PORT_MODIFY("DSW") /* c00004 -> c00007 */ |
| r14883 | r14884 | |
| 652 | 650 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 653 | 651 | PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW ) |
| 654 | 652 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT ) |
| 655 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(z80_nmi_r, NULL) // From Sound CPU | |
| 653 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU | |
| 656 | 654 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 657 | 655 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 658 | 656 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| r14883 | r14884 | |
| 739 | 737 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 740 | 738 | PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW ) |
| 741 | 739 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT ) |
| 742 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(z80_nmi_r, NULL) // From Sound CPU | |
| 740 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU | |
| 743 | 741 | PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 744 | 742 | |
| 745 | 743 | PORT_MODIFY("DSW") /* c00004 -> c00007 */ |
| r14883 | r14884 | |
| 803 | 801 | PORT_MODIFY("P1_P2") /* c00000 -> c00003 */ |
| 804 | 802 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 805 | 803 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 806 | PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mcu_status_r, NULL) | |
| 804 | PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,mcu_status_r, NULL) | |
| 807 | 805 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 808 | 806 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 809 | 807 | PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW ) |
| 810 | 808 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT ) |
| 811 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(z80_nmi_r, NULL) // From Sound CPU | |
| 809 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU | |
| 812 | 810 | PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 813 | 811 | |
| 814 | 812 | PORT_MODIFY("DSW") /* c00004 -> c00007 */ |
| r14883 | r14884 | |
| 927 | 925 | PORT_MODIFY("P1_P2") /* c00000 -> c00003 */ |
| 928 | 926 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 929 | 927 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 930 | PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mcu_status_r, NULL) | |
| 928 | PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,mcu_status_r, NULL) | |
| 931 | 929 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 932 | 930 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 933 | 931 | PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW ) |
| 934 | 932 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT ) |
| 935 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(z80_nmi_r, NULL) // From Sound CPU | |
| 933 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, NULL) // From Sound CPU | |
| 936 | 934 | PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 937 | 935 | |
| 938 | 936 | PORT_MODIFY("DSW") /* c00004 -> c00007 */ |
| r14883 | r14884 | |
|---|---|---|
| 81 | 81 | DECLARE_WRITE8_MEMBER(snd_ack_w); |
| 82 | 82 | DECLARE_WRITE8_MEMBER(snd_irq_w); |
| 83 | 83 | DECLARE_WRITE8_MEMBER(music_irq_w); |
| 84 | DECLARE_CUSTOM_INPUT_MEMBER(snd_ack_r); | |
| 84 | 85 | }; |
| 85 | 86 | |
| 86 | 87 | static TILE_GET_INFO( get_bg_tile_info ) |
| r14883 | r14884 | |
| 266 | 267 | m_snd_ack = data; |
| 267 | 268 | } |
| 268 | 269 | |
| 269 | ||
| 270 | ||
| 270 | 271 | { |
| 271 | dacholer_state *state = field.machine().driver_data<dacholer_state>(); | |
| 272 | return state->m_snd_ack; //guess ... | |
| 272 | return m_snd_ack; //guess ... | |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | WRITE8_MEMBER(dacholer_state::snd_irq_w) |
| r14883 | r14884 | |
| 345 | 345 | PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) ) |
| 346 | 346 | PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) ) |
| 347 | 347 | PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) |
| 348 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snd_ack_r, NULL) | |
| 348 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dacholer_state,snd_ack_r, NULL) | |
| 349 | 349 | |
| 350 | 350 | PORT_START("DSWB") |
| 351 | 351 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) /* table at 0x0a9c */ |
| r14883 | r14884 | |
|---|---|---|
| 212 | 212 | INPUT_PORTS_END |
| 213 | 213 | |
| 214 | 214 | // stops the game hanging.. |
| 215 | ||
| 215 | ||
| 216 | 216 | { |
| 217 | return | |
| 217 | return | |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | static INPUT_PORTS_START( threeds ) |
| r14883 | r14884 | |
| 369 | 369 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 370 | 370 | |
| 371 | 371 | PORT_START("SYSTEM") |
| 372 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(nb1413m3_hackbusyflag_r, NULL) // DRAW BUSY | |
| 372 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pastelg_state,nb1413m3_hackbusyflag_r, NULL) // DRAW BUSY | |
| 373 | 373 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE3 ) // MEMORY RESET |
| 374 | 374 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER |
| 375 | 375 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST |
| r14883 | r14884 | |
|---|---|---|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | |
| 90 | ||
| 90 | ||
| 91 | 91 | { |
| 92 | galastrm_state *state = field.machine().driver_data<galastrm_state>(); | |
| 93 | return state->m_frame_counter; | |
| 92 | return m_frame_counter; | |
| 94 | 93 | } |
| 95 | 94 | |
| 96 | ||
| 95 | ||
| 97 | 96 | { |
| 98 | galastrm_state *state = field.machine().driver_data<galastrm_state>(); | |
| 99 | return state->m_coin_word; | |
| 97 | return m_coin_word; | |
| 100 | 98 | } |
| 101 | 99 | |
| 102 | 100 | WRITE32_MEMBER(galastrm_state::galastrm_input_w) |
| r14883 | r14884 | |
| 202 | 200 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 203 | 201 | PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 204 | 202 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_START1 ) |
| 205 | PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(frame_counter_r, NULL) | |
| 203 | PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state,frame_counter_r, NULL) | |
| 206 | 204 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 207 | 205 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 208 | 206 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 228 | 226 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 229 | 227 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 230 | 228 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 231 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(coin_word_r, NULL) | |
| 229 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state,coin_word_r, NULL) | |
| 232 | 230 | |
| 233 | 231 | PORT_START("STICKX") |
| 234 | 232 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(60) PORT_KEYDELTA(15) PORT_PLAYER(1) |
| r14883 | r14884 | |
|---|---|---|
| 252 | 252 | m_rocknms_main2sub = (data ^ 0xffff); |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | ||
| 255 | ||
| 256 | 256 | { |
| 257 | tetrisp2_state *state = field.machine().driver_data<tetrisp2_state>(); | |
| 258 | return state->m_rocknms_sub2main & 0x0003; | |
| 257 | return m_rocknms_sub2main & 0x0003; | |
| 259 | 258 | } |
| 260 | 259 | |
| 261 | 260 | WRITE16_MEMBER(tetrisp2_state::rocknms_sub2main_w) |
| r14883 | r14884 | |
| 858 | 857 | |
| 859 | 858 | static INPUT_PORTS_START( rocknms ) |
| 860 | 859 | PORT_START("PLAYERS") // IN0 - $be0002.w |
| 861 | PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(rocknms_main2sub_status_r, NULL) // MAIN -> SUB Communication | |
| 860 | PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tetrisp2_state,rocknms_main2sub_status_r, NULL) // MAIN -> SUB Communication | |
| 862 | 861 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 863 | 862 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 864 | 863 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) |
| r14883 | r14884 | |
|---|---|---|
| 4762 | 4762 | |
| 4763 | 4763 | /*******************************************************************/ |
| 4764 | 4764 | |
| 4765 | ||
| 4765 | ||
| 4766 | 4766 | { |
| 4767 | namcos22_state *state = field.machine().driver_data<namcos22_state>(); | |
| 4768 | return state->m_motor_status >> (FPTR)param & 1; | |
| 4767 | return m_motor_status >> (FPTR)param & 1; | |
| 4769 | 4768 | } |
| 4770 | 4769 | |
| 4771 | 4770 | static INPUT_PORTS_START( alpiner ) |
| r14883 | r14884 | |
| 4803 | 4802 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START ) // Decision / View Change |
| 4804 | 4803 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY // L Selection |
| 4805 | 4804 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_16WAY // R Selection |
| 4806 | PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM(alpine_motor_read, (void *)0) // steps are free | |
| 4805 | PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)0) // steps are free | |
| 4807 | 4806 | |
| 4808 | 4807 | PORT_START("SWING") |
| 4809 | 4808 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Swing") |
| r14883 | r14884 | |
| 4812 | 4811 | PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_NAME("Steps Edge") |
| 4813 | 4812 | |
| 4814 | 4813 | PORT_START("MCUP5B") |
| 4815 | PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM(alpine_motor_read, (void *)1) // steps are locked | |
| 4814 | PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)1) // steps are locked | |
| 4816 | 4815 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 4817 | 4816 | INPUT_PORTS_END /* Alpine Racer */ |
| 4818 | 4817 |
| r14883 | r14884 | |
|---|---|---|
| 916 | 916 | |
| 917 | 917 | |
| 918 | 918 | /* Lives Dips are spread across two input ports */ |
| 919 | ||
| 919 | ||
| 920 | 920 | { |
| 921 | 921 | int bit_mask = (FPTR)param; |
| 922 | 922 | |
| 923 | 923 | switch (bit_mask) |
| 924 | 924 | { |
| 925 | 925 | case 0x40: /* vpool : IN1 (0xa800) bit 6 */ |
| 926 | return ((input_port_read( | |
| 926 | return ((input_port_read( | |
| 927 | 927 | case 0x01: /* vpool : DSW (0xb000) bit 0 */ |
| 928 | return ((input_port_read( | |
| 928 | return ((input_port_read( | |
| 929 | 929 | |
| 930 | 930 | default: |
| 931 | 931 | logerror("vpool_lives_r : invalid %02X bit_mask\n",bit_mask); |
| r14883 | r14884 | |
| 952 | 952 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL |
| 953 | 953 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 954 | 954 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 955 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vpool_lives_r, (void *)0x40) | |
| 955 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,vpool_lives_r, (void *)0x40) | |
| 956 | 956 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 957 | 957 | |
| 958 | 958 | PORT_START("DSW0") |
| 959 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vpool_lives_r, (void *)0x01) | |
| 959 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,vpool_lives_r, (void *)0x01) | |
| 960 | 960 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) |
| 961 | 961 | PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) |
| 962 | 962 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r14883 | r14884 | |
| 1063 | 1063 | |
| 1064 | 1064 | |
| 1065 | 1065 | /* Coinage Dips are spread across two input ports */ |
| 1066 | ||
| 1066 | ||
| 1067 | 1067 | { |
| 1068 | 1068 | int bit_mask = (FPTR)param; |
| 1069 | 1069 | |
| 1070 | 1070 | switch (bit_mask) |
| 1071 | 1071 | { |
| 1072 | 1072 | case 0x0c: /* ckongg : DSW (0xc800) bits 2 and 3 */ |
| 1073 | return ((input_port_read( | |
| 1073 | return ((input_port_read( | |
| 1074 | 1074 | case 0x40: /* ckongg : IN1 (0xc400) bit 6 */ |
| 1075 | return ((input_port_read( | |
| 1075 | return ((input_port_read( | |
| 1076 | 1076 | |
| 1077 | 1077 | case 0xc0: /* ckongmc : IN1 (0xa800) bits 6 and 7 */ |
| 1078 | return ((input_port_read( | |
| 1078 | return ((input_port_read( | |
| 1079 | 1079 | case 0x01: /* ckongmc : DSW (0xb000) bit 0 */ |
| 1080 | return ((input_port_read( | |
| 1080 | return ((input_port_read( | |
| 1081 | 1081 | |
| 1082 | 1082 | default: |
| 1083 | 1083 | logerror("ckongg_coinage_r : invalid %02X bit_mask\n",bit_mask); |
| r14883 | r14884 | |
| 1104 | 1104 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1105 | 1105 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| 1106 | 1106 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL |
| 1107 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x40) | |
| 1107 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x40) | |
| 1108 | 1108 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) |
| 1109 | 1109 | PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) |
| 1110 | 1110 | PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) |
| r14883 | r14884 | |
| 1115 | 1115 | PORT_DIPSETTING( 0x01, "4" ) |
| 1116 | 1116 | PORT_DIPSETTING( 0x02, "5" ) |
| 1117 | 1117 | PORT_DIPSETTING( 0x03, "6" ) |
| 1118 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x0c) | |
| 1118 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x0c) | |
| 1119 | 1119 | PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1120 | 1120 | |
| 1121 | 1121 | PORT_START("COINAGE") |
| r14883 | r14884 | |
| 1149 | 1149 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1150 | 1150 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| 1151 | 1151 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1152 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0xc0) | |
| 1152 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0xc0) | |
| 1153 | 1153 | |
| 1154 | 1154 | PORT_START("DSW") |
| 1155 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ckongg_coinage_r, (void *)0x01) | |
| 1155 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x01) | |
| 1156 | 1156 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) ) |
| 1157 | 1157 | PORT_DIPSETTING( 0x00, "3" ) |
| 1158 | 1158 | PORT_DIPSETTING( 0x02, "4" ) |
| r14883 | r14884 | |
| 1276 | 1276 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 1277 | 1277 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1278 | 1278 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 1279 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_4in1_fake_port_r, (void *)0x40) // See fake ports | |
| 1280 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_4in1_fake_port_r, (void *)0x80) // See fake ports | |
| 1279 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x40) // See fake ports | |
| 1280 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x80) // See fake ports | |
| 1281 | 1281 | |
| 1282 | 1282 | PORT_START("DSW0") |
| 1283 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_4in1_fake_port_r, (void *)0x01) // See fake ports | |
| 1284 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_4in1_fake_port_r, (void *)0x02) // See fake ports | |
| 1283 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x01) // See fake ports | |
| 1284 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x02) // See fake ports | |
| 1285 | 1285 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) |
| 1286 | 1286 | PORT_DIPSETTING( 0x00, "3" ) // 2 when continue (Scramble PT2) |
| 1287 | 1287 | PORT_DIPSETTING( 0x04, "5" ) // 2 when continue (Scramble PT2) |
| 1288 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_4in1_fake_port_r, (void *)0x08) // See fake ports | |
| 1289 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_4in1_fake_port_r, (void *)0x10) // See fake ports | |
| 1290 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_4in1_fake_port_r, (void *)0x20) // See fake ports | |
| 1288 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x08) // See fake ports | |
| 1289 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x10) // See fake ports | |
| 1290 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x20) // See fake ports | |
| 1291 | 1291 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1292 | 1292 | |
| 1293 | 1293 | PORT_START("FAKE1") /* The Ghost Muncher PT3 - FAKE DSW0 (bits 0 to 5) and IN1 (bits 6 and 7) */ |
| r14883 | r14884 | |
| 1431 | 1431 | |
| 1432 | 1432 | |
| 1433 | 1433 | /* Coinage Dips are spread across two input ports */ |
| 1434 | ||
| 1434 | ||
| 1435 | 1435 | { |
| 1436 | 1436 | int bit_mask = (FPTR)param; |
| 1437 | 1437 | |
| 1438 | 1438 | switch (bit_mask) |
| 1439 | 1439 | { |
| 1440 | 1440 | case 0xc0: /* dkongjrm : IN1 (0xa8??) bits 6 and 7 */ |
| 1441 | return ((input_port_read( | |
| 1441 | return ((input_port_read( | |
| 1442 | 1442 | case 0x01: /* dkongjrm : DSW (0xb0??) bit 0 */ |
| 1443 | return ((input_port_read( | |
| 1443 | return ((input_port_read( | |
| 1444 | 1444 | |
| 1445 | 1445 | default: |
| 1446 | 1446 | logerror("dkongjrm_coinage_r : invalid %02X bit_mask\n",bit_mask); |
| r14883 | r14884 | |
| 1467 | 1467 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 1468 | 1468 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| 1469 | 1469 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 1470 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dkongjrm_coinage_r, (void *)0xc0) | |
| 1470 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,dkongjrm_coinage_r, (void *)0xc0) | |
| 1471 | 1471 | |
| 1472 | 1472 | PORT_START("DSW") |
| 1473 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dkongjrm_coinage_r, (void *)0x01) | |
| 1473 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,dkongjrm_coinage_r, (void *)0x01) | |
| 1474 | 1474 | PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) ) |
| 1475 | 1475 | PORT_DIPSETTING( 0x00, "3" ) |
| 1476 | 1476 | PORT_DIPSETTING( 0x02, "4" ) |
| r14883 | r14884 | |
|---|---|---|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | |
| 98 | ||
| 98 | ||
| 99 | 99 | { |
| 100 | 100 | int bit_mask = (FPTR)param; |
| 101 | return (input_port_read( | |
| 101 | return (input_port_read( | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | WRITE8_MEMBER(cop01_state::cop01_irq_ack_w) |
| r14883 | r14884 | |
| 326 | 326 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 327 | 327 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 328 | 328 | PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) |
| 329 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mightguy_area_r, (void *)0x04) // "Start Area" - see fake Dip Switch | |
| 329 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x04) // "Start Area" - see fake Dip Switch | |
| 330 | 330 | |
| 331 | 331 | PORT_START("DSW2") |
| 332 | 332 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) |
| r14883 | r14884 | |
| 344 | 344 | PORT_DIPSETTING( 0x20, DEF_STR( Normal ) ) |
| 345 | 345 | PORT_DIPSETTING( 0x10, DEF_STR( Hard ) ) |
| 346 | 346 | PORT_DIPSETTING( 0x00, "Invincibility") |
| 347 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mightguy_area_r, (void *)0x01) // "Start Area" - see fake Dip Switch | |
| 348 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mightguy_area_r, (void *)0x02) // "Start Area" - see fake Dip Switch | |
| 347 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x01) // "Start Area" - see fake Dip Switch | |
| 348 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x02) // "Start Area" - see fake Dip Switch | |
| 349 | 349 | |
| 350 | 350 | PORT_START("FAKE") /* FAKE Dip Switch */ |
| 351 | 351 | PORT_DIPNAME( 0x07, 0x07, "Starting Area" ) |
| r14883 | r14884 | |
|---|---|---|
| 541 | 541 | |
| 542 | 542 | static INPUT_PORTS_START( crusnusa ) |
| 543 | 543 | PORT_START("991030") |
| 544 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 545 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 544 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 545 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 546 | 546 | |
| 547 | 547 | PORT_START("992000") |
| 548 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 549 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 548 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW") | |
| 549 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW") | |
| 550 | 550 | |
| 551 | 551 | PORT_START("IN0") |
| 552 | 552 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 673 | 673 | |
| 674 | 674 | static INPUT_PORTS_START( crusnwld ) |
| 675 | 675 | PORT_START("991030") |
| 676 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 677 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 676 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 677 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 678 | 678 | |
| 679 | 679 | PORT_START("992000") |
| 680 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 681 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 680 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW") | |
| 681 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW") | |
| 682 | 682 | |
| 683 | 683 | PORT_START("IN0") |
| 684 | 684 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 802 | 802 | |
| 803 | 803 | static INPUT_PORTS_START( offroadc ) |
| 804 | 804 | PORT_START("991030") |
| 805 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 806 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1") | |
| 805 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 806 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") | |
| 807 | 807 | |
| 808 | 808 | PORT_START("992000") |
| 809 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 810 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 809 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW") | |
| 810 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW") | |
| 811 | 811 | |
| 812 | 812 | PORT_START("IN0") |
| 813 | 813 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
|---|---|---|
| 111 | 111 | |
| 112 | 112 | ******************************************************************************/ |
| 113 | 113 | |
| 114 | ||
| 114 | ||
| 115 | 115 | { |
| 116 | inufuku_state *state = field.machine().driver_data<inufuku_state>(); | |
| 117 | UINT16 soundflag = state->m_pending_command ? 0 : 1; | |
| 116 | UINT16 soundflag = m_pending_command ? 0 : 1; | |
| 118 | 117 | |
| 119 | 118 | return soundflag; |
| 120 | 119 | } |
| r14883 | r14884 | |
| 232 | 231 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 233 | 232 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 234 | 233 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 235 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(soundflag_r, NULL) // pending sound command | |
| 234 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, inufuku_state,soundflag_r, NULL) // pending sound command | |
| 236 | 235 | |
| 237 | 236 | PORT_START( "EEPROMOUT" ) |
| 238 | 237 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, write_bit) |
| r14883 | r14884 | |
|---|---|---|
| 96 | 96 | void jackie_unk_reg_lo_w( int offset, UINT8 data, int reg ); |
| 97 | 97 | void jackie_unk_reg_hi_w( int offset, UINT8 data, int reg ); |
| 98 | 98 | void show_out(); |
| 99 | DECLARE_CUSTOM_INPUT_MEMBER(hopper_r); | |
| 99 | 100 | }; |
| 100 | 101 | |
| 101 | 102 | |
| r14883 | r14884 | |
| 384 | 385 | AM_RANGE(0x8000, 0xffff) AM_READ(expram_r) |
| 385 | 386 | ADDRESS_MAP_END |
| 386 | 387 | |
| 387 | ||
| 388 | ||
| 388 | 389 | { |
| 389 | jackie_state *state = field.machine().driver_data<jackie_state>(); | |
| 390 | if (state->m_hopper) return !(field.machine().primary_screen->frame_number()%10); | |
| 391 | return field.machine().input().code_pressed(KEYCODE_H); | |
| 390 | if (m_hopper) return !(machine().primary_screen->frame_number()%10); | |
| 391 | return machine().input().code_pressed(KEYCODE_H); | |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | static INPUT_PORTS_START( jackie ) |
| r14883 | r14884 | |
| 464 | 464 | |
| 465 | 465 | PORT_START("SERVICE") |
| 466 | 466 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_9) PORT_NAME("Attendent") |
| 467 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 467 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jackie_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 468 | 468 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 469 | 469 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot) |
| 470 | 470 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics") |
| r14883 | r14884 | |
|---|---|---|
| 42 | 42 | emu_timer *m_serial_timer; |
| 43 | 43 | UINT8 m_serial_timer_active; |
| 44 | 44 | UINT16 m_input_select; |
| 45 | DECLARE_CUSTOM_INPUT_MEMBER(lightgun_pos_r); | |
| 46 | DECLARE_CUSTOM_INPUT_MEMBER(lightgun_trigger_r); | |
| 47 | DECLARE_CUSTOM_INPUT_MEMBER(lightgun_holster_r); | |
| 45 | 48 | }; |
| 46 | 49 | |
| 47 | 50 | static TIMER_CALLBACK( response_timer ); |
| r14883 | r14884 | |
| 184 | 187 | } |
| 185 | 188 | |
| 186 | 189 | |
| 187 | ||
| 190 | ||
| 188 | 191 | { |
| 189 | alg_state *state = field.machine().driver_data<alg_state>(); | |
| 190 | 192 | int x = 0, y = 0; |
| 191 | 193 | |
| 192 | 194 | /* get the position based on the input select */ |
| 193 | get_lightgun_pos(* | |
| 195 | get_lightgun_pos(* | |
| 194 | 196 | return (y << 8) | (x >> 2); |
| 195 | 197 | } |
| 196 | 198 | |
| 197 | 199 | |
| 198 | ||
| 200 | ||
| 199 | 201 | { |
| 200 | alg_state *state = field.machine().driver_data<alg_state>(); | |
| 201 | 202 | |
| 202 | 203 | /* read the trigger control based on the input select */ |
| 203 | return (input_port_read( | |
| 204 | return (input_port_read( | |
| 204 | 205 | } |
| 205 | 206 | |
| 206 | 207 | |
| 207 | ||
| 208 | ||
| 208 | 209 | { |
| 209 | alg_state *state = field.machine().driver_data<alg_state>(); | |
| 210 | 210 | |
| 211 | 211 | /* read the holster control based on the input select */ |
| 212 | return (input_port_read( | |
| 212 | return (input_port_read( | |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | |
| r14883 | r14884 | |
| 326 | 326 | |
| 327 | 327 | static INPUT_PORTS_START( alg ) |
| 328 | 328 | PORT_START("JOY0DAT") /* read by Amiga core */ |
| 329 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P1JOY") | |
| 329 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, "P1JOY") | |
| 330 | 330 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 331 | 331 | |
| 332 | 332 | PORT_START("JOY1DAT") /* read by Amiga core */ |
| 333 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P2JOY") | |
| 333 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, "P2JOY") | |
| 334 | 334 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 335 | 335 | |
| 336 | 336 | PORT_START("POTGO") /* read by Amiga core */ |
| r14883 | r14884 | |
| 341 | 341 | PORT_BIT( 0xaaff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 342 | 342 | |
| 343 | 343 | PORT_START("HVPOS") /* read by Amiga core */ |
| 344 | PORT_BIT( 0x1ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(lightgun_pos_r, NULL) | |
| 344 | PORT_BIT( 0x1ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_pos_r, NULL) | |
| 345 | 345 | |
| 346 | 346 | PORT_START("FIRE") |
| 347 | 347 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| r14883 | r14884 | |
| 372 | 372 | |
| 373 | 373 | PORT_MODIFY("POTGO") |
| 374 | 374 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 ) |
| 375 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(lightgun_trigger_r, NULL) | |
| 375 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_trigger_r, NULL) | |
| 376 | 376 | |
| 377 | 377 | PORT_MODIFY("FIRE") |
| 378 | 378 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 379 | 379 | |
| 380 | 380 | PORT_MODIFY("P2JOY") |
| 381 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(lightgun_holster_r, NULL) | |
| 381 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_holster_r, NULL) | |
| 382 | 382 | |
| 383 | 383 | PORT_START("GUN2X") /* referenced by lightgun_pos_r */ |
| 384 | 384 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2) |
| r14883 | r14884 | |
|---|---|---|
| 287 | 287 | * |
| 288 | 288 | *************************************/ |
| 289 | 289 | |
| 290 | ||
| 290 | ||
| 291 | 291 | { |
| 292 | return (input_port_read( | |
| 292 | return (input_port_read( | |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | |
| r14883 | r14884 | |
| 555 | 555 | PORT_INCLUDE( g80v_generic ) |
| 556 | 556 | |
| 557 | 557 | PORT_MODIFY("D7D6") |
| 558 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(elim4_joint_coin_r, NULL) /* combination of all four coin inputs */ | |
| 558 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segag80v_state,elim4_joint_coin_r, NULL) /* combination of all four coin inputs */ | |
| 559 | 559 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 560 | 560 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 561 | 561 |
| r14883 | r14884 | |
|---|---|---|
| 502 | 502 | PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 503 | 503 | |
| 504 | 504 | PORT_START("c00004") |
| 505 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 506 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW") | |
| 505 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW") | |
| 506 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW") | |
| 507 | 507 | |
| 508 | 508 | PORT_START("DSW") |
| 509 | 509 | PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") |
| r14883 | r14884 | |
|---|---|---|
| 253 | 253 | * |
| 254 | 254 | *************************************/ |
| 255 | 255 | |
| 256 | ||
| 256 | ||
| 257 | 257 | { |
| 258 | astrocde_state *state = field.machine().driver_data<astrocde_state>(); | |
| 259 | 258 | static const char *const names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" }; |
| 260 | return input_port_read( | |
| 259 | return input_port_read( | |
| 261 | 260 | } |
| 262 | 261 | |
| 263 | 262 | |
| r14883 | r14884 | |
| 480 | 479 | } |
| 481 | 480 | |
| 482 | 481 | |
| 483 | ||
| 482 | ||
| 484 | 483 | { |
| 485 | astrocde_state *state = field.machine().driver_data<astrocde_state>(); | |
| 486 | 484 | static const char *const names[] = { "MOVEX", "MOVEY" }; |
| 487 | return input_port_read( | |
| 485 | return input_port_read( | |
| 488 | 486 | } |
| 489 | 487 | |
| 490 | 488 | |
| r14883 | r14884 | |
| 818 | 816 | PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "S1:8" ) |
| 819 | 817 | |
| 820 | 818 | PORT_START("P4HANDLE") |
| 821 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ebases_trackball_r, NULL) | |
| 819 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state,ebases_trackball_r, NULL) | |
| 822 | 820 | |
| 823 | 821 | PORT_START("TRACKX1") |
| 824 | 822 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_RESET |
| r14883 | r14884 | |
| 1144 | 1142 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1145 | 1143 | |
| 1146 | 1144 | PORT_START("P2HANDLE") |
| 1147 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(demndragn_joystick_r, NULL) | |
| 1145 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state,demndragn_joystick_r, NULL) | |
| 1148 | 1146 | |
| 1149 | 1147 | PORT_START("P3HANDLE") |
| 1150 | 1148 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 777 | 777 | } |
| 778 | 778 | } |
| 779 | 779 | |
| 780 | ||
| 780 | ||
| 781 | 781 | |
| 782 | 782 | static WRITE8_DEVICE_HANDLER( out_0 ) |
| 783 | 783 | { |
| r14883 | r14884 | |
| 1416 | 1416 | PORT_DIPSETTING( 0xc0, "5" ) |
| 1417 | 1417 | |
| 1418 | 1418 | PORT_START("DSWA_HI") |
| 1419 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM(shifted_port_r, "DSWA") | |
| 1419 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bosco_state,shifted_port_r, "DSWA") | |
| 1420 | 1420 | |
| 1421 | 1421 | PORT_START("DSWB") // reverse order against SWA |
| 1422 | 1422 | PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWB:1,2") |
| r14883 | r14884 | |
| 1443 | 1443 | PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) ) |
| 1444 | 1444 | |
| 1445 | 1445 | PORT_START("DSWB_HI") |
| 1446 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM(shifted_port_r, "DSWB") | |
| 1446 | PORT_BIT( 0x0f, 0x00, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bosco_state,shifted_port_r, "DSWB") | |
| 1447 | 1447 | INPUT_PORTS_END |
| 1448 | 1448 | |
| 1449 | 1449 | /* |
| r14883 | r14884 | |
|---|---|---|
| 226 | 226 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 227 | 227 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 228 | 228 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 229 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in1_control_r, NULL) | |
| 229 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL) | |
| 230 | 230 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 231 | 231 | |
| 232 | 232 | PORT_START("IN2") |
| r14883 | r14884 | |
| 241 | 241 | PORT_DIPSETTING( 0x00, "1500" ) |
| 242 | 242 | /* SW1:5,6,7: In OFF, PL2 can have no control of joystick, going auto left/right and other problems like no laser gun. |
| 243 | 243 | Be sure these are always ON */ |
| 244 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, NULL) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */ | |
| 244 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */ | |
| 245 | 245 | PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPLOCATION("SW1:8") |
| 246 | 246 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 247 | 247 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| r14883 | r14884 | |
| 1153 | 1153 | /* */ |
| 1154 | 1154 | /*******************************************************/ |
| 1155 | 1155 | |
| 1156 | ||
| 1156 | ||
| 1157 | 1157 | { |
| 1158 | return ( | |
| 1158 | return ( | |
| 1159 | 1159 | } |
| 1160 | 1160 | |
| 1161 | 1161 | static ADDRESS_MAP_START( sflush_map, AS_PROGRAM, 8, _8080bw_state ) |
| r14883 | r14884 | |
| 1197 | 1197 | PORT_DIPNAME( 0x40, 0x00, "Coinage Display" ) |
| 1198 | 1198 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1199 | 1199 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 1200 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(sflush_80_r, NULL) // 128V? | |
| 1200 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state,sflush_80_r, NULL) // 128V? | |
| 1201 | 1201 | |
| 1202 | 1202 | PORT_START("PADDLE") |
| 1203 | 1203 | PORT_BIT( 0xff, 0x6a, IPT_PADDLE ) PORT_MINMAX(0x16,0xbf) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_CENTERDELTA(0) |
| r14883 | r14884 | |
| 1623 | 1623 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) |
| 1624 | 1624 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) |
| 1625 | 1625 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 1626 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in1_control_r, NULL) | |
| 1626 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, NULL) | |
| 1627 | 1627 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1628 | 1628 | |
| 1629 | 1629 | PORT_START("IN1") |
| r14883 | r14884 | |
| 1638 | 1638 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) |
| 1639 | 1639 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1640 | 1640 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1641 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(invaders_in2_control_r, NULL) | |
| 1641 | PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, NULL) | |
| 1642 | 1642 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1643 | 1643 | |
| 1644 | 1644 | /* Dummy controls port, P1 */ |
| r14883 | r14884 | |
|---|---|---|
| 195 | 195 | device_set_input_line(device, 4, HOLD_LINE); |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | ||
| 198 | ||
| 199 | 199 | { |
| 200 | return input_port_read( | |
| 200 | return input_port_read( | |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | ||
| 203 | ||
| 204 | 204 | { |
| 205 | psikyo4_state *state = field.machine().driver_data<psikyo4_state>(); | |
| 206 | 205 | int player = (FPTR)param; |
| 207 | int sel = ( | |
| 206 | int sel = ( | |
| 208 | 207 | int ret = 0xff; |
| 209 | 208 | |
| 210 | if (sel & 1) ret &= input_port_read(field.machine(), player ? "KEY4" : "KEY0" ); | |
| 211 | if (sel & 2) ret &= input_port_read(field.machine(), player ? "KEY5" : "KEY1" ); | |
| 212 | if (sel & 4) ret &= input_port_read(field.machine(), player ? "KEY6" : "KEY2" ); | |
| 213 | if (sel & 8) ret &= input_port_read(field.machine(), player ? "KEY7" : "KEY3" ); | |
| 209 | if (sel & 1) ret &= input_port_read(machine(), player ? "KEY4" : "KEY0" ); | |
| 210 | if (sel & 2) ret &= input_port_read(machine(), player ? "KEY5" : "KEY1" ); | |
| 211 | if (sel & 4) ret &= input_port_read(machine(), player ? "KEY6" : "KEY2" ); | |
| 212 | if (sel & 8) ret &= input_port_read(machine(), player ? "KEY7" : "KEY3" ); | |
| 214 | 213 | |
| 215 | 214 | return ret; |
| 216 | 215 | } |
| r14883 | r14884 | |
| 379 | 378 | |
| 380 | 379 | static INPUT_PORTS_START( hotgmck ) |
| 381 | 380 | PORT_START("P1_P2") |
| 382 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM(system_port_r, NULL) | |
| 381 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state,system_port_r, NULL) | |
| 383 | 382 | PORT_BIT( 0x00ffff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 384 | PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM(mahjong_ctrl_r, (void *)0) | |
| 383 | PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state,mahjong_ctrl_r, (void *)0) | |
| 385 | 384 | |
| 386 | 385 | PORT_START("P3_P4") |
| 387 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM(system_port_r, NULL) | |
| 386 | PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state,system_port_r, NULL) | |
| 388 | 387 | PORT_BIT( 0x00ffff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 389 | PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM(mahjong_ctrl_r, (void *)1) | |
| 388 | PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state,mahjong_ctrl_r, (void *)1) | |
| 390 | 389 | |
| 391 | 390 | PORT_START("JP4")/* jumper pads 'JP4' on the PCB */ |
| 392 | 391 | /* EEPROM is read here */ |
| r14883 | r14884 | |
|---|---|---|
| 78 | 78 | DECLARE_WRITE8_MEMBER(den2_w); |
| 79 | 79 | DECLARE_WRITE8_MEMBER(ssi263_register_w); |
| 80 | 80 | DECLARE_READ8_MEMBER(ssi263_register_r); |
| 81 | DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_enter_r); | |
| 82 | DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_ready_r); | |
| 81 | 83 | }; |
| 82 | 84 | |
| 83 | 85 | |
| r14883 | r14884 | |
| 618 | 620 | |
| 619 | 621 | /* Input Ports */ |
| 620 | 622 | |
| 621 | ||
| 623 | ||
| 622 | 624 | { |
| 623 | thayers_state *state = field.machine().driver_data<thayers_state>(); | |
| 624 | if (state->m_pr7820 != NULL) return state->m_pr7820_enter; | |
| 625 | if (state->m_ldv1000 != NULL) return (state->m_ldv1000->status_strobe_r() == ASSERT_LINE) ? 0 : 1; | |
| 625 | if (m_pr7820 != NULL) return m_pr7820_enter; | |
| 626 | if (m_ldv1000 != NULL) return (m_ldv1000->status_strobe_r() == ASSERT_LINE) ? 0 : 1; | |
| 626 | 627 | return 0; |
| 627 | 628 | } |
| 628 | 629 | |
| 629 | ||
| 630 | ||
| 630 | 631 | { |
| 631 | thayers_state *state = field.machine().driver_data<thayers_state>(); | |
| 632 | if (state->m_pr7820 != NULL) return (state->m_pr7820->ready_r() == ASSERT_LINE) ? 0 : 1; | |
| 633 | if (state->m_ldv1000 != NULL) return (state->m_ldv1000->command_strobe_r() == ASSERT_LINE) ? 0 : 1; | |
| 632 | if (m_pr7820 != NULL) return (m_pr7820->ready_r() == ASSERT_LINE) ? 0 : 1; | |
| 633 | if (m_ldv1000 != NULL) return (m_ldv1000->command_strobe_r() == ASSERT_LINE) ? 0 : 1; | |
| 634 | 634 | return 0; |
| 635 | 635 | } |
| 636 | 636 | |
| r14883 | r14884 | |
| 671 | 671 | PORT_START("COIN") |
| 672 | 672 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 673 | 673 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 674 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(laserdisc_enter_r, NULL) | |
| 675 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(laserdisc_ready_r, NULL) | |
| 674 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, thayers_state,laserdisc_enter_r, NULL) | |
| 675 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, thayers_state,laserdisc_ready_r, NULL) | |
| 676 | 676 | |
| 677 | 677 | PORT_START("R0") |
| 678 | 678 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME( "2" ) PORT_CODE( KEYCODE_F2 ) |
| r14883 | r14884 | |
|---|---|---|
| 77 | 77 | DECLARE_READ8_MEMBER(palette_r); |
| 78 | 78 | DECLARE_WRITE8_MEMBER(palette_w); |
| 79 | 79 | DECLARE_WRITE8_MEMBER(casino5_bank_w); |
| 80 | DECLARE_CUSTOM_INPUT_MEMBER(rndbit_r); | |
| 80 | 81 | }; |
| 81 | 82 | |
| 82 | 83 | |
| r14883 | r14884 | |
| 345 | 346 | } |
| 346 | 347 | } |
| 347 | 348 | |
| 348 | ||
| 349 | ||
| 349 | 350 | { |
| 350 | return | |
| 351 | return | |
| 351 | 352 | } |
| 352 | 353 | |
| 353 | 354 | static ADDRESS_MAP_START( pitboss_map, AS_PROGRAM, 8, merit_state ) |
| r14883 | r14884 | |
| 1024 | 1025 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1025 | 1026 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1026 | 1027 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1027 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(rndbit_r, NULL) | |
| 1028 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, NULL) | |
| 1028 | 1029 | |
| 1029 | 1030 | PORT_START("DSW") |
| 1030 | 1031 | PORT_DIPNAME( 0x01, 0x01, "Draw Poker enabled" ) |
| r14883 | r14884 | |
|---|---|---|
| 48 | 48 | DECLARE_WRITE8_MEMBER(spoker_leds_w); |
| 49 | 49 | DECLARE_WRITE8_MEMBER(spoker_magic_w); |
| 50 | 50 | DECLARE_READ8_MEMBER(spoker_magic_r); |
| 51 | DECLARE_CUSTOM_INPUT_MEMBER(hopper_r); | |
| 51 | 52 | }; |
| 52 | 53 | |
| 53 | 54 | WRITE8_MEMBER(spoker_state::bg_tile_w) |
| r14883 | r14884 | |
| 108 | 109 | Memory Maps |
| 109 | 110 | ***************************************************************************/ |
| 110 | 111 | |
| 111 | ||
| 112 | ||
| 112 | 113 | { |
| 113 | running_machine &machine = field.machine(); | |
| 114 | spoker_state *state = machine.driver_data<spoker_state>(); | |
| 115 | ||
| 116 | if (state->m_hopper) return !(machine.primary_screen->frame_number()%10); | |
| 117 | return machine.input().code_pressed(KEYCODE_H); | |
| 114 | if (m_hopper) return !(machine().primary_screen->frame_number()%10); | |
| 115 | return machine().input().code_pressed(KEYCODE_H); | |
| 118 | 116 | } |
| 119 | 117 | |
| 120 | 118 | static void show_out(UINT8 *out) |
| r14883 | r14884 | |
| 331 | 329 | PORT_START("SERVICE") |
| 332 | 330 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 333 | 331 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Memory Clear") // stats, memory |
| 334 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 332 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 335 | 333 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 336 | 334 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 337 | 335 | PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) |
| r14883 | r14884 | |
| 400 | 398 | |
| 401 | 399 | PORT_START("IN0") |
| 402 | 400 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 403 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM( | |
| 401 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, (void *)0 ) PORT_NAME("HPSW") // hopper sensor | |
| 404 | 402 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) |
| 405 | 403 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics") |
| 406 | 404 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
|---|---|---|
| 816 | 816 | |
| 817 | 817 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 818 | 818 | |
| 819 | MCFG_SOUND_ADD("konami1", K054539, 48000) | |
| 820 | MCFG_SOUND_CONFIG(k054539_config) | |
| 819 | MCFG_K054539_ADD("konami1", 48000, k054539_config) | |
| 821 | 820 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.75) |
| 822 | 821 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.75) |
| 823 | 822 | |
| 824 | MCFG_ | |
| 823 | MCFG_K054539_ADD("konami2", 48000, k054539_config) | |
| 825 | 824 | MCFG_SOUND_CONFIG(k054539_config) |
| 826 | 825 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.75) |
| 827 | 826 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.75) |
| r14883 | r14884 | |
|---|---|---|
| 465 | 465 | int m_tank_shutter_position; |
| 466 | 466 | int m_cable_holder_release; |
| 467 | 467 | double m_pad_position[ 6 ]; |
| 468 | DECLARE_CUSTOM_INPUT_MEMBER(gn845pwbb_read); | |
| 469 | DECLARE_CUSTOM_INPUT_MEMBER(gunmania_tank_shutter_sensor); | |
| 470 | DECLARE_CUSTOM_INPUT_MEMBER(gunmania_cable_holder_sensor); | |
| 468 | 471 | }; |
| 469 | 472 | |
| 470 | 473 | INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ... ) |
| r14883 | r14884 | |
| 1668 | 1671 | state->m_stage[ offset ].state, state->m_stage[ offset ].DO, state->m_stage[ offset ].shift, state->m_stage[ offset ].bit, state->m_stage_mask ); |
| 1669 | 1672 | } |
| 1670 | 1673 | |
| 1671 | ||
| 1674 | ||
| 1672 | 1675 | { |
| 1673 | ksys573_state *state = field.machine().driver_data<ksys573_state>(); | |
| 1674 | 1676 | |
| 1675 | return input_port_read( | |
| 1677 | return input_port_read( | |
| 1676 | 1678 | } |
| 1677 | 1679 | |
| 1678 | 1680 | static void gn845pwbb_output_callback( running_machine &machine, int offset, int data ) |
| r14883 | r14884 | |
| 2896 | 2898 | verboselog( space->machine(), 2, "gunmania_w %08x %08x %08x\n", offset, mem_mask, data ); |
| 2897 | 2899 | } |
| 2898 | 2900 | |
| 2899 | ||
| 2901 | ||
| 2900 | 2902 | { |
| 2901 | ksys573_state *state = field.machine().driver_data<ksys573_state>(); | |
| 2902 | 2903 | |
| 2903 | if( | |
| 2904 | if( | |
| 2904 | 2905 | { |
| 2905 | 2906 | return 1; |
| 2906 | 2907 | } |
| r14883 | r14884 | |
| 2908 | 2909 | return 0; |
| 2909 | 2910 | } |
| 2910 | 2911 | |
| 2911 | ||
| 2912 | ||
| 2912 | 2913 | { |
| 2913 | ksys573_state *state = field.machine().driver_data<ksys573_state>(); | |
| 2914 | 2914 | |
| 2915 | return | |
| 2915 | return | |
| 2916 | 2916 | } |
| 2917 | 2917 | |
| 2918 | 2918 | static READ32_HANDLER( gunmania_r ) |
| r14883 | r14884 | |
| 3357 | 3357 | PORT_INCLUDE( konami573 ) |
| 3358 | 3358 | |
| 3359 | 3359 | PORT_MODIFY("IN2") |
| 3360 | PORT_BIT( 0x00000f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gn845pwbb_read, NULL) | |
| 3360 | PORT_BIT( 0x00000f0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ksys573_state,gn845pwbb_read, NULL) | |
| 3361 | 3361 | |
| 3362 | 3362 | PORT_START( "STAGE" ) |
| 3363 | 3363 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_PLAYER(1) |
| r14883 | r14884 | |
| 3503 | 3503 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) PORT_NAME( "Bullet Tube-1 Sensor" ) |
| 3504 | 3504 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_NAME( "Bullet Tube-2 Sensor" ) |
| 3505 | 3505 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME( "Safety Sensor Under" ) |
| 3506 | PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( | |
| 3506 | PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,ksys573_state,gunmania_tank_shutter_sensor, NULL ) | |
| 3507 | 3507 | |
| 3508 | 3508 | PORT_MODIFY("IN3") |
| 3509 | 3509 | PORT_BIT( 0x0d000b00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 3510 | PORT_BIT( 0x02000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM( | |
| 3510 | PORT_BIT( 0x02000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,ksys573_state,gunmania_cable_holder_sensor, NULL ) | |
| 3511 | 3511 | |
| 3512 | 3512 | PORT_START("GUNX") |
| 3513 | 3513 | PORT_BIT( 0x7f, 0x2f, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(0x00,0x5f) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1) |
| r14883 | r14884 | |
|---|---|---|
| 234 | 234 | DECLARE_READ8_MEMBER(spacduel_IN3_r); |
| 235 | 235 | DECLARE_WRITE8_MEMBER(bwidow_misc_w); |
| 236 | 236 | DECLARE_WRITE8_MEMBER(irq_ack_w); |
| 237 | DECLARE_CUSTOM_INPUT_MEMBER(clock_r); | |
| 237 | 238 | }; |
| 238 | 239 | |
| 239 | 240 | |
| r14883 | r14884 | |
| 317 | 318 | return res; |
| 318 | 319 | } |
| 319 | 320 | |
| 320 | ||
| 321 | ||
| 321 | 322 | { |
| 322 | return ( | |
| 323 | return ( | |
| 323 | 324 | } |
| 324 | 325 | |
| 325 | 326 | |
| r14883 | r14884 | |
| 424 | 425 | /* per default (busy vector processor). */ |
| 425 | 426 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 426 | 427 | /* bit 7 is tied to a 3kHz clock */ |
| 427 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 428 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, NULL) | |
| 428 | 429 | |
| 429 | 430 | PORT_START("DSW0") |
| 430 | 431 | PORT_DIPNAME(0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("D4:!7,!8") |
| r14883 | r14884 | |
| 503 | 504 | /* per default (busy vector processor). */ |
| 504 | 505 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 505 | 506 | /* bit 7 is tied to a 3kHz clock */ |
| 506 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 507 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, NULL) | |
| 507 | 508 | |
| 508 | 509 | PORT_START("DSW0") |
| 509 | 510 | PORT_DIPUNUSED_DIPLOC( 0x03, IP_ACTIVE_HIGH, "D4:!7,!8" ) |
| r14883 | r14884 | |
| 577 | 578 | /* per default (busy vector processor). */ |
| 578 | 579 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 579 | 580 | /* bit 7 is tied to a 3kHz clock */ |
| 580 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 581 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, NULL) | |
| 581 | 582 | |
| 582 | 583 | PORT_START("DSW0") /* DSW0 - Not read */ |
| 583 | 584 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
| 611 | 612 | /* per default (busy vector processor). */ |
| 612 | 613 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(avgdvg_done_r, NULL) |
| 613 | 614 | /* bit 7 is tied to a 3kHz clock */ |
| 614 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(clock_r, NULL) | |
| 615 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, NULL) | |
| 615 | 616 | |
| 616 | 617 | PORT_START("DSW0") |
| 617 | 618 | PORT_DIPNAME(0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("D4:!7,!8") |
| r14883 | r14884 | |
|---|---|---|
| 254 | 254 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, set_cs_line) |
| 255 | 255 | INPUT_PORTS_END |
| 256 | 256 | |
| 257 | ||
| 257 | ||
| 258 | 258 | { |
| 259 | //xmen_state *state = field.machine().driver_data<xmen_state>(); | |
| 260 | return field.machine().primary_screen->frame_number() & 1; | |
| 259 | return machine().primary_screen->frame_number() & 1; | |
| 261 | 260 | } |
| 262 | 261 | |
| 263 | 262 | static INPUT_PORTS_START( xmen6p ) |
| r14883 | r14884 | |
| 284 | 283 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START5 ) /* not verified */ |
| 285 | 284 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START6 ) /* not verified */ |
| 286 | 285 | PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW ) |
| 287 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(xmen_frame_r, NULL) /* screen indicator? */ | |
| 286 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xmen_state,xmen_frame_r, NULL) /* screen indicator? */ | |
| 288 | 287 | |
| 289 | 288 | PORT_START( "EEPROMOUT" ) |
| 290 | 289 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_device, write_bit) |
| r14883 | r14884 | |
|---|---|---|
| 78 | 78 | palette_set_color_rgb(machine(),offset*2+1,pal5bit(a >> 10),pal5bit(a >> 5),pal5bit(a >> 0)); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | ||
| 81 | ||
| 82 | 82 | { |
| 83 | gunbustr_state *state = field.machine().driver_data<gunbustr_state>(); | |
| 84 | return state->m_coin_word; | |
| 83 | return m_coin_word; | |
| 85 | 84 | } |
| 86 | 85 | |
| 87 | 86 | WRITE32_MEMBER(gunbustr_state::gunbustr_input_w) |
| r14883 | r14884 | |
| 263 | 262 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 264 | 263 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 265 | 264 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 266 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(coin_word_r, NULL) | |
| 265 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gunbustr_state,coin_word_r, NULL) | |
| 267 | 266 | |
| 268 | 267 | /* Light gun inputs */ |
| 269 | 268 |
| r14883 | r14884 | |
|---|---|---|
| 410 | 410 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Channel Select") PORT_CODE(KEYCODE_0) |
| 411 | 411 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Enter") PORT_CODE(KEYCODE_MINUS) |
| 412 | 412 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Reset") PORT_CODE(KEYCODE_EQUALS) |
| 413 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(pc10_int_detect_r, NULL) // INT Detect | |
| 413 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, playch10_state,pc10_int_detect_r, NULL) // INT Detect | |
| 414 | 414 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 415 | 415 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 416 | 416 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| r14883 | r14884 | |
|---|---|---|
| 44 | 44 | DECLARE_WRITE16_MEMBER(txt_videoram_w); |
| 45 | 45 | DECLARE_WRITE16_MEMBER(ticket_w); |
| 46 | 46 | DECLARE_WRITE16_MEMBER(video_regs_w); |
| 47 | DECLARE_CUSTOM_INPUT_MEMBER(ticket_status_r); | |
| 47 | 48 | }; |
| 48 | 49 | |
| 49 | 50 | |
| r14883 | r14884 | |
| 201 | 202 | downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (data & 0x3)); |
| 202 | 203 | } |
| 203 | 204 | |
| 204 | ||
| 205 | ||
| 205 | 206 | { |
| 206 | pzletime_state *state = field.machine().driver_data<pzletime_state>(); | |
| 207 | return (state->m_ticket && !(field.machine().primary_screen->frame_number() % 128)); | |
| 207 | return (m_ticket && !(machine().primary_screen->frame_number() % 128)); | |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | static ADDRESS_MAP_START( pzletime_map, AS_PROGRAM, 16, pzletime_state ) |
| r14883 | r14884 | |
| 233 | 233 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 234 | 234 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 235 | 235 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) /* eeprom */ |
| 236 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(ticket_status_r, NULL) /* ticket dispenser */ | |
| 236 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pzletime_state,ticket_status_r, NULL) /* ticket dispenser */ | |
| 237 | 237 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 238 | 238 | |
| 239 | 239 | PORT_START("INPUT") |
| r14883 | r14884 | |
|---|---|---|
| 652 | 652 | #endif |
| 653 | 653 | |
| 654 | 654 | |
| 655 | ||
| 655 | ||
| 656 | 656 | { |
| 657 | equites_state *state = field.machine().driver_data<equites_state>(); | |
| 658 | return state->m_unknown_bit; | |
| 657 | return m_unknown_bit; | |
| 659 | 658 | } |
| 660 | 659 | |
| 661 | 660 | WRITE16_MEMBER(equites_state::gekisou_unknown_0_w) |
| r14883 | r14884 | |
| 850 | 849 | PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 851 | 850 | PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 852 | 851 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 853 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gekisou_unknown_status, NULL) | |
| 852 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state,gekisou_unknown_status, NULL) | |
| 854 | 853 | |
| 855 | 854 | /* this is actually a variable resistor */ |
| 856 | 855 | PORT_START(FRQ_ADJUSTER_TAG) |
| r14883 | r14884 | |
|---|---|---|
| 105 | 105 | DECLARE_WRITE8_MEMBER(led_den2_w); |
| 106 | 106 | DECLARE_READ8_MEMBER(laserdisc_r); |
| 107 | 107 | DECLARE_WRITE8_MEMBER(laserdisc_w); |
| 108 | DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_status_r); | |
| 109 | DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_command_r); | |
| 108 | 110 | }; |
| 109 | 111 | |
| 110 | 112 | |
| r14883 | r14884 | |
| 360 | 362 | * |
| 361 | 363 | *************************************/ |
| 362 | 364 | |
| 363 | ||
| 365 | ||
| 364 | 366 | { |
| 365 | dlair_state *state = field.machine().driver_data<dlair_state>(); | |
| 366 | return state->laserdisc_status_r(); | |
| 367 | return laserdisc_status_r(); | |
| 367 | 368 | } |
| 368 | 369 | |
| 369 | 370 | |
| 370 | ||
| 371 | ||
| 371 | 372 | { |
| 372 | dlair_state *state = field.machine().driver_data<dlair_state>(); | |
| 373 | return (state->laserdisc_ready_r() == ASSERT_LINE) ? 0 : 1; | |
| 373 | return (laserdisc_ready_r() == ASSERT_LINE) ? 0 : 1; | |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | |
| r14883 | r14884 | |
| 579 | 579 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 580 | 580 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 581 | 581 | PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 582 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(laserdisc_status_r, NULL) /* status strobe */ | |
| 583 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(laserdisc_command_r, NULL) /* command strobe */ | |
| 582 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, NULL) /* status strobe */ | |
| 583 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, NULL) /* command strobe */ | |
| 584 | 584 | INPUT_PORTS_END |
| 585 | 585 | |
| 586 | 586 | |
| r14883 | r14884 | |
| 611 | 611 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 612 | 612 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 613 | 613 | PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ |
| 614 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(laserdisc_status_r, NULL) /* status strobe */ | |
| 615 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(laserdisc_command_r, NULL) /* command strobe */ | |
| 614 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, NULL) /* status strobe */ | |
| 615 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, NULL) /* command strobe */ | |
| 616 | 616 | |
| 617 | 617 | PORT_START("DSW1") |
| 618 | 618 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("A:2,1") |
| r14883 | r14884 | |
|---|---|---|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | |
| 198 | ||
| 198 | ||
| 199 | 199 | { |
| 200 | firetrk_state *state = field.machine().driver_data<firetrk_state>(); | |
| 201 | return state->m_steer_dir[(FPTR)param]; | |
| 200 | return m_steer_dir[(FPTR)param]; | |
| 202 | 201 | } |
| 203 | 202 | |
| 204 | 203 | |
| 205 | ||
| 204 | ||
| 206 | 205 | { |
| 207 | firetrk_state *state = field.machine().driver_data<firetrk_state>(); | |
| 208 | return state->m_steer_flag[(FPTR)param]; | |
| 206 | return m_steer_flag[(FPTR)param]; | |
| 209 | 207 | } |
| 210 | 208 | |
| 211 | 209 | |
| 212 | ||
| 210 | ||
| 213 | 211 | { |
| 214 | firetrk_state *state = field.machine().driver_data<firetrk_state>(); | |
| 215 | 212 | UINT32 ret; |
| 216 | 213 | int which = (FPTR)param; |
| 217 | 214 | |
| 218 | 215 | if (which != 2) |
| 219 | ret = | |
| 216 | ret = | |
| 220 | 217 | else |
| 221 | ret = | |
| 218 | ret = | |
| 222 | 219 | |
| 223 | 220 | return ret; |
| 224 | 221 | } |
| 225 | 222 | |
| 226 | 223 | |
| 227 | ||
| 224 | ||
| 228 | 225 | { |
| 229 | firetrk_state *state = field.machine().driver_data<firetrk_state>(); | |
| 230 | 226 | UINT32 ret; |
| 231 | 227 | int which = (FPTR)param; |
| 232 | 228 | |
| 233 | 229 | if (which != 2) |
| 234 | ret = | |
| 230 | ret = | |
| 235 | 231 | else |
| 236 | ret = | |
| 232 | ret = | |
| 237 | 233 | |
| 238 | 234 | return ret; |
| 239 | 235 | } |
| 240 | 236 | |
| 241 | 237 | |
| 242 | ||
| 238 | ||
| 243 | 239 | { |
| 244 | firetrk_state *state = field.machine().driver_data<firetrk_state>(); | |
| 245 | return (state->m_gear == (FPTR)param) ? 1 : 0; | |
| 240 | return (m_gear == (FPTR)param) ? 1 : 0; | |
| 246 | 241 | } |
| 247 | 242 | |
| 248 | 243 | |
| r14883 | r14884 | |
| 438 | 433 | PORT_START("BIT_0") |
| 439 | 434 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 440 | 435 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas") PORT_PLAYER(1) |
| 441 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(steer_dir_r, (void *)0) | |
| 442 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(steer_dir_r, (void *)1) | |
| 436 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)0) | |
| 437 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)1) | |
| 443 | 438 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Bell") PORT_PLAYER(2) |
| 444 | 439 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_TILT ) |
| 445 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(skid_r, (void *)2) | |
| 440 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)2) | |
| 446 | 441 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Service_Mode ) ) PORT_CODE(KEYCODE_F2) PORT_TOGGLE PORT_CHANGED(service_mode_switch_changed, 0) |
| 447 | 442 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 448 | 443 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| r14883 | r14884 | |
| 462 | 457 | PORT_START("BIT_7") |
| 463 | 458 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 464 | 459 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 465 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(steer_flag_r, (void *)0) | |
| 466 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(steer_flag_r, (void *)1) | |
| 460 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)0) | |
| 461 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)1) | |
| 467 | 462 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 468 | 463 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 469 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(crash_r, (void *)2) | |
| 464 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,crash_r, (void *)2) | |
| 470 | 465 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Diag Step") PORT_CODE(KEYCODE_F1) |
| 471 | 466 | |
| 472 | 467 | PORT_START("HORN") |
| r14883 | r14884 | |
| 508 | 503 | PORT_DIPSETTING( 0xc0, DEF_STR( German ) ) |
| 509 | 504 | |
| 510 | 505 | PORT_START("BIT_0") |
| 511 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gear_r, (void *)1) | |
| 506 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)1) | |
| 512 | 507 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas") |
| 513 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(steer_dir_r, (void *)0) | |
| 508 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)0) | |
| 514 | 509 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Hiscore Reset") PORT_CODE(KEYCODE_H) |
| 515 | 510 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 516 | 511 | PORT_SERVICE( 0x20, IP_ACTIVE_HIGH ) |
| 517 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(skid_r, (void *)0) | |
| 512 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)0) | |
| 518 | 513 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT ) |
| 519 | 514 | |
| 520 | 515 | PORT_START("BIT_7") |
| 521 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gear_r, (void *)2) | |
| 522 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gear_r, (void *)0) | |
| 523 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(steer_flag_r, (void *)0) | |
| 516 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)2) | |
| 517 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)0) | |
| 518 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)0) | |
| 524 | 519 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 525 | 520 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 526 | 521 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) |
| 527 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(crash_r, (void *)0) | |
| 522 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,crash_r, (void *)0) | |
| 528 | 523 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE) |
| 529 | 524 | |
| 530 | 525 | PORT_START("GEAR") |
| r14883 | r14884 | |
| 580 | 575 | PORT_DIPSETTING( 0x00, DEF_STR( German ) ) |
| 581 | 576 | |
| 582 | 577 | PORT_START("BIT_6") |
| 583 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gear_r, (void *)0) | |
| 584 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gear_r, (void *)1) | |
| 585 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gear_r, (void *)2) | |
| 578 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)0) | |
| 579 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)1) | |
| 580 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)2) | |
| 586 | 581 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE) |
| 587 | 582 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas") |
| 588 | 583 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_VBLANK ) |
| 589 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(steer_dir_r, (void *)0) | |
| 590 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(skid_r, (void *)1) | |
| 584 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)0) | |
| 585 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)1) | |
| 591 | 586 | |
| 592 | 587 | PORT_START("BIT_7") |
| 593 | 588 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) |
| r14883 | r14884 | |
| 596 | 591 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 597 | 592 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 598 | 593 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 599 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(steer_flag_r, (void *)0) | |
| 600 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(skid_r, (void *)0) | |
| 594 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)0) | |
| 595 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)0) | |
| 601 | 596 | |
| 602 | 597 | PORT_START("GEAR") |
| 603 | 598 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED(gear_changed, (void *)0) |
| r14883 | r14884 | |
|---|---|---|
| 232 | 232 | DECLARE_READ8_MEMBER(peplus_bgcolor_r); |
| 233 | 233 | DECLARE_READ8_MEMBER(peplus_dropdoor_r); |
| 234 | 234 | DECLARE_READ8_MEMBER(peplus_watchdog_r); |
| 235 | DECLARE_CUSTOM_INPUT_MEMBER(peplus_input_r); | |
| 235 | 236 | }; |
| 236 | 237 | |
| 237 | 238 | |
| r14883 | r14884 | |
| 804 | 805 | * Input ports * |
| 805 | 806 | *************************/ |
| 806 | 807 | |
| 807 | ||
| 808 | ||
| 808 | 809 | { |
| 809 | 810 | UINT8 inp_ret = 0x00; |
| 810 | UINT8 inp_read = input_port_read( | |
| 811 | UINT8 inp_read = input_port_read( | |
| 811 | 812 | |
| 812 | 813 | if (inp_read & 0x01) inp_ret = 0x01; |
| 813 | 814 | if (inp_read & 0x02) inp_ret = 0x02; |
| r14883 | r14884 | |
| 863 | 864 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 864 | 865 | |
| 865 | 866 | PORT_START("IN0") |
| 866 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK1") | |
| 867 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK1") | |
| 867 | 868 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 868 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK2") | |
| 869 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK2") | |
| 869 | 870 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 870 | 871 | INPUT_PORTS_END |
| 871 | 872 | |
| r14883 | r14884 | |
| 891 | 892 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U) |
| 892 | 893 | |
| 893 | 894 | PORT_START("IN0") |
| 894 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK1") | |
| 895 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK1") | |
| 895 | 896 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 896 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK2") | |
| 897 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK2") | |
| 897 | 898 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 898 | 899 | INPUT_PORTS_END |
| 899 | 900 | |
| r14883 | r14884 | |
| 919 | 920 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON15 ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U) |
| 920 | 921 | |
| 921 | 922 | PORT_START("IN0") |
| 922 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK1") | |
| 923 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK1") | |
| 923 | 924 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 924 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK2") | |
| 925 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK2") | |
| 925 | 926 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 926 | 927 | INPUT_PORTS_END |
| 927 | 928 | |
| r14883 | r14884 | |
| 952 | 953 | PORT_BIT( 0xffff, 0x200, IPT_LIGHTGUN_Y ) PORT_MINMAX(0x00, 1024) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(13) |
| 953 | 954 | |
| 954 | 955 | PORT_START("IN0") |
| 955 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK1") | |
| 956 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK1") | |
| 956 | 957 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Light Pen") PORT_CODE(KEYCODE_A) |
| 957 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK2") | |
| 958 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK2") | |
| 958 | 959 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 959 | 960 | INPUT_PORTS_END |
| 960 | 961 | |
| r14883 | r14884 | |
| 980 | 981 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON15 ) PORT_NAME("Bill Acceptor") PORT_CODE(KEYCODE_U) |
| 981 | 982 | |
| 982 | 983 | PORT_START("IN0") |
| 983 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK1") | |
| 984 | PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK1") | |
| 984 | 985 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 985 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(peplus_input_r, "IN_BANK2") | |
| 986 | PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state,peplus_input_r, "IN_BANK2") | |
| 986 | 987 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 987 | 988 | INPUT_PORTS_END |
| 988 | 989 |
| r14883 | r14884 | |
|---|---|---|
| 94 | 94 | DECLARE_WRITE8_MEMBER(sound_w); |
| 95 | 95 | DECLARE_WRITE8_MEMBER(i8257_CH0_w); |
| 96 | 96 | DECLARE_WRITE8_MEMBER(i8257_LMSR_w); |
| 97 | DECLARE_CUSTOM_INPUT_MEMBER(prot_r); | |
| 97 | 98 | }; |
| 98 | 99 | |
| 99 | 100 | |
| r14883 | r14884 | |
| 140 | 141 | 0x03, 0x01, 0x00, 0x03 |
| 141 | 142 | }; |
| 142 | 143 | |
| 143 | ||
| 144 | ||
| 144 | 145 | { |
| 145 | ddayjlc_state *state = field.machine().driver_data<ddayjlc_state>(); | |
| 146 | return prot_data[state->m_prot_addr]; | |
| 146 | return prot_data[m_prot_addr]; | |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | WRITE8_MEMBER(ddayjlc_state::prot_w) |
| r14883 | r14884 | |
| 293 | 293 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 294 | 294 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 295 | 295 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 ) |
| 296 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(prot_r, NULL) | |
| 296 | PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddayjlc_state,prot_r, NULL) | |
| 297 | 297 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 298 | 298 | |
| 299 | 299 | PORT_START("DSW1") |
| r14883 | r14884 | |
|---|---|---|
| 440 | 440 | /**********************************************************************************/ |
| 441 | 441 | /* EEPROM handlers */ |
| 442 | 442 | |
| 443 | ||
| 443 | ||
| 444 | 444 | { |
| 445 | 445 | return (gx_rdport1_3 >> 1); |
| 446 | 446 | } |
| r14883 | r14884 | |
| 1369 | 1369 | |
| 1370 | 1370 | // note: racin' force expects bit 1 of the eeprom port to toggle |
| 1371 | 1371 | PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) |
| 1372 | PORT_BIT( 0x000000fe, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gx_rdport1_3_r, NULL) | |
| 1372 | PORT_BIT( 0x000000fe, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, konamigx_state,gx_rdport1_3_r, NULL) | |
| 1373 | 1373 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1374 | 1374 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1375 | 1375 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 31 | 31 | /* devices */ |
| 32 | 32 | device_t *m_main_cpu; |
| 33 | 33 | DECLARE_WRITE8_MEMBER(dorachan_ctrl_w); |
| 34 | DECLARE_CUSTOM_INPUT_MEMBER(dorachan_protection_r); | |
| 35 | DECLARE_CUSTOM_INPUT_MEMBER(dorachan_v128_r); | |
| 34 | 36 | }; |
| 35 | 37 | |
| 36 | 38 | |
| r14883 | r14884 | |
| 40 | 42 | * |
| 41 | 43 | *************************************/ |
| 42 | 44 | |
| 43 | ||
| 45 | ||
| 44 | 46 | { |
| 45 | dorachan_state *state = field.machine().driver_data<dorachan_state>(); | |
| 46 | 47 | UINT8 ret = 0; |
| 47 | 48 | |
| 48 | switch (cpu_get_previouspc( | |
| 49 | switch (cpu_get_previouspc( | |
| 49 | 50 | { |
| 50 | 51 | case 0x70ce: ret = 0xf2; break; |
| 51 | 52 | case 0x72a2: ret = 0xd5; break; |
| 52 | 53 | case 0x72b5: ret = 0xcb; break; |
| 53 | 54 | |
| 54 | 55 | default: |
| 55 | mame_printf_debug("unhandled $2400 read @ %x\n", cpu_get_previouspc( | |
| 56 | mame_printf_debug("unhandled $2400 read @ %x\n", cpu_get_previouspc( | |
| 56 | 57 | break; |
| 57 | 58 | } |
| 58 | 59 | |
| r14883 | r14884 | |
| 127 | 128 | } |
| 128 | 129 | |
| 129 | 130 | |
| 130 | ||
| 131 | ||
| 131 | 132 | { |
| 132 | dorachan_state *state = field.machine().driver_data<dorachan_state>(); | |
| 133 | 133 | |
| 134 | 134 | /* to avoid resetting (when player 2 starts) bit 0 need to be inverted when screen is flipped */ |
| 135 | return (( | |
| 135 | return (( | |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | |
| r14883 | r14884 | |
| 180 | 180 | |
| 181 | 181 | static INPUT_PORTS_START( dorachan ) |
| 182 | 182 | PORT_START("PROT") |
| 183 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dorachan_protection_r, NULL) | |
| 183 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dorachan_state,dorachan_protection_r, NULL) | |
| 184 | 184 | |
| 185 | 185 | PORT_START("SYSTEM") |
| 186 | 186 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
| 209 | 209 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) |
| 210 | 210 | |
| 211 | 211 | PORT_START("V128") |
| 212 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(dorachan_v128_r, NULL) | |
| 212 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dorachan_state,dorachan_v128_r, NULL) | |
| 213 | 213 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 214 | 214 | INPUT_PORTS_END |
| 215 | 215 |
| r14883 | r14884 | |
|---|---|---|
| 222 | 222 | { |
| 223 | 223 | |
| 224 | 224 | m_latch2_full = 0; |
| 225 | return soundlatch2_r( | |
| 225 | return soundlatch2_r( | |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | WRITE16_MEMBER(sandscrp_state::sandscrp_soundlatch_word_w) |
| r14883 | r14884 | |
| 231 | 231 | if (ACCESSING_BITS_0_7) |
| 232 | 232 | { |
| 233 | 233 | m_latch1_full = 1; |
| 234 | soundlatch_w( | |
| 234 | soundlatch_w( | |
| 235 | 235 | cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); |
| 236 | 236 | device_spin_until_time(&space.device(), attotime::from_usec(100)); // Allow the other cpu to reply |
| 237 | 237 | } |
| r14883 | r14884 | |
| 291 | 291 | { |
| 292 | 292 | |
| 293 | 293 | m_latch1_full = 0; |
| 294 | return soundlatch_r( | |
| 294 | return soundlatch_r( | |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | WRITE8_MEMBER(sandscrp_state::sandscrp_soundlatch_w) |
| 298 | 298 | { |
| 299 | 299 | |
| 300 | 300 | m_latch2_full = 1; |
| 301 | soundlatch2_w( | |
| 301 | soundlatch2_w( | |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | static ADDRESS_MAP_START( sandscrp_soundmem, AS_PROGRAM, 8, sandscrp_state ) |
| r14883 | r14884 | |
|---|---|---|
| 155 | 155 | * |
| 156 | 156 | *************************************/ |
| 157 | 157 | |
| 158 | ||
| 158 | ||
| 159 | 159 | { |
| 160 | exidy_state *state = field.machine().driver_data<exidy_state>(); | |
| 161 | UINT8 dial = input_port_read(field.machine(), "DIAL"); | |
| 160 | UINT8 dial = input_port_read(machine(), "DIAL"); | |
| 162 | 161 | int result = 0; |
| 163 | 162 | |
| 164 | result = (dial != | |
| 163 | result = (dial != | |
| 165 | 164 | if (result != 0) |
| 166 | 165 | { |
| 167 | if (((dial - | |
| 166 | if (((dial - | |
| 168 | 167 | { |
| 169 | 168 | result |= 1; |
| 170 | | |
| 169 | | |
| 171 | 170 | } |
| 172 | 171 | else |
| 173 | | |
| 172 | | |
| 174 | 173 | } |
| 175 | 174 | |
| 176 | 175 | return result; |
| r14883 | r14884 | |
| 603 | 602 | PORT_START("IN0") |
| 604 | 603 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| 605 | 604 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) |
| 606 | PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(teetert_input_r, NULL) | |
| 605 | PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy_state,teetert_input_r, NULL) | |
| 607 | 606 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 608 | 607 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 609 | 608 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 30 | 30 | DECLARE_WRITE8_MEMBER(mw18w_lamps_w); |
| 31 | 31 | DECLARE_WRITE8_MEMBER(mw18w_led_display_w); |
| 32 | 32 | DECLARE_WRITE8_MEMBER(mw18w_irq0_clear_w); |
| 33 | DECLARE_CUSTOM_INPUT_MEMBER(mw18w_sensors_r); | |
| 33 | 34 | }; |
| 34 | 35 | |
| 35 | 36 | |
| r14883 | r14884 | |
| 66 | 67 | cputag_set_input_line(machine(), "maincpu", 0, CLEAR_LINE); |
| 67 | 68 | } |
| 68 | 69 | |
| 69 | ||
| 70 | ||
| 70 | 71 | { |
| 71 | 72 | // d7: off road |
| 72 | 73 | // d6: in dock area |
| r14883 | r14884 | |
| 114 | 115 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // left/right sw. |
| 115 | 116 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 116 | 117 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 117 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mw18w_sensors_r, NULL) | |
| 118 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw18w_state,mw18w_sensors_r, NULL) | |
| 118 | 119 | |
| 119 | 120 | PORT_START("IN1") |
| 120 | 121 | PORT_BIT( 0x1f, 0x00, IPT_PEDAL ) PORT_REMAP_TABLE(mw18w_controller_table + 0x20) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) // accelerate |
| r14883 | r14884 | |
|---|---|---|
| 270 | 270 | |
| 271 | 271 | /* Input Ports */ |
| 272 | 272 | |
| 273 | ||
| 273 | ||
| 274 | 274 | { |
| 275 | cidelsa_state *state = field.machine().driver_data<cidelsa_state>(); | |
| 276 | 275 | |
| 277 | return | |
| 276 | return | |
| 278 | 277 | } |
| 279 | 278 | |
| 280 | 279 | static INPUT_CHANGED( ef_w ) |
| r14883 | r14884 | |
| 291 | 290 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF |
| 292 | 291 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR |
| 293 | 292 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 294 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, NULL) | |
| 293 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cidelsa_state,cdp1869_pcb_r, NULL) | |
| 295 | 294 | |
| 296 | 295 | PORT_START("IN1") |
| 297 | 296 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) |
| r14883 | r14884 | |
| 331 | 330 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF |
| 332 | 331 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR |
| 333 | 332 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 334 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, NULL) | |
| 333 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cidelsa_state,cdp1869_pcb_r, NULL) | |
| 335 | 334 | |
| 336 | 335 | PORT_START("IN1") |
| 337 | 336 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) |
| r14883 | r14884 | |
| 381 | 380 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 382 | 381 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 383 | 382 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 384 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, NULL) | |
| 383 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cidelsa_state,cdp1869_pcb_r, NULL) | |
| 385 | 384 | |
| 386 | 385 | PORT_START("IN1") |
| 387 | 386 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) |
| r14883 | r14884 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | /******************************************************************************/ |
| 43 | 43 | |
| 44 | ||
| 44 | ||
| 45 | 45 | { |
| 46 | 46 | const char *tag = (const char *)param; |
| 47 | 47 | UINT32 ipt = 0; |
| 48 | 48 | |
| 49 | ipt = ((input_port_read( | |
| 49 | ipt = ((input_port_read( | |
| 50 | 50 | |
| 51 | 51 | return ipt; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | ||
| 54 | ||
| 55 | 55 | { |
| 56 | taito_f3_state *state = field.machine().driver_data<taito_f3_state>(); | |
| 57 | 56 | int num = (FPTR)param; |
| 58 | return | |
| 57 | return | |
| 59 | 58 | } |
| 60 | 59 | |
| 61 | 60 | READ32_MEMBER(taito_f3_state::f3_control_r) |
| r14883 | r14884 | |
| 230 | 229 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_START2 ) |
| 231 | 230 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_START3 ) |
| 232 | 231 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_START4 ) |
| 233 | PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "EEPROMIN") | |
| 234 | PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "EEPROMIN") | |
| 232 | PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "EEPROMIN") | |
| 233 | PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "EEPROMIN") | |
| 235 | 234 | |
| 236 | 235 | /* MSW: Coin counters/lockouts are readable, LSW: Joysticks (Player 1 & 2) */ |
| 237 | 236 | PORT_START("IN1") |
| r14883 | r14884 | |
| 244 | 243 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 245 | 244 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 246 | 245 | PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* These must be high */ |
| 247 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(f3_coin_r, (void *)0) | |
| 246 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_coin_r, (void *)0) | |
| 248 | 247 | |
| 249 | 248 | /* Player 3 & 4 fire buttons (Player 2 top fire buttons in Kaiser Knuckle) */ |
| 250 | 249 | PORT_START("IN2") |
| r14883 | r14884 | |
| 270 | 269 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) |
| 271 | 270 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) |
| 272 | 271 | PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 273 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(f3_coin_r, (void *)1) | |
| 272 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_coin_r, (void *)1) | |
| 274 | 273 | |
| 275 | 274 | /* Analog control 1 */ |
| 276 | 275 | PORT_START("AN0") |
| 277 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(f3_analog_r, "DIAL1") | |
| 276 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_analog_r, "DIAL1") | |
| 278 | 277 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 279 | 278 | |
| 280 | 279 | /* Analog control 2 */ |
| 281 | 280 | PORT_START("AN1") |
| 282 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(f3_analog_r, "DIAL2") | |
| 281 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_analog_r, "DIAL2") | |
| 283 | 282 | PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 284 | 283 | |
| 285 | 284 | /* These are not read directly, but through PORT_CUSTOMs above */ |
| r14883 | r14884 | |
|---|---|---|
| 1115 | 1115 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 1116 | 1116 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Acc.") |
| 1117 | 1117 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Gear") PORT_TOGGLE |
| 1118 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(wrally2_analog_bit_r, (void *)0) /* ADC_1 serial input */ | |
| 1118 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco2_state,wrally2_analog_bit_r, (void *)0) /* ADC_1 serial input */ | |
| 1119 | 1119 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) |
| 1120 | 1120 | PORT_SERVICE_DIPLOC( 0x0100, IP_ACTIVE_LOW, "SW2:1" ) |
| 1121 | 1121 | PORT_DIPNAME( 0x0200, 0x0000, "Coin mechanism" ) PORT_DIPLOCATION("SW2:2") |
| r14883 | r14884 | |
| 1173 | 1173 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 1174 | 1174 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Acc.") |
| 1175 | 1175 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Gear") PORT_TOGGLE |
| 1176 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(wrally2_analog_bit_r, (void *)1) /* ADC_2 serial input */ | |
| 1176 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco2_state,wrally2_analog_bit_r, (void *)1) /* ADC_2 serial input */ | |
| 1177 | 1177 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) |
| 1178 | 1178 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1179 | 1179 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r14883 | r14884 | |
|---|---|---|
| 62 | 62 | AM_RANGE(0xc000, 0xdfff) AM_RAM |
| 63 | 63 | ADDRESS_MAP_END |
| 64 | 64 | |
| 65 | ||
| 65 | ||
| 66 | 66 | { |
| 67 | UINT8 ret = ( | |
| 67 | UINT8 ret = ( | |
| 68 | 68 | |
| 69 | 69 | return ret; |
| 70 | 70 | } |
| r14883 | r14884 | |
| 97 | 97 | static INPUT_PORTS_START( homerun ) |
| 98 | 98 | PORT_START("IN0") |
| 99 | 99 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 100 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(homerun_40_r, NULL) | |
| 100 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state,homerun_40_r, NULL) | |
| 101 | 101 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 102 | 102 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 103 | 103 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| r14883 | r14884 | |
| 127 | 127 | static INPUT_PORTS_START( dynashot ) |
| 128 | 128 | PORT_START("IN0") |
| 129 | 129 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 130 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(homerun_40_r, NULL) | |
| 130 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state,homerun_40_r, NULL) | |
| 131 | 131 | PORT_BIT( 0xb7, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 132 | 132 | |
| 133 | 133 | PORT_START("IN1") |
| r14883 | r14884 | |
|---|---|---|
| 120 | 120 | m_watchdog_count = 0; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | ||
| 123 | ||
| 124 | 124 | { |
| 125 | champbas_state *state = field.machine().driver_data<champbas_state>(); | |
| 126 | return BIT(state->m_watchdog_count, 2); | |
| 125 | return BIT(m_watchdog_count, 2); | |
| 127 | 126 | } |
| 128 | 127 | |
| 129 | 128 | |
| r14883 | r14884 | |
| 402 | 401 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) |
| 403 | 402 | PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) |
| 404 | 403 | PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) |
| 405 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter | |
| 404 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter | |
| 406 | 405 | |
| 407 | 406 | PORT_START("SYSTEM") |
| 408 | 407 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| r14883 | r14884 | |
| 449 | 448 | PORT_DIPSETTING( 0x20, DEF_STR( Easy ) ) |
| 450 | 449 | PORT_DIPSETTING( 0x00, DEF_STR( Hard )) |
| 451 | 450 | PORT_DIPUNKNOWN( 0x40, 0x00 ) |
| 452 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter | |
| 451 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter | |
| 453 | 452 | INPUT_PORTS_END |
| 454 | 453 | |
| 455 | 454 | static INPUT_PORTS_START( exctsccr ) |
| r14883 | r14884 | |
| 475 | 474 | PORT_DIPSETTING( 0x00, "2 Min." ) |
| 476 | 475 | PORT_DIPSETTING( 0x60, "3 Min." ) |
| 477 | 476 | PORT_DIPSETTING( 0x40, "4 Min." ) |
| 478 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter | |
| 477 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state,champbas_watchdog_bit2, NULL) // bit 2 of the watchdog counter | |
| 479 | 478 | INPUT_PORTS_END |
| 480 | 479 | |
| 481 | 480 |
| r14883 | r14884 | |
|---|---|---|
| 639 | 639 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT ) |
| 640 | 640 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 ) |
| 641 | 641 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) |
| 642 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(arkanoid_68705_input_r, NULL) /* Inputs from the 68705 */ | |
| 642 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arkanoid_state,arkanoid_68705_input_r, NULL) /* Inputs from the 68705 */ | |
| 643 | 643 | |
| 644 | 644 | PORT_START("BUTTONS") |
| 645 | 645 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| r14883 | r14884 | |
| 648 | 648 | PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 649 | 649 | |
| 650 | 650 | PORT_START("MUX") |
| 651 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(arkanoid_input_mux, "P1\0P2") | |
| 651 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arkanoid_state,arkanoid_input_mux, "P1\0P2") | |
| 652 | 652 | |
| 653 | 653 | PORT_START("DSW") |
| 654 | 654 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:8") |
| r14883 | r14884 | |
|---|---|---|
| 170 | 170 | } |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | ||
| 173 | ||
| 174 | 174 | { |
| 175 | crshrace_state *state = field.machine().driver_data<crshrace_state>(); | |
| 176 | return state->m_pending_command; | |
| 175 | return m_pending_command; | |
| 177 | 176 | } |
| 178 | 177 | |
| 179 | 178 | WRITE8_MEMBER(crshrace_state::pending_command_clear_w) |
| r14883 | r14884 | |
| 364 | 363 | PORT_DIPSETTING( 0x0e00, "5" ) |
| 365 | 364 | PORT_DIPSETTING( 0x0f00, "5" ) |
| 366 | 365 | */ |
| 367 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(country_sndpending_r, NULL) /* pending sound command */ | |
| 366 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, crshrace_state,country_sndpending_r, NULL) /* pending sound command */ | |
| 368 | 367 | INPUT_PORTS_END |
| 369 | 368 | |
| 370 | 369 | /* Same as 'crshrace', but additional "unknown" Dip Switch (see notes) */ |
| r14883 | r14884 | |
|---|---|---|
| 173 | 173 | DECLARE_WRITE16_MEMBER(vbowl_link_2_w); |
| 174 | 174 | DECLARE_WRITE16_MEMBER(vbowl_link_3_w); |
| 175 | 175 | UINT16 igs_dips_r(int NUM); |
| 176 | DECLARE_CUSTOM_INPUT_MEMBER(igs_hopper_r); | |
| 176 | 177 | }; |
| 177 | 178 | |
| 178 | 179 | |
| r14883 | r14884 | |
| 520 | 521 | // Inputs |
| 521 | 522 | |
| 522 | 523 | |
| 523 | ||
| 524 | ||
| 524 | 525 | { |
| 525 | igs011_state *state = field.machine().driver_data<igs011_state>(); | |
| 526 | return (state->m_igs_hopper && ((field.machine().primary_screen->frame_number()/5)&1)) ? 0x0000 : 0x0001; | |
| 526 | return (m_igs_hopper && ((machine().primary_screen->frame_number()/5)&1)) ? 0x0000 : 0x0001; | |
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | WRITE16_MEMBER(igs011_state::igs_dips_w) |
| r14883 | r14884 | |
| 2857 | 2857 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2858 | 2858 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear |
| 2859 | 2859 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting |
| 2860 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(igs_hopper_r, (void *)0) // hopper switch | |
| 2860 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)0) // hopper switch | |
| 2861 | 2861 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats |
| 2862 | 2862 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin |
| 2863 | 2863 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 2986 | 2986 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // shown in test mode |
| 2987 | 2987 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 2988 | 2988 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin |
| 2989 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(igs_hopper_r, (void *)0) // hopper switch | |
| 2989 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)0) // hopper switch | |
| 2990 | 2990 | |
| 2991 | 2991 | PORT_START("IN0") |
| 2992 | 2992 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) |
| r14883 | r14884 | |
| 3115 | 3115 | PORT_DIPUNKNOWN( 0x80, 0x80 ) |
| 3116 | 3116 | |
| 3117 | 3117 | PORT_START("COIN") |
| 3118 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(igs_hopper_r, (void *)0) // hopper switch | |
| 3118 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)0) // hopper switch | |
| 3119 | 3119 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) // system reset |
| 3120 | 3120 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting |
| 3121 | 3121 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats |
| r14883 | r14884 | |
| 3442 | 3442 | PORT_DIPUNKNOWN( 0x80, 0x80 ) |
| 3443 | 3443 | |
| 3444 | 3444 | PORT_START("COIN") |
| 3445 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(igs_hopper_r, (void *)0) // hopper switch | |
| 3445 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)0) // hopper switch | |
| 3446 | 3446 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 3447 | 3447 | PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting |
| 3448 | 3448 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats |
| r14883 | r14884 | |
|---|---|---|
| 696 | 696 | } |
| 697 | 697 | } |
| 698 | 698 | |
| 699 | ||
| 699 | ||
| 700 | 700 | { |
| 701 | cave_state *state = field.machine().driver_data<cave_state>(); | |
| 702 | return state->m_hopper ? 1 : 0; | |
| 701 | return m_hopper ? 1 : 0; | |
| 703 | 702 | } |
| 704 | 703 | |
| 705 | 704 | |
| r14883 | r14884 | |
| 933 | 932 | // popmessage("led %04X", data); |
| 934 | 933 | } |
| 935 | 934 | |
| 936 | ||
| 935 | ||
| 937 | 936 | { |
| 938 | cave_state *state = field.machine().driver_data<cave_state>(); | |
| 939 | return (state->m_hopper && !(field.machine().primary_screen->frame_number() % 10)) ? 0 : 1; | |
| 937 | return (m_hopper && !(machine().primary_screen->frame_number() % 10)) ? 0 : 1; | |
| 940 | 938 | } |
| 941 | 939 | |
| 942 | 940 | static ADDRESS_MAP_START( tjumpman_map, AS_PROGRAM, 16, cave_state ) |
| r14883 | r14884 | |
| 1477 | 1475 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // service medal out? |
| 1478 | 1476 | PORT_SERVICE( 0x2000, IP_ACTIVE_LOW ) |
| 1479 | 1477 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) // service coin |
| 1480 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(korokoro_hopper_r, NULL) // motor / hopper status ??? | |
| 1478 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,korokoro_hopper_r, NULL) // motor / hopper status ??? | |
| 1481 | 1479 | |
| 1482 | 1480 | PORT_START("IN1") |
| 1483 | 1481 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 1508 | 1506 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( DEF_STR( Yes ) ) PORT_CODE(KEYCODE_Y) // suru ("do") |
| 1509 | 1507 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 1510 | 1508 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "1 Bet" ) |
| 1511 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(tjumpman_hopper_r, NULL) | |
| 1509 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, NULL) | |
| 1512 | 1510 | |
| 1513 | 1511 | PORT_START("IN1") |
| 1514 | 1512 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
| 1533 | 1531 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Pac-Man" ) PORT_CODE(KEYCODE_Y) |
| 1534 | 1532 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) |
| 1535 | 1533 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Bet" ) |
| 1536 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(tjumpman_hopper_r, NULL) | |
| 1534 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, NULL) | |
| 1537 | 1535 | |
| 1538 | 1536 | PORT_START("IN1") |
| 1539 | 1537 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 922 | 922 | |
| 923 | 923 | static INPUT_PORTS_START( joust ) |
| 924 | 924 | PORT_START("IN0") |
| 925 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(williams_mux_r, "INP2\0INP1") | |
| 925 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, williams_state,williams_mux_r, "INP2\0INP1") | |
| 926 | 926 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) |
| 927 | 927 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 ) |
| 928 | 928 | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r14883 | r14884 | |
| 983 | 983 | PORT_START("IN0") |
| 984 | 984 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) |
| 985 | 985 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 ) |
| 986 | PORT_BIT( 0xcf, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(williams_mux_r, "INP2\0INP1") | |
| 986 | PORT_BIT( 0xcf, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, williams_state,williams_mux_r, "INP2\0INP1") | |
| 987 | 987 | |
| 988 | 988 | PORT_START("IN1") |
| 989 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(williams_mux_r, "INP2A\0INP1A") | |
| 989 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, williams_state,williams_mux_r, "INP2A\0INP1A") | |
| 990 | 990 | PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 991 | 991 | |
| 992 | 992 | PORT_START("IN2") |
| r14883 | r14884 | |
| 1200 | 1200 | PORT_START("IN0") |
| 1201 | 1201 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) |
| 1202 | 1202 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 ) |
| 1203 | PORT_BIT( 0xcf, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(williams_mux_r, "INP2\0INP1") | |
| 1203 | PORT_BIT( 0xcf, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, williams_state,williams_mux_r, "INP2\0INP1") | |
| 1204 | 1204 | |
| 1205 | 1205 | PORT_START("IN1") |
| 1206 | 1206 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| r14883 | r14884 | |
| 1290 | 1290 | |
| 1291 | 1291 | static INPUT_PORTS_START( tshoot ) |
| 1292 | 1292 | PORT_START("IN0") |
| 1293 | PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(williams_mux_r, "INP1X\0INP1Y") | |
| 1293 | PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, williams_state,williams_mux_r, "INP1X\0INP1Y") | |
| 1294 | 1294 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1295 | 1295 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 1296 | 1296 | |
| r14883 | r14884 | |
| 1321 | 1321 | |
| 1322 | 1322 | static INPUT_PORTS_START( inferno ) |
| 1323 | 1323 | PORT_START("IN0") |
| 1324 | PORT_BIT( 0xFF, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(williams_mux_r, "INP1\0INP2") | |
| 1324 | PORT_BIT( 0xFF, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, williams_state,williams_mux_r, "INP1\0INP2") | |
| 1325 | 1325 | |
| 1326 | 1326 | PORT_START("IN1") |
| 1327 | 1327 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) |
| r14883 | r14884 | |
| 1364 | 1364 | |
| 1365 | 1365 | static INPUT_PORTS_START( joust2 ) |
| 1366 | 1366 | PORT_START("IN0") |
| 1367 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(williams_mux_r, "INP1\0INP2") | |
| 1367 | PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, williams_state,williams_mux_r, "INP1\0INP2") | |
| 1368 | 1368 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 1369 | 1369 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 1370 | 1370 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r14883 | r14884 | |
|---|---|---|
| 314 | 314 | |
| 315 | 315 | static INPUT_PORTS_START( asurabld ) |
| 316 | 316 | PORT_START("800000") |
| 317 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "SYSTEM") | |
| 318 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "SYSTEM") | |
| 317 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "SYSTEM") | |
| 318 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "SYSTEM") | |
| 319 | 319 | |
| 320 | 320 | PORT_START("810000") |
| 321 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "INPUTS") | |
| 322 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "INPUTS") | |
| 321 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "INPUTS") | |
| 322 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "INPUTS") | |
| 323 | 323 | |
| 324 | 324 | PORT_START("880000") |
| 325 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW1") | |
| 326 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW1") | |
| 325 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW1") | |
| 326 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW1") | |
| 327 | 327 | |
| 328 | 328 | PORT_START("890000") |
| 329 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW2") | |
| 330 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "DSW2") | |
| 329 | PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW2") | |
| 330 | PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "DSW2") | |
| 331 | 331 | |
| 332 | 332 | PORT_START("SYSTEM") |
| 333 | 333 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r14883 | r14884 | |
|---|---|---|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
| 33 | ||
| 33 | ||
| 34 | 34 | { |
| 35 | 35 | int bit = (FPTR)param; |
| 36 | return ((input_port_read( | |
| 36 | return ((input_port_read( | |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| r14883 | r14884 | |
| 149 | 149 | |
| 150 | 150 | static INPUT_PORTS_START( wolfpack ) |
| 151 | 151 | PORT_START("INPUTS") |
| 152 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(wolfpack_dial_r, (void *)0) /* dial connects here */ | |
| 153 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(wolfpack_dial_r, (void *)1) /* dial connects here */ | |
| 152 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state,wolfpack_dial_r, (void *)0) /* dial connects here */ | |
| 153 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state,wolfpack_dial_r, (void *)1) /* dial connects here */ | |
| 154 | 154 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) |
| 155 | 155 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 156 | 156 | PORT_SERVICE( 0x10, IP_ACTIVE_HIGH ) |
| r14883 | r14884 | |
|---|---|---|
| 126 | 126 | // logerror("%06x: out_w %04x\n",cpu_get_pc(&space.device()),data); |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | ||
| 129 | ||
| 130 | 130 | { |
| 131 | 131 | // static int prot = 0xa3; |
| 132 | 132 | // offs_t pc; |
| 133 | 133 | int bit; |
| 134 | 134 | |
| 135 | // logerror("%s: IN1_r\n", | |
| 135 | // logerror("%s: IN1_r\n", | |
| 136 | 136 | |
| 137 | 137 | #if 0 |
| 138 | 138 | /* Pirates protection workaround. It more complicated than this... see code at |
| 139 | 139 | 602e and 62a6 */ |
| 140 | 140 | /* For Genix, see 6576 for setting values and 67c2,d3b4 and dbc2 for tests. */ |
| 141 | 141 | |
| 142 | pc = cpu_get_pc( | |
| 142 | pc = cpu_get_pc( | |
| 143 | 143 | if (pc == 0x6134) |
| 144 | 144 | { |
| 145 | 145 | bit = prot & 1; |
| r14883 | r14884 | |
| 212 | 212 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_device, read_bit) // EEPROM data |
| 213 | 213 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode" |
| 214 | 214 | PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode" |
| 215 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM(prot_r, NULL) // protection | |
| 215 | PORT_BIT( 0x0080, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pirates_state,prot_r, NULL) // protection | |
| 216 | 216 | /* What do these bits do ? */ |
| 217 | 217 | PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 218 | 218 | PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r14883 | r14884 | |
|---|---|---|
| 164 | 164 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* JS1SW */ |
| 165 | 165 | |
| 166 | 166 | PORT_START("JOY0DAT") |
| 167 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P1JOY") | |
| 167 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, "P1JOY") | |
| 168 | 168 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 169 | 169 | |
| 170 | 170 | PORT_START("JOY1DAT") |
| 171 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P2JOY") | |
| 171 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, "P2JOY") | |
| 172 | 172 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 173 | 173 | |
| 174 | 174 | PORT_START("P1JOY") |
| r14883 | r14884 | |
|---|---|---|
| 706 | 706 | repeated both in the upper and lower half |
| 707 | 707 | -------------------------------------------------*/ |
| 708 | 708 | |
| 709 | CUSTOM_INPUT( custom_port_read ) | |
| 709 | CUSTOM_INPUT_MEMBER( driver_device::custom_port_read ) | |
| 710 | 710 | { |
| 711 | 711 | const char *tag = (const char *)param; |
| 712 | return input_port_read( | |
| 712 | return input_port_read( | |
| 713 | 713 | } |
| r14883 | r14884 | |
|---|---|---|
| 148 | 148 | INTERRUPT_GEN( irq7_line_pulse ); |
| 149 | 149 | INTERRUPT_GEN( irq7_line_assert ); |
| 150 | 150 | |
| 151 | ||
| 152 | ||
| 153 | /* ----- generic input port helpers ----- */ | |
| 154 | ||
| 155 | /* custom handler */ | |
| 156 | CUSTOM_INPUT( custom_port_read ); | |
| 157 | ||
| 158 | 151 | #endif /* __MACHINE_GENERIC_H__ */ |
| r14883 | r14884 | |
|---|---|---|
| 186 | 186 | // 8-8-8 RGB palette write handlers |
| 187 | 187 | DECLARE_WRITE16_MEMBER( paletteram16_xrgb_word_be_w ); |
| 188 | 188 | DECLARE_WRITE16_MEMBER( paletteram16_xbgr_word_be_w ); |
| 189 | ||
| 190 | // generic input port helpers | |
| 191 | // custom handler | |
| 192 | DECLARE_CUSTOM_INPUT_MEMBER( custom_port_read ); | |
| 189 | 193 | |
| 190 | 194 | protected: |
| 191 | 195 | // helpers called at startup |
| r14883 | r14884 | |
|---|---|---|
| 205 | 205 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 206 | 206 | |
| 207 | 207 | PORT_START("JOY0DAT") |
| 208 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P1JOY") | |
| 208 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, "P1JOY") | |
| 209 | 209 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 210 | 210 | |
| 211 | 211 | PORT_START("JOY1DAT") |
| 212 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P2JOY") | |
| 212 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state,amiga_joystick_convert, "P2JOY") | |
| 213 | 213 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 214 | 214 | |
| 215 | 215 | PORT_START("POTGO") |
| r14883 | r14884 | |
|---|---|---|
| 196 | 196 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 197 | 197 | |
| 198 | 198 | PORT_START("JOY0DAT") |
| 199 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P1JOY") | |
| 199 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ami1200_state,amiga_joystick_convert, "P1JOY") | |
| 200 | 200 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 201 | 201 | |
| 202 | 202 | PORT_START("JOY1DAT") |
| 203 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(amiga_joystick_convert, "P2JOY") | |
| 203 | PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ami1200_state,amiga_joystick_convert, "P2JOY") | |
| 204 | 204 | PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 205 | 205 | |
| 206 | 206 | PORT_START("POTGO") |
| Previous | 15994 Revisions | Next |