trunk/src/mame/drivers/kenseim.c
| r30877 | r30878 | |
| 10 | 10 | https://www.youtube.com/watch?v=mV00MMyBBXM |
| 11 | 11 | https://www.youtube.com/watch?v=yQpMvRL0FfM |
| 12 | 12 | |
| 13 | todo: |
| 14 | we have no way of telling the physical order of the moles on the control panel vs. the reads / writes |
| 15 | so our moles could be in the wrong positions - maybe there are fixed patterns in the video we can use |
| 16 | to figure it out? * the big mole appears to be worth 2 points so that one we can identify |
| 13 | 17 | |
| 14 | 18 | |
| 19 | |
| 15 | 20 | Additional 'DRIVE BOARD' PCB (todo, improve ascii layout) |
| 16 | 21 | |
| 17 | 22 | --------------------------------------------------------------------------------------------------------------| |
| r30877 | r30878 | |
| 310 | 315 | // i8255 ports D and E tend to be used together in the code, and the input gets masked with 6 bits (0x3f) |
| 311 | 316 | READ8_MEMBER(kenseim_state::i8255_portd_r) |
| 312 | 317 | { |
| 313 | | return 0xff; |
| 314 | | |
| 315 | | logerror("%s i8255 read port D (mole matrix / sensors input 1?)\n", machine().describe_context()); |
| 316 | | static int i = 0; |
| 317 | | i++; |
| 318 | int retvalue = 0xc0; // todo, check if upper bits are used |
| 318 | 319 | |
| 319 | | //return 0xff; |
| 320 | | if (i&8) return 0x3f; |
| 321 | | else return 0x00; |
| 320 | retvalue |= ioport("MOLEA")->read() & 0x3f; |
| 321 | |
| 322 | return retvalue; |
| 322 | 323 | } |
| 323 | 324 | |
| 324 | 325 | READ8_MEMBER(kenseim_state::i8255_porte_r) |
| 325 | 326 | { |
| 326 | | return 0xff; |
| 327 | | |
| 328 | | logerror("%s i8255 read port E (mole matrix / sensors input 2?)\n", machine().describe_context()); |
| 329 | | static int i = 0; |
| 330 | | i++; |
| 327 | int retvalue = 0xc0; // todo, check if upper bits are used |
| 331 | 328 | |
| 332 | | //return 0xff; |
| 333 | | if (i&8) return 0x3f; |
| 334 | | else return 0x00; |
| 329 | retvalue |= ioport("MOLEB")->read() & 0x3f; |
| 330 | |
| 331 | return retvalue; |
| 335 | 332 | } |
| 336 | 333 | |
| 337 | 334 | WRITE8_MEMBER(kenseim_state::i8255_porta_w) // maybe molesa output? (6-bits?) |
| r30877 | r30878 | |
| 739 | 736 | PORT_DIPNAME( 0x40, 0x40, "Game Time" ) PORT_DIPLOCATION("DRV SW(1):7") |
| 740 | 737 | PORT_DIPSETTING( 0x00, "Long (59 seconds)" ) |
| 741 | 738 | PORT_DIPSETTING( 0x40, "Short (49 seconds)" ) |
| 742 | | PORT_DIPNAME( 0x80, 0x80, "VS Bison" ) PORT_DIPLOCATION("DRV SW(1):8") |
| 743 | | PORT_DIPSETTING( 0x00, "0" ) |
| 744 | | PORT_DIPSETTING( 0x80, "1" ) |
| 739 | PORT_DIPNAME( 0x80, 0x80, "Winner of 2 Player faces Vega" ) PORT_DIPLOCATION("DRV SW(1):8") |
| 740 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 741 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 745 | 742 | |
| 746 | 743 | PORT_START("DSW2") |
| 747 | 744 | PORT_DIPNAME( 0x01, 0x01, "Unknown 1 (1-bit)" ) PORT_DIPLOCATION("DRV SW(2):1") // manual lists unused, but see code at 0x0E9E |
| r30877 | r30878 | |
| 766 | 763 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Ryu Start") |
| 767 | 764 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Chun-Li Start") |
| 768 | 765 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 766 | |
| 767 | PORT_START("MOLEA") |
| 768 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CODE(KEYCODE_W) // big mole (2pts) |
| 769 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CODE(KEYCODE_Q) |
| 770 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CODE(KEYCODE_E) |
| 771 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CODE(KEYCODE_A) |
| 772 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_CODE(KEYCODE_S) |
| 773 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_CODE(KEYCODE_D) |
| 774 | |
| 775 | PORT_START("MOLEB") |
| 776 | PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_8_PAD) // big mole (2pts) |
| 777 | PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_7_PAD) |
| 778 | PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_9_PAD) |
| 779 | PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_4_PAD) |
| 780 | PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_5_PAD) |
| 781 | PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_CODE(KEYCODE_6_PAD) |
| 769 | 782 | INPUT_PORTS_END |
| 770 | 783 | |
| 771 | 784 | ROM_START( kenseim ) |
trunk/src/mame/layout/kenseim.lay
| r30877 | r30878 | |
| 195 | 195 | </backdrop> |
| 196 | 196 | |
| 197 | 197 | |
| 198 | | <backdrop name="molea_0" element="mole_sim" state="0"><bounds x="15.0" y="275" width="25" height="25"/></backdrop> |
| 199 | | <backdrop name="molea_3" element="mole_sim" state="0"><bounds x="15.0" y="305" width="25" height="25"/></backdrop> |
| 200 | | <backdrop name="molea_1" element="mole_sim" state="0"><bounds x="40.0" y="260" width="30" height="30"/></backdrop> <!-- big mole --> |
| 201 | | <backdrop name="molea_4" element="mole_sim" state="0"><bounds x="42.5" y="300" width="25" height="25"/></backdrop> |
| 202 | | <backdrop name="molea_2" element="mole_sim" state="0"><bounds x="70.0" y="275" width="25" height="25"/></backdrop> |
| 203 | | <backdrop name="molea_5" element="mole_sim" state="0"><bounds x="70.0" y="305" width="25" height="25"/></backdrop> |
| 198 | <!-- top row --> |
| 199 | <backdrop name="molea_1" element="mole_sim" state="0" inputtag="MOLEA" inputmask="0x02" ><bounds x="15.0" y="275" width="25" height="25"/></backdrop> |
| 200 | <backdrop name="molea_0" element="mole_sim" state="0" inputtag="MOLEA" inputmask="0x01" ><bounds x="40.0" y="260" width="30" height="30"/></backdrop> <!-- big mole --> |
| 201 | <backdrop name="molea_2" element="mole_sim" state="0" inputtag="MOLEA" inputmask="0x04" ><bounds x="70.0" y="275" width="25" height="25"/></backdrop> |
| 202 | <!-- bottom row --> |
| 203 | <backdrop name="molea_3" element="mole_sim" state="0" inputtag="MOLEA" inputmask="0x08" ><bounds x="15.0" y="305" width="25" height="25"/></backdrop> |
| 204 | <backdrop name="molea_4" element="mole_sim" state="0" inputtag="MOLEA" inputmask="0x10" ><bounds x="42.5" y="300" width="25" height="25"/></backdrop> |
| 205 | <backdrop name="molea_5" element="mole_sim" state="0" inputtag="MOLEA" inputmask="0x20" ><bounds x="70.0" y="305" width="25" height="25"/></backdrop> |
| 204 | 206 | |
| 205 | | <backdrop name="moleb_0" element="mole_sim" state="0"><bounds x="225.0" y="275" width="25" height="25"/></backdrop> |
| 206 | | <backdrop name="moleb_3" element="mole_sim" state="0"><bounds x="225.0" y="305" width="25" height="25"/></backdrop> |
| 207 | | <backdrop name="moleb_1" element="mole_sim" state="0"><bounds x="250.0" y="260" width="30" height="30"/></backdrop> <!-- big mole --> |
| 208 | | <backdrop name="moleb_4" element="mole_sim" state="0"><bounds x="252.5" y="300" width="25" height="25"/></backdrop> |
| 209 | | <backdrop name="moleb_2" element="mole_sim" state="0"><bounds x="280.0" y="275" width="25" height="25"/></backdrop> |
| 210 | | <backdrop name="moleb_5" element="mole_sim" state="0"><bounds x="280.0" y="305" width="25" height="25"/></backdrop> |
| 207 | |
| 208 | <!-- top row --> |
| 209 | <backdrop name="moleb_1" element="mole_sim" state="0" inputtag="MOLEB" inputmask="0x02" ><bounds x="225.0" y="275" width="25" height="25"/></backdrop> |
| 210 | <backdrop name="moleb_0" element="mole_sim" state="0" inputtag="MOLEB" inputmask="0x01" ><bounds x="250.0" y="260" width="30" height="30"/></backdrop> <!-- big mole --> |
| 211 | <backdrop name="moleb_2" element="mole_sim" state="0" inputtag="MOLEB" inputmask="0x04" ><bounds x="280.0" y="275" width="25" height="25"/></backdrop> |
| 212 | |
| 213 | <!-- bottom row --> |
| 214 | <backdrop name="moleb_3" element="mole_sim" state="0" inputtag="MOLEB" inputmask="0x08" ><bounds x="225.0" y="305" width="25" height="25"/></backdrop> |
| 215 | <backdrop name="moleb_4" element="mole_sim" state="0" inputtag="MOLEB" inputmask="0x10" ><bounds x="252.5" y="300" width="25" height="25"/></backdrop> |
| 216 | <backdrop name="moleb_5" element="mole_sim" state="0" inputtag="MOLEB" inputmask="0x20" ><bounds x="280.0" y="305" width="25" height="25"/></backdrop> |
| 211 | 217 | |
| 212 | 218 | |
| 213 | 219 | <screen index="0"> |