src/mame/layout/kungfur.lay
| r14424 | r14425 | |
| 1 | 1 | <?xml version="1.0"?> |
| 2 | 2 | <mamelayout version="2"> |
| 3 | |
| 4 | <element name="static_black"> |
| 5 | <rect> |
| 6 | <color red="0.0" green="0.0" blue="0.0" /> |
| 7 | </rect> |
| 8 | </element> |
| 9 | <element name="static_green"> |
| 10 | <rect> |
| 11 | <color red="0.0" green="0.22" blue="0.22" /> |
| 12 | </rect> |
| 13 | </element> |
| 14 | <element name="static_yellow"> |
| 15 | <rect> |
| 16 | <color red="0.85" green="0.85" blue="0.2" /> |
| 17 | </rect> |
| 18 | </element> |
| 19 | |
| 3 | 20 | <element name="digit" defstate="0"> |
| 4 | 21 | <led7seg> |
| 5 | | <color red="1.0" green="0.0" blue="0.0" /> |
| 22 | <color red="1.0" green="0.1" blue="0.1" /> |
| 6 | 23 | </led7seg> |
| 7 | 24 | </element> |
| 8 | 25 | |
| 26 | |
| 27 | <!-- define level lamps --> |
| 28 | |
| 29 | <element name="level1" defstate="0"> |
| 30 | <disk state="1"> |
| 31 | <color red="1.0" green="0.3" blue="0.3" /> |
| 32 | </disk> |
| 33 | <disk state="0"> |
| 34 | <color red="0.2" green="0.0" blue="0.0" /> |
| 35 | </disk> |
| 36 | <text string="1"> |
| 37 | <color red="0.0" green="0.0" blue="0.0" /> |
| 38 | <bounds x="0" y="0.25" width="1" height="0.5" /> |
| 39 | </text> |
| 40 | </element> |
| 41 | <element name="level2" defstate="0"> |
| 42 | <disk state="1"> |
| 43 | <color red="1.0" green="0.3" blue="0.3" /> |
| 44 | </disk> |
| 45 | <disk state="0"> |
| 46 | <color red="0.2" green="0.0" blue="0.0" /> |
| 47 | </disk> |
| 48 | <text string="2"> |
| 49 | <color red="0.0" green="0.0" blue="0.0" /> |
| 50 | <bounds x="0" y="0.25" width="1" height="0.5" /> |
| 51 | </text> |
| 52 | </element> |
| 53 | <element name="level3" defstate="0"> |
| 54 | <disk state="1"> |
| 55 | <color red="1.0" green="0.3" blue="0.3" /> |
| 56 | </disk> |
| 57 | <disk state="0"> |
| 58 | <color red="0.2" green="0.0" blue="0.0" /> |
| 59 | </disk> |
| 60 | <text string="3"> |
| 61 | <color red="0.0" green="0.0" blue="0.0" /> |
| 62 | <bounds x="0" y="0.25" width="1" height="0.5" /> |
| 63 | </text> |
| 64 | </element> |
| 65 | <element name="level4" defstate="0"> |
| 66 | <disk state="1"> |
| 67 | <color red="1.0" green="0.3" blue="0.3" /> |
| 68 | </disk> |
| 69 | <disk state="0"> |
| 70 | <color red="0.2" green="0.0" blue="0.0" /> |
| 71 | </disk> |
| 72 | <text string="4"> |
| 73 | <color red="0.0" green="0.0" blue="0.0" /> |
| 74 | <bounds x="0" y="0.25" width="1" height="0.5" /> |
| 75 | </text> |
| 76 | </element> |
| 77 | <element name="level5" defstate="0"> |
| 78 | <disk state="1"> |
| 79 | <color red="1.0" green="0.3" blue="0.3" /> |
| 80 | </disk> |
| 81 | <disk state="0"> |
| 82 | <color red="0.2" green="0.0" blue="0.0" /> |
| 83 | </disk> |
| 84 | <text string="5"> |
| 85 | <color red="0.0" green="0.0" blue="0.0" /> |
| 86 | <bounds x="0" y="0.25" width="1" height="0.5" /> |
| 87 | </text> |
| 88 | </element> |
| 89 | |
| 90 | |
| 91 | <!-- define text --> |
| 92 | |
| 93 | <element name="text_score"> |
| 94 | <rect> |
| 95 | <color red="0.0" green="0.22" blue="0.22" /> |
| 96 | </rect> |
| 97 | <text string="SCORE"> |
| 98 | <color red="1.0" green="1.0" blue="1.0" /> |
| 99 | <bounds x="0.03" y="0" width="0.94" height="1" /> |
| 100 | </text> |
| 101 | </element> |
| 102 | |
| 103 | <element name="text_level"> |
| 104 | <rect> |
| 105 | <color red="0.0" green="0.22" blue="0.22" /> |
| 106 | </rect> |
| 107 | <text string="LEVEL"> |
| 108 | <color red="1.0" green="1.0" blue="1.0" /> |
| 109 | <bounds x="0.03" y="0" width="0.94" height="1" /> |
| 110 | </text> |
| 111 | </element> |
| 112 | |
| 113 | <element name="text_reaction"> |
| 114 | <rect> |
| 115 | <color red="0.0" green="0.22" blue="0.22" /> |
| 116 | </rect> |
| 117 | <text string="REACTION TIME"> |
| 118 | <color red="1.0" green="1.0" blue="1.0" /> |
| 119 | <bounds x="0.02" y="0" width="0.96" height="1" /> |
| 120 | </text> |
| 121 | </element> |
| 122 | |
| 123 | <element name="text_average"> |
| 124 | <rect> |
| 125 | <color red="0.0" green="0.22" blue="0.22" /> |
| 126 | </rect> |
| 127 | <text string="AVERAGE"> |
| 128 | <color red="1.0" green="1.0" blue="1.0" /> |
| 129 | <bounds x="0.03" y="0" width="0.94" height="1" /> |
| 130 | </text> |
| 131 | </element> |
| 132 | |
| 133 | <element name="text_today"> |
| 134 | <rect> |
| 135 | <color red="0.0" green="0.22" blue="0.22" /> |
| 136 | </rect> |
| 137 | <text string="TODAY'S BEST"> |
| 138 | <bounds x="0.025" y="0" width="0.95" height="1" /> |
| 139 | <color red="1.0" green="1.0" blue="1.0" /> |
| 140 | </text> |
| 141 | </element> |
| 142 | |
| 143 | <element name="text_1"> |
| 144 | <text string="1ST"> |
| 145 | <color red="1.0" green="1.0" blue="1.0" /> |
| 146 | </text> |
| 147 | </element> |
| 148 | <element name="text_2"> |
| 149 | <text string="2ND"> |
| 150 | <color red="1.0" green="1.0" blue="1.0" /> |
| 151 | </text> |
| 152 | </element> |
| 153 | <element name="text_3"> |
| 154 | <text string="3RD"> |
| 155 | <color red="1.0" green="1.0" blue="1.0" /> |
| 156 | </text> |
| 157 | </element> |
| 158 | |
| 159 | <element name="text_gameover" defstate="0"> |
| 160 | <text string="GAME OVER" state="1"> |
| 161 | <color red="1.0" green="0.3" blue="0.3" /> |
| 162 | </text> |
| 163 | <text string="GAME OVER" state="0"> |
| 164 | <color red="0.2" green="0.0" blue="0.0" /> |
| 165 | </text> |
| 166 | </element> |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 9 | 172 | <view name="Simple LEDs"> |
| 10 | | <screen index="0"> |
| 11 | | <bounds left="0" right="200" top="0" bottom="200" /> |
| 12 | | </screen> |
| 173 | <bounds left="0" right="147" top="0" bottom="100" /> |
| 174 | <bezel element="static_green"> |
| 175 | <bounds left="0" right="147" top="0" bottom="100" /> |
| 176 | </bezel> |
| 13 | 177 | |
| 14 | 178 | |
| 179 | <!-- today's highscores --> |
| 180 | |
| 181 | <bezel element="static_yellow"> |
| 182 | <bounds x="97" y="5" width="45" height="75" /> |
| 183 | </bezel> |
| 184 | <bezel element="static_green"> |
| 185 | <bounds x="98" y="6" width="43" height="73" /> |
| 186 | </bezel> |
| 187 | |
| 188 | <bezel element="text_today"> |
| 189 | <bounds x="105" y="3" width="29" height="5" /> |
| 190 | </bezel> |
| 191 | |
| 192 | <bezel element="text_1"> |
| 193 | <bounds x="98.8" y="21" width="10" height="5" /> |
| 194 | </bezel> |
| 195 | <bezel element="static_black"> |
| 196 | <bounds x="109" y="9" width="22" height="17" /> |
| 197 | </bezel> |
| 198 | |
| 199 | <bezel name="digit0" element="digit"> |
| 200 | <bounds x="110" y="10" width="10" height="15" /> |
| 201 | </bezel> |
| 202 | <bezel name="digit1" element="digit"> |
| 203 | <bounds x="120" y="10" width="10" height="15" /> |
| 204 | </bezel> |
| 205 | |
| 206 | <bezel element="text_2"> |
| 207 | <bounds x="99" y="46" width="10" height="5" /> |
| 208 | </bezel> |
| 209 | <bezel element="static_black"> |
| 210 | <bounds x="109" y="34" width="22" height="17" /> |
| 211 | </bezel> |
| 212 | |
| 213 | <bezel name="digit2" element="digit"> |
| 214 | <bounds x="110" y="35" width="10" height="15" /> |
| 215 | </bezel> |
| 216 | <bezel name="digit3" element="digit"> |
| 217 | <bounds x="120" y="35" width="10" height="15" /> |
| 218 | </bezel> |
| 219 | |
| 220 | <bezel element="text_3"> |
| 221 | <bounds x="99" y="71" width="10" height="5" /> |
| 222 | </bezel> |
| 223 | <bezel element="static_black"> |
| 224 | <bounds x="109" y="59" width="22" height="17" /> |
| 225 | </bezel> |
| 226 | |
| 227 | <bezel name="digit4" element="digit"> |
| 228 | <bounds x="110" y="60" width="10" height="15" /> |
| 229 | </bezel> |
| 230 | <bezel name="digit5" element="digit"> |
| 231 | <bounds x="120" y="60" width="10" height="15" /> |
| 232 | </bezel> |
| 233 | |
| 234 | |
| 235 | <!-- reaction time --> |
| 236 | |
| 237 | <bezel element="static_yellow"> |
| 238 | <bounds x="5" y="70" width="90" height="25" /> |
| 239 | </bezel> |
| 240 | <bezel element="static_green"> |
| 241 | <bounds x="6" y="71" width="88" height="23" /> |
| 242 | </bezel> |
| 243 | |
| 244 | <bezel element="text_reaction"> |
| 245 | <bounds x="9.5" y="68" width="33" height="5" /> |
| 246 | </bezel> |
| 247 | <bezel element="text_average"> |
| 248 | <bounds x="56" y="68" width="19.5" height="5" /> |
| 249 | </bezel> |
| 250 | |
| 251 | <bezel element="static_black"> |
| 252 | <bounds x="9" y="74" width="32" height="17" /> |
| 253 | </bezel> |
| 254 | |
| 255 | <bezel name="digit6" element="digit"> |
| 256 | <bounds x="10" y="75" width="10" height="15" /> |
| 257 | </bezel> |
| 258 | <bezel name="digit7" element="digit"> |
| 259 | <bounds x="20" y="75" width="10" height="15" /> |
| 260 | </bezel> |
| 261 | <bezel name="digit8" element="digit"> |
| 262 | <bounds x="30" y="75" width="10" height="15" /> |
| 263 | </bezel> |
| 264 | |
| 265 | <bezel element="static_black"> |
| 266 | <bounds x="49" y="74" width="32" height="17" /> |
| 267 | </bezel> |
| 268 | |
| 269 | <bezel name="digit9" element="digit"> |
| 270 | <bounds x="50" y="75" width="10" height="15" /> |
| 271 | </bezel> |
| 272 | <bezel name="digit10" element="digit"> |
| 273 | <bounds x="60" y="75" width="10" height="15" /> |
| 274 | </bezel> |
| 275 | <bezel name="digit11" element="digit"> |
| 276 | <bounds x="70" y="75" width="10" height="15" /> |
| 277 | </bezel> |
| 278 | |
| 279 | |
| 280 | <!-- score --> |
| 281 | |
| 282 | <bezel element="static_yellow"> |
| 283 | <bounds x="5" y="5" width="90" height="40" /> |
| 284 | </bezel> |
| 285 | <bezel element="static_green"> |
| 286 | <bounds x="6" y="6" width="88" height="38" /> |
| 287 | </bezel> |
| 288 | |
| 289 | <bezel element="text_score"> |
| 290 | <bounds x="43" y="3" width="15" height="5" /> |
| 291 | </bezel> |
| 292 | |
| 293 | <bezel element="static_black"> |
| 294 | <bounds x="29" y="9" width="42" height="32" /> |
| 295 | </bezel> |
| 296 | |
| 297 | <bezel name="digit12" element="digit"> |
| 298 | <bounds x="30" y="10" width="20" height="30" /> |
| 299 | </bezel> |
| 300 | <bezel name="digit13" element="digit"> |
| 301 | <bounds x="50" y="10" width="20" height="30" /> |
| 302 | </bezel> |
| 303 | |
| 304 | |
| 305 | <!-- level --> |
| 306 | |
| 307 | <bezel element="static_yellow"> |
| 308 | <bounds x="5" y="47" width="90" height="21" /> |
| 309 | </bezel> |
| 310 | <bezel element="static_green"> |
| 311 | <bounds x="6" y="48" width="88" height="19" /> |
| 312 | </bezel> |
| 313 | |
| 314 | <bezel element="text_level"> |
| 315 | <bounds x="43" y="45" width="13" height="5" /> |
| 316 | </bezel> |
| 317 | |
| 318 | <bezel name="lamp0" element="level1"> |
| 319 | <bounds x="10" y="52.5" width="10" height="10" /> |
| 320 | </bezel> |
| 321 | <bezel name="lamp1" element="level2"> |
| 322 | <bounds x="27.5" y="52.5" width="10" height="10" /> |
| 323 | </bezel> |
| 324 | <bezel name="lamp2" element="level3"> |
| 325 | <bounds x="45" y="52.5" width="10" height="10" /> |
| 326 | </bezel> |
| 327 | <bezel name="lamp3" element="level4"> |
| 328 | <bounds x="62.5" y="52.5" width="10" height="10" /> |
| 329 | </bezel> |
| 330 | <bezel name="lamp4" element="level5"> |
| 331 | <bounds x="80" y="52.5" width="10" height="10" /> |
| 332 | </bezel> |
| 333 | |
| 334 | |
| 335 | <!-- gameover --> |
| 336 | |
| 337 | <bezel element="static_yellow"> |
| 338 | <bounds x="97" y="82" width="45" height="13" /> |
| 339 | </bezel> |
| 340 | <bezel element="static_green"> |
| 341 | <bounds x="98" y="83" width="43" height="11" /> |
| 342 | </bezel> |
| 343 | |
| 344 | <bezel name="lamp5" element="text_gameover"> |
| 345 | <bounds x="97" y="86" width="45" height="5" /> |
| 346 | </bezel> |
| 347 | |
| 348 | |
| 15 | 349 | </view> |
| 16 | 350 | </mamelayout> |
src/mame/drivers/kungfur.c
| r14424 | r14425 | |
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | | TODO: |
| 4 | | - understand the 7segs properly; |
| 5 | | - inputs; |
| 6 | | - lamps; |
| 7 | | - Fix sound index/sound stop for the ADPCM sound chips; |
| 8 | | |
| 9 | | =========================================================================== |
| 10 | | |
| 11 | 3 | KUNG-FU ROUSHI |
| 12 | 4 | (c)1987 NAMCO |
| 13 | 5 | |
| 14 | | 6809 (4Mhz?) |
| 6 | 6809 (4MHz?) |
| 15 | 7 | RAM 2016x1 |
| 16 | 8 | MSM5205 x 2 (2 SPEAKERS) |
| 17 | 9 | 8255 x 2 |
| r14424 | r14425 | |
| 27 | 19 | http://www.youtube.com/watch?v=ssEfw-RbSjs |
| 28 | 20 | http://www.youtube.com/watch?v=1YacVjpUG8g |
| 29 | 21 | |
| 22 | --------------------------------------------------------------------------- |
| 30 | 23 | |
| 31 | | ---------------------------------------------------------------- |
| 24 | Game Panel: |
| 32 | 25 | |
| 26 | tokuten honjitsu yuuryoukiroku |
| 27 | (score) (today's best scores) |
| 28 | XX #1 XX points |
| 29 | #2 XX points |
| 30 | dankai #3 XX points |
| 31 | (level) |
| 32 | 1 2 3 4 5 |
| 33 | |
| 34 | hannoujikan heikinhannoujikan shuuryou |
| 35 | (reaction time) (average reaction time) (finished, complete) |
| 36 | X.XX seconds X.XX seconds |
| 37 | |
| 38 | |
| 39 | Control Panel: |
| 40 | |
| 41 | washi no kakegoe no toori ni botan wo osunojazoi! |
| 42 | (hit the buttons as I call them out) |
| 43 | |
| 44 | over 8, or 10 points --> level 1 |
| 45 | " 16, or 20 " --> level 2 |
| 46 | " 28, or 35 " --> level 3 |
| 47 | " 42, or 52 " --> level 4 |
| 48 | " 52, or 73(?) " --> level 5 |
| 49 | menkyokaiden(full certification) |
| 50 | |
| 51 | The 4 buttons are labeled: |
| 52 | mae(forward), migi(right), ushiro(back), hidari(left) |
| 53 | |
| 54 | |
| 33 | 55 | ***************************************************************************/ |
| 34 | 56 | |
| 35 | 57 | #include "emu.h" |
| r14424 | r14425 | |
| 46 | 68 | kungfur_state(const machine_config &mconfig, device_type type, const char *tag) |
| 47 | 69 | : driver_device(mconfig, type, tag) { } |
| 48 | 70 | |
| 49 | | UINT8 m_led[0x10]; |
| 50 | | UINT8 m_mux_data; |
| 71 | UINT8 m_latch[3]; |
| 72 | UINT8 m_control; |
| 73 | |
| 51 | 74 | UINT32 m_adpcm_pos[2]; |
| 52 | | UINT8 m_adpcm_idle[2]; |
| 53 | | UINT8 m_trigger1; |
| 54 | | UINT8 m_adpcm_data1; |
| 55 | | UINT8 m_trigger2; |
| 56 | | UINT8 m_adpcm_data2; |
| 75 | UINT8 m_adpcm_data[2]; |
| 76 | UINT8 m_adpcm_sel[2]; |
| 57 | 77 | }; |
| 58 | 78 | |
| 59 | 79 | |
| 60 | | static VIDEO_START( kungfur ) |
| 80 | static INTERRUPT_GEN( kungfur_irq ) |
| 61 | 81 | { |
| 62 | | |
| 82 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 83 | if (state->m_control & 0x10) |
| 84 | device_set_input_line(device, M6809_IRQ_LINE, ASSERT_LINE); |
| 63 | 85 | } |
| 64 | 86 | |
| 65 | | /* TODO: I believe that f segment is incorrectly connected (the following is just copied from acommand.c).*/ |
| 66 | | /* |
| 67 | | a |
| 68 | | --- |
| 69 | | f | | b |
| 70 | | -g- |
| 71 | | e | | c |
| 72 | | --- |
| 73 | | d |
| 74 | | a & 1 |
| 75 | | b & 2 |
| 76 | | c & 4 |
| 77 | | d & 8 |
| 78 | | e & 10 |
| 79 | | f & 20 |
| 80 | | g & 40 |
| 81 | | 7f |
| 82 | | */ |
| 83 | 87 | |
| 84 | | #define LED_ON 0x0001 |
| 85 | | #define LED_OFF 0x0000 |
| 88 | /*************************************************************************** |
| 86 | 89 | |
| 87 | | static void draw_led(bitmap_ind16 &bitmap, int x, int y,UINT8 value) |
| 88 | | { |
| 89 | | bitmap.plot_box(x, y, 6, 10, 0x00000000); |
| 90 | I/O |
| 90 | 91 | |
| 91 | | /*a*/ |
| 92 | | bitmap.pix16(y+0, x+1) = ((value & 0x01) ? LED_ON : LED_OFF); |
| 93 | | bitmap.pix16(y+0, x+2) = ((value & 0x01) ? LED_ON : LED_OFF); |
| 94 | | bitmap.pix16(y+0, x+3) = ((value & 0x01) ? LED_ON : LED_OFF); |
| 95 | | /*b*/ |
| 96 | | bitmap.pix16(y+1, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); |
| 97 | | bitmap.pix16(y+2, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); |
| 98 | | bitmap.pix16(y+3, x+4) = ((value & 0x02) ? LED_ON : LED_OFF); |
| 99 | | /*c*/ |
| 100 | | bitmap.pix16(y+5, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); |
| 101 | | bitmap.pix16(y+6, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); |
| 102 | | bitmap.pix16(y+7, x+4) = ((value & 0x04) ? LED_ON : LED_OFF); |
| 103 | | /*d*/ |
| 104 | | bitmap.pix16(y+8, x+1) = ((value & 0x08) ? LED_ON : LED_OFF); |
| 105 | | bitmap.pix16(y+8, x+2) = ((value & 0x08) ? LED_ON : LED_OFF); |
| 106 | | bitmap.pix16(y+8, x+3) = ((value & 0x08) ? LED_ON : LED_OFF); |
| 107 | | /*e*/ |
| 108 | | bitmap.pix16(y+5, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); |
| 109 | | bitmap.pix16(y+6, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); |
| 110 | | bitmap.pix16(y+7, x+0) = ((value & 0x10) ? LED_ON : LED_OFF); |
| 111 | | /*f*/ |
| 112 | | bitmap.pix16(y+1, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); |
| 113 | | bitmap.pix16(y+2, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); |
| 114 | | bitmap.pix16(y+3, x+0) = ((value & 0x20) ? LED_ON : LED_OFF); |
| 115 | | /*g*/ |
| 116 | | bitmap.pix16(y+4, x+1) = ((value & 0x40) ? LED_ON : LED_OFF); |
| 117 | | bitmap.pix16(y+4, x+2) = ((value & 0x40) ? LED_ON : LED_OFF); |
| 118 | | bitmap.pix16(y+4, x+3) = ((value & 0x40) ? LED_ON : LED_OFF); |
| 119 | | /*"point" (just for debugging)*/ |
| 120 | | bitmap.pix16(y+9, x+4) = ((value & 0x80) ? LED_ON : LED_OFF); |
| 121 | | } |
| 92 | ***************************************************************************/ |
| 122 | 93 | |
| 123 | | /* actually debugging purpose, it will be converted to the artwork system at some point. */ |
| 124 | | static SCREEN_UPDATE_IND16( kungfur ) |
| 94 | static WRITE8_DEVICE_HANDLER( kungfur_output_w ) |
| 125 | 95 | { |
| 126 | | kungfur_state *state = screen.machine().driver_data<kungfur_state>(); |
| 127 | | // popmessage("%02x %02x %02x %02x %02x %02x",io_data[0],io_data[1],io_data[2],io_data[3],io_data[4],io_data[5]); |
| 128 | | int i; |
| 96 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 129 | 97 | |
| 130 | | for(i=0;i<16;i++) |
| 131 | | draw_led(bitmap, (i*8)+2, 100, state->m_led[i]); |
| 98 | // d0-d2: output led7seg |
| 99 | static const int lut_digits[24] = |
| 100 | { |
| 101 | 0, 2, 4, 6, 9, 12,14,0, |
| 102 | 0, 1, 3, 5, 8, 11,13,0, |
| 103 | 0, 0, 0, 0, 7, 10,0, 0 |
| 104 | }; |
| 105 | for (int i = 0; i < 3; i++) |
| 106 | { |
| 107 | int offs = i << 3 | (data & 7); |
| 108 | if (lut_digits[offs]) |
| 109 | output_set_digit_value(lut_digits[offs] - 1, state->m_latch[i]); |
| 110 | } |
| 132 | 111 | |
| 133 | | return 0; |
| 112 | // 2.6 goes to level lamps |
| 113 | if ((data & 7) == 6) |
| 114 | { |
| 115 | for (int i = 0; i < 5; i++) |
| 116 | output_set_lamp_value(i, state->m_latch[2] >> i & 1); |
| 117 | } |
| 118 | |
| 119 | // d7: game-over lamp, d3-d4: marquee lamps |
| 120 | output_set_lamp_value(5, data >> 7 & 1); |
| 121 | output_set_lamp_value(6, data >> 3 & 1); |
| 122 | output_set_lamp_value(7, data >> 4 & 1); |
| 123 | |
| 124 | // d5: N/C? |
| 125 | // d6: coincounter |
| 126 | coin_counter_w(device->machine(), 0, data & 0x40); |
| 134 | 127 | } |
| 135 | 128 | |
| 136 | | static WRITE8_DEVICE_HANDLER( test0_w ) |
| 129 | |
| 130 | // lamp output latches |
| 131 | static WRITE8_DEVICE_HANDLER( kungfur_latch1_w ) |
| 137 | 132 | { |
| 138 | 133 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 139 | | state->m_mux_data = data & 7; /* multiplexer selector? (00-06) */ |
| 140 | | |
| 141 | | state->m_mux_data|= (data & 0x10)>>1; |
| 142 | | // printf("%02x MUX W\n",data); |
| 134 | state->m_latch[0] = data; |
| 143 | 135 | } |
| 144 | 136 | |
| 145 | | static WRITE8_DEVICE_HANDLER( test1_w ) |
| 137 | static WRITE8_DEVICE_HANDLER( kungfur_latch2_w ) |
| 146 | 138 | { |
| 147 | | // io_data[1] = data; /* the whole port should be NULL */ |
| 148 | | // printf("%02x Unk 1 W\n",data); |
| 139 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 140 | state->m_latch[1] = data; |
| 149 | 141 | } |
| 150 | 142 | |
| 151 | | static WRITE8_DEVICE_HANDLER( test2_w ) |
| 143 | static WRITE8_DEVICE_HANDLER( kungfur_latch3_w ) |
| 152 | 144 | { |
| 153 | 145 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 154 | | // io_data[2] = data; /* lower nibble should be NULL */ |
| 155 | | state->m_led[state->m_mux_data] = data; |
| 156 | | // printf("%02x Unk 2 W\n",data); |
| 146 | state->m_latch[2] = data; |
| 157 | 147 | } |
| 158 | 148 | |
| 159 | | static WRITE8_DEVICE_HANDLER( test3_w ) |
| 149 | |
| 150 | static WRITE8_DEVICE_HANDLER( kungfur_control_w ) |
| 160 | 151 | { |
| 161 | | // io_data[3] = data; |
| 162 | | // printf("%02x Unk 3 W\n",data); |
| 152 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 153 | |
| 154 | // d0-d3: N/C |
| 155 | // d4: irq ack |
| 156 | if (~data & 0x10) |
| 157 | cputag_set_input_line(device->machine(), "maincpu", M6809_IRQ_LINE, CLEAR_LINE); |
| 158 | |
| 159 | // d5: ? |
| 160 | // d6-d7: sound trigger (edge) |
| 161 | if ((data ^ state->m_control) & 0x40) |
| 162 | { |
| 163 | msm5205_reset_w(device->machine().device("adpcm1"), data >> 6 & 1); |
| 164 | state->m_adpcm_pos[0] = state->m_adpcm_data[0] * 0x400; |
| 165 | state->m_adpcm_sel[0] = 0; |
| 166 | } |
| 167 | if ((data ^ state->m_control) & 0x80) |
| 168 | { |
| 169 | msm5205_reset_w(device->machine().device("adpcm2"), data >> 7 & 1); |
| 170 | state->m_adpcm_pos[1] = state->m_adpcm_data[1] * 0x400; |
| 171 | state->m_adpcm_sel[1] = 0; |
| 172 | } |
| 173 | |
| 174 | state->m_control = data; |
| 163 | 175 | } |
| 164 | 176 | |
| 165 | | /*mux is always 0*/ |
| 166 | | static WRITE8_DEVICE_HANDLER( test4_w ) |
| 177 | // adpcm latches |
| 178 | static WRITE8_DEVICE_HANDLER( kungfur_adpcm1_w ) |
| 167 | 179 | { |
| 168 | 180 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 169 | | // io_data[4] = data; |
| 170 | | state->m_led[state->m_mux_data] = data; |
| 181 | state->m_adpcm_data[0] = data; |
| 171 | 182 | } |
| 172 | 183 | |
| 173 | | /* this looks like lamps. */ |
| 174 | | static WRITE8_DEVICE_HANDLER( test5_w ) |
| 184 | static WRITE8_DEVICE_HANDLER( kungfur_adpcm2_w ) |
| 175 | 185 | { |
| 176 | | // io_data[5] = data; |
| 177 | | // printf("%02x Unk 5 W\n",data); |
| 186 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 187 | state->m_adpcm_data[1] = data; |
| 178 | 188 | } |
| 179 | 189 | |
| 180 | | |
| 181 | | static WRITE8_DEVICE_HANDLER( kungfur_adpcm1_w ) |
| 190 | // adpcm callbacks |
| 191 | static void kfr_adpcm1_int(device_t *device) |
| 182 | 192 | { |
| 183 | 193 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 184 | | state->m_adpcm_pos[0] = 0x40000+(data & 0xff) * 0x100; |
| 185 | | state->m_adpcm_idle[0] = 0; |
| 186 | | msm5205_reset_w(device->machine().device("adpcm1"),0); |
| 194 | UINT8 *ROM = device->machine().region("adpcm1")->base(); |
| 195 | UINT8 data = ROM[state->m_adpcm_pos[0] & 0x1ffff]; |
| 196 | |
| 197 | msm5205_data_w(device, state->m_adpcm_sel[0] ? data & 0xf : data >> 4 & 0xf); |
| 198 | state->m_adpcm_pos[0] += state->m_adpcm_sel[0]; |
| 199 | state->m_adpcm_sel[0] ^= 1; |
| 187 | 200 | } |
| 188 | 201 | |
| 189 | | static WRITE8_DEVICE_HANDLER( kungfur_adpcm2_w ) |
| 202 | static void kfr_adpcm2_int(device_t *device) |
| 190 | 203 | { |
| 191 | 204 | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 192 | | state->m_adpcm_pos[1] = (data & 0xff) * 0x400; |
| 193 | | state->m_adpcm_idle[1] = 0; |
| 194 | | msm5205_reset_w(device->machine().device("adpcm2"),0); |
| 205 | UINT8 *ROM = device->machine().region("adpcm2")->base(); |
| 206 | UINT8 data = ROM[state->m_adpcm_pos[1] & 0x3ffff]; |
| 207 | |
| 208 | msm5205_data_w(device, state->m_adpcm_sel[1] ? data & 0xf : data >> 4 & 0xf); |
| 209 | state->m_adpcm_pos[1] += state->m_adpcm_sel[1]; |
| 210 | state->m_adpcm_sel[1] ^= 1; |
| 195 | 211 | } |
| 196 | 212 | |
| 197 | | /* |
| 198 | 213 | |
| 199 | | 0000-07FF ; RW ; Working RAM. |
| 200 | | 4000-4000 ; W ; M5205? |
| 201 | | 4004-4004 ; W ; M5205? |
| 202 | | 4008-400B ; RW ; PPI8255_0. PPI mode 0 - Ports B & lower C as Input. |
| 203 | | 400C-400F ; W ; PPI8255_1. PPI mode 0 - All ports as output. |
| 204 | | C000-FFFF ; R ; ROM space. |
| 205 | | |
| 206 | | */ |
| 207 | 214 | static ADDRESS_MAP_START( kungfur_map, AS_PROGRAM, 8 ) |
| 208 | 215 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 209 | 216 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("adpcm1", kungfur_adpcm1_w) |
| r14424 | r14425 | |
| 214 | 221 | ADDRESS_MAP_END |
| 215 | 222 | |
| 216 | 223 | |
| 217 | | static INPUT_PORTS_START( kungfur ) |
| 224 | /*************************************************************************** |
| 218 | 225 | |
| 226 | Inputs |
| 227 | |
| 228 | ***************************************************************************/ |
| 229 | |
| 230 | static INPUT_PORTS_START( kungfur ) |
| 219 | 231 | PORT_START("IN0") |
| 220 | | PORT_DIPNAME( 0x01, 0x01, "SYSTEM" ) |
| 221 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 222 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 223 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| 224 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 225 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 226 | | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 227 | | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 228 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 229 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 230 | | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 231 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 232 | | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 233 | | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 234 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 235 | | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 236 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 237 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 238 | | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 239 | | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 240 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 241 | | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 242 | | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 243 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 232 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 233 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 234 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 235 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 236 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("Migi (Right)") |
| 237 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_NAME("Hidari (Left)") |
| 238 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_NAME("Ushiro (Back)") |
| 239 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_16WAY PORT_NAME("Mae (Front)") |
| 244 | 240 | |
| 245 | 241 | PORT_START("IN1") |
| 246 | | PORT_DIPNAME( 0x01, 0x01, "SYSTEM" ) |
| 247 | | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 248 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 249 | | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| 250 | | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 251 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 252 | | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 253 | | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 254 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 255 | | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 256 | | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 257 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 242 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) |
| 243 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| 244 | PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) ) |
| 245 | PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) |
| 246 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_2C ) ) |
| 247 | // PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) // dupe |
| 248 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) |
| 249 | // PORT_DIPSETTING( 0x00, DEF_STR( 1C_3C ) ) // dupe |
| 250 | // PORT_DIPSETTING( 0x04, DEF_STR( 0C_0C ) ) // invalid |
| 251 | PORT_SERVICE( 0x08, IP_ACTIVE_LOW ) |
| 258 | 252 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 259 | | |
| 260 | 253 | INPUT_PORTS_END |
| 261 | 254 | |
| 262 | | static const ppi8255_interface ppi8255_intf[2] = |
| 263 | | /* Unused ports are still hooked for a easy visibility of the port writes */ |
| 264 | | { |
| 265 | | {/* PPI mode 0 - ports B & lower C as Input - (4008) */ |
| 266 | | DEVCB_NULL, /* Port A read */ |
| 267 | | DEVCB_INPUT_PORT("IN0"), /* Port B read */ |
| 268 | | DEVCB_INPUT_PORT("IN1"), /* Port C (lower) read */ |
| 269 | | DEVCB_HANDLER(test0_w), /* Port A write */ |
| 270 | | DEVCB_HANDLER(test1_w), /* Port B write */ |
| 271 | | DEVCB_HANDLER(test2_w) /* Port C (higher) write */ |
| 272 | | }, |
| 273 | | {/* PPI mode 0 - All ports as output - (400c) */ |
| 274 | | DEVCB_NULL, /* Port A read */ |
| 275 | | DEVCB_NULL, /* Port B read */ |
| 276 | | DEVCB_NULL, /* Port C read */ |
| 277 | | DEVCB_HANDLER(test3_w), /* Port A write */ |
| 278 | | DEVCB_HANDLER(test4_w), /* Port B write */ |
| 279 | | DEVCB_HANDLER(test5_w) /* Port C write */ |
| 280 | | } |
| 281 | | }; |
| 282 | 255 | |
| 283 | | static void kfr_adpcm1_int(device_t *device) |
| 284 | | { |
| 285 | | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 256 | /*************************************************************************** |
| 286 | 257 | |
| 287 | | if (state->m_adpcm_pos[0] >= 0x40000 || state->m_adpcm_idle[0]) |
| 288 | | { |
| 289 | | msm5205_reset_w(device->machine().device("adpcm1"),1); |
| 290 | | state->m_trigger1 = 0; |
| 291 | | } |
| 292 | | else |
| 293 | | { |
| 294 | | UINT8 *ROM = device->machine().region("adpcm1")->base(); |
| 258 | Machine Config |
| 295 | 259 | |
| 296 | | state->m_adpcm_data1 = ((state->m_trigger1 ? (ROM[state->m_adpcm_pos[0]] & 0x0f) : (ROM[state->m_adpcm_pos[0]] & 0xf0)>>4) ); |
| 297 | | msm5205_data_w(device->machine().device("adpcm1"), state->m_adpcm_data1 & 0xf); |
| 298 | | state->m_trigger1 ^= 1; |
| 299 | | if(state->m_trigger1 == 0) |
| 300 | | { |
| 301 | | state->m_adpcm_pos[0]++; |
| 302 | | if((ROM[state->m_adpcm_pos[0]] & 0xff) == 0xff) |
| 303 | | state->m_adpcm_idle[0] = 1; |
| 304 | | } |
| 305 | | } |
| 306 | | } |
| 260 | ***************************************************************************/ |
| 307 | 261 | |
| 308 | | |
| 309 | | static void kfr_adpcm2_int(device_t *device) |
| 262 | static const ppi8255_interface ppi8255_intf[2] = |
| 310 | 263 | { |
| 311 | | kungfur_state *state = device->machine().driver_data<kungfur_state>(); |
| 312 | | |
| 313 | | if (state->m_adpcm_pos[1] >= 0x10000 || state->m_adpcm_idle[1]) |
| 264 | // $4008 - always $83 (PPI mode 0, ports B & lower C as input) |
| 314 | 265 | { |
| 315 | | msm5205_reset_w(device->machine().device("adpcm2"),1); |
| 316 | | state->m_trigger2 = 0; |
| 317 | | } |
| 318 | | else |
| 266 | DEVCB_NULL, |
| 267 | DEVCB_INPUT_PORT("IN0"), |
| 268 | DEVCB_INPUT_PORT("IN1"), |
| 269 | DEVCB_HANDLER(kungfur_output_w), |
| 270 | DEVCB_NULL, |
| 271 | DEVCB_HANDLER(kungfur_control_w) |
| 272 | }, |
| 273 | // $400c - always $80 (PPI mode 0, all ports as output) |
| 319 | 274 | { |
| 320 | | UINT8 *ROM = device->machine().region("adpcm2")->base(); |
| 321 | | |
| 322 | | state->m_adpcm_data2 = ((state->m_trigger2 ? (ROM[state->m_adpcm_pos[1]] & 0x0f) : (ROM[state->m_adpcm_pos[1]] & 0xf0)>>4) ); |
| 323 | | msm5205_data_w(device->machine().device("adpcm2"), state->m_adpcm_data2 & 0xf); |
| 324 | | state->m_trigger2 ^= 1; |
| 325 | | if(state->m_trigger2 == 0) |
| 326 | | { |
| 327 | | state->m_adpcm_pos[1]++; |
| 328 | | if((ROM[state->m_adpcm_pos[1]] & 0xff) == 0xff) |
| 329 | | state->m_adpcm_idle[1] = 1; |
| 330 | | } |
| 275 | DEVCB_NULL, |
| 276 | DEVCB_NULL, |
| 277 | DEVCB_NULL, |
| 278 | DEVCB_HANDLER(kungfur_latch1_w), |
| 279 | DEVCB_HANDLER(kungfur_latch2_w), |
| 280 | DEVCB_HANDLER(kungfur_latch3_w) |
| 331 | 281 | } |
| 332 | | } |
| 282 | }; |
| 333 | 283 | |
| 334 | 284 | static const msm5205_interface msm5205_config_1 = |
| 335 | 285 | { |
| 336 | | kfr_adpcm1_int, /* interrupt function */ |
| 337 | | MSM5205_S48_4B /* 8kHz */ |
| 286 | kfr_adpcm1_int, |
| 287 | MSM5205_S48_4B |
| 338 | 288 | }; |
| 339 | 289 | |
| 340 | 290 | static const msm5205_interface msm5205_config_2 = |
| 341 | 291 | { |
| 342 | | kfr_adpcm2_int, /* interrupt function */ |
| 343 | | MSM5205_S48_4B /* 8kHz */ |
| 292 | kfr_adpcm2_int, |
| 293 | MSM5205_S48_4B |
| 344 | 294 | }; |
| 345 | 295 | |
| 346 | | static MACHINE_RESET( kungfur ) |
| 296 | static MACHINE_START( kungfur ) |
| 347 | 297 | { |
| 348 | 298 | kungfur_state *state = machine.driver_data<kungfur_state>(); |
| 349 | | state->m_adpcm_pos[0] = state->m_adpcm_pos[1] = 0; |
| 350 | | state->m_adpcm_idle[0] = state->m_adpcm_idle[1] = 1; |
| 299 | |
| 300 | state->save_item(NAME(state->m_control)); |
| 301 | state->save_item(NAME(state->m_latch)); |
| 302 | |
| 303 | state->save_item(NAME(state->m_adpcm_pos)); |
| 304 | state->save_item(NAME(state->m_adpcm_data)); |
| 305 | state->save_item(NAME(state->m_adpcm_sel)); |
| 351 | 306 | } |
| 352 | 307 | |
| 353 | | static INTERRUPT_GEN( kungfur_irq ) |
| 308 | static MACHINE_RESET( kungfur ) |
| 354 | 309 | { |
| 355 | | cputag_set_input_line(device->machine(), "maincpu", M6809_IRQ_LINE, HOLD_LINE); |
| 310 | kungfur_state *state = machine.driver_data<kungfur_state>(); |
| 311 | state->m_control = 0; |
| 356 | 312 | } |
| 357 | 313 | |
| 358 | 314 | static MACHINE_CONFIG_START( kungfur, kungfur_state ) |
| 359 | 315 | |
| 360 | 316 | /* basic machine hardware */ |
| 361 | | MCFG_CPU_ADD("maincpu",M6809,8000000/2) |
| 317 | MCFG_CPU_ADD("maincpu", M6809, 8000000/2) // 4MHz? |
| 362 | 318 | MCFG_CPU_PROGRAM_MAP(kungfur_map) |
| 363 | | MCFG_CPU_VBLANK_INT("screen",kungfur_irq) |
| 319 | MCFG_CPU_PERIODIC_INT(kungfur_irq, 975) // close approximation |
| 364 | 320 | |
| 365 | 321 | MCFG_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] ) |
| 366 | 322 | MCFG_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] ) |
| 367 | 323 | |
| 368 | | MCFG_MACHINE_RESET( kungfur ) |
| 324 | MCFG_MACHINE_START(kungfur) |
| 325 | MCFG_MACHINE_RESET(kungfur) |
| 369 | 326 | |
| 370 | | /* video hardware */ |
| 371 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 372 | | MCFG_SCREEN_REFRESH_RATE(60) |
| 373 | | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 374 | | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 375 | | MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 376 | | MCFG_SCREEN_UPDATE_STATIC(kungfur) |
| 377 | | MCFG_PALETTE_LENGTH(512) |
| 327 | /* no video! */ |
| 378 | 328 | |
| 379 | | MCFG_VIDEO_START(kungfur) |
| 380 | | |
| 381 | 329 | /* sound hardware */ |
| 382 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 383 | | MCFG_SOUND_ADD("adpcm1", MSM5205, 400000) |
| 330 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 331 | MCFG_SOUND_ADD("adpcm1", MSM5205, XTAL_384kHz) // clock verified with recording |
| 384 | 332 | MCFG_SOUND_CONFIG(msm5205_config_1) |
| 385 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 333 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) |
| 386 | 334 | |
| 387 | | MCFG_SOUND_ADD("adpcm2", MSM5205, 400000) |
| 335 | MCFG_SOUND_ADD("adpcm2", MSM5205, XTAL_384kHz) // " |
| 388 | 336 | MCFG_SOUND_CONFIG(msm5205_config_2) |
| 389 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 337 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) |
| 390 | 338 | MACHINE_CONFIG_END |
| 391 | 339 | |
| 340 | |
| 392 | 341 | /*************************************************************************** |
| 393 | 342 | |
| 394 | 343 | Game driver(s) |
| r14424 | r14425 | |
| 397 | 346 | |
| 398 | 347 | ROM_START( kungfur ) |
| 399 | 348 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 400 | | ROM_LOAD( "kr1.bin", 0xc000, 0x4000, CRC(f5b93cc7) SHA1(ed962915aeafea823a6562e6f284a88422f09a08) ) |
| 349 | ROM_LOAD( "kr1.bin", 0x0c000, 0x04000, CRC(f5b93cc7) SHA1(ed962915aeafea823a6562e6f284a88422f09a08) ) |
| 401 | 350 | |
| 402 | | ROM_REGION( 0x40000, "adpcm1", 0 ) |
| 351 | ROM_REGION( 0x20000, "adpcm1", 0 ) |
| 403 | 352 | ROM_LOAD( "kr2.bin", 0x00000, 0x10000, CRC(13f5eba8) SHA1(a3ae2d54ec60d48bfff6192e61033ec583e3603f) ) |
| 404 | 353 | ROM_LOAD( "kr3.bin", 0x10000, 0x10000, CRC(05fd1301) SHA1(6871d872315ffb025fea7d2ccd9a203863dc142d) ) |
| 405 | | ROM_LOAD( "kr4.bin", 0x20000, 0x10000, CRC(58929279) SHA1(d90f68dd8cf2ddc5e73ed40eb31ebbb0be7e35a4) ) |
| 406 | | ROM_LOAD( "kr5.bin", 0x30000, 0x10000, CRC(31ed39c8) SHA1(8da50b2183a287fe3a41ec13078aff7fb40c43a3) ) |
| 407 | 354 | |
| 408 | | ROM_REGION( 0x10000, "adpcm2", 0 ) |
| 409 | | ROM_LOAD( "kr6.bin", 0x00000, 0x10000, CRC(9ea75d4a) SHA1(57445ccb961acb11a25cdac81f2e543d92bcb7f9) ) |
| 355 | ROM_REGION( 0x40000, "adpcm2", 0 ) |
| 356 | ROM_LOAD( "kr4.bin", 0x00000, 0x10000, CRC(58929279) SHA1(d90f68dd8cf2ddc5e73ed40eb31ebbb0be7e35a4) ) |
| 357 | ROM_LOAD( "kr5.bin", 0x10000, 0x10000, CRC(31ed39c8) SHA1(8da50b2183a287fe3a41ec13078aff7fb40c43a3) ) |
| 358 | ROM_LOAD( "kr6.bin", 0x20000, 0x10000, CRC(9ea75d4a) SHA1(57445ccb961acb11a25cdac81f2e543d92bcb7f9) ) |
| 410 | 359 | ROM_END |
| 411 | 360 | |
| 412 | | GAMEL(1987, kungfur, 0, kungfur, kungfur, 0, ROT0, "Namco", "Kung-Fu Roshi", GAME_NOT_WORKING, layout_kungfur) |
| 361 | GAMEL(1987, kungfur, 0, kungfur, kungfur, 0, ROT0, "Namco", "Kung-Fu Roushi", GAME_SUPPORTS_SAVE, layout_kungfur ) |
src/mame/drivers/namcos21.c
| r14424 | r14425 | |
| 1523 | 1523 | namcos2_kickstart = namcos21_kickstart; |
| 1524 | 1524 | } |
| 1525 | 1525 | |
| 1526 | |
| 1526 | 1527 | static MACHINE_CONFIG_START( s21base, namcos21_state ) |
| 1527 | 1528 | MCFG_CPU_ADD("maincpu", M68000,12288000) /* Master */ |
| 1528 | 1529 | MCFG_CPU_PROGRAM_MAP(namcos21_68k_master) |
| r14424 | r14425 | |
| 1571 | 1572 | MCFG_VIDEO_START(namcos21) |
| 1572 | 1573 | MACHINE_CONFIG_END |
| 1573 | 1574 | |
| 1575 | |
| 1574 | 1576 | static MACHINE_CONFIG_DERIVED( poly_c140_typeA, s21base ) |
| 1575 | 1577 | |
| 1576 | 1578 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| r14424 | r14425 | |
| 1585 | 1587 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.30) |
| 1586 | 1588 | MACHINE_CONFIG_END |
| 1587 | 1589 | |
| 1590 | |
| 1588 | 1591 | static MACHINE_CONFIG_DERIVED( poly_c140_typeB, s21base ) |
| 1589 | 1592 | |
| 1590 | 1593 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| r14424 | r14425 | |
| 1599 | 1602 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.30) |
| 1600 | 1603 | MACHINE_CONFIG_END |
| 1601 | 1604 | |
| 1605 | |
| 1602 | 1606 | static MACHINE_CONFIG_START( driveyes, namcos21_state ) |
| 1603 | 1607 | MCFG_CPU_ADD("maincpu", M68000,12288000) /* Master */ |
| 1604 | 1608 | MCFG_CPU_PROGRAM_MAP(driveyes_68k_master) |
| r14424 | r14425 | |
| 1653 | 1657 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.30) |
| 1654 | 1658 | MACHINE_CONFIG_END |
| 1655 | 1659 | |
| 1656 | | static MACHINE_CONFIG_START( winrun_c140_typeB, namcos21_state ) |
| 1660 | |
| 1661 | static MACHINE_CONFIG_START( winrun_c140_typeA, namcos21_state ) |
| 1657 | 1662 | MCFG_CPU_ADD("maincpu", M68000,12288000) /* Master */ |
| 1658 | 1663 | MCFG_CPU_PROGRAM_MAP(am_master_winrun) |
| 1659 | 1664 | MCFG_CPU_VBLANK_INT("screen", namcos2_68k_master_vblank) |
| r14424 | r14425 | |
| 1701 | 1706 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 1702 | 1707 | |
| 1703 | 1708 | MCFG_SOUND_ADD("c140", C140, 8000000/374) |
| 1704 | | MCFG_SOUND_CONFIG(C140_interface_typeB) |
| 1709 | MCFG_SOUND_CONFIG(C140_interface_typeA) |
| 1705 | 1710 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.50) |
| 1706 | 1711 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) |
| 1707 | 1712 | |
| r14424 | r14425 | |
| 1710 | 1715 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.30) |
| 1711 | 1716 | MACHINE_CONFIG_END |
| 1712 | 1717 | |
| 1718 | |
| 1719 | static MACHINE_CONFIG_DERIVED( winrun_c140_typeB, winrun_c140_typeA ) |
| 1720 | MCFG_SOUND_REPLACE("c140", C140, 8000000/374) |
| 1721 | MCFG_SOUND_CONFIG(C140_interface_typeB) |
| 1722 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.50) |
| 1723 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) |
| 1724 | MACHINE_CONFIG_END |
| 1725 | |
| 1726 | |
| 1713 | 1727 | ROM_START( aircomb ) |
| 1714 | 1728 | ROM_REGION( 0x100000, "maincpu", 0 ) /* Master */ |
| 1715 | 1729 | ROM_LOAD16_BYTE( "ac2-mpr-u.3j", 0x000000, 0x80000, CRC(a7133f85) SHA1(9f1c99dd503f1fc81096170fd272e33ae8a7de2f) ) |
| r14424 | r14425 | |
| 2096 | 2110 | |
| 2097 | 2111 | ROM_START( winrun ) |
| 2098 | 2112 | ROM_REGION( 0x40000, "maincpu", 0 ) /* 68k code */ |
| 2113 | ROM_LOAD16_BYTE( "wr2mpub.3k", 0x000000, 0x20000, CRC(3bb0ea17) SHA1(201cedf5865224c1c4a0c9b017982e36ec9b8243) ) |
| 2114 | ROM_LOAD16_BYTE( "wr2mplb.1k", 0x000001, 0x20000, CRC(95465062) SHA1(7d010ff92e87949b7b9109f8320ab61de7d0400a) ) |
| 2115 | |
| 2116 | ROM_REGION( 0x40000, "slave", 0 ) /* 68k code */ |
| 2117 | ROM_LOAD16_BYTE( "wr1spu.6b", 0x000000, 0x20000, CRC(d4915d44) SHA1(57056051138b259d021b3e7cc1c43a9f951b5cc1) ) |
| 2118 | ROM_LOAD16_BYTE( "wr1spl.4b", 0x000001, 0x20000, CRC(0c336505) SHA1(edee073bf6fabe45c577b0b9375295183eb30c62) ) |
| 2119 | |
| 2120 | ROM_REGION( 0x30000, "audiocpu", 0 ) /* Sound */ |
| 2121 | ROM_LOAD( "wr1snd0.7c", 0x00c000, 0x004000, CRC(698bae12) SHA1(86d22c1c639a9489e3c95820e4e3f04c30407e41) ) |
| 2122 | ROM_CONTINUE( 0x010000, 0x01c000 ) |
| 2123 | ROM_RELOAD( 0x010000, 0x020000 ) |
| 2124 | |
| 2125 | ROM_REGION( 0x10000, "mcu", 0 ) /* I/O MCU */ |
| 2126 | ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) |
| 2127 | ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) |
| 2128 | |
| 2129 | ROM_REGION( 0x20000, "dsp", ROMREGION_ERASEFF ) /* DSP */ |
| 2130 | |
| 2131 | ROM_REGION( 0x80000, "gpu", 0 ) /* 68k code */ |
| 2132 | ROM_LOAD16_BYTE( "wr1gp0u.1k", 0x00000, 0x20000, CRC(c66a43be) SHA1(88ec02c5c18c8bb91a95934c14e9ae530ae09880) ) |
| 2133 | ROM_LOAD16_BYTE( "wr1gp0l.3k", 0x00001, 0x20000, CRC(91a70e6f) SHA1(e613e2544f63cd386588445a2a199ae6b84d741e) ) |
| 2134 | ROM_LOAD16_BYTE( "wr1gp1u.1l", 0x40000, 0x20000, CRC(8ff51a3d) SHA1(81fbcd4e8c51742f35607537e1b1a86fd7782827) ) |
| 2135 | ROM_LOAD16_BYTE( "wr1gp1l.3l", 0x40001, 0x20000, CRC(9360d34e) SHA1(e558eb540c02acfe84f2dfe2d65afd609b7f3207) ) |
| 2136 | |
| 2137 | ROM_REGION16_BE( 0x80000, "user1", 0 ) /* 68k */ |
| 2138 | ROM_LOAD16_BYTE( "wr1d0u.3a", 0x00000, 0x20000, CRC(84ea1492) SHA1(56274b39bd5be076c9904d9ed9ce3f6e29d9f038) ) |
| 2139 | ROM_LOAD16_BYTE( "wr1d0l.1a", 0x00001, 0x20000, CRC(b81508f9) SHA1(51c03c3dff86cece9790667b1557de940ebccbe9) ) |
| 2140 | ROM_LOAD16_BYTE( "wr1d1u.3b", 0x40000, 0x20000, CRC(bbd1fdd7) SHA1(026e9410525fa0e93f155949bbc1d3b8a2785bd1) ) |
| 2141 | ROM_LOAD16_BYTE( "wr1d1l.1b", 0x40001, 0x20000, CRC(8ddd7eac) SHA1(b873b253b0a095e66a9f68d45a2cb41fa025ba16) ) |
| 2142 | |
| 2143 | ROM_REGION16_BE( 0x80000, "user2", 0 ) /* 3d objects */ |
| 2144 | ROM_LOAD16_BYTE( "wr1pt0u.8j", 0x00000, 0x20000, CRC(7ec4cf6b) SHA1(92ec92567b9f7321efb4a3724cbcdba216eb22f9) ) |
| 2145 | ROM_LOAD16_BYTE( "wr1pt0l.8d", 0x00001, 0x20000, CRC(58c14b73) SHA1(e34a26866cd870743e166669f7fa5915a82104e9) ) |
| 2146 | |
| 2147 | ROM_REGION16_BE( 0x100000, "user3", 0 ) /* bitmapped graphics */ |
| 2148 | ROM_LOAD16_BYTE( "wr1gd0u-2.1p", 0x00000, 0x40000, CRC(9752eef5) SHA1(d6df0faf9c2696247bdf463f53c1e474ec595dd0) ) |
| 2149 | ROM_LOAD16_BYTE( "wr1gd0l-2.3p", 0x00001, 0x40000, CRC(349c95cc) SHA1(8898eecf5918485ec683900520f123483077df28) ) |
| 2150 | |
| 2151 | ROM_REGION( 0x200000, "c140", 0 ) /* sound samples */ |
| 2152 | ROM_LOAD("wrvoi-0.11b", 0x040000, 0x40000, CRC(8040b645) SHA1(7ccafb3073fa79910e26cf9b8b6e8e9ae22e55fc) ) |
| 2153 | ROM_LOAD("wrvoi-1.11c", 0x0c0000, 0x40000, CRC(d347e904) SHA1(620cd07e6230322c306283e45a43fa1e217028d4) ) |
| 2154 | ROM_LOAD("wrvoi-2.11d", 0x140000, 0x40000, CRC(b34747af) SHA1(7e0b55631bffa0583bf4f7f5368db9f09e411ba1) ) |
| 2155 | ROM_LOAD("wrvoi-3.11e", 0x1c0000, 0x40000, CRC(43085303) SHA1(9f743055c20df3548879118194244e37a0b91f7e) ) |
| 2156 | |
| 2157 | ROM_REGION( 0x1000, "pals", 0 ) |
| 2158 | /* Main PCB (2252960101) */ |
| 2159 | ROM_LOAD("sys87b-2.3w", 0x000, 0x104, CRC(18f43c22) SHA1(72849c5b842678bb9037541d26d4c99cdf879982) ) /* PAL16L8ACN */ |
| 2160 | ROM_LOAD("wr-c1.6p", 0x000, 0x040, CRC(d6c33258) SHA1(5baf71fae1ad73a75d91ee2dededca2254b4f414) ) /* PAL12L10CNS */ |
| 2161 | ROM_LOAD("wr-c2.8k", 0x000, 0x040, CRC(a3e77ade) SHA1(b4282fc4d21ce7813aba7772a85d721fb25144b6) ) /* PAL12L10CNS */ |
| 2162 | |
| 2163 | /* Framebuffer PCB (2252960900) */ |
| 2164 | ROM_LOAD("wr-g1.3a", 0x000, 0x104, CRC(d6b4373d) SHA1(b4db4526a37b7d6862cec1d223f2281e5120f225) ) /* PAL16L8ACN */ |
| 2165 | ROM_LOAD("wr-g2b.4p", 0x000, 0x104, NO_DUMP ) /* PAL16L8ACN */ |
| 2166 | ROM_LOAD("wr-g3.4s", 0x000, 0x104, NO_DUMP ) /* GAL20V8 */ |
| 2167 | ROM_LOAD("wr-g4.7f", 0x000, 0x104, CRC(f858b32b) SHA1(59af496e4416c9becb116315542858ac917cbe46) ) /* PAL16L8ACN */ |
| 2168 | |
| 2169 | /* 3D PCB (2252960701) */ |
| 2170 | ROM_LOAD("wr-p1.1b", 0x000, 0x104, CRC(5856cc43) SHA1(4578c7a7d731c61d678d594dd071370db46cc3f7) ) /* PAL16L8ACN */ |
| 2171 | |
| 2172 | /* DSP PCB (2252960601) */ |
| 2173 | ROM_LOAD("wr-d1.3b", 0x000, 0x104, CRC(7a072b71) SHA1(45b8d9405a2c1a40f2cd9c6a33d105565136c538) ) /* PAL16L8ACN */ |
| 2174 | ROM_LOAD("wr-d2.4j", 0x000, 0x104, CRC(614de474) SHA1(80c3ab287896e07073a70dd42e7b47f515dd3931) ) /* PAL16L8ACN */ |
| 2175 | ROM_END |
| 2176 | |
| 2177 | ROM_START( winrungp ) |
| 2178 | ROM_REGION( 0x40000, "maincpu", 0 ) /* 68k code */ |
| 2099 | 2179 | ROM_LOAD16_BYTE( "sg1-mp-ub.3k", 0x000000, 0x20000, CRC(7f9b855a) SHA1(6d39a3a9959dbcd0047dbaab0fcd68adc81f5508) ) |
| 2100 | 2180 | ROM_LOAD16_BYTE( "sg1-mp-lb.1k", 0x000001, 0x20000, CRC(a45e8543) SHA1(f9e583a988e4661026ee7873a48d078225778df3) ) |
| 2101 | 2181 | |
| r14424 | r14425 | |
| 2450 | 2530 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 2451 | 2531 | INPUT_PORTS_END |
| 2452 | 2532 | |
| 2453 | | /* YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR, COMPANY, FULLNAME, FLAGS */ |
| 2454 | | GAME( 1992, aircomb, 0, poly_c140_typeB, aircombt, aircombt, ROT0, "Namco", "Air Combat (US)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 2455 | | GAME( 1992, aircombj, aircomb, poly_c140_typeB, aircombt, aircombt, ROT0, "Namco", "Air Combat (Japan)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 2456 | | GAME( 1993, cybsled, 0, poly_c140_typeA, cybsled, cybsled, ROT0, "Namco", "Cyber Sled (US)", GAME_IMPERFECT_GRAPHICS ) |
| 2457 | | GAME( 1993, cybsledj, cybsled, poly_c140_typeA, cybsled, cybsled, ROT0, "Namco", "Cyber Sled (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 2533 | /* YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR, COMPANY, FULLNAME, FLAGS */ |
| 2534 | GAME( 1988, winrun, 0, winrun_c140_typeA, winrun, winrun, ROT0, "Namco", "Winning Run", GAME_IMPERFECT_GRAPHICS ) |
| 2535 | GAME( 1989, winrungp, 0, winrun_c140_typeB, winrun, winrun, ROT0, "Namco", "Winning Run Suzuka Grand Prix (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 2536 | GAME( 1991, winrun91, 0, winrun_c140_typeB, winrun, winrun, ROT0, "Namco", "Winning Run 91 (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 2537 | GAME( 1991, driveyes, 0, driveyes, winrun, driveyes, ROT0, "Namco", "Driver's Eyes (US)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS ) |
| 2538 | GAME( 1991, solvalou, 0, poly_c140_typeA, s21default, solvalou, ROT0, "Namco", "Solvalou (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 2539 | GAME( 1991, starblad, 0, poly_c140_typeA, s21default, starblad, ROT0, "Namco", "Starblade (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 2458 | 2540 | /* 1992, ShimDrive */ |
| 2459 | | GAME( 1991, solvalou, 0, poly_c140_typeA, s21default, solvalou, ROT0, "Namco", "Solvalou (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 2460 | | GAME( 1991, starblad, 0, poly_c140_typeA, s21default, starblad, ROT0, "Namco", "Starblade (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 2461 | | GAME( 1991, winrun91, 0, winrun_c140_typeB, winrun, winrun, ROT0, "Namco", "Winning Run 91 (Japan)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 2462 | | GAME( 1989, winrun, 0, winrun_c140_typeB, winrun, winrun, ROT0, "Namco", "Winning Run Suzuka Grand Prix (Japan)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 2463 | | /* 1988, Winning Run */ |
| 2464 | | GAME( 1991, driveyes, 0, driveyes, winrun, driveyes, ROT0, "Namco", "Driver's Eyes (US)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) |
| 2541 | GAME( 1992, aircomb, 0, poly_c140_typeB, aircombt, aircombt, ROT0, "Namco", "Air Combat (US)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS ) |
| 2542 | GAME( 1992, aircombj, aircomb, poly_c140_typeB, aircombt, aircombt, ROT0, "Namco", "Air Combat (Japan)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS ) |
| 2543 | GAME( 1993, cybsled, 0, poly_c140_typeA, cybsled, cybsled, ROT0, "Namco", "Cyber Sled (US)", GAME_IMPERFECT_GRAPHICS ) |
| 2544 | GAME( 1993, cybsledj, cybsled, poly_c140_typeA, cybsled, cybsled, ROT0, "Namco", "Cyber Sled (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| | No newline at end of file |
src/mame/drivers/tsamurai.c
| r14424 | r14425 | |
| 350 | 350 | static INPUT_PORTS_START( tsamurai ) |
| 351 | 351 | PORT_START("P1") |
| 352 | 352 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY |
| 353 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 354 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY |
| 355 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 353 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY |
| 354 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY |
| 355 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY |
| 356 | 356 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 357 | 357 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) |
| 358 | 358 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r14424 | r14425 | |
| 360 | 360 | |
| 361 | 361 | PORT_START("P2") |
| 362 | 362 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL |
| 363 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL |
| 364 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| 365 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL |
| 363 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL |
| 364 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL |
| 365 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL |
| 366 | 366 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 367 | 367 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL |
| 368 | 368 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r14424 | r14425 | |
| 428 | 428 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 429 | 429 | INPUT_PORTS_END |
| 430 | 430 | |
| 431 | | static INPUT_PORTS_START( nunchaku ) |
| 431 | |
| 432 | static INPUT_PORTS_START( ladymstr ) |
| 432 | 433 | PORT_INCLUDE( tsamurai ) |
| 433 | 434 | |
| 435 | PORT_MODIFY("P1") |
| 436 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 437 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 438 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY |
| 439 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 440 | |
| 441 | PORT_MODIFY("P2") |
| 442 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 443 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 444 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 445 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 446 | INPUT_PORTS_END |
| 447 | |
| 448 | static INPUT_PORTS_START( nunchaku ) |
| 449 | PORT_INCLUDE( ladymstr ) |
| 450 | |
| 434 | 451 | PORT_MODIFY("DSW2") |
| 435 | 452 | PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) |
| 436 | 453 | PORT_DIPSETTING( 0x00, "3" ) |
| r14424 | r14425 | |
| 455 | 472 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 456 | 473 | INPUT_PORTS_END |
| 457 | 474 | |
| 475 | |
| 458 | 476 | static INPUT_PORTS_START( vsgongf ) |
| 459 | 477 | PORT_INCLUDE( tsamurai ) |
| 460 | 478 | |
| 479 | PORT_MODIFY("P1") |
| 480 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 481 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 482 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY |
| 483 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 484 | |
| 485 | PORT_MODIFY("P2") |
| 486 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 487 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 488 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 489 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 490 | |
| 461 | 491 | PORT_MODIFY("DSW2") |
| 462 | 492 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) |
| 463 | 493 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| r14424 | r14425 | |
| 485 | 515 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 486 | 516 | INPUT_PORTS_END |
| 487 | 517 | |
| 518 | |
| 488 | 519 | static INPUT_PORTS_START( yamagchi ) |
| 489 | 520 | PORT_INCLUDE( tsamurai ) |
| 490 | 521 | |
| 491 | 522 | PORT_MODIFY("P1") |
| 492 | 523 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 493 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 494 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY |
| 495 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 524 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 525 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY |
| 526 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 496 | 527 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) |
| 497 | 528 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 498 | 529 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r14424 | r14425 | |
| 500 | 531 | |
| 501 | 532 | PORT_MODIFY("P2") |
| 502 | 533 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 503 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 504 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 505 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 534 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 535 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 536 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 506 | 537 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL |
| 507 | 538 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL |
| 508 | 539 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| r14424 | r14425 | |
| 533 | 564 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 534 | 565 | INPUT_PORTS_END |
| 535 | 566 | |
| 567 | |
| 536 | 568 | static INPUT_PORTS_START( m660 ) |
| 537 | | PORT_INCLUDE( yamagchi ) |
| 569 | PORT_INCLUDE( tsamurai ) |
| 538 | 570 | |
| 571 | PORT_MODIFY("P1") |
| 572 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 573 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 574 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY |
| 575 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY |
| 576 | |
| 577 | PORT_MODIFY("P2") |
| 578 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL |
| 579 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL |
| 580 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL |
| 581 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL |
| 582 | |
| 539 | 583 | PORT_MODIFY("DSW1") |
| 540 | 584 | PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) ) |
| 541 | 585 | PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) ) |
| r14424 | r14425 | |
| 643 | 687 | static MACHINE_CONFIG_START( tsamurai, tsamurai_state ) |
| 644 | 688 | |
| 645 | 689 | /* basic machine hardware */ |
| 646 | | MCFG_CPU_ADD("maincpu", Z80, 4000000) |
| 690 | MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) |
| 647 | 691 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 648 | 692 | MCFG_CPU_IO_MAP(z80_io_map) |
| 649 | 693 | MCFG_CPU_VBLANK_INT("screen", samurai_interrupt) |
| 650 | 694 | |
| 651 | | MCFG_CPU_ADD("audiocpu", Z80, 2000000) |
| 695 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) |
| 652 | 696 | MCFG_CPU_PROGRAM_MAP(sound1_map) |
| 653 | 697 | |
| 654 | | MCFG_CPU_ADD("audio2", Z80, 2000000) |
| 698 | MCFG_CPU_ADD("audio2", Z80, XTAL_24MHz/8) |
| 655 | 699 | MCFG_CPU_PROGRAM_MAP(sound2_map) |
| 656 | 700 | |
| 657 | 701 | /* video hardware */ |
| r14424 | r14425 | |
| 671 | 715 | /* sound hardware */ |
| 672 | 716 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 673 | 717 | |
| 674 | | MCFG_SOUND_ADD("aysnd", AY8910, 2000000) |
| 718 | MCFG_SOUND_ADD("aysnd", AY8910, XTAL_24MHz/8) |
| 675 | 719 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 676 | 720 | |
| 677 | 721 | MCFG_SOUND_ADD("dac1", DAC, 0) |
| r14424 | r14425 | |
| 682 | 726 | MACHINE_CONFIG_END |
| 683 | 727 | |
| 684 | 728 | |
| 685 | | static MACHINE_CONFIG_START( m660, tsamurai_state ) |
| 729 | static MACHINE_CONFIG_START( vsgongf, tsamurai_state ) |
| 686 | 730 | |
| 687 | 731 | /* basic machine hardware */ |
| 688 | | MCFG_CPU_ADD("maincpu", Z80, 4000000) |
| 689 | | MCFG_CPU_PROGRAM_MAP(m660_map) |
| 690 | | MCFG_CPU_IO_MAP(z80_m660_io_map) |
| 732 | MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) |
| 733 | MCFG_CPU_PROGRAM_MAP(vsgongf_map) |
| 691 | 734 | MCFG_CPU_VBLANK_INT("screen", samurai_interrupt) |
| 692 | 735 | |
| 693 | | MCFG_CPU_ADD("audiocpu", Z80, 2000000) |
| 694 | | MCFG_CPU_PROGRAM_MAP(sound1_m660_map) |
| 736 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) |
| 737 | MCFG_CPU_PROGRAM_MAP(sound_vsgongf_map) |
| 738 | MCFG_CPU_IO_MAP(vsgongf_audio_io_map) |
| 739 | MCFG_CPU_PERIODIC_INT(vsgongf_sound_interrupt,3*60) |
| 695 | 740 | |
| 696 | | MCFG_CPU_ADD("audio2", Z80, 2000000) |
| 697 | | MCFG_CPU_PROGRAM_MAP(sound2_m660_map) |
| 698 | | |
| 699 | | MCFG_CPU_ADD("audio3", Z80, 2000000) |
| 700 | | MCFG_CPU_PROGRAM_MAP(sound3_m660_map) |
| 701 | | MCFG_CPU_IO_MAP(sound3_m660_io_map) |
| 702 | | MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) |
| 703 | | |
| 704 | 741 | /* video hardware */ |
| 705 | 742 | MCFG_SCREEN_ADD("screen", RASTER) |
| 706 | 743 | MCFG_SCREEN_REFRESH_RATE(60) |
| 707 | 744 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 708 | 745 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 709 | 746 | MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) |
| 710 | | MCFG_SCREEN_UPDATE_STATIC(tsamurai) |
| 747 | MCFG_SCREEN_UPDATE_STATIC(vsgongf) |
| 711 | 748 | |
| 712 | 749 | MCFG_GFXDECODE(tsamurai) |
| 713 | 750 | MCFG_PALETTE_LENGTH(256) |
| 714 | 751 | |
| 715 | 752 | MCFG_PALETTE_INIT(RRRR_GGGG_BBBB) |
| 716 | | MCFG_VIDEO_START(tsamurai) |
| 753 | MCFG_VIDEO_START(vsgongf) |
| 717 | 754 | |
| 718 | 755 | /* sound hardware */ |
| 719 | 756 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 720 | 757 | |
| 721 | | MCFG_SOUND_ADD("aysnd", AY8910, 2000000) |
| 758 | MCFG_SOUND_ADD("aysnd", AY8910, XTAL_24MHz/8) |
| 722 | 759 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 723 | 760 | |
| 724 | | MCFG_SOUND_ADD("dac1", DAC, 0) |
| 761 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 725 | 762 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 726 | | |
| 727 | | MCFG_SOUND_ADD("dac2", DAC, 0) |
| 728 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 729 | 763 | MACHINE_CONFIG_END |
| 730 | 764 | |
| 731 | 765 | |
| 732 | | static MACHINE_CONFIG_START( vsgongf, tsamurai_state ) |
| 766 | static MACHINE_CONFIG_START( m660, tsamurai_state ) |
| 733 | 767 | |
| 734 | 768 | /* basic machine hardware */ |
| 735 | | MCFG_CPU_ADD("maincpu", Z80, 4000000) |
| 736 | | MCFG_CPU_PROGRAM_MAP(vsgongf_map) |
| 769 | MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) |
| 770 | MCFG_CPU_PROGRAM_MAP(m660_map) |
| 771 | MCFG_CPU_IO_MAP(z80_m660_io_map) |
| 737 | 772 | MCFG_CPU_VBLANK_INT("screen", samurai_interrupt) |
| 738 | 773 | |
| 739 | | MCFG_CPU_ADD("audiocpu", Z80, 4000000) |
| 740 | | MCFG_CPU_PROGRAM_MAP(sound_vsgongf_map) |
| 741 | | MCFG_CPU_IO_MAP(vsgongf_audio_io_map) |
| 742 | | MCFG_CPU_PERIODIC_INT(vsgongf_sound_interrupt,3*60) |
| 774 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) |
| 775 | MCFG_CPU_PROGRAM_MAP(sound1_m660_map) |
| 743 | 776 | |
| 777 | MCFG_CPU_ADD("audio2", Z80, XTAL_24MHz/8) |
| 778 | MCFG_CPU_PROGRAM_MAP(sound2_m660_map) |
| 779 | |
| 780 | MCFG_CPU_ADD("audio3", Z80, XTAL_24MHz/8) |
| 781 | MCFG_CPU_PROGRAM_MAP(sound3_m660_map) |
| 782 | MCFG_CPU_IO_MAP(sound3_m660_io_map) |
| 783 | MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse) |
| 784 | |
| 744 | 785 | /* video hardware */ |
| 745 | 786 | MCFG_SCREEN_ADD("screen", RASTER) |
| 746 | 787 | MCFG_SCREEN_REFRESH_RATE(60) |
| 747 | 788 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 748 | 789 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 749 | 790 | MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) |
| 750 | | MCFG_SCREEN_UPDATE_STATIC(vsgongf) |
| 791 | MCFG_SCREEN_UPDATE_STATIC(tsamurai) |
| 751 | 792 | |
| 752 | 793 | MCFG_GFXDECODE(tsamurai) |
| 753 | 794 | MCFG_PALETTE_LENGTH(256) |
| 754 | 795 | |
| 755 | 796 | MCFG_PALETTE_INIT(RRRR_GGGG_BBBB) |
| 756 | | MCFG_VIDEO_START(vsgongf) |
| 797 | MCFG_VIDEO_START(tsamurai) |
| 757 | 798 | |
| 758 | 799 | /* sound hardware */ |
| 759 | 800 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 760 | 801 | |
| 761 | | MCFG_SOUND_ADD("aysnd", AY8910, 2000000) |
| 802 | MCFG_SOUND_ADD("aysnd", AY8910, XTAL_24MHz/8) |
| 762 | 803 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 763 | 804 | |
| 764 | | MCFG_SOUND_ADD("dac", DAC, 0) |
| 805 | MCFG_SOUND_ADD("dac1", DAC, 0) |
| 765 | 806 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 807 | |
| 808 | MCFG_SOUND_ADD("dac2", DAC, 0) |
| 809 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 766 | 810 | MACHINE_CONFIG_END |
| 767 | 811 | |
| 768 | 812 | /*******************************************************************************/ |
| r14424 | r14425 | |
| 1205 | 1249 | GAME( 1984, ringfgt, vsgongf, vsgongf, vsgongf, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", GAME_IMPERFECT_COLORS ) |
| 1206 | 1250 | GAME( 1984, ringfgt2, vsgongf, vsgongf, vsgongf, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", GAME_IMPERFECT_COLORS ) |
| 1207 | 1251 | |
| 1208 | | GAME( 1985, tsamurai, 0, tsamurai, tsamurai, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-ichi (set 1)", 0 ) |
| 1209 | | GAME( 1985, tsamurai2,tsamurai, tsamurai, tsamurai, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-ichi (set 2)", 0 ) |
| 1210 | | GAME( 1985, tsamuraih,tsamurai, tsamurai, tsamurai, 0, ROT90, "bootleg", "Samurai Nihon-ichi (bootleg, harder)", 0 ) |
| 1252 | GAME( 1985, tsamurai, 0, tsamurai, tsamurai, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-Ichi (set 1)", 0 ) |
| 1253 | GAME( 1985, tsamurai2,tsamurai, tsamurai, tsamurai, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-Ichi (set 2)", 0 ) |
| 1254 | GAME( 1985, tsamuraih,tsamurai, tsamurai, tsamurai, 0, ROT90, "bootleg", "Samurai Nihon-Ichi (bootleg, harder)", 0 ) |
| 1211 | 1255 | |
| 1212 | | GAME( 1985, ladymstr, 0, tsamurai, tsamurai, 0, ROT90, "Kaneko / Taito", "Lady Master of Kung Fu", 0 ) |
| 1256 | GAME( 1985, ladymstr, 0, tsamurai, ladymstr, 0, ROT90, "Kaneko / Taito", "Lady Master of Kung Fu", 0 ) |
| 1213 | 1257 | GAME( 1985, nunchaku, ladymstr, tsamurai, nunchaku, 0, ROT90, "Kaneko / Taito", "Nunchackun", GAME_IMPERFECT_COLORS ) |
| 1214 | 1258 | |
| 1215 | 1259 | GAME( 1985, yamagchi, 0, tsamurai, yamagchi, 0, ROT90, "Kaneko / Taito", "Go Go Mr. Yamaguchi / Yuke Yuke Yamaguchi-kun", GAME_IMPERFECT_COLORS ) |
src/emu/machine/generic.c
| r14424 | r14425 | |
| 583 | 583 | |
| 584 | 584 | /*------------------------------------------------- |
| 585 | 585 | generic_pulse_irq_line - "pulse" an IRQ line by |
| 586 | | asserting it and then clearing it 1 cycle |
| 586 | asserting it and then clearing it x cycle(s) |
| 587 | 587 | later |
| 588 | 588 | -------------------------------------------------*/ |
| 589 | 589 | |
| 590 | | void generic_pulse_irq_line(device_t *device, int irqline) |
| 590 | void generic_pulse_irq_line(device_t *device, int irqline, int cycles) |
| 591 | 591 | { |
| 592 | | assert(irqline != INPUT_LINE_NMI && irqline != INPUT_LINE_RESET); |
| 592 | assert(irqline != INPUT_LINE_NMI && irqline != INPUT_LINE_RESET && cycles > 0); |
| 593 | 593 | device_set_input_line(device, irqline, ASSERT_LINE); |
| 594 | 594 | |
| 595 | 595 | cpu_device *cpudevice = downcast<cpu_device *>(device); |
| 596 | | attotime target_time = cpudevice->local_time() + cpudevice->cycles_to_attotime(cpudevice->min_cycles()); |
| 596 | attotime target_time = cpudevice->local_time() + cpudevice->cycles_to_attotime(cycles * cpudevice->min_cycles()); |
| 597 | 597 | device->machine().scheduler().timer_set(target_time - device->machine().time(), FUNC(irq_pulse_clear), irqline, (void *)device); |
| 598 | 598 | } |
| 599 | 599 | |
| r14424 | r14425 | |
| 601 | 601 | /*------------------------------------------------- |
| 602 | 602 | generic_pulse_irq_line_and_vector - "pulse" an |
| 603 | 603 | IRQ line by asserting it and then clearing it |
| 604 | | 1 cycle later, specifying a vector |
| 604 | x cycle(s) later, specifying a vector |
| 605 | 605 | -------------------------------------------------*/ |
| 606 | 606 | |
| 607 | | void generic_pulse_irq_line_and_vector(device_t *device, int irqline, int vector) |
| 607 | void generic_pulse_irq_line_and_vector(device_t *device, int irqline, int vector, int cycles) |
| 608 | 608 | { |
| 609 | | assert(irqline != INPUT_LINE_NMI && irqline != INPUT_LINE_RESET); |
| 609 | assert(irqline != INPUT_LINE_NMI && irqline != INPUT_LINE_RESET && cycles > 0); |
| 610 | 610 | device_set_input_line_and_vector(device, irqline, ASSERT_LINE, vector); |
| 611 | 611 | |
| 612 | 612 | cpu_device *cpudevice = downcast<cpu_device *>(device); |
| 613 | | attotime target_time = cpudevice->local_time() + cpudevice->cycles_to_attotime(cpudevice->min_cycles()); |
| 613 | attotime target_time = cpudevice->local_time() + cpudevice->cycles_to_attotime(cycles * cpudevice->min_cycles()); |
| 614 | 614 | device->machine().scheduler().timer_set(target_time - device->machine().time(), FUNC(irq_pulse_clear), irqline, (void *)device); |
| 615 | 615 | } |
| 616 | 616 | |
| r14424 | r14425 | |
| 633 | 633 | -------------------------------------------------*/ |
| 634 | 634 | |
| 635 | 635 | INTERRUPT_GEN( irq0_line_hold ) { if (interrupt_enabled(device)) device_set_input_line(device, 0, HOLD_LINE); } |
| 636 | | INTERRUPT_GEN( irq0_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 0); } |
| 636 | INTERRUPT_GEN( irq0_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 0, 1); } |
| 637 | 637 | INTERRUPT_GEN( irq0_line_assert ) { if (interrupt_enabled(device)) device_set_input_line(device, 0, ASSERT_LINE); } |
| 638 | 638 | |
| 639 | 639 | INTERRUPT_GEN( irq1_line_hold ) { if (interrupt_enabled(device)) device_set_input_line(device, 1, HOLD_LINE); } |
| 640 | | INTERRUPT_GEN( irq1_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 1); } |
| 640 | INTERRUPT_GEN( irq1_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 1, 1); } |
| 641 | 641 | INTERRUPT_GEN( irq1_line_assert ) { if (interrupt_enabled(device)) device_set_input_line(device, 1, ASSERT_LINE); } |
| 642 | 642 | |
| 643 | 643 | INTERRUPT_GEN( irq2_line_hold ) { if (interrupt_enabled(device)) device_set_input_line(device, 2, HOLD_LINE); } |
| 644 | | INTERRUPT_GEN( irq2_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 2); } |
| 644 | INTERRUPT_GEN( irq2_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 2, 1); } |
| 645 | 645 | INTERRUPT_GEN( irq2_line_assert ) { if (interrupt_enabled(device)) device_set_input_line(device, 2, ASSERT_LINE); } |
| 646 | 646 | |
| 647 | 647 | INTERRUPT_GEN( irq3_line_hold ) { if (interrupt_enabled(device)) device_set_input_line(device, 3, HOLD_LINE); } |
| 648 | | INTERRUPT_GEN( irq3_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 3); } |
| 648 | INTERRUPT_GEN( irq3_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 3, 1); } |
| 649 | 649 | INTERRUPT_GEN( irq3_line_assert ) { if (interrupt_enabled(device)) device_set_input_line(device, 3, ASSERT_LINE); } |
| 650 | 650 | |
| 651 | 651 | INTERRUPT_GEN( irq4_line_hold ) { if (interrupt_enabled(device)) device_set_input_line(device, 4, HOLD_LINE); } |
| 652 | | INTERRUPT_GEN( irq4_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 4); } |
| 652 | INTERRUPT_GEN( irq4_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 4, 1); } |
| 653 | 653 | INTERRUPT_GEN( irq4_line_assert ) { if (interrupt_enabled(device)) device_set_input_line(device, 4, ASSERT_LINE); } |
| 654 | 654 | |
| 655 | 655 | INTERRUPT_GEN( irq5_line_hold ) { if (interrupt_enabled(device)) device_set_input_line(device, 5, HOLD_LINE); } |
| 656 | | INTERRUPT_GEN( irq5_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 5); } |
| 656 | INTERRUPT_GEN( irq5_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 5, 1); } |
| 657 | 657 | INTERRUPT_GEN( irq5_line_assert ) { if (interrupt_enabled(device)) device_set_input_line(device, 5, ASSERT_LINE); } |
| 658 | 658 | |
| 659 | 659 | INTERRUPT_GEN( irq6_line_hold ) { if (interrupt_enabled(device)) device_set_input_line(device, 6, HOLD_LINE); } |
| 660 | | INTERRUPT_GEN( irq6_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 6); } |
| 660 | INTERRUPT_GEN( irq6_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 6, 1); } |
| 661 | 661 | INTERRUPT_GEN( irq6_line_assert ) { if (interrupt_enabled(device)) device_set_input_line(device, 6, ASSERT_LINE); } |
| 662 | 662 | |
| 663 | 663 | INTERRUPT_GEN( irq7_line_hold ) { if (interrupt_enabled(device)) device_set_input_line(device, 7, HOLD_LINE); } |
| 664 | | INTERRUPT_GEN( irq7_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 7); } |
| 664 | INTERRUPT_GEN( irq7_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 7, 1); } |
| 665 | 665 | INTERRUPT_GEN( irq7_line_assert ) { if (interrupt_enabled(device)) device_set_input_line(device, 7, ASSERT_LINE); } |
| 666 | 666 | |
| 667 | 667 | |