src/mame/machine/psx.c
| r11556 | r11557 | |
| 2 | 2 | |
| 3 | 3 | machine/psx.c |
| 4 | 4 | |
| 5 | | Thanks to Olivier Galibert for IDCT information |
| 6 | | |
| 7 | 5 | ***************************************************************************/ |
| 8 | 6 | |
| 9 | 7 | #include "emu.h" |
| r11556 | r11557 | |
| 43 | 41 | |
| 44 | 42 | /* IRQ */ |
| 45 | 43 | |
| 46 | | static void psx_irq_update( psx_machine *p_psx ) |
| 47 | | { |
| 48 | | if( ( p_psx->n_irqdata & p_psx->n_irqmask ) != 0 ) |
| 49 | | { |
| 50 | | verboselog( p_psx, 2, "psx irq assert\n" ); |
| 51 | | cputag_set_input_line( p_psx->machine(), "maincpu", PSXCPU_IRQ0, ASSERT_LINE ); |
| 52 | | } |
| 53 | | else |
| 54 | | { |
| 55 | | verboselog( p_psx, 2, "psx irq clear\n" ); |
| 56 | | cputag_set_input_line( p_psx->machine(), "maincpu", PSXCPU_IRQ0, CLEAR_LINE ); |
| 57 | | } |
| 58 | | } |
| 59 | | |
| 60 | | WRITE32_HANDLER( psx_irq_w ) |
| 61 | | { |
| 62 | | psx_machine *p_psx = space->machine().driver_data<psx_state>()->m_p_psx; |
| 63 | | |
| 64 | | switch( offset ) |
| 65 | | { |
| 66 | | case 0x00: |
| 67 | | verboselog( p_psx, 2, "psx irq data ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, p_psx->n_irqdata, ( p_psx->n_irqdata & ~mem_mask ) | ( p_psx->n_irqdata & p_psx->n_irqmask & data ) ); |
| 68 | | p_psx->n_irqdata = ( p_psx->n_irqdata & ~mem_mask ) | ( p_psx->n_irqdata & p_psx->n_irqmask & data ); |
| 69 | | psx_irq_update(p_psx); |
| 70 | | break; |
| 71 | | case 0x01: |
| 72 | | verboselog( p_psx, 2, "psx irq mask ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, p_psx->n_irqmask, ( p_psx->n_irqmask & ~mem_mask ) | data ); |
| 73 | | p_psx->n_irqmask = ( p_psx->n_irqmask & ~mem_mask ) | data; |
| 74 | | if( ( p_psx->n_irqmask &~ PSX_IRQ_MASK ) != 0 ) |
| 75 | | { |
| 76 | | verboselog( p_psx, 0, "psx_irq_w( %08x, %08x, %08x ) unknown irq\n", offset, data, mem_mask ); |
| 77 | | } |
| 78 | | psx_irq_update(p_psx); |
| 79 | | break; |
| 80 | | default: |
| 81 | | verboselog( p_psx, 0, "psx_irq_w( %08x, %08x, %08x ) unknown register\n", offset, data, mem_mask ); |
| 82 | | break; |
| 83 | | } |
| 84 | | } |
| 85 | | |
| 86 | | READ32_HANDLER( psx_irq_r ) |
| 87 | | { |
| 88 | | psx_machine *p_psx = space->machine().driver_data<psx_state>()->m_p_psx; |
| 89 | | |
| 90 | | switch( offset ) |
| 91 | | { |
| 92 | | case 0x00: |
| 93 | | verboselog( p_psx, 1, "psx_irq_r irq data %08x\n", p_psx->n_irqdata ); |
| 94 | | return p_psx->n_irqdata; |
| 95 | | case 0x01: |
| 96 | | verboselog( p_psx, 1, "psx_irq_r irq mask %08x\n", p_psx->n_irqmask ); |
| 97 | | return p_psx->n_irqmask; |
| 98 | | default: |
| 99 | | verboselog( p_psx, 0, "psx_irq_r unknown register %d\n", offset ); |
| 100 | | break; |
| 101 | | } |
| 102 | | return 0; |
| 103 | | } |
| 104 | | |
| 105 | 44 | void psx_irq_set( running_machine &machine, UINT32 data ) |
| 106 | 45 | { |
| 107 | | psx_machine *p_psx = machine.driver_data<psx_state>()->m_p_psx; |
| 108 | | |
| 109 | | verboselog( p_psx, 2, "psx_irq_set %08x\n", data ); |
| 110 | | p_psx->n_irqdata |= data; |
| 111 | | psx_irq_update(p_psx); |
| 46 | psxcpu_device::irq_set( *machine.device("maincpu"), "maincpu", data ); |
| 112 | 47 | } |
| 113 | 48 | |
| 114 | 49 | /* DMA */ |
| r11556 | r11557 | |
| 123 | 58 | psxcpu_device::install_dma_write_handler( *machine.device("maincpu"), "maincpu", n_channel, p_fn_dma_write ); |
| 124 | 59 | } |
| 125 | 60 | |
| 126 | | /* Root Counters */ |
| 127 | | |
| 128 | | static UINT64 psxcpu_gettotalcycles( psx_machine *p_psx ) |
| 61 | void psx_sio_install_handler( running_machine &machine, int n_port, psx_sio_handler p_f_sio_handler ) |
| 129 | 62 | { |
| 130 | | /* TODO: should return the start of the current tick. */ |
| 131 | | return p_psx->machine().firstcpu->total_cycles() * 2; |
| 63 | psxcpu_device::install_sio_handler( *machine.device("maincpu"), "maincpu", n_port, p_f_sio_handler ); |
| 132 | 64 | } |
| 133 | 65 | |
| 134 | | static int root_divider( psx_machine *p_psx, int n_counter ) |
| 135 | | { |
| 136 | | psx_root *root = &p_psx->root[ n_counter ]; |
| 137 | | |
| 138 | | if( n_counter == 0 && ( root->n_mode & PSX_RC_CLC ) != 0 ) |
| 139 | | { |
| 140 | | /* TODO: pixel clock, probably based on resolution */ |
| 141 | | return 5; |
| 142 | | } |
| 143 | | else if( n_counter == 1 && ( root->n_mode & PSX_RC_CLC ) != 0 ) |
| 144 | | { |
| 145 | | return 2150; |
| 146 | | } |
| 147 | | else if( n_counter == 2 && ( root->n_mode & PSX_RC_DIV ) != 0 ) |
| 148 | | { |
| 149 | | return 8; |
| 150 | | } |
| 151 | | return 1; |
| 152 | | } |
| 153 | | |
| 154 | | static UINT16 root_current( psx_machine *p_psx, int n_counter ) |
| 155 | | { |
| 156 | | psx_root *root = &p_psx->root[ n_counter ]; |
| 157 | | |
| 158 | | if( ( root->n_mode & PSX_RC_STOP ) != 0 ) |
| 159 | | { |
| 160 | | return root->n_count; |
| 161 | | } |
| 162 | | else |
| 163 | | { |
| 164 | | UINT64 n_current; |
| 165 | | n_current = psxcpu_gettotalcycles(p_psx) - root->n_start; |
| 166 | | n_current /= root_divider( p_psx, n_counter ); |
| 167 | | n_current += root->n_count; |
| 168 | | if( n_current > 0xffff ) |
| 169 | | { |
| 170 | | /* TODO: use timer for wrap on 0x10000. */ |
| 171 | | root->n_count = n_current; |
| 172 | | root->n_start = psxcpu_gettotalcycles(p_psx); |
| 173 | | } |
| 174 | | return n_current; |
| 175 | | } |
| 176 | | } |
| 177 | | |
| 178 | | static int root_target( psx_machine *p_psx, int n_counter ) |
| 179 | | { |
| 180 | | psx_root *root = &p_psx->root[ n_counter ]; |
| 181 | | |
| 182 | | if( ( root->n_mode & PSX_RC_COUNTTARGET ) != 0 || |
| 183 | | ( root->n_mode & PSX_RC_IRQTARGET ) != 0 ) |
| 184 | | { |
| 185 | | return root->n_target; |
| 186 | | } |
| 187 | | return 0x10000; |
| 188 | | } |
| 189 | | |
| 190 | | static void root_timer_adjust( psx_machine *p_psx, int n_counter ) |
| 191 | | { |
| 192 | | psx_root *root = &p_psx->root[ n_counter ]; |
| 193 | | |
| 194 | | if( ( root->n_mode & PSX_RC_STOP ) != 0 ) |
| 195 | | { |
| 196 | | root->timer->adjust( attotime::never, n_counter); |
| 197 | | } |
| 198 | | else |
| 199 | | { |
| 200 | | int n_duration; |
| 201 | | |
| 202 | | n_duration = root_target( p_psx, n_counter ) - root_current( p_psx, n_counter ); |
| 203 | | if( n_duration < 1 ) |
| 204 | | { |
| 205 | | n_duration += 0x10000; |
| 206 | | } |
| 207 | | |
| 208 | | n_duration *= root_divider( p_psx, n_counter ); |
| 209 | | |
| 210 | | root->timer->adjust( attotime::from_hz(33868800) * n_duration, n_counter); |
| 211 | | } |
| 212 | | } |
| 213 | | |
| 214 | | static TIMER_CALLBACK( root_finished ) |
| 215 | | { |
| 216 | | psx_machine *p_psx = machine.driver_data<psx_state>()->m_p_psx; |
| 217 | | int n_counter = param; |
| 218 | | psx_root *root = &p_psx->root[ n_counter ]; |
| 219 | | |
| 220 | | verboselog( p_psx, 2, "root_finished( %d ) %04x\n", n_counter, root_current( p_psx, n_counter ) ); |
| 221 | | //if( ( root->n_mode & PSX_RC_COUNTTARGET ) != 0 ) |
| 222 | | { |
| 223 | | /* TODO: wrap should be handled differently as PSX_RC_COUNTTARGET & PSX_RC_IRQTARGET don't have to be the same. */ |
| 224 | | root->n_count = 0; |
| 225 | | root->n_start = psxcpu_gettotalcycles(p_psx); |
| 226 | | } |
| 227 | | if( ( root->n_mode & PSX_RC_REPEAT ) != 0 ) |
| 228 | | { |
| 229 | | root_timer_adjust( p_psx, n_counter ); |
| 230 | | } |
| 231 | | if( ( root->n_mode & PSX_RC_IRQOVERFLOW ) != 0 || |
| 232 | | ( root->n_mode & PSX_RC_IRQTARGET ) != 0 ) |
| 233 | | { |
| 234 | | psx_irq_set( machine, PSX_IRQ_ROOTCOUNTER0 << n_counter ); |
| 235 | | } |
| 236 | | } |
| 237 | | |
| 238 | | WRITE32_HANDLER( psx_counter_w ) |
| 239 | | { |
| 240 | | psx_machine *p_psx = space->machine().driver_data<psx_state>()->m_p_psx; |
| 241 | | int n_counter = offset / 4; |
| 242 | | psx_root *root = &p_psx->root[ n_counter ]; |
| 243 | | |
| 244 | | verboselog( p_psx, 1, "psx_counter_w ( %08x, %08x, %08x )\n", offset, data, mem_mask ); |
| 245 | | |
| 246 | | switch( offset % 4 ) |
| 247 | | { |
| 248 | | case 0: |
| 249 | | root->n_count = data; |
| 250 | | root->n_start = psxcpu_gettotalcycles(p_psx); |
| 251 | | break; |
| 252 | | case 1: |
| 253 | | root->n_count = root_current( p_psx, n_counter ); |
| 254 | | root->n_start = psxcpu_gettotalcycles(p_psx); |
| 255 | | |
| 256 | | if( ( data & PSX_RC_RESET ) != 0 ) |
| 257 | | { |
| 258 | | data &= ~( PSX_RC_RESET | PSX_RC_STOP ); |
| 259 | | root->n_count = 0; |
| 260 | | } |
| 261 | | |
| 262 | | root->n_mode = data; |
| 263 | | |
| 264 | | #if 0 |
| 265 | | if( ( data & 0xfca6 ) != 0 || |
| 266 | | ( ( data & 0x0100 ) != 0 && n_counter != 0 && n_counter != 1 ) || |
| 267 | | ( ( data & 0x0200 ) != 0 && n_counter != 2 ) ) |
| 268 | | { |
| 269 | | mame_printf_debug( "mode %d 0x%04x\n", n_counter, data & 0xfca6 ); |
| 270 | | } |
| 271 | | #endif |
| 272 | | break; |
| 273 | | case 2: |
| 274 | | root->n_target = data; |
| 275 | | break; |
| 276 | | default: |
| 277 | | verboselog( p_psx, 0, "psx_counter_w( %08x, %08x, %08x ) unknown register\n", offset, mem_mask, data ); |
| 278 | | return; |
| 279 | | } |
| 280 | | |
| 281 | | root_timer_adjust( p_psx, n_counter ); |
| 282 | | } |
| 283 | | |
| 284 | | READ32_HANDLER( psx_counter_r ) |
| 285 | | { |
| 286 | | psx_machine *p_psx = space->machine().driver_data<psx_state>()->m_p_psx; |
| 287 | | int n_counter = offset / 4; |
| 288 | | psx_root *root = &p_psx->root[ n_counter ]; |
| 289 | | UINT32 data; |
| 290 | | |
| 291 | | switch( offset % 4 ) |
| 292 | | { |
| 293 | | case 0: |
| 294 | | data = root_current( p_psx, n_counter ); |
| 295 | | break; |
| 296 | | case 1: |
| 297 | | data = root->n_mode; |
| 298 | | break; |
| 299 | | case 2: |
| 300 | | data = root->n_target; |
| 301 | | break; |
| 302 | | default: |
| 303 | | verboselog( p_psx, 0, "psx_counter_r( %08x, %08x ) unknown register\n", offset, mem_mask ); |
| 304 | | return 0; |
| 305 | | } |
| 306 | | verboselog( p_psx, 1, "psx_counter_r ( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| 307 | | return data; |
| 308 | | } |
| 309 | | |
| 310 | | /* SIO */ |
| 311 | | |
| 312 | | static void sio_interrupt( psx_machine *p_psx, int n_port ) |
| 313 | | { |
| 314 | | psx_sio *sio = &p_psx->sio[ n_port ]; |
| 315 | | |
| 316 | | verboselog( p_psx, 1, "sio_interrupt( %d )\n", n_port ); |
| 317 | | sio->n_status |= SIO_STATUS_IRQ; |
| 318 | | if( n_port == 0 ) |
| 319 | | { |
| 320 | | psx_irq_set( p_psx->machine(), PSX_IRQ_SIO0 ); |
| 321 | | } |
| 322 | | else |
| 323 | | { |
| 324 | | psx_irq_set( p_psx->machine(), PSX_IRQ_SIO1 ); |
| 325 | | } |
| 326 | | } |
| 327 | | |
| 328 | | static void sio_timer_adjust( psx_machine *p_psx, int n_port ) |
| 329 | | { |
| 330 | | psx_sio *sio = &p_psx->sio[ n_port ]; |
| 331 | | attotime n_time; |
| 332 | | |
| 333 | | if( ( sio->n_status & SIO_STATUS_TX_EMPTY ) == 0 || sio->n_tx_bits != 0 ) |
| 334 | | { |
| 335 | | int n_prescaler; |
| 336 | | |
| 337 | | switch( sio->n_mode & 3 ) |
| 338 | | { |
| 339 | | case 1: |
| 340 | | n_prescaler = 1; |
| 341 | | break; |
| 342 | | case 2: |
| 343 | | n_prescaler = 16; |
| 344 | | break; |
| 345 | | case 3: |
| 346 | | n_prescaler = 64; |
| 347 | | break; |
| 348 | | default: |
| 349 | | n_prescaler = 0; |
| 350 | | break; |
| 351 | | } |
| 352 | | |
| 353 | | if( sio->n_baud != 0 && n_prescaler != 0 ) |
| 354 | | { |
| 355 | | n_time = attotime::from_hz(33868800) * (n_prescaler * sio->n_baud); |
| 356 | | verboselog( p_psx, 2, "sio_timer_adjust( %d ) = %s ( %d x %d )\n", n_port, n_time.as_string(), n_prescaler, sio->n_baud ); |
| 357 | | } |
| 358 | | else |
| 359 | | { |
| 360 | | n_time = attotime::never; |
| 361 | | verboselog( p_psx, 0, "sio_timer_adjust( %d ) invalid baud rate ( %d x %d )\n", n_port, n_prescaler, sio->n_baud ); |
| 362 | | } |
| 363 | | } |
| 364 | | else |
| 365 | | { |
| 366 | | n_time = attotime::never; |
| 367 | | verboselog( p_psx, 2, "sio_timer_adjust( %d ) finished\n", n_port ); |
| 368 | | } |
| 369 | | sio->timer->adjust( n_time, n_port); |
| 370 | | } |
| 371 | | |
| 372 | | static TIMER_CALLBACK( sio_clock ) |
| 373 | | { |
| 374 | | psx_machine *p_psx = machine.driver_data<psx_state>()->m_p_psx; |
| 375 | | int n_port = param; |
| 376 | | psx_sio *sio = &p_psx->sio[ n_port ]; |
| 377 | | verboselog( p_psx, 2, "sio tick\n" ); |
| 378 | | |
| 379 | | if( sio->n_tx_bits == 0 && |
| 380 | | ( sio->n_control & SIO_CONTROL_TX_ENA ) != 0 && |
| 381 | | ( sio->n_status & SIO_STATUS_TX_EMPTY ) == 0 ) |
| 382 | | { |
| 383 | | sio->n_tx_bits = 8; |
| 384 | | sio->n_tx_shift = sio->n_tx_data; |
| 385 | | if( n_port == 0 ) |
| 386 | | { |
| 387 | | sio->n_rx_bits = 8; |
| 388 | | sio->n_rx_shift = 0; |
| 389 | | } |
| 390 | | sio->n_status |= SIO_STATUS_TX_EMPTY; |
| 391 | | sio->n_status |= SIO_STATUS_TX_RDY; |
| 392 | | } |
| 393 | | |
| 394 | | if( sio->n_tx_bits != 0 ) |
| 395 | | { |
| 396 | | sio->n_tx = ( sio->n_tx & ~PSX_SIO_OUT_DATA ) | ( ( sio->n_tx_shift & 1 ) * PSX_SIO_OUT_DATA ); |
| 397 | | sio->n_tx_shift >>= 1; |
| 398 | | sio->n_tx_bits--; |
| 399 | | |
| 400 | | if( sio->fn_handler != NULL ) |
| 401 | | { |
| 402 | | if( n_port == 0 ) |
| 403 | | { |
| 404 | | sio->n_tx &= ~PSX_SIO_OUT_CLOCK; |
| 405 | | (*sio->fn_handler)( machine, sio->n_tx ); |
| 406 | | sio->n_tx |= PSX_SIO_OUT_CLOCK; |
| 407 | | } |
| 408 | | (*sio->fn_handler)( machine, sio->n_tx ); |
| 409 | | } |
| 410 | | |
| 411 | | if( sio->n_tx_bits == 0 && |
| 412 | | ( sio->n_control & SIO_CONTROL_TX_IENA ) != 0 ) |
| 413 | | { |
| 414 | | sio_interrupt( p_psx, n_port ); |
| 415 | | } |
| 416 | | } |
| 417 | | |
| 418 | | if( sio->n_rx_bits != 0 ) |
| 419 | | { |
| 420 | | sio->n_rx_shift = ( sio->n_rx_shift >> 1 ) | ( ( ( sio->n_rx & PSX_SIO_IN_DATA ) / PSX_SIO_IN_DATA ) << 7 ); |
| 421 | | sio->n_rx_bits--; |
| 422 | | |
| 423 | | if( sio->n_rx_bits == 0 ) |
| 424 | | { |
| 425 | | if( ( sio->n_status & SIO_STATUS_RX_RDY ) != 0 ) |
| 426 | | { |
| 427 | | sio->n_status |= SIO_STATUS_OVERRUN; |
| 428 | | } |
| 429 | | else |
| 430 | | { |
| 431 | | sio->n_rx_data = sio->n_rx_shift; |
| 432 | | sio->n_status |= SIO_STATUS_RX_RDY; |
| 433 | | } |
| 434 | | if( ( sio->n_control & SIO_CONTROL_RX_IENA ) != 0 ) |
| 435 | | { |
| 436 | | sio_interrupt( p_psx, n_port ); |
| 437 | | } |
| 438 | | } |
| 439 | | } |
| 440 | | |
| 441 | | sio_timer_adjust( p_psx, n_port ); |
| 442 | | } |
| 443 | | |
| 444 | 66 | void psx_sio_input( running_machine &machine, int n_port, int n_mask, int n_data ) |
| 445 | 67 | { |
| 446 | | psx_machine *p_psx = machine.driver_data<psx_state>()->m_p_psx; |
| 447 | | psx_sio *sio = &p_psx->sio[ n_port ]; |
| 448 | | verboselog( p_psx, 1, "psx_sio_input( %d, %02x, %02x )\n", n_port, n_mask, n_data ); |
| 449 | | sio->n_rx = ( sio->n_rx & ~n_mask ) | ( n_data & n_mask ); |
| 450 | | |
| 451 | | if( ( sio->n_rx & PSX_SIO_IN_DSR ) != 0 ) |
| 452 | | { |
| 453 | | sio->n_status |= SIO_STATUS_DSR; |
| 454 | | if( ( sio->n_rx_prev & PSX_SIO_IN_DSR ) == 0 && |
| 455 | | ( sio->n_control & SIO_CONTROL_DSR_IENA ) != 0 ) |
| 456 | | { |
| 457 | | sio_interrupt( p_psx, n_port ); |
| 458 | | } |
| 459 | | } |
| 460 | | else |
| 461 | | { |
| 462 | | sio->n_status &= ~SIO_STATUS_DSR; |
| 463 | | } |
| 464 | | sio->n_rx_prev = sio->n_rx; |
| 68 | psxcpu_device::sio_input( *machine.device("maincpu"), "maincpu", n_port, n_mask, n_data ); |
| 465 | 69 | } |
| 466 | 70 | |
| 467 | | WRITE32_HANDLER( psx_sio_w ) |
| 468 | | { |
| 469 | | psx_machine *p_psx = space->machine().driver_data<psx_state>()->m_p_psx; |
| 470 | | int n_port = offset / 4; |
| 471 | | psx_sio *sio = &p_psx->sio[ n_port ]; |
| 472 | | |
| 473 | | switch( offset % 4 ) |
| 474 | | { |
| 475 | | case 0: |
| 476 | | verboselog( p_psx, 1, "psx_sio_w %d data %02x (%08x)\n", n_port, data, mem_mask ); |
| 477 | | sio->n_tx_data = data; |
| 478 | | sio->n_status &= ~( SIO_STATUS_TX_RDY ); |
| 479 | | sio->n_status &= ~( SIO_STATUS_TX_EMPTY ); |
| 480 | | sio_timer_adjust( p_psx, n_port ); |
| 481 | | break; |
| 482 | | case 1: |
| 483 | | verboselog( p_psx, 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); |
| 484 | | break; |
| 485 | | case 2: |
| 486 | | if( ACCESSING_BITS_0_15 ) |
| 487 | | { |
| 488 | | sio->n_mode = data & 0xffff; |
| 489 | | verboselog( p_psx, 1, "psx_sio_w %d mode %04x\n", n_port, data & 0xffff ); |
| 490 | | } |
| 491 | | if( ACCESSING_BITS_16_31 ) |
| 492 | | { |
| 493 | | verboselog( p_psx, 1, "psx_sio_w %d control %04x\n", n_port, data >> 16 ); |
| 494 | | sio->n_control = data >> 16; |
| 495 | | |
| 496 | | if( ( sio->n_control & SIO_CONTROL_RESET ) != 0 ) |
| 497 | | { |
| 498 | | verboselog( p_psx, 1, "psx_sio_w reset\n" ); |
| 499 | | sio->n_status |= SIO_STATUS_TX_EMPTY | SIO_STATUS_TX_RDY; |
| 500 | | sio->n_status &= ~( SIO_STATUS_RX_RDY | SIO_STATUS_OVERRUN | SIO_STATUS_IRQ ); |
| 501 | | } |
| 502 | | if( ( sio->n_control & SIO_CONTROL_IACK ) != 0 ) |
| 503 | | { |
| 504 | | verboselog( p_psx, 1, "psx_sio_w iack\n" ); |
| 505 | | sio->n_status &= ~( SIO_STATUS_IRQ ); |
| 506 | | sio->n_control &= ~( SIO_CONTROL_IACK ); |
| 507 | | } |
| 508 | | if( ( sio->n_control & SIO_CONTROL_DTR ) != 0 ) |
| 509 | | { |
| 510 | | sio->n_tx |= PSX_SIO_OUT_DTR; |
| 511 | | } |
| 512 | | else |
| 513 | | { |
| 514 | | sio->n_tx &= ~PSX_SIO_OUT_DTR; |
| 515 | | } |
| 516 | | |
| 517 | | if( ( ( sio->n_tx ^ sio->n_tx_prev ) & PSX_SIO_OUT_DTR ) != 0 ) |
| 518 | | { |
| 519 | | if( sio->fn_handler != NULL ) |
| 520 | | { |
| 521 | | (*sio->fn_handler)( space->machine(), sio->n_tx ); |
| 522 | | } |
| 523 | | } |
| 524 | | sio->n_tx_prev = sio->n_tx; |
| 525 | | |
| 526 | | } |
| 527 | | break; |
| 528 | | case 3: |
| 529 | | if( ACCESSING_BITS_0_15 ) |
| 530 | | { |
| 531 | | verboselog( p_psx, 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); |
| 532 | | } |
| 533 | | if( ACCESSING_BITS_16_31 ) |
| 534 | | { |
| 535 | | sio->n_baud = data >> 16; |
| 536 | | verboselog( p_psx, 1, "psx_sio_w %d baud %04x\n", n_port, data >> 16 ); |
| 537 | | } |
| 538 | | break; |
| 539 | | default: |
| 540 | | verboselog( p_psx, 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); |
| 541 | | break; |
| 542 | | } |
| 543 | | } |
| 544 | | |
| 545 | | READ32_HANDLER( psx_sio_r ) |
| 546 | | { |
| 547 | | psx_machine *p_psx = space->machine().driver_data<psx_state>()->m_p_psx; |
| 548 | | int n_port = offset / 4; |
| 549 | | psx_sio *sio = &p_psx->sio[ n_port ]; |
| 550 | | UINT32 data; |
| 551 | | |
| 552 | | switch( offset % 4 ) |
| 553 | | { |
| 554 | | case 0: |
| 555 | | data = sio->n_rx_data; |
| 556 | | sio->n_status &= ~( SIO_STATUS_RX_RDY ); |
| 557 | | sio->n_rx_data = 0xff; |
| 558 | | verboselog( p_psx, 1, "psx_sio_r %d data %02x (%08x)\n", n_port, data, mem_mask ); |
| 559 | | break; |
| 560 | | case 1: |
| 561 | | data = sio->n_status; |
| 562 | | if( ACCESSING_BITS_0_15 ) |
| 563 | | { |
| 564 | | verboselog( p_psx, 1, "psx_sio_r %d status %04x\n", n_port, data & 0xffff ); |
| 565 | | } |
| 566 | | if( ACCESSING_BITS_16_31 ) |
| 567 | | { |
| 568 | | verboselog( p_psx, 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| 569 | | } |
| 570 | | break; |
| 571 | | case 2: |
| 572 | | data = ( sio->n_control << 16 ) | sio->n_mode; |
| 573 | | if( ACCESSING_BITS_0_15 ) |
| 574 | | { |
| 575 | | verboselog( p_psx, 1, "psx_sio_r %d mode %04x\n", n_port, data & 0xffff ); |
| 576 | | } |
| 577 | | if( ACCESSING_BITS_16_31 ) |
| 578 | | { |
| 579 | | verboselog( p_psx, 1, "psx_sio_r %d control %04x\n", n_port, data >> 16 ); |
| 580 | | } |
| 581 | | break; |
| 582 | | case 3: |
| 583 | | data = sio->n_baud << 16; |
| 584 | | if( ACCESSING_BITS_0_15 ) |
| 585 | | { |
| 586 | | verboselog( p_psx, 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| 587 | | } |
| 588 | | if( ACCESSING_BITS_16_31 ) |
| 589 | | { |
| 590 | | verboselog( p_psx, 1, "psx_sio_r %d baud %04x\n", n_port, data >> 16 ); |
| 591 | | } |
| 592 | | break; |
| 593 | | default: |
| 594 | | data = 0; |
| 595 | | verboselog( p_psx, 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| 596 | | break; |
| 597 | | } |
| 598 | | return data; |
| 599 | | } |
| 600 | | |
| 601 | | void psx_sio_install_handler( running_machine &machine, int n_port, psx_sio_handler p_f_sio_handler ) |
| 602 | | { |
| 603 | | psx_machine *p_psx = machine.driver_data<psx_state>()->m_p_psx; |
| 604 | | |
| 605 | | p_psx->sio[ n_port ].fn_handler = p_f_sio_handler; |
| 606 | | } |
| 607 | | |
| 608 | 71 | static void gpu_read( psx_state *state, UINT32 n_address, INT32 n_size ) |
| 609 | 72 | { |
| 610 | 73 | psx_machine *p_psx = state->m_p_psx; |
| r11556 | r11557 | |
| 623 | 86 | |
| 624 | 87 | void psx_machine_init( running_machine &machine ) |
| 625 | 88 | { |
| 626 | | psx_machine *p_psx = machine.driver_data<psx_state>()->m_p_psx; |
| 627 | | int n; |
| 628 | | |
| 629 | | /* irq */ |
| 630 | | p_psx->n_irqdata = 0; |
| 631 | | p_psx->n_irqmask = 0; |
| 632 | | |
| 633 | | for( n = 0; n < 2; n++ ) |
| 634 | | { |
| 635 | | p_psx->sio[ n ].n_status = SIO_STATUS_TX_EMPTY | SIO_STATUS_TX_RDY; |
| 636 | | p_psx->sio[ n ].n_mode = 0; |
| 637 | | p_psx->sio[ n ].n_control = 0; |
| 638 | | p_psx->sio[ n ].n_baud = 0; |
| 639 | | p_psx->sio[ n ].n_tx = 0; |
| 640 | | p_psx->sio[ n ].n_rx = 0; |
| 641 | | p_psx->sio[ n ].n_tx_prev = 0; |
| 642 | | p_psx->sio[ n ].n_rx_prev = 0; |
| 643 | | p_psx->sio[ n ].n_rx_data = 0; |
| 644 | | p_psx->sio[ n ].n_tx_data = 0; |
| 645 | | p_psx->sio[ n ].n_rx_shift = 0; |
| 646 | | p_psx->sio[ n ].n_tx_shift = 0; |
| 647 | | p_psx->sio[ n ].n_rx_bits = 0; |
| 648 | | p_psx->sio[ n ].n_tx_bits = 0; |
| 649 | | } |
| 650 | | |
| 651 | 89 | psx_gpu_reset(machine); |
| 652 | 90 | } |
| 653 | 91 | |
| 654 | | static void psx_postload(psx_machine *p_psx) |
| 655 | | { |
| 656 | | int n; |
| 657 | | |
| 658 | | psx_irq_update(p_psx); |
| 659 | | |
| 660 | | for( n = 0; n < 3; n++ ) |
| 661 | | { |
| 662 | | root_timer_adjust( p_psx, n ); |
| 663 | | } |
| 664 | | |
| 665 | | for( n = 0; n < 2; n++ ) |
| 666 | | { |
| 667 | | sio_timer_adjust( p_psx, n ); |
| 668 | | } |
| 669 | | } |
| 670 | | |
| 671 | 92 | void psx_driver_init( running_machine &machine ) |
| 672 | 93 | { |
| 673 | 94 | psx_state *state = machine.driver_data<psx_state>(); |
| 674 | 95 | psx_machine *p_psx = auto_alloc_clear(machine, psx_machine); |
| 675 | | int n; |
| 676 | 96 | |
| 677 | 97 | state->m_p_psx = p_psx; |
| 678 | 98 | state->m_p_n_psxram = (UINT32 *)memory_get_shared(machine, "share1", state->m_n_psxramsize); |
| r11556 | r11557 | |
| 681 | 101 | p_psx->p_n_psxram = state->m_p_n_psxram; |
| 682 | 102 | p_psx->n_psxramsize = state->m_n_psxramsize; |
| 683 | 103 | |
| 684 | | for( n = 0; n < 3; n++ ) |
| 685 | | { |
| 686 | | p_psx->root[ n ].timer = machine.scheduler().timer_alloc( FUNC(root_finished )); |
| 687 | | } |
| 688 | | |
| 689 | | for( n = 0; n < 2; n++ ) |
| 690 | | { |
| 691 | | p_psx->sio[ n ].timer = machine.scheduler().timer_alloc( FUNC(sio_clock )); |
| 692 | | p_psx->sio[ n ].fn_handler = NULL; |
| 693 | | } |
| 694 | | |
| 695 | 104 | psx_dma_install_read_handler( machine, 2, psx_dma_read_delegate( FUNC( gpu_read ), state ) ); |
| 696 | 105 | psx_dma_install_write_handler( machine, 2, psx_dma_write_delegate( FUNC( gpu_write ), state ) ); |
| 697 | | |
| 698 | | state_save_register_global( machine, p_psx->n_irqdata ); |
| 699 | | state_save_register_global( machine, p_psx->n_irqmask ); |
| 700 | | for ( n = 0; n < 3; n++ ) |
| 701 | | { |
| 702 | | state_save_register_item( machine, "psxroot", NULL, n, p_psx->root[n].n_count ); |
| 703 | | state_save_register_item( machine, "psxroot", NULL, n, p_psx->root[n].n_mode ); |
| 704 | | state_save_register_item( machine, "psxroot", NULL, n, p_psx->root[n].n_target ); |
| 705 | | state_save_register_item( machine, "psxroot", NULL, n, p_psx->root[n].n_start ); |
| 706 | | } |
| 707 | | for( n = 0; n < 2; n++ ) |
| 708 | | { |
| 709 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_status ); |
| 710 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_mode ); |
| 711 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_control ); |
| 712 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_baud ); |
| 713 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_tx ); |
| 714 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_rx ); |
| 715 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_tx_prev ); |
| 716 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_rx_prev ); |
| 717 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_rx_data ); |
| 718 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_tx_data ); |
| 719 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_rx_shift ); |
| 720 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_tx_shift ); |
| 721 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_rx_bits ); |
| 722 | | state_save_register_item( machine, "psxsio", NULL, n, p_psx->sio[n].n_tx_bits ); |
| 723 | | } |
| 724 | | |
| 725 | | machine.save().register_postload( save_prepost_delegate(FUNC(psx_postload), p_psx )); |
| 726 | 106 | } |
src/mame/video/konicdev.c
| r11556 | r11557 | |
| 8981 | 8981 | } |
| 8982 | 8982 | |
| 8983 | 8983 | |
| 8984 | | /***************************************************************************/ |
| 8985 | | /* */ |
| 8986 | | /* 053252 */ |
| 8987 | | /* */ |
| 8988 | | /***************************************************************************/ |
| 8989 | 8984 | |
| 8990 | | /* |
| 8991 | 8985 | |
| 8992 | | left res = current in game, right res = computed |
| 8993 | 8986 | |
| 8994 | | hexion: 02 FF 00 4D 00 73 00 00 01 1F 05 0E B7 7C 00 00 512x256 ~ 512x256 <- writes to e and f regs, in an irq ack fashion |
| 8995 | | overdriv: 01 7F 00 22 00 0D 00 03 01 07 10 0F 73 00 00 00 304x256 ~ 305x224 |
| 8996 | | esckids: 01 7F 00 12 00 0D 00 01 01 07 08 07 73 00 00 00 304x224 ~ 321x240 |
| 8997 | | rollerg: 01 7F 00 23 00 1D 02 00 01 07 10 0F 73 00 02 00 288x224 ~ 288x224 <- writes to 6 and e regs, in an irq ack fashion |
| 8998 | | gaiapols: 01 FB 00 19 00 37 00 00 01 06 10 0E 75 00 D1 00 376x224 ~ 380x224 |
| 8999 | | mmaulers: 01 7F 00 19 00 27 00 00 01 07 10 0F 73 00 00 00 288x224 ~ 288x224 |
| 9000 | | mystwarr: 01 7F 00 12 00 2E 00 00 01 07 11 0E 73 00 00 00 288x224 ~ 288x224 |
| 9001 | | metamrph: 01 7F 00 11 00 27 01 00 01 07 10 0F 74 00 00 00 288x224 ~ 288x224 |
| 9002 | | viostorm: 01 FF 00 16 00 39 00 00 01 07 11 0E 75 00 00 00 384x224 ~ 385x224 |
| 9003 | | mtlchamp: 01 FF 00 21 00 37 00 00 01 07 11 0E 74 00 00 00 384x224 ~ 384x224 |
| 9004 | | dbz: 01 FF 00 21 00 37 00 00 01 20 0C 0E 54 00 00 00 384x256 ~ 384x256 |
| 9005 | | dbz2: 01 FF 00 21 00 37 00 00 01 20 0C 0E 54 00 00 00 384x256 ~ 384x256 |
| 9006 | | xexex: 01 FF 00 21 00 37 01 00 00 20 0C 0E 54 00 00 00 384x256 ~ 384x256 (*) |
| 9007 | | (all konamigx, cowboys of moo mesa, run & gun, dj main) |
| 9008 | 8987 | |
| 9009 | | (*) hblank duration 512 (0x200), hdisp 384 (0x180), vblank duration 288 (0x120), vdisp 256 (0x100) |
| 9010 | | |
| 9011 | | Definitions from GX, look similar, all values big-endian, write-only: |
| 9012 | | |
| 9013 | | 0-1: bits 9-0: HC - Total hblank duration (-1) Hres ~ (HC+1) - HFP - HBP - 8*(HSW+1) |
| 9014 | | 2-3: bits 8-0: HFP - HBlank front porch |
| 9015 | | 4-5: bits 8-0: HBP - HBlank back porch |
| 9016 | | 6 : bits 7-0: INT1EN |
| 9017 | | 7 : bits 7-0: INT2EN |
| 9018 | | 8-9: bits 8-0: VC - Total vblank duration |
| 9019 | | a : bits 7-0: VFP - VBlank front porch Vres ~ VC - VFP - VBP - (VSW+1) |
| 9020 | | b : bits 7-0: VBP - VBlank back porch |
| 9021 | | c : bits 7-4: VSW - V-Sync Width |
| 9022 | | c : bits 3-0: HSW - H-Sync Width |
| 9023 | | d : bits 7-0: INT-TIME |
| 9024 | | e : bits 7-0: INT1ACK |
| 9025 | | f : bits 7-0: INT2ACK |
| 9026 | | |
| 9027 | | Read-only: |
| 9028 | | e-f: bits 8-0: VCT |
| 9029 | | |
| 9030 | | TODO: |
| 9031 | | - xexex sets up 0x20 as the VC? |
| 9032 | | */ |
| 9033 | | |
| 9034 | | typedef struct _k053252_state k053252_state; |
| 9035 | | struct _k053252_state |
| 9036 | | { |
| 9037 | | UINT8 regs[16]; |
| 9038 | | UINT16 hc,hfp,hbp; |
| 9039 | | UINT16 vc,vfp,vbp; |
| 9040 | | UINT8 vsw,hsw; |
| 9041 | | }; |
| 9042 | | |
| 9043 | | /***************************************************************************** |
| 9044 | | INLINE FUNCTIONS |
| 9045 | | *****************************************************************************/ |
| 9046 | | |
| 9047 | | INLINE k053252_state *k053252_get_safe_token( device_t *device ) |
| 9048 | | { |
| 9049 | | assert(device != NULL); |
| 9050 | | assert(device->type() == K053252); |
| 9051 | | |
| 9052 | | return (k053252_state *)downcast<legacy_device_base *>(device)->token(); |
| 9053 | | } |
| 9054 | | |
| 9055 | | /***************************************************************************** |
| 9056 | | DEVICE HANDLERS |
| 9057 | | *****************************************************************************/ |
| 9058 | | |
| 9059 | | READ8_DEVICE_HANDLER( k053252_r ) |
| 9060 | | { |
| 9061 | | k053252_state *k053252 = k053252_get_safe_token(device); |
| 9062 | | return k053252->regs[offset]; |
| 9063 | | } |
| 9064 | | |
| 9065 | | WRITE8_DEVICE_HANDLER( k053252_w ) |
| 9066 | | { |
| 9067 | | k053252_state *k053252 = k053252_get_safe_token(device); |
| 9068 | | |
| 9069 | | k053252->regs[offset] = data; |
| 9070 | | |
| 9071 | | //printf("%04x %02x\n",offset,data); |
| 9072 | | |
| 9073 | | switch(offset) |
| 9074 | | { |
| 9075 | | case 0x00: |
| 9076 | | case 0x01: |
| 9077 | | k053252->hc = (k053252->regs[1]&0xff); |
| 9078 | | k053252->hc |= ((k053252->regs[0]&0x03)<<8); |
| 9079 | | k053252->hc ++; |
| 9080 | | logerror("%d (%04x) HC set\n",k053252->hc,k053252->hc); |
| 9081 | | break; |
| 9082 | | case 0x02: |
| 9083 | | case 0x03: |
| 9084 | | k053252->hfp = (k053252->regs[3]&0xff); |
| 9085 | | k053252->hfp |= ((k053252->regs[2]&0x01)<<8); |
| 9086 | | logerror("%d (%04x) HFP set\n",k053252->hfp,k053252->hfp); |
| 9087 | | break; |
| 9088 | | case 0x04: |
| 9089 | | case 0x05: |
| 9090 | | k053252->hbp = (k053252->regs[5]&0xff); |
| 9091 | | k053252->hbp |= ((k053252->regs[4]&0x01)<<8); |
| 9092 | | logerror("%d (%04x) HBP set\n",k053252->hbp,k053252->hbp); |
| 9093 | | break; |
| 9094 | | case 0x08: |
| 9095 | | case 0x09: |
| 9096 | | k053252->vc = (k053252->regs[9]&0xff); |
| 9097 | | k053252->vc |= ((k053252->regs[8]&0x01)<<8); |
| 9098 | | k053252->vc ++; |
| 9099 | | logerror("%d (%04x) VC set\n",k053252->vc,k053252->vc); |
| 9100 | | break; |
| 9101 | | case 0x0a: |
| 9102 | | k053252->vfp = (k053252->regs[0x0a]&0xff); |
| 9103 | | logerror("%d (%04x) VFP set\n",k053252->vfp,k053252->vfp); |
| 9104 | | break; |
| 9105 | | case 0x0b: |
| 9106 | | k053252->vbp = (k053252->regs[0x0b]&0xff); |
| 9107 | | logerror("%d (%04x) VBP set\n",k053252->vbp,k053252->vbp); |
| 9108 | | break; |
| 9109 | | case 0x0c: |
| 9110 | | k053252->vsw = ((k053252->regs[0x0c]&0xf0) >> 4) + 1; |
| 9111 | | k053252->hsw = ((k053252->regs[0x0c]&0x0f) >> 0) + 1; |
| 9112 | | logerror("%02x VSW / %02x HSW set\n",k053252->vsw,k053252->hsw); |
| 9113 | | break; |
| 9114 | | } |
| 9115 | | } |
| 9116 | | |
| 9117 | | |
| 9118 | | |
| 9119 | | /***************************************************************************** |
| 9120 | | DEVICE INTERFACE |
| 9121 | | *****************************************************************************/ |
| 9122 | | |
| 9123 | | static DEVICE_START( k053252 ) |
| 9124 | | { |
| 9125 | | k053252_state *k053252 = k053252_get_safe_token(device); |
| 9126 | | |
| 9127 | | device->save_item(NAME(k053252->regs)); |
| 9128 | | } |
| 9129 | | |
| 9130 | | static DEVICE_RESET( k053252 ) |
| 9131 | | { |
| 9132 | | k053252_state *k053252 = k053252_get_safe_token(device); |
| 9133 | | int i; |
| 9134 | | |
| 9135 | | for (i = 0; i < 16; i++) |
| 9136 | | k053252->regs[i] = 0; |
| 9137 | | } |
| 9138 | | |
| 9139 | | |
| 9140 | 8988 | // Newer Konami devices |
| 9141 | 8989 | |
| 9142 | 8990 | // from video/gticlub.c |
| r11556 | r11557 | |
| 11347 | 11195 | } |
| 11348 | 11196 | } |
| 11349 | 11197 | |
| 11350 | | DEVICE_GET_INFO( k053252 ) |
| 11351 | | { |
| 11352 | | switch (state) |
| 11353 | | { |
| 11354 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 11355 | | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(k053252_state); break; |
| 11356 | 11198 | |
| 11357 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 11358 | | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(k053252); break; |
| 11359 | | case DEVINFO_FCT_STOP: /* Nothing */ break; |
| 11360 | | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(k053252); break; |
| 11361 | | |
| 11362 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 11363 | | case DEVINFO_STR_NAME: strcpy(info->s, "Konami 053252"); break; |
| 11364 | | case DEVINFO_STR_FAMILY: strcpy(info->s, "Konami Video IC"); break; |
| 11365 | | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 11366 | | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 11367 | | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright MAME Team"); break; |
| 11368 | | } |
| 11369 | | } |
| 11370 | | |
| 11371 | 11199 | DEVICE_GET_INFO( k001006 ) |
| 11372 | 11200 | { |
| 11373 | 11201 | switch (state) |
| r11556 | r11557 | |
| 11473 | 11301 | DEFINE_LEGACY_DEVICE(K055555, k055555); |
| 11474 | 11302 | DEFINE_LEGACY_DEVICE(K054338, k054338); |
| 11475 | 11303 | DEFINE_LEGACY_DEVICE(K053250, k053250); |
| 11476 | | DEFINE_LEGACY_DEVICE(K053252, k053252); |
| 11477 | 11304 | DEFINE_LEGACY_DEVICE(K001006, k001006); |
| 11478 | 11305 | DEFINE_LEGACY_DEVICE(K001005, k001005); |
| 11479 | 11306 | DEFINE_LEGACY_DEVICE(K001604, k001604); |
src/mame/drivers/namcos12.c
| r11556 | r11557 | |
| 38 | 38 | Paca Paca Passion Special (PSP1/VER.A) (C) Produce/Namco,1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M5F2 KC052 |
| 39 | 39 | Paca Paca Passion 2 (PKS1/VER.A) (C) Produce/Namco,1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC046 |
| 40 | 40 | Point Blank 2 (GNB5/VER.A) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F0 KC042 |
| 41 | Gunbarl (GNB4/VER.A) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F0 KC042 |
| 41 | 42 | Soul Calibur (SOC11/VER.A2) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC020 |
| 42 | 43 | Soul Calibur (SOC11/VER.B) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC020 |
| 43 | 44 | Soul Calibur (SOC11/VER.C) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC020 |
| r11556 | r11557 | |
| 362 | 363 | (i.e no FlashROMs) (note these ROMs contains the same data as) |
| 363 | 364 | (the ones used on System 11 Point Blank 2) |
| 364 | 365 | |
| 366 | Gunbarl GNB4/VER.A Same PCB but sticker says.... KC042 GNB1 WAVEB.IC2 |
| 367 | 'SYSTEM 12 M4F0 PCB 8661962000' GNB1 PRG0U.IC11, GNB1 PRG0L.IC12 |
| 368 | (i.e no FlashROMs) (note these ROMs contains the same data as) |
| 369 | (the ones used on System 11 Point Blank 2) |
| 370 | |
| 365 | 371 | Super World SS81/VER.A SYSTEM 12 M4F6 PCB 8661960901 (8661970901) KC025 SS81 WAVE0, SS81 WAVE1 |
| 366 | 372 | Stadium '98 SS81 FL1U, SS81 FL1L, SS81 FL2U |
| 367 | 373 | SS81 FL2L, SS81 FL3U, SS81 FL3L |
| r11556 | r11557 | |
| 1384 | 1390 | strcmp( machine.system().name, "tenkomor" ) == 0 || |
| 1385 | 1391 | strcmp( machine.system().name, "tenkomorja" ) == 0 || |
| 1386 | 1392 | strcmp( machine.system().name, "ptblank2" ) == 0 || |
| 1393 | strcmp( machine.system().name, "gunbarl" ) == 0 || |
| 1387 | 1394 | strcmp( machine.system().name, "sws2000" ) == 0 || |
| 1388 | 1395 | strcmp( machine.system().name, "sws2001" ) == 0 || |
| 1389 | 1396 | strcmp( machine.system().name, "truckk" ) == 0 || |
| r11556 | r11557 | |
| 2123 | 2130 | ROM_LOAD16_WORD_SWAP( "gnb5vera.11s", 0x000000, 0x080000, CRC(d45a53eb) SHA1(01eb4f659b29671d417c5d3684f15a5876f76009) ) |
| 2124 | 2131 | |
| 2125 | 2132 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 2126 | | ROM_LOAD( "gnb1wave.ic2", 0x0000000, 0x400000, CRC(4e19d9d6) SHA1(0a92c987536999a789663a30c787950ab6995128) ) |
| 2133 | ROM_LOAD( "gnb1waveb.ic2", 0x0000000, 0x400000, CRC(4e19d9d6) SHA1(0a92c987536999a789663a30c787950ab6995128) ) |
| 2127 | 2134 | ROM_RELOAD( 0x800000, 0x400000 ) |
| 2128 | 2135 | ROM_END |
| 2129 | 2136 | |
| 2137 | ROM_START( gunbarl ) |
| 2138 | ROM_REGION32_LE( 0x00400000, "user1", 0 ) /* main prg */ |
| 2139 | ROM_LOAD16_BYTE( "gnb4vera.2l", 0x0000000, 0x200000, CRC(88c05cde) SHA1(80d210b06c8eda19e37430fb34492885d9eec671) ) |
| 2140 | ROM_LOAD16_BYTE( "gnb4vera.2p", 0x0000001, 0x200000, CRC(7d57437a) SHA1(b4fc960b11e7dc9d3bde567f534635f264276e53) ) |
| 2141 | |
| 2142 | ROM_REGION32_LE( 0x1000000, "user2", 0 ) /* main data */ |
| 2143 | ROM_LOAD16_BYTE( "gnb1prg0l.ic12", 0x000000, 0x800000, CRC(78746037) SHA1(d130ca1153a730e3c967945248f00662f9fab304) ) |
| 2144 | ROM_LOAD16_BYTE( "gnb1prg0u.ic11", 0x000001, 0x800000, CRC(697d3279) SHA1(40302780f7494d9413888b2d1da38bd14a9a444f) ) |
| 2145 | |
| 2146 | ROM_REGION( 0x0080000, "sub", 0 ) /* sound prg */ |
| 2147 | ROM_LOAD16_WORD_SWAP( "gnb5vera.11s", 0x000000, 0x080000, CRC(d45a53eb) SHA1(01eb4f659b29671d417c5d3684f15a5876f76009) ) |
| 2148 | |
| 2149 | ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ |
| 2150 | ROM_LOAD( "gnb1waveb.ic2", 0x0000000, 0x400000, CRC(4e19d9d6) SHA1(0a92c987536999a789663a30c787950ab6995128) ) |
| 2151 | ROM_RELOAD( 0x800000, 0x400000 ) |
| 2152 | ROM_END |
| 2153 | |
| 2130 | 2154 | ROM_START( soulclbr ) |
| 2131 | 2155 | ROM_REGION32_LE( 0x00400000, "user1", 0 ) /* main prg */ |
| 2132 | 2156 | ROM_LOAD16_BYTE( "soc14verc.2e", 0x0000000, 0x200000, CRC(c40e9614) SHA1(dc20469f0d657423e472fdf5897852ab9fb8bb73) ) |
| r11556 | r11557 | |
| 2709 | 2733 | GAME( 1998, fgtlayer, 0, coh700, namcos12, namcos12, ROT0, "Arika / Namco", "Fighting Layer (Japan, FTL1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC037 */ |
| 2710 | 2734 | GAME( 1999, pacapp, 0, coh700, namcos12, namcos12, ROT0, "Produce / Namco", "Paca Paca Passion (Japan, PPP1/VER.A2)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC038 */ |
| 2711 | 2735 | GAME( 1999, ptblank2, 0, coh700, ptblank2, ptblank2, ROT0, "Namco", "Point Blank 2 (GNB5/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC042 */ |
| 2736 | GAME( 1999, gunbarl, ptblank2, coh700, ptblank2, ptblank2, ROT0, "Namco", "Gunbarl (Japan, GNB4/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC042 */ |
| 2712 | 2737 | GAME( 1999, sws99, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Super World Stadium '99 (Japan, SS91/VER.A3)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC043 */ |
| 2713 | 2738 | GAME( 1999, tektagt, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken Tag Tournament (US, TEG3/VER.C1)", GAME_IMPERFECT_SOUND ) /* KC044 */ |
| 2714 | 2739 | GAME( 1999, tektagtac, tektagt, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken Tag Tournament (Asia, TEG2/VER.C1)", GAME_IMPERFECT_SOUND ) /* KC044 */ |
src/mame/drivers/midwunit.c
| r11556 | r11557 | |
| 132 | 132 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 133 | 133 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 134 | 134 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 135 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 136 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 137 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 135 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 High Punch") PORT_PLAYER(1) |
| 136 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Block") PORT_PLAYER(1) |
| 137 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 High Kick") PORT_PLAYER(1) |
| 138 | 138 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 139 | 139 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 140 | 140 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 141 | 141 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 142 | 142 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 143 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 144 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 145 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 143 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 High Punch") PORT_PLAYER(2) |
| 144 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Block") PORT_PLAYER(2) |
| 145 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 High Kick") PORT_PLAYER(2) |
| 146 | 146 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 147 | 147 | |
| 148 | 148 | PORT_START("IN1") |
| 149 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 150 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 151 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 149 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1) |
| 150 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1) |
| 151 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Run") PORT_PLAYER(1) |
| 152 | 152 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 153 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 154 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 155 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 153 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Low Punch") PORT_PLAYER(2) |
| 154 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Low Kick") PORT_PLAYER(2) |
| 155 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Run") PORT_PLAYER(2) |
| 156 | 156 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 157 | 157 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 158 | 158 | |
| r11556 | r11557 | |
| 231 | 231 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 232 | 232 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 233 | 233 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 234 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 235 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 236 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 234 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Shoot / Block") PORT_PLAYER(1) |
| 235 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Pass / Steal") PORT_PLAYER(1) |
| 236 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Turbo") PORT_PLAYER(1) |
| 237 | 237 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 238 | 238 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 239 | 239 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 240 | 240 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 241 | 241 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 242 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 243 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 244 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 242 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Shoot / Block") PORT_PLAYER(2) |
| 243 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Pass / Steal") PORT_PLAYER(2) |
| 244 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Turbo") PORT_PLAYER(2) |
| 245 | 245 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 246 | 246 | |
| 247 | 247 | PORT_START("IN1") |
| r11556 | r11557 | |
| 249 | 249 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| 250 | 250 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) |
| 251 | 251 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) |
| 252 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| 253 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) |
| 254 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) |
| 252 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Shoot / Block") PORT_PLAYER(3) |
| 253 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Pass / Steal") PORT_PLAYER(3) |
| 254 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Turbo") PORT_PLAYER(3) |
| 255 | 255 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 256 | 256 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) |
| 257 | 257 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) |
| 258 | 258 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) |
| 259 | 259 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) |
| 260 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) |
| 261 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) |
| 262 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) |
| 260 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Shoot / Block") PORT_PLAYER(4) |
| 261 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P4 Pass / Steal")PORT_PLAYER(4) |
| 262 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Turbo")PORT_PLAYER(4) |
| 263 | 263 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 264 | 264 | |
| 265 | 265 | PORT_START("DSW") |
| r11556 | r11557 | |
| 340 | 340 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 341 | 341 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 342 | 342 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 343 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 344 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 345 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 343 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Shoot / Block") PORT_PLAYER(1) |
| 344 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Pass / Steal") PORT_PLAYER(1) |
| 345 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Turbo") PORT_PLAYER(1) |
| 346 | 346 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 347 | 347 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 348 | 348 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 349 | 349 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 350 | 350 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 351 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 352 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 353 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 351 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Shoot / Block") PORT_PLAYER(2) |
| 352 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Pass / Steal") PORT_PLAYER(2) |
| 353 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Turbo") PORT_PLAYER(2) |
| 354 | 354 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 355 | 355 | |
| 356 | 356 | PORT_START("IN1") |
| r11556 | r11557 | |
| 358 | 358 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| 359 | 359 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) |
| 360 | 360 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) |
| 361 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| 362 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) |
| 363 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) |
| 361 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Shoot / Block") PORT_PLAYER(3) |
| 362 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Pass / Steal") PORT_PLAYER(3) |
| 363 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Turbo") PORT_PLAYER(3) |
| 364 | 364 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 365 | 365 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) |
| 366 | 366 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) |
| 367 | 367 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) |
| 368 | 368 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) |
| 369 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4) |
| 370 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4) |
| 371 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) |
| 369 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Shoot / Block") PORT_PLAYER(4) |
| 370 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P4 Pass / Steal") PORT_PLAYER(4) |
| 371 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Turbo") PORT_PLAYER(4) |
| 372 | 372 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 373 | 373 | |
| 374 | 374 | PORT_START("DSW") |
| r11556 | r11557 | |
| 433 | 433 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 434 | 434 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 435 | 435 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 436 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 437 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 438 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 436 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Punch") PORT_PLAYER(1) |
| 437 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Kick") PORT_PLAYER(1) |
| 438 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Jump") PORT_PLAYER(1) |
| 439 | 439 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 440 | 440 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 441 | 441 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 442 | 442 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 443 | 443 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 444 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 445 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 446 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 444 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Punch") PORT_PLAYER(2) |
| 445 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Kick") PORT_PLAYER(2) |
| 446 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Jump") PORT_PLAYER(2) |
| 447 | 447 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 448 | 448 | |
| 449 | 449 | PORT_START("IN1") |
| r11556 | r11557 | |
| 451 | 451 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| 452 | 452 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) |
| 453 | 453 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) |
| 454 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| 455 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) |
| 456 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) |
| 454 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Punch") PORT_PLAYER(3) |
| 455 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Kick") PORT_PLAYER(3) |
| 456 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Jump") PORT_PLAYER(3) |
| 457 | 457 | PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 458 | 458 | |
| 459 | 459 | PORT_START("DSW") |
| r11556 | r11557 | |
| 526 | 526 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 527 | 527 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 528 | 528 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 529 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 530 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 531 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 529 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Punch") PORT_PLAYER(1) |
| 530 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Defense") PORT_PLAYER(1) |
| 531 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Power Punch") PORT_PLAYER(1) |
| 532 | 532 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 533 | 533 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 534 | 534 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 535 | 535 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 536 | 536 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 537 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 538 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 539 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 537 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Punch") PORT_PLAYER(2) |
| 538 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Defense") PORT_PLAYER(2) |
| 539 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Power Punch") PORT_PLAYER(2) |
| 540 | 540 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 541 | 541 | |
| 542 | 542 | PORT_START("IN1") |
| 543 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 544 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 543 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Kick") PORT_PLAYER(1) |
| 544 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Power Kick") PORT_PLAYER(1) |
| 545 | 545 | PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 546 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 547 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 546 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Kick") PORT_PLAYER(2) |
| 547 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Power Kick") PORT_PLAYER(2) |
| 548 | 548 | PORT_BIT( 0x00c0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 549 | 549 | PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 550 | 550 | |
src/mame/drivers/midyunit.c
| r11556 | r11557 | |
| 213 | 213 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 214 | 214 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 215 | 215 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 216 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 217 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 218 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 219 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 216 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Crouch") PORT_PLAYER(1) |
| 217 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Fire") PORT_PLAYER(1) |
| 218 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Jump") PORT_PLAYER(1) |
| 219 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Rocket Bomb") PORT_PLAYER(1) |
| 220 | 220 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 221 | 221 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 222 | 222 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 223 | 223 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 224 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 225 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 226 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 227 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 224 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Crouch") PORT_PLAYER(2) |
| 225 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Fire") PORT_PLAYER(2) |
| 226 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Jump") PORT_PLAYER(2) |
| 227 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Rocket Bomb") PORT_PLAYER(2) |
| 228 | 228 | |
| 229 | 229 | PORT_START("IN1") |
| 230 | 230 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r11556 | r11557 | |
| 273 | 273 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 274 | 274 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 275 | 275 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 276 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 276 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Punch") PORT_PLAYER(1) |
| 277 | 277 | PORT_BIT( 0x00e0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 278 | 278 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 279 | 279 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 280 | 280 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 281 | 281 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 282 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 282 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Punch") PORT_PLAYER(2) |
| 283 | 283 | PORT_BIT( 0xe000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 284 | 284 | |
| 285 | 285 | PORT_START("IN1") |
| r11556 | r11557 | |
| 298 | 298 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| 299 | 299 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3) |
| 300 | 300 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) |
| 301 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) |
| 301 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Punch") PORT_PLAYER(3) |
| 302 | 302 | |
| 303 | 303 | PORT_START("IN2") |
| 304 | 304 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4) |
| 305 | 305 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4) |
| 306 | 306 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4) |
| 307 | 307 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4) |
| 308 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) |
| 308 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Punch") PORT_PLAYER(4) |
| 309 | 309 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 310 | 310 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 311 | 311 | |
| r11556 | r11557 | |
| 365 | 365 | |
| 366 | 366 | static INPUT_PORTS_START( smashtv ) |
| 367 | 367 | PORT_START("IN0") |
| 368 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(1) |
| 369 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(1) |
| 370 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(1) |
| 371 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(1) |
| 372 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(1) |
| 373 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(1) |
| 374 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(1) |
| 375 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(1) |
| 376 | | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(2) |
| 377 | | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(2) |
| 378 | | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(2) |
| 379 | | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(2) |
| 380 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(2) |
| 381 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(2) |
| 382 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(2) |
| 383 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(2) |
| 368 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("P1 Move Up") PORT_PLAYER(1) |
| 369 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("P1 Move Down") PORT_PLAYER(1) |
| 370 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("P1 Move Left") PORT_PLAYER(1) |
| 371 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("P1 Move Right") PORT_PLAYER(1) |
| 372 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("P1 Fire Up") PORT_PLAYER(1) |
| 373 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("P1 Fire Down") PORT_PLAYER(1) |
| 374 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("P1 Fire Left")PORT_PLAYER(1) |
| 375 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("P1 Fire Right") PORT_PLAYER(1) |
| 376 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("P2 Move Up") PORT_PLAYER(2) |
| 377 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("P2 Move Down") PORT_PLAYER(2) |
| 378 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("P2 Move Left") PORT_PLAYER(2) |
| 379 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("P2 Move Right") PORT_PLAYER(2) |
| 380 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("P2 Fire Up") PORT_PLAYER(2) |
| 381 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("P2 Fire Down") PORT_PLAYER(2) |
| 382 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("P2 Fire Left") PORT_PLAYER(2) |
| 383 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("P2 Fire Right") PORT_PLAYER(2) |
| 384 | 384 | |
| 385 | |
| 385 | 386 | PORT_START("IN1") |
| 386 | 387 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 387 | 388 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| r11556 | r11557 | |
| 465 | 466 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 466 | 467 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 467 | 468 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 468 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 469 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 470 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 469 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Fire") PORT_PLAYER(1) |
| 470 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Weapon") PORT_PLAYER(1) |
| 471 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Weapon Select") PORT_PLAYER(1) |
| 471 | 472 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 472 | 473 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 473 | 474 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 474 | 475 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 475 | 476 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 476 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 477 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 478 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 477 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Fire") PORT_PLAYER(2) |
| 478 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Weapon") PORT_PLAYER(2) |
| 479 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Weapon Select") PORT_PLAYER(2) |
| 479 | 480 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 480 | 481 | |
| 481 | 482 | PORT_START("IN1") |
| 482 | 483 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 483 | 484 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 484 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 485 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Start / Transform") |
| 485 | 486 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 486 | 487 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW ) |
| 487 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 488 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("P2 Start / Transform") |
| 488 | 489 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 489 | 490 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 490 | 491 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r11556 | r11557 | |
| 562 | 563 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 563 | 564 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 564 | 565 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 565 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 566 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 567 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 566 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 High Punch") PORT_PLAYER(1) |
| 567 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Block") PORT_PLAYER(1) |
| 568 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 High Kick") PORT_PLAYER(1) |
| 568 | 569 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 569 | 570 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 570 | 571 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 571 | 572 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 572 | 573 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 573 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 574 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 575 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 574 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 High Punch") PORT_PLAYER(2) |
| 575 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Block") PORT_PLAYER(2) |
| 576 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 High Kick") PORT_PLAYER(2) |
| 576 | 577 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 577 | 578 | |
| 578 | 579 | PORT_START("IN1") |
| r11556 | r11557 | |
| 585 | 586 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 586 | 587 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| 587 | 588 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 588 | | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 589 | | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 590 | | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 591 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 592 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 589 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Low Punch") PORT_PLAYER(2) |
| 590 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Low Kick") PORT_PLAYER(2) |
| 591 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Block 2") PORT_PLAYER(2) |
| 592 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1) |
| 593 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1) |
| 593 | 594 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(adpcm_irq_state_r, NULL) |
| 594 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 595 | | //There should be an additional block button for player 2, but I coudn't find it. |
| 595 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Block 2") PORT_PLAYER(1) |
| 596 | 596 | |
| 597 | 597 | PORT_START("IN2") |
| 598 | 598 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r11556 | r11557 | |
| 655 | 655 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) |
| 656 | 656 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) |
| 657 | 657 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |
| 658 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 659 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 660 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 658 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 High Punch") PORT_PLAYER(1) |
| 659 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Block") PORT_PLAYER(1) |
| 660 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 High Kick") PORT_PLAYER(1) |
| 661 | 661 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 662 | 662 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| 663 | 663 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) |
| 664 | 664 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 665 | 665 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 666 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 667 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 668 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 666 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 High Punch") PORT_PLAYER(2) |
| 667 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Block") PORT_PLAYER(2) |
| 668 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 High Kick") PORT_PLAYER(2) |
| 669 | 669 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 670 | 670 | |
| 671 | 671 | PORT_START("IN1") |
| r11556 | r11557 | |
| 678 | 678 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 679 | 679 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| 680 | 680 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 681 | | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 682 | | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 683 | | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 684 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 685 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 681 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Low Punch") PORT_PLAYER(2) |
| 682 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Low Kick") PORT_PLAYER(2) |
| 683 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Block 2") PORT_PLAYER(2) |
| 684 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1) |
| 685 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1) |
| 686 | 686 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(adpcm_irq_state_r, NULL) |
| 687 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 688 | | //There should be an additional block button for player 2, but I coudn't find it. |
| 687 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Block 2") PORT_PLAYER(1) |
| 689 | 688 | |
| 690 | 689 | PORT_START("IN2") |
| 691 | 690 | PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r11556 | r11557 | |
| 748 | 747 | static INPUT_PORTS_START( term2 ) |
| 749 | 748 | PORT_START("IN0") |
| 750 | 749 | PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 751 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 752 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 750 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Trigger") PORT_PLAYER(1) |
| 751 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Bomb") PORT_PLAYER(1) |
| 753 | 752 | PORT_BIT( 0x00c0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 754 | 753 | PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 755 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 756 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 754 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Trigger") PORT_PLAYER(2) |
| 755 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Bomb") PORT_PLAYER(2) |
| 757 | 756 | PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 758 | 757 | |
| 759 | 758 | PORT_START("IN1") |
| r11556 | r11557 | |
| 846 | 845 | |
| 847 | 846 | static INPUT_PORTS_START( totcarn ) |
| 848 | 847 | PORT_START("IN0") |
| 849 | | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(1) |
| 850 | | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(1) |
| 851 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(1) |
| 852 | | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(1) |
| 853 | | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(1) |
| 854 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(1) |
| 855 | | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(1) |
| 856 | | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(1) |
| 857 | | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(2) |
| 858 | | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(2) |
| 859 | | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(2) |
| 860 | | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(2) |
| 861 | | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(2) |
| 862 | | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(2) |
| 863 | | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(2) |
| 864 | | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(2) |
| 848 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("P1 Move Up") PORT_PLAYER(1) |
| 849 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("P1 Move Down") PORT_PLAYER(1) |
| 850 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("P1 Move Left") PORT_PLAYER(1) |
| 851 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("P1 Move Right") PORT_PLAYER(1) |
| 852 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("P1 Fire Up") PORT_PLAYER(1) |
| 853 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("P1 Fire Down") PORT_PLAYER(1) |
| 854 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("P1 Fire Left") PORT_PLAYER(1) |
| 855 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("P1 Fire Right") PORT_PLAYER(1) |
| 856 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_NAME("P2 Move Up") PORT_PLAYER(2) |
| 857 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_NAME("P2 Move Down") PORT_PLAYER(2) |
| 858 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_NAME("P2 Move Left") PORT_PLAYER(2) |
| 859 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_NAME("P2 Move Right") PORT_PLAYER(2) |
| 860 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_NAME("P2 Fire Up") PORT_PLAYER(2) |
| 861 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_NAME("P2 Fire Down") PORT_PLAYER(2) |
| 862 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_NAME("P2 Fire Left") PORT_PLAYER(2) |
| 863 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_NAME("P2 Fire Right") PORT_PLAYER(2) |
| 865 | 864 | |
| 866 | 865 | PORT_START("IN1") |
| 867 | 866 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 868 | 867 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 869 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 868 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Start / Bomb") |
| 870 | 869 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_TILT ) /* Slam Switch */ |
| 871 | 870 | PORT_SERVICE( 0x0010, IP_ACTIVE_LOW ) |
| 872 | | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) |
| 871 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("P2 Start / Bomb") |
| 873 | 872 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 874 | 873 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BILL1 ) |
| 875 | 874 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) /* video freeze */ |
src/mame/drivers/cps3.c
| r11556 | r11557 | |
| 2239 | 2239 | AM_RANGE(0xc0000000, 0xc00003ff) AM_RAM_WRITE( cps3_0xc0000000_ram_w ) AM_BASE_MEMBER(cps3_state, m_0xc0000000_ram) /* Executes code from here */ |
| 2240 | 2240 | ADDRESS_MAP_END |
| 2241 | 2241 | |
| 2242 | | |
| 2243 | | |
| 2244 | | |
| 2245 | 2242 | static INPUT_PORTS_START( cps3 ) |
| 2246 | 2243 | PORT_START("INPUTS") |
| 2247 | 2244 | PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 2248 | 2245 | PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 2249 | 2246 | PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 2250 | 2247 | PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 2251 | | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 2252 | | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 2253 | | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) |
| 2248 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Jab Punch") PORT_PLAYER(1) |
| 2249 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Strong Punch") PORT_PLAYER(1) |
| 2250 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Fierce Punch") PORT_PLAYER(1) |
| 2254 | 2251 | PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED ) // nothing here? |
| 2255 | 2252 | PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 2256 | 2253 | PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 2257 | 2254 | PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 2258 | 2255 | PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 2259 | | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 2260 | | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 2261 | | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 2256 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Jab Punch") PORT_PLAYER(2) |
| 2257 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Strong Punch") PORT_PLAYER(2) |
| 2258 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Fierce Punch") PORT_PLAYER(2) |
| 2262 | 2259 | PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED ) // nothing here? |
| 2263 | 2260 | PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_SERVICE1 ) |
| 2264 | 2261 | PORT_SERVICE_NO_TOGGLE( 0x00020000, IP_ACTIVE_LOW ) |
| 2265 | 2262 | PORT_BIT( 0x00fc0000, IP_ACTIVE_LOW, IPT_UNUSED ) // nothing here? |
| 2266 | 2263 | PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 2267 | 2264 | PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 2268 | | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 2265 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Roundhouse Kick") PORT_PLAYER(2) |
| 2269 | 2266 | PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_UNUSED ) // nothing here? |
| 2270 | 2267 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_START1 ) |
| 2271 | 2268 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_START2 ) |
| r11556 | r11557 | |
| 2273 | 2270 | |
| 2274 | 2271 | PORT_START("EXTRA") |
| 2275 | 2272 | PORT_BIT( 0x0001ffff, IP_ACTIVE_LOW, IPT_UNUSED ) // nothing here? |
| 2276 | | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) |
| 2277 | | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) |
| 2278 | | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) |
| 2279 | | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 2280 | | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 2273 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Roundhouse Kick") PORT_PLAYER(1) |
| 2274 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Forward Kick") PORT_PLAYER(1) |
| 2275 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Short Kick") PORT_PLAYER(1) |
| 2276 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Short Kick") PORT_PLAYER(2) |
| 2277 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Forward Kick") PORT_PLAYER(2) |
| 2281 | 2278 | PORT_BIT( 0xffc00000, IP_ACTIVE_LOW, IPT_UNUSED ) // nothing here? |
| 2282 | 2279 | INPUT_PORTS_END |
| 2283 | 2280 | |
| 2281 | /* Red Earth game inputs */ |
| 2282 | static INPUT_PORTS_START ( cps3_re ) |
| 2283 | PORT_INCLUDE ( cps3 ) |
| 2284 | |
| 2285 | PORT_MODIFY("INPUTS") |
| 2286 | PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Start / Change Orb") |
| 2287 | PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("P2 Start / Change Orb") |
| 2288 | INPUT_PORTS_END |
| 2289 | |
| 2290 | /* Jojo game inputs */ |
| 2291 | static INPUT_PORTS_START( cps3_jojo) |
| 2292 | PORT_INCLUDE( cps3 ) |
| 2293 | |
| 2294 | PORT_MODIFY("INPUTS") |
| 2295 | PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Light") PORT_PLAYER(1) |
| 2296 | PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Medium") PORT_PLAYER(1) |
| 2297 | PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Strong") PORT_PLAYER(1) |
| 2298 | PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Light") PORT_PLAYER(2) |
| 2299 | PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Medium") PORT_PLAYER(2) |
| 2300 | PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Strong") PORT_PLAYER(2) |
| 2301 | PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(2) |
| 2302 | |
| 2303 | PORT_MODIFY("EXTRA") |
| 2304 | PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(1) |
| 2305 | PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(1) |
| 2306 | PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Stand") PORT_PLAYER(1) |
| 2307 | PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Stand") PORT_PLAYER(2) |
| 2308 | PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_PLAYER(2) |
| 2309 | INPUT_PORTS_END |
| 2310 | |
| 2284 | 2311 | static INTERRUPT_GEN(cps3_vbl_interrupt) |
| 2285 | 2312 | { |
| 2286 | 2313 | device_set_input_line(device,12, ASSERT_LINE); |
| r11556 | r11557 | |
| 3279 | 3306 | |
| 3280 | 3307 | /* todo: use BIOS for the bios roms, having clones only for CD / NO CD */ |
| 3281 | 3308 | |
| 3282 | | GAME( 1996, redearth, 0, redearth, cps3, redearth, ROT0, "Capcom", "Red Earth (Euro 961121)", GAME_IMPERFECT_GRAPHICS ) |
| 3283 | | GAME( 1996, redeartha,redearth, redearth, cps3, redearth, ROT0, "Capcom", "Red Earth (Euro 961023)", GAME_IMPERFECT_GRAPHICS ) |
| 3284 | | GAME( 1996, warzard, redearth, redearth, cps3, redearth, ROT0, "Capcom", "Warzard (Japan 961121)", GAME_IMPERFECT_GRAPHICS ) |
| 3285 | | GAME( 1996, warzarda, redearth, redearth, cps3, redearth, ROT0, "Capcom", "Warzard (Japan 961023)", GAME_IMPERFECT_GRAPHICS ) |
| 3286 | | GAME( 1997, sfiii, 0, sfiii, cps3, sfiii, ROT0, "Capcom", "Street Fighter III: New Generation (USA 970204)", GAME_IMPERFECT_GRAPHICS ) |
| 3287 | | GAME( 1997, sfiiij, sfiii, sfiii, cps3, sfiii, ROT0, "Capcom", "Street Fighter III: New Generation (Japan 970204)", GAME_IMPERFECT_GRAPHICS ) |
| 3288 | | GAME( 1997, sfiiih, sfiii, sfiii, cps3, sfiii, ROT0, "Capcom", "Street Fighter III: New Generation (Hispanic 970204)", GAME_IMPERFECT_GRAPHICS ) |
| 3289 | | GAME( 1997, sfiii2, 0, sfiii2, cps3, sfiii2, ROT0, "Capcom", "Street Fighter III 2nd Impact: Giant Attack (USA 970930)", GAME_IMPERFECT_GRAPHICS ) |
| 3290 | | GAME( 1997, sfiii2j, sfiii2, sfiii2, cps3, sfiii2, ROT0, "Capcom", "Street Fighter III 2nd Impact: Giant Attack (Japan 970930)", GAME_IMPERFECT_GRAPHICS ) |
| 3291 | | GAME( 1998, jojo, 0, jojo, cps3, jojo, ROT0, "Capcom", "JoJo's Venture (USA 990108)", GAME_IMPERFECT_GRAPHICS ) |
| 3292 | | GAME( 1998, jojoa, jojo, jojo, cps3, jojo, ROT0, "Capcom", "JoJo's Venture (USA 981202)", GAME_IMPERFECT_GRAPHICS ) |
| 3293 | | GAME( 1998, jojoj, jojo, jojo, cps3, jojo, ROT0, "Capcom", "JoJo no Kimyouna Bouken (Japan 990108)", GAME_IMPERFECT_GRAPHICS ) |
| 3294 | | GAME( 1998, jojoaj, jojo, jojo, cps3, jojo, ROT0, "Capcom", "JoJo no Kimyouna Bouken (Japan 981202)", GAME_IMPERFECT_GRAPHICS ) |
| 3295 | | GAME( 1999, sfiii3, 0, sfiii3, cps3, sfiii3, ROT0, "Capcom", "Street Fighter III 3rd Strike: Fight for the Future (USA 990608)", GAME_IMPERFECT_GRAPHICS ) |
| 3296 | | GAME( 1999, sfiii3a, sfiii3, sfiii3, cps3, sfiii3, ROT0, "Capcom", "Street Fighter III 3rd Strike: Fight for the Future (USA 990512)", GAME_IMPERFECT_GRAPHICS ) |
| 3297 | | GAME( 1999, jojoba, 0, jojoba, cps3, jojoba, ROT0, "Capcom", "JoJo no Kimyouna Bouken: Miraie no Isan (Japan 990913)", GAME_IMPERFECT_GRAPHICS ) |
| 3309 | GAME( 1996, redearth, 0, redearth, cps3_re, redearth, ROT0, "Capcom", "Red Earth (Euro 961121)", GAME_IMPERFECT_GRAPHICS ) |
| 3310 | GAME( 1996, redeartha,redearth, redearth, cps3_re, redearth, ROT0, "Capcom", "Red Earth (Euro 961023)", GAME_IMPERFECT_GRAPHICS ) |
| 3311 | GAME( 1996, warzard, redearth, redearth, cps3_re, redearth, ROT0, "Capcom", "Warzard (Japan 961121)", GAME_IMPERFECT_GRAPHICS ) |
| 3312 | GAME( 1996, warzarda, redearth, redearth, cps3_re, redearth, ROT0, "Capcom", "Warzard (Japan 961023)", GAME_IMPERFECT_GRAPHICS ) |
| 3313 | GAME( 1997, sfiii, 0, sfiii, cps3, sfiii, ROT0, "Capcom", "Street Fighter III: New Generation (USA 970204)", GAME_IMPERFECT_GRAPHICS ) |
| 3314 | GAME( 1997, sfiiij, sfiii, sfiii, cps3, sfiii, ROT0, "Capcom", "Street Fighter III: New Generation (Japan 970204)", GAME_IMPERFECT_GRAPHICS ) |
| 3315 | GAME( 1997, sfiiih, sfiii, sfiii, cps3, sfiii, ROT0, "Capcom", "Street Fighter III: New Generation (Hispanic 970204)", GAME_IMPERFECT_GRAPHICS ) |
| 3316 | GAME( 1997, sfiii2, 0, sfiii2, cps3, sfiii2, ROT0, "Capcom", "Street Fighter III 2nd Impact: Giant Attack (USA 970930)", GAME_IMPERFECT_GRAPHICS ) |
| 3317 | GAME( 1997, sfiii2j, sfiii2, sfiii2, cps3, sfiii2, ROT0, "Capcom", "Street Fighter III 2nd Impact: Giant Attack (Japan 970930)", GAME_IMPERFECT_GRAPHICS ) |
| 3318 | GAME( 1998, jojo, 0, jojo, cps3_jojo, jojo, ROT0, "Capcom", "JoJo's Venture (USA 990108)", GAME_IMPERFECT_GRAPHICS ) |
| 3319 | GAME( 1998, jojoa, jojo, jojo, cps3_jojo, jojo, ROT0, "Capcom", "JoJo's Venture (USA 981202)", GAME_IMPERFECT_GRAPHICS ) |
| 3320 | GAME( 1998, jojoj, jojo, jojo, cps3_jojo, jojo, ROT0, "Capcom", "JoJo no Kimyouna Bouken (Japan 990108)", GAME_IMPERFECT_GRAPHICS ) |
| 3321 | GAME( 1998, jojoaj, jojo, jojo, cps3_jojo, jojo, ROT0, "Capcom", "JoJo no Kimyouna Bouken (Japan 981202)", GAME_IMPERFECT_GRAPHICS ) |
| 3322 | GAME( 1999, sfiii3, 0, sfiii3, cps3, sfiii3, ROT0, "Capcom", "Street Fighter III 3rd Strike: Fight for the Future (USA 990608)", GAME_IMPERFECT_GRAPHICS ) |
| 3323 | GAME( 1999, sfiii3a, sfiii3, sfiii3, cps3, sfiii3, ROT0, "Capcom", "Street Fighter III 3rd Strike: Fight for the Future (USA 990512)", GAME_IMPERFECT_GRAPHICS ) |
| 3324 | GAME( 1999, jojoba, 0, jojoba, cps3_jojo, jojoba, ROT0, "Capcom", "JoJo no Kimyouna Bouken: Miraie no Isan (Japan 990913)", GAME_IMPERFECT_GRAPHICS ) |
| 3298 | 3325 | |
| 3299 | 3326 | /* NO CD sets */ |
| 3300 | 3327 | |
| 3301 | | GAME( 1997, sfiiin, sfiii, sfiii, cps3, sfiii, ROT0, "Capcom", "Street Fighter III: New Generation (Asia 970204, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3302 | | GAME( 1997, sfiii2n, sfiii2, sfiii2, cps3, sfiii2, ROT0, "Capcom", "Street Fighter III 2nd Impact: Giant Attack (Asia 970930, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3303 | | GAME( 1998, jojon, jojo, jojo, cps3, jojo, ROT0, "Capcom", "JoJo's Venture (Asia 990108, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3304 | | GAME( 1998, jojoan, jojo, jojo, cps3, jojo, ROT0, "Capcom", "JoJo's Venture (Asia 981202, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3305 | | GAME( 1999, sfiii3n, sfiii3, sfiii3, cps3, sfiii3, ROT0, "Capcom", "Street Fighter III 3rd Strike: Fight for the Future (Japan 990608, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3306 | | GAME( 1999, sfiii3an, sfiii3, sfiii3, cps3, sfiii3, ROT0, "Capcom", "Street Fighter III 3rd Strike: Fight for the Future (Japan 990512, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3307 | | GAME( 1999, jojoban, jojoba, jojoba, cps3, jojoba, ROT0, "Capcom", "JoJo no Kimyouna Bouken: Miraie no Isan (Japan 990913, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3308 | | GAME( 1999, jojobane, jojoba, jojoba, cps3, jojoba, ROT0, "Capcom", "JoJo's Bizarre Adventure (Euro 990913, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3328 | GAME( 1997, sfiiin, sfiii, sfiii, cps3, sfiii, ROT0, "Capcom", "Street Fighter III: New Generation (Asia 970204, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3329 | GAME( 1997, sfiii2n, sfiii2, sfiii2, cps3, sfiii2, ROT0, "Capcom", "Street Fighter III 2nd Impact: Giant Attack (Asia 970930, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3330 | GAME( 1998, jojon, jojo, jojo, cps3_jojo, jojo, ROT0, "Capcom", "JoJo's Venture (Asia 990108, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3331 | GAME( 1998, jojoan, jojo, jojo, cps3_jojo, jojo, ROT0, "Capcom", "JoJo's Venture (Asia 981202, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3332 | GAME( 1999, sfiii3n, sfiii3, sfiii3, cps3, sfiii3, ROT0, "Capcom", "Street Fighter III 3rd Strike: Fight for the Future (Japan 990608, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3333 | GAME( 1999, sfiii3an, sfiii3, sfiii3, cps3, sfiii3, ROT0, "Capcom", "Street Fighter III 3rd Strike: Fight for the Future (Japan 990512, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3334 | GAME( 1999, jojoban, jojoba, jojoba, cps3_jojo, jojoba, ROT0, "Capcom", "JoJo no Kimyouna Bouken: Miraie no Isan (Japan 990913, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
| 3335 | GAME( 1999, jojobane, jojoba, jojoba, cps3_jojo, jojoba, ROT0, "Capcom", "JoJo's Bizarre Adventure (Euro 990913, NO CD)", GAME_IMPERFECT_GRAPHICS ) |
src/mame/drivers/mystwarr.c
| r11556 | r11557 | |
| 25 | 25 | #include "deprecat.h" |
| 26 | 26 | |
| 27 | 27 | #include "video/konamiic.h" |
| 28 | #include "machine/k053252.h" |
| 28 | 29 | #include "includes/konamigx.h" |
| 29 | 30 | #include "cpu/m68000/m68000.h" |
| 30 | 31 | #include "cpu/z80/z80.h" |
| r11556 | r11557 | |
| 280 | 281 | AM_RANGE(0x498014, 0x498015) AM_READ(sound_status_r) |
| 281 | 282 | AM_RANGE(0x498000, 0x49801f) AM_RAM |
| 282 | 283 | AM_RANGE(0x49a000, 0x49a001) AM_WRITE(sound_irq_w) |
| 283 | | AM_RANGE(0x49c000, 0x49c01f) AM_WRITE(K053252_word_w) |
| 284 | AM_RANGE(0x49c000, 0x49c01f) AM_DEVREADWRITE8("k053252",k053252_r,k053252_w,0x00ff) |
| 284 | 285 | AM_RANGE(0x49e000, 0x49e007) AM_WRITE(irq_ack_w) // VSCCS (custom) |
| 285 | 286 | AM_RANGE(0x600000, 0x601fff) AM_READWRITE(K056832_ram_word_r,K056832_ram_word_w) |
| 286 | 287 | AM_RANGE(0x602000, 0x603fff) AM_READWRITE(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM mirror read(essential) |
| r11556 | r11557 | |
| 292 | 293 | AM_RANGE(0x484000, 0x484007) AM_READ(K053246_reg_word_r) |
| 293 | 294 | AM_RANGE(0x48a000, 0x48a01f) AM_READ(K054338_word_r) |
| 294 | 295 | AM_RANGE(0x48c000, 0x48c03f) AM_READ(K056832_word_r) |
| 295 | | AM_RANGE(0x49c000, 0x49c01f) AM_READ(K053252_word_r) |
| 296 | 296 | #endif |
| 297 | 297 | ADDRESS_MAP_END |
| 298 | 298 | |
| r11556 | r11557 | |
| 309 | 309 | AM_RANGE(0x250000, 0x25000f) AM_READWRITE(K053250_0_r,K053250_0_w) |
| 310 | 310 | AM_RANGE(0x254000, 0x25401f) AM_WRITE(K054338_word_w) |
| 311 | 311 | AM_RANGE(0x258000, 0x2580ff) AM_WRITE(K055555_word_w) |
| 312 | | AM_RANGE(0x260000, 0x26001f) AM_WRITE(K053252_word_w) |
| 312 | AM_RANGE(0x260000, 0x26001f) AM_DEVREADWRITE8("k053252",k053252_r,k053252_w,0x00ff) |
| 313 | 313 | AM_RANGE(0x264000, 0x264001) AM_WRITE(sound_irq_w) |
| 314 | 314 | AM_RANGE(0x26800c, 0x26800d) AM_WRITE(sound_cmd1_w) |
| 315 | 315 | AM_RANGE(0x26800e, 0x26800f) AM_WRITE(sound_cmd2_w) |
| r11556 | r11557 | |
| 333 | 333 | AM_RANGE(0x244010, 0x24401f) AM_READ(K053247_reg_word_r) |
| 334 | 334 | AM_RANGE(0x254000, 0x25401f) AM_READ(K054338_word_r) |
| 335 | 335 | AM_RANGE(0x258000, 0x2580ff) AM_READ(K055555_word_r) |
| 336 | | AM_RANGE(0x260000, 0x26001f) AM_READ(K053252_word_r) |
| 337 | 336 | AM_RANGE(0x26C000, 0x26C007) AM_READ(K056832_b_word_r) |
| 338 | 337 | AM_RANGE(0x270000, 0x27003f) AM_READ(K056832_word_r) |
| 339 | 338 | #endif |
| r11556 | r11557 | |
| 353 | 352 | AM_RANGE(0x254000, 0x25401f) AM_WRITE(K054338_word_w) |
| 354 | 353 | AM_RANGE(0x258000, 0x2580ff) AM_WRITE(K055555_word_w) |
| 355 | 354 | AM_RANGE(0x25c000, 0x25c03f) AM_READWRITE(K055550_word_r,K055550_word_w) |
| 356 | | AM_RANGE(0x260000, 0x26001f) AM_WRITE(K053252_word_w) |
| 355 | AM_RANGE(0x260000, 0x26001f) AM_DEVREADWRITE8("k053252",k053252_r,k053252_w,0x00ff) |
| 357 | 356 | AM_RANGE(0x264000, 0x264001) AM_WRITE(sound_irq_w) |
| 358 | 357 | AM_RANGE(0x26800c, 0x26800d) AM_WRITE(sound_cmd1_w) |
| 359 | 358 | AM_RANGE(0x26800e, 0x26800f) AM_WRITE(sound_cmd2_w) |
| r11556 | r11557 | |
| 377 | 376 | AM_RANGE(0x244010, 0x24401f) AM_READ(K053247_reg_word_r) |
| 378 | 377 | AM_RANGE(0x254000, 0x25401f) AM_READ(K054338_word_r) |
| 379 | 378 | AM_RANGE(0x258000, 0x2580ff) AM_READ(K055555_word_r) |
| 380 | | AM_RANGE(0x260000, 0x26001f) AM_READ(K053252_word_r) |
| 381 | 379 | AM_RANGE(0x26C000, 0x26C007) AM_READ(K056832_b_word_r) |
| 382 | 380 | AM_RANGE(0x270000, 0x27003f) AM_READ(K056832_word_r) |
| 383 | 381 | #endif |
| r11556 | r11557 | |
| 460 | 458 | AM_RANGE(0x41800e, 0x41800f) AM_WRITE(sound_cmd2_w) |
| 461 | 459 | AM_RANGE(0x418000, 0x41801f) AM_RAM // sound regs fall through |
| 462 | 460 | AM_RANGE(0x41a000, 0x41a001) AM_WRITE(sound_irq_w) |
| 463 | | AM_RANGE(0x41c000, 0x41c01f) AM_WRITE(K053252_word_w) // CCU |
| 461 | AM_RANGE(0x41c000, 0x41c01f) AM_DEVREADWRITE8("k053252",k053252_r,k053252_w,0x00ff) // CCU |
| 464 | 462 | AM_RANGE(0x41e000, 0x41e007) AM_WRITE(K056832_b_word_w) // VSCCS |
| 465 | 463 | AM_RANGE(0x480000, 0x483fff) AM_READWRITE(K053247_martchmp_word_r,K053247_martchmp_word_w) AM_BASE_MEMBER(mystwarr_state, m_spriteram) // sprite RAM |
| 466 | 464 | AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram16_xrgb_word_be_w) AM_BASE_GENERIC(paletteram) // palette RAM |
| r11556 | r11557 | |
| 494 | 492 | AM_RANGE(0x480000, 0x48003f) AM_WRITE(K056832_word_w) // VACSET |
| 495 | 493 | AM_RANGE(0x482000, 0x482007) AM_WRITE(K056832_b_word_w) // VSCCS |
| 496 | 494 | AM_RANGE(0x484000, 0x484003) AM_WRITE(ddd_053936_clip_w) |
| 497 | | AM_RANGE(0x486000, 0x48601f) AM_WRITE(K053252_word_w) |
| 495 | AM_RANGE(0x486000, 0x48601f) AM_DEVREADWRITE8("k053252",k053252_r,k053252_w,0x00ff) |
| 498 | 496 | AM_RANGE(0x488000, 0x4880ff) AM_WRITE(K055555_word_w) |
| 499 | 497 | AM_RANGE(0x48a00c, 0x48a00d) AM_WRITE(sound_cmd1_msb_w) |
| 500 | 498 | AM_RANGE(0x48a00e, 0x48a00f) AM_WRITE(sound_cmd2_msb_w) |
| r11556 | r11557 | |
| 517 | 515 | AM_RANGE(0x450010, 0x45001f) AM_READ(K053247_reg_word_r) |
| 518 | 516 | AM_RANGE(0x480000, 0x48003f) AM_READ(K056832_word_r) |
| 519 | 517 | AM_RANGE(0x482000, 0x482007) AM_READ(K056832_b_word_r) |
| 520 | | AM_RANGE(0x486000, 0x48601f) AM_READ(K053252_word_r) |
| 521 | 518 | AM_RANGE(0x488000, 0x4880ff) AM_READ(K055555_word_r) |
| 522 | 519 | AM_RANGE(0x48c000, 0x48c01f) AM_READ(K054338_word_r) |
| 523 | 520 | #endif |
| r11556 | r11557 | |
| 542 | 539 | AM_RANGE(0x480000, 0x48003f) AM_WRITE(K056832_word_w) // VACSET |
| 543 | 540 | AM_RANGE(0x482000, 0x482007) AM_WRITE(K056832_b_word_w) // VSCCS |
| 544 | 541 | AM_RANGE(0x484000, 0x484003) AM_WRITE(ddd_053936_clip_w) |
| 545 | | AM_RANGE(0x486000, 0x48601f) AM_WRITE(K053252_word_w) |
| 542 | AM_RANGE(0x486000, 0x48601f) AM_DEVREADWRITE8("k053252",k053252_r,k053252_w,0x00ff) |
| 546 | 543 | AM_RANGE(0x488000, 0x4880ff) AM_WRITE(K055555_word_w) |
| 547 | 544 | AM_RANGE(0x48a00c, 0x48a00d) AM_WRITE(sound_cmd1_msb_w) |
| 548 | 545 | AM_RANGE(0x48a00e, 0x48a00f) AM_WRITE(sound_cmd2_msb_w) |
| r11556 | r11557 | |
| 565 | 562 | AM_RANGE(0x450010, 0x45001f) AM_READ(K053247_reg_word_r) |
| 566 | 563 | AM_RANGE(0x480000, 0x48003f) AM_READ(K056832_word_r) |
| 567 | 564 | AM_RANGE(0x482000, 0x482007) AM_READ(K056832_b_word_r) |
| 568 | | AM_RANGE(0x486000, 0x48601f) AM_READ(K053252_word_r) |
| 569 | 565 | AM_RANGE(0x488000, 0x4880ff) AM_READ(K055555_word_r) |
| 570 | 566 | AM_RANGE(0x48c000, 0x48c01f) AM_READ(K054338_word_r) |
| 571 | 567 | #endif |
| r11556 | r11557 | |
| 943 | 939 | for (i=5; i<=7; i++) k054539_set_gain(k054539_1, i, 2.0); |
| 944 | 940 | } |
| 945 | 941 | |
| 942 | static const k053252_interface mystwarr_k053252_intf = |
| 943 | { |
| 944 | "screen", |
| 945 | DEVCB_NULL, |
| 946 | DEVCB_NULL, |
| 947 | DEVCB_NULL, |
| 948 | DEVCB_NULL, |
| 949 | 24, 16 |
| 950 | }; |
| 951 | |
| 952 | static const k053252_interface viostorm_k053252_intf = |
| 953 | { |
| 954 | "screen", |
| 955 | DEVCB_NULL, |
| 956 | DEVCB_NULL, |
| 957 | DEVCB_NULL, |
| 958 | DEVCB_NULL, |
| 959 | 40, 16 |
| 960 | }; |
| 961 | |
| 962 | static const k053252_interface metamrph_k053252_intf = |
| 963 | { |
| 964 | "screen", |
| 965 | DEVCB_NULL, |
| 966 | DEVCB_NULL, |
| 967 | DEVCB_NULL, |
| 968 | DEVCB_NULL, |
| 969 | 24, 24 |
| 970 | }; |
| 971 | |
| 972 | static const k053252_interface martchmp_k053252_intf = |
| 973 | { |
| 974 | "screen", |
| 975 | DEVCB_NULL, |
| 976 | DEVCB_NULL, |
| 977 | DEVCB_NULL, |
| 978 | DEVCB_NULL, |
| 979 | 32, 24-1 |
| 980 | }; |
| 981 | |
| 982 | static const k053252_interface dadandrm_k053252_intf = |
| 983 | { |
| 984 | "screen", |
| 985 | DEVCB_NULL, |
| 986 | DEVCB_NULL, |
| 987 | DEVCB_NULL, |
| 988 | DEVCB_NULL, |
| 989 | 24, 16+1 |
| 990 | }; |
| 991 | |
| 992 | static const k053252_interface gaiapols_k053252_intf = |
| 993 | { |
| 994 | "screen", |
| 995 | DEVCB_NULL, |
| 996 | DEVCB_NULL, |
| 997 | DEVCB_NULL, |
| 998 | DEVCB_NULL, |
| 999 | 40, 16 |
| 1000 | }; |
| 1001 | |
| 946 | 1002 | static MACHINE_CONFIG_START( mystwarr, mystwarr_state ) |
| 947 | 1003 | |
| 948 | 1004 | /* basic machine hardware */ |
| r11556 | r11557 | |
| 957 | 1013 | MCFG_QUANTUM_TIME(attotime::from_hz(1920)) |
| 958 | 1014 | |
| 959 | 1015 | MCFG_EEPROM_ADD("eeprom", eeprom_intf) |
| 1016 | MCFG_K053252_ADD("k053252", 6000000, mystwarr_k053252_intf) // 6 MHz? |
| 960 | 1017 | |
| 961 | 1018 | MCFG_MACHINE_START(mystwarr) |
| 962 | 1019 | MCFG_MACHINE_RESET(mystwarr) |
| r11556 | r11557 | |
| 995 | 1052 | |
| 996 | 1053 | MCFG_MACHINE_RESET(viostorm) |
| 997 | 1054 | |
| 1055 | MCFG_DEVICE_REMOVE("k053252") |
| 1056 | MCFG_K053252_ADD("k053252", 16000000/2, viostorm_k053252_intf) |
| 1057 | |
| 998 | 1058 | /* basic machine hardware */ |
| 999 | 1059 | MCFG_CPU_MODIFY("maincpu") |
| 1000 | 1060 | MCFG_CPU_PROGRAM_MAP(viostorm_map) |
| r11556 | r11557 | |
| 1020 | 1080 | MCFG_CPU_PROGRAM_MAP(metamrph_map) |
| 1021 | 1081 | MCFG_CPU_VBLANK_INT_HACK(metamrph_interrupt, 40) |
| 1022 | 1082 | |
| 1083 | MCFG_DEVICE_REMOVE("k053252") |
| 1084 | MCFG_K053252_ADD("k053252", 6000000, metamrph_k053252_intf) // 6 MHz? |
| 1085 | |
| 1023 | 1086 | /* video hardware */ |
| 1024 | 1087 | MCFG_VIDEO_START(metamrph) |
| 1025 | 1088 | MCFG_SCREEN_MODIFY("screen") |
| r11556 | r11557 | |
| 1040 | 1103 | MCFG_CPU_PROGRAM_MAP(dadandrn_map) |
| 1041 | 1104 | MCFG_CPU_VBLANK_INT("screen", ddd_interrupt) |
| 1042 | 1105 | |
| 1106 | MCFG_DEVICE_REMOVE("k053252") |
| 1107 | MCFG_K053252_ADD("k053252", 6000000, dadandrm_k053252_intf) // 6 MHz? |
| 1108 | |
| 1043 | 1109 | MCFG_GFXDECODE(dadandrn) |
| 1044 | 1110 | |
| 1045 | 1111 | /* video hardware */ |
| r11556 | r11557 | |
| 1062 | 1128 | MCFG_CPU_PROGRAM_MAP(gaiapols_map) |
| 1063 | 1129 | MCFG_CPU_VBLANK_INT("screen", ddd_interrupt) |
| 1064 | 1130 | |
| 1131 | MCFG_DEVICE_REMOVE("k053252") |
| 1132 | MCFG_K053252_ADD("k053252", 6000000, gaiapols_k053252_intf) // 6 MHz? |
| 1133 | |
| 1065 | 1134 | MCFG_GFXDECODE(gaiapols) |
| 1066 | 1135 | |
| 1067 | 1136 | MCFG_DEVICE_REMOVE("eeprom") |
| r11556 | r11557 | |
| 1088 | 1157 | MCFG_CPU_PROGRAM_MAP(martchmp_map) |
| 1089 | 1158 | MCFG_CPU_VBLANK_INT_HACK(mchamp_interrupt, 2) |
| 1090 | 1159 | |
| 1160 | MCFG_DEVICE_REMOVE("k053252") |
| 1161 | MCFG_K053252_ADD("k053252", 16000000/2, martchmp_k053252_intf) |
| 1162 | |
| 1091 | 1163 | MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_BEFORE_VBLANK) |
| 1092 | 1164 | |
| 1093 | 1165 | MCFG_VIDEO_START(martchmp) |
src/emu/cpu/psx/rcnt.c
| r0 | r11557 | |
| 1 | /* |
| 2 | * PlayStation Root Counter emulator |
| 3 | * |
| 4 | * Copyright 2003-2011 smf |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include "rcnt.h" |
| 9 | #include "includes/psx.h" |
| 10 | |
| 11 | #define VERBOSE_LEVEL ( 0 ) |
| 12 | |
| 13 | INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) |
| 14 | { |
| 15 | if( VERBOSE_LEVEL >= n_level ) |
| 16 | { |
| 17 | va_list v; |
| 18 | char buf[ 32768 ]; |
| 19 | va_start( v, s_fmt ); |
| 20 | vsprintf( buf, s_fmt, v ); |
| 21 | va_end( v ); |
| 22 | logerror( "%s: %s", machine.describe_context(), buf ); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | const device_type PSX_RCNT = &device_creator<psxrcnt_device>; |
| 27 | |
| 28 | psxrcnt_device::psxrcnt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 29 | : device_t(mconfig, PSX_RCNT, "PSX RCNT", tag, owner, clock) |
| 30 | { |
| 31 | } |
| 32 | |
| 33 | void psxrcnt_device::device_reset() |
| 34 | { |
| 35 | } |
| 36 | |
| 37 | void psxrcnt_device::device_post_load() |
| 38 | { |
| 39 | int n; |
| 40 | for( n = 0; n < 3; n++ ) |
| 41 | { |
| 42 | root_timer_adjust( n ); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | void psxrcnt_device::device_start() |
| 47 | { |
| 48 | int n; |
| 49 | |
| 50 | for( n = 0; n < 3; n++ ) |
| 51 | { |
| 52 | root_counter[ n ].timer = machine().scheduler().timer_alloc( timer_expired_delegate( FUNC( psxrcnt_device::root_finished ), this ) ); |
| 53 | state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_count ); |
| 54 | state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_mode ); |
| 55 | state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_target ); |
| 56 | state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_start ); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | WRITE32_MEMBER( psxrcnt_device::write ) |
| 61 | { |
| 62 | int n_counter = offset / 4; |
| 63 | psx_root *root = &root_counter[ n_counter ]; |
| 64 | |
| 65 | verboselog( machine(), 1, "psx_counter_w ( %08x, %08x, %08x )\n", offset, data, mem_mask ); |
| 66 | |
| 67 | switch( offset % 4 ) |
| 68 | { |
| 69 | case 0: |
| 70 | root->n_count = data; |
| 71 | root->n_start = gettotalcycles(); |
| 72 | break; |
| 73 | case 1: |
| 74 | root->n_count = root_current( n_counter ); |
| 75 | root->n_start = gettotalcycles(); |
| 76 | |
| 77 | if( ( data & PSX_RC_RESET ) != 0 ) |
| 78 | { |
| 79 | data &= ~( PSX_RC_RESET | PSX_RC_STOP ); |
| 80 | root->n_count = 0; |
| 81 | } |
| 82 | |
| 83 | root->n_mode = data; |
| 84 | |
| 85 | #if 0 |
| 86 | if( ( data & 0xfca6 ) != 0 || |
| 87 | ( ( data & 0x0100 ) != 0 && n_counter != 0 && n_counter != 1 ) || |
| 88 | ( ( data & 0x0200 ) != 0 && n_counter != 2 ) ) |
| 89 | { |
| 90 | mame_printf_debug( "mode %d 0x%04x\n", n_counter, data & 0xfca6 ); |
| 91 | } |
| 92 | #endif |
| 93 | break; |
| 94 | case 2: |
| 95 | root->n_target = data; |
| 96 | break; |
| 97 | default: |
| 98 | verboselog( machine(), 0, "psx_counter_w( %08x, %08x, %08x ) unknown register\n", offset, mem_mask, data ); |
| 99 | return; |
| 100 | } |
| 101 | |
| 102 | root_timer_adjust( n_counter ); |
| 103 | } |
| 104 | |
| 105 | READ32_MEMBER( psxrcnt_device::read ) |
| 106 | { |
| 107 | int n_counter = offset / 4; |
| 108 | psx_root *root = &root_counter[ n_counter ]; |
| 109 | UINT32 data; |
| 110 | |
| 111 | switch( offset % 4 ) |
| 112 | { |
| 113 | case 0: |
| 114 | data = root_current( n_counter ); |
| 115 | break; |
| 116 | case 1: |
| 117 | data = root->n_mode; |
| 118 | break; |
| 119 | case 2: |
| 120 | data = root->n_target; |
| 121 | break; |
| 122 | default: |
| 123 | verboselog( machine(), 0, "psx_counter_r( %08x, %08x ) unknown register\n", offset, mem_mask ); |
| 124 | return 0; |
| 125 | } |
| 126 | verboselog( machine(), 1, "psx_counter_r ( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| 127 | return data; |
| 128 | } |
| 129 | |
| 130 | UINT64 psxrcnt_device::gettotalcycles( void ) |
| 131 | { |
| 132 | /* TODO: should return the start of the current tick. */ |
| 133 | return machine().firstcpu->total_cycles() * 2; |
| 134 | } |
| 135 | |
| 136 | int psxrcnt_device::root_divider( int n_counter ) |
| 137 | { |
| 138 | psx_root *root = &root_counter[ n_counter ]; |
| 139 | |
| 140 | if( n_counter == 0 && ( root->n_mode & PSX_RC_CLC ) != 0 ) |
| 141 | { |
| 142 | /* TODO: pixel clock, probably based on resolution */ |
| 143 | return 5; |
| 144 | } |
| 145 | else if( n_counter == 1 && ( root->n_mode & PSX_RC_CLC ) != 0 ) |
| 146 | { |
| 147 | return 2150; |
| 148 | } |
| 149 | else if( n_counter == 2 && ( root->n_mode & PSX_RC_DIV ) != 0 ) |
| 150 | { |
| 151 | return 8; |
| 152 | } |
| 153 | return 1; |
| 154 | } |
| 155 | |
| 156 | UINT16 psxrcnt_device::root_current( int n_counter ) |
| 157 | { |
| 158 | psx_root *root = &root_counter[ n_counter ]; |
| 159 | |
| 160 | if( ( root->n_mode & PSX_RC_STOP ) != 0 ) |
| 161 | { |
| 162 | return root->n_count; |
| 163 | } |
| 164 | else |
| 165 | { |
| 166 | UINT64 n_current; |
| 167 | n_current = gettotalcycles() - root->n_start; |
| 168 | n_current /= root_divider( n_counter ); |
| 169 | n_current += root->n_count; |
| 170 | if( n_current > 0xffff ) |
| 171 | { |
| 172 | /* TODO: use timer for wrap on 0x10000. */ |
| 173 | root->n_count = n_current; |
| 174 | root->n_start = gettotalcycles(); |
| 175 | } |
| 176 | return n_current; |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | int psxrcnt_device::root_target( int n_counter ) |
| 181 | { |
| 182 | psx_root *root = &root_counter[ n_counter ]; |
| 183 | |
| 184 | if( ( root->n_mode & PSX_RC_COUNTTARGET ) != 0 || |
| 185 | ( root->n_mode & PSX_RC_IRQTARGET ) != 0 ) |
| 186 | { |
| 187 | return root->n_target; |
| 188 | } |
| 189 | return 0x10000; |
| 190 | } |
| 191 | |
| 192 | void psxrcnt_device::root_timer_adjust( int n_counter ) |
| 193 | { |
| 194 | psx_root *root = &root_counter[ n_counter ]; |
| 195 | |
| 196 | if( ( root->n_mode & PSX_RC_STOP ) != 0 ) |
| 197 | { |
| 198 | root->timer->adjust( attotime::never, n_counter); |
| 199 | } |
| 200 | else |
| 201 | { |
| 202 | int n_duration; |
| 203 | |
| 204 | n_duration = root_target( n_counter ) - root_current( n_counter ); |
| 205 | if( n_duration < 1 ) |
| 206 | { |
| 207 | n_duration += 0x10000; |
| 208 | } |
| 209 | |
| 210 | n_duration *= root_divider( n_counter ); |
| 211 | |
| 212 | root->timer->adjust( attotime::from_hz(33868800) * n_duration, n_counter); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | void psxrcnt_device::root_finished( void *ptr, int param ) |
| 217 | { |
| 218 | int n_counter = param; |
| 219 | psx_root *root = &root_counter[ n_counter ]; |
| 220 | |
| 221 | verboselog( machine(), 2, "root_finished( %d ) %04x\n", n_counter, root_current( n_counter ) ); |
| 222 | //if( ( root->n_mode & PSX_RC_COUNTTARGET ) != 0 ) |
| 223 | { |
| 224 | /* TODO: wrap should be handled differently as PSX_RC_COUNTTARGET & PSX_RC_IRQTARGET don't have to be the same. */ |
| 225 | root->n_count = 0; |
| 226 | root->n_start = gettotalcycles(); |
| 227 | } |
| 228 | if( ( root->n_mode & PSX_RC_REPEAT ) != 0 ) |
| 229 | { |
| 230 | root_timer_adjust( n_counter ); |
| 231 | } |
| 232 | if( ( root->n_mode & PSX_RC_IRQOVERFLOW ) != 0 || |
| 233 | ( root->n_mode & PSX_RC_IRQTARGET ) != 0 ) |
| 234 | { |
| 235 | psx_irq_set( machine(), PSX_IRQ_ROOTCOUNTER0 << n_counter ); |
| 236 | } |
| 237 | } |
src/emu/cpu/psx/psx.c
| r11556 | r11557 | |
| 66 | 66 | #include "debugger.h" |
| 67 | 67 | #include "psx.h" |
| 68 | 68 | #include "dma.h" |
| 69 | #include "irq.h" |
| 69 | 70 | #include "mdec.h" |
| 71 | #include "rcnt.h" |
| 72 | #include "sio.h" |
| 70 | 73 | #include "includes/psx.h" |
| 71 | 74 | #include "sound/spu.h" |
| 72 | 75 | |
| r11556 | r11557 | |
| 1526 | 1529 | AM_RANGE(0x1f800000, 0x1f8003ff) AM_NOP /* scratchpad */ |
| 1527 | 1530 | AM_RANGE(0x1f800400, 0x1f800fff) AM_READWRITE( berr_r, berr_w ) |
| 1528 | 1531 | AM_RANGE(0x1f801004, 0x1f80101f) AM_RAM |
| 1532 | /* 1f801014 spu delay */ |
| 1533 | /* 1f801018 dv delay */ |
| 1529 | 1534 | AM_RANGE(0x1f801020, 0x1f801023) AM_READWRITE_LEGACY( psx_com_delay_r, psx_com_delay_w ) |
| 1530 | 1535 | AM_RANGE(0x1f801024, 0x1f80102f) AM_RAM |
| 1531 | | AM_RANGE(0x1f801040, 0x1f80105f) AM_READWRITE_LEGACY( psx_sio_r, psx_sio_w ) |
| 1536 | AM_RANGE(0x1f801040, 0x1f80105f) AM_DEVREADWRITE( "sio", psxsio_device, read, write ) |
| 1537 | /* 1f801060 ram config */ |
| 1532 | 1538 | AM_RANGE(0x1f801060, 0x1f80106f) AM_RAM |
| 1533 | | AM_RANGE(0x1f801070, 0x1f801077) AM_READWRITE_LEGACY( psx_irq_r, psx_irq_w ) |
| 1539 | AM_RANGE(0x1f801070, 0x1f801077) AM_DEVREADWRITE( "irq", psxirq_device, read, write ) |
| 1534 | 1540 | AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE( "dma", psxdma_device, read, write ) |
| 1535 | | AM_RANGE(0x1f801100, 0x1f80112f) AM_READWRITE_LEGACY( psx_counter_r, psx_counter_w ) |
| 1541 | AM_RANGE(0x1f801100, 0x1f80112f) AM_DEVREADWRITE( "rcnt", psxrcnt_device, read, write ) |
| 1542 | /* 1f801800-1f801803 cd */ |
| 1536 | 1543 | AM_RANGE(0x1f801810, 0x1f801817) AM_READWRITE_LEGACY( psx_gpu_r, psx_gpu_w ) |
| 1537 | 1544 | AM_RANGE(0x1f801820, 0x1f801827) AM_DEVREADWRITE( "mdec", psxmdec_device, read, write ) |
| 1538 | 1545 | AM_RANGE(0x1f801c00, 0x1f801dff) AM_READWRITE16_LEGACY( spu_r, spu_w, 0xffffffff ) |
| 1539 | 1546 | AM_RANGE(0x1f802020, 0x1f802033) AM_RAM /* ?? */ |
| 1547 | /* 1f802030 int 2000 */ |
| 1548 | /* 1f802040 dip switches */ |
| 1540 | 1549 | AM_RANGE(0x1f802040, 0x1f802043) AM_WRITENOP |
| 1541 | 1550 | AM_RANGE(0x20000000, 0x7fffffff) AM_READWRITE( berr_r, berr_w ) |
| 1542 | 1551 | AM_RANGE(0x80800000, 0x9effffff) AM_READWRITE( berr_r, berr_w ) |
| r11556 | r11557 | |
| 1552 | 1561 | AM_RANGE(0x1f801004, 0x1f80101f) AM_RAM |
| 1553 | 1562 | AM_RANGE(0x1f801020, 0x1f801023) AM_READWRITE_LEGACY( psx_com_delay_r, psx_com_delay_w ) |
| 1554 | 1563 | AM_RANGE(0x1f801024, 0x1f80102f) AM_RAM |
| 1555 | | AM_RANGE(0x1f801040, 0x1f80105f) AM_READWRITE_LEGACY( psx_sio_r, psx_sio_w ) |
| 1564 | AM_RANGE(0x1f801040, 0x1f80105f) AM_DEVREADWRITE( "sio", psxsio_device, read, write ) |
| 1556 | 1565 | AM_RANGE(0x1f801060, 0x1f80106f) AM_RAM |
| 1557 | | AM_RANGE(0x1f801070, 0x1f801077) AM_READWRITE_LEGACY( psx_irq_r, psx_irq_w ) |
| 1566 | AM_RANGE(0x1f801070, 0x1f801077) AM_DEVREADWRITE( "irq", psxirq_device, read, write ) |
| 1558 | 1567 | AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE( "dma", psxdma_device, read, write ) |
| 1559 | | AM_RANGE(0x1f801100, 0x1f80112f) AM_READWRITE_LEGACY( psx_counter_r, psx_counter_w ) |
| 1568 | AM_RANGE(0x1f801100, 0x1f80112f) AM_DEVREADWRITE( "rcnt", psxrcnt_device, read, write ) |
| 1560 | 1569 | AM_RANGE(0x1f801810, 0x1f801817) AM_READWRITE_LEGACY( psx_gpu_r, psx_gpu_w ) |
| 1561 | 1570 | AM_RANGE(0x1f801820, 0x1f801827) AM_DEVREADWRITE( "mdec", psxmdec_device, read, write ) |
| 1562 | 1571 | AM_RANGE(0x1f801c00, 0x1f801dff) AM_READWRITE16_LEGACY( spu_r, spu_w, 0xffffffff ) |
| r11556 | r11557 | |
| 3157 | 3166 | return downcast<psxcpu_device *>( device.siblingdevice( cputag ) ); |
| 3158 | 3167 | } |
| 3159 | 3168 | |
| 3169 | void psxcpu_device::irq_set( device_t &device, const char *cputag, UINT32 bitmask ) |
| 3170 | { |
| 3171 | psxirq_device *irq = downcast<psxirq_device *>( getcpu( device, cputag )->subdevice("irq") ); |
| 3172 | irq->set( bitmask ); |
| 3173 | } |
| 3174 | |
| 3160 | 3175 | void psxcpu_device::install_dma_read_handler( device_t &device, const char *cputag, int channel, psx_dma_read_delegate handler ) |
| 3161 | 3176 | { |
| 3162 | 3177 | psxdma_device *dma = downcast<psxdma_device *>( getcpu( device, cputag )->subdevice("dma") ); |
| r11556 | r11557 | |
| 3169 | 3184 | dma->install_write_handler( channel, handler ); |
| 3170 | 3185 | } |
| 3171 | 3186 | |
| 3187 | void psxcpu_device::install_sio_handler( device_t &device, const char *cputag, int n_port, psx_sio_handler p_f_sio_handler ) |
| 3188 | { |
| 3189 | psxsio_device *sio = downcast<psxsio_device *>( getcpu( device, cputag )->subdevice("sio") ); |
| 3190 | sio->install_handler( n_port, p_f_sio_handler ); |
| 3191 | } |
| 3192 | |
| 3193 | void psxcpu_device::sio_input( device_t &device, const char *cputag, int n_port, int n_mask, int n_data ) |
| 3194 | { |
| 3195 | psxsio_device *sio = downcast<psxsio_device *>( getcpu( device, cputag )->subdevice("sio") ); |
| 3196 | sio->input( n_port, n_mask, n_data ); |
| 3197 | } |
| 3198 | |
| 3172 | 3199 | static MACHINE_CONFIG_FRAGMENT( psx ) |
| 3200 | MCFG_DEVICE_ADD("irq", PSX_IRQ, 0) |
| 3173 | 3201 | MCFG_DEVICE_ADD("dma", PSX_DMA, 0) |
| 3174 | 3202 | |
| 3175 | 3203 | MCFG_DEVICE_ADD("mdec", PSX_MDEC, 0) |
| 3176 | 3204 | MCFG_PSX_DMA_CHANNEL_WRITE( DEVICE_SELF, 0, psx_dma_write_delegate( FUNC( psxmdec_device::dma_write ), (psxmdec_device *) device ) ) |
| 3177 | 3205 | MCFG_PSX_DMA_CHANNEL_READ( DEVICE_SELF, 1, psx_dma_read_delegate( FUNC( psxmdec_device::dma_read ), (psxmdec_device *) device ) ) |
| 3206 | |
| 3207 | MCFG_DEVICE_ADD("rcnt", PSX_RCNT, 0) |
| 3208 | MCFG_DEVICE_ADD("sio", PSX_SIO, 0) |
| 3178 | 3209 | MACHINE_CONFIG_END |
| 3179 | 3210 | |
| 3180 | 3211 | //------------------------------------------------- |
src/emu/cpu/psx/sio.c
| r0 | r11557 | |
| 1 | /* |
| 2 | * PlayStation Serial I/O emulator |
| 3 | * |
| 4 | * Copyright 2003-2011 smf |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include "sio.h" |
| 9 | #include "includes/psx.h" |
| 10 | |
| 11 | #define VERBOSE_LEVEL ( 0 ) |
| 12 | |
| 13 | INLINE void ATTR_PRINTF(3,4) verboselog( running_machine& machine, int n_level, const char *s_fmt, ... ) |
| 14 | { |
| 15 | if( VERBOSE_LEVEL >= n_level ) |
| 16 | { |
| 17 | va_list v; |
| 18 | char buf[ 32768 ]; |
| 19 | va_start( v, s_fmt ); |
| 20 | vsprintf( buf, s_fmt, v ); |
| 21 | va_end( v ); |
| 22 | logerror( "%s: %s", machine.describe_context(), buf ); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | const device_type PSX_SIO = &device_creator<psxsio_device>; |
| 27 | |
| 28 | psxsio_device::psxsio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 29 | : device_t(mconfig, PSX_SIO, "PSX SIO", tag, owner, clock) |
| 30 | { |
| 31 | int n; |
| 32 | |
| 33 | for( n = 0; n < 2; n++ ) |
| 34 | { |
| 35 | port[ n ].fn_handler = NULL; |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | void psxsio_device::device_reset() |
| 40 | { |
| 41 | } |
| 42 | |
| 43 | void psxsio_device::device_post_load() |
| 44 | { |
| 45 | int n; |
| 46 | |
| 47 | for( n = 0; n < 2; n++ ) |
| 48 | { |
| 49 | sio_timer_adjust( n ); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | void psxsio_device::device_start() |
| 54 | { |
| 55 | int n; |
| 56 | |
| 57 | for( n = 0; n < 2; n++ ) |
| 58 | { |
| 59 | port[ n ].timer = machine().scheduler().timer_alloc( timer_expired_delegate( FUNC( psxsio_device::sio_clock ), this ) ); |
| 60 | port[ n ].n_status = SIO_STATUS_TX_EMPTY | SIO_STATUS_TX_RDY; |
| 61 | port[ n ].n_mode = 0; |
| 62 | port[ n ].n_control = 0; |
| 63 | port[ n ].n_baud = 0; |
| 64 | port[ n ].n_tx = 0; |
| 65 | port[ n ].n_rx = 0; |
| 66 | port[ n ].n_tx_prev = 0; |
| 67 | port[ n ].n_rx_prev = 0; |
| 68 | port[ n ].n_rx_data = 0; |
| 69 | port[ n ].n_tx_data = 0; |
| 70 | port[ n ].n_rx_shift = 0; |
| 71 | port[ n ].n_tx_shift = 0; |
| 72 | port[ n ].n_rx_bits = 0; |
| 73 | port[ n ].n_tx_bits = 0; |
| 74 | } |
| 75 | |
| 76 | for( n = 0; n < 2; n++ ) |
| 77 | { |
| 78 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_status ); |
| 79 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_mode ); |
| 80 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_control ); |
| 81 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_baud ); |
| 82 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_tx ); |
| 83 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_rx ); |
| 84 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_tx_prev ); |
| 85 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_rx_prev ); |
| 86 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_rx_data ); |
| 87 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_tx_data ); |
| 88 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_rx_shift ); |
| 89 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_tx_shift ); |
| 90 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_rx_bits ); |
| 91 | state_save_register_item( machine(), "psxsio", NULL, n, port[n].n_tx_bits ); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | void psxsio_device::install_handler( int n_port, psx_sio_handler p_f_sio_handler ) |
| 96 | { |
| 97 | port[ n_port ].fn_handler = p_f_sio_handler; |
| 98 | } |
| 99 | |
| 100 | void psxsio_device::sio_interrupt( int n_port ) |
| 101 | { |
| 102 | psx_sio *sio = &port[ n_port ]; |
| 103 | |
| 104 | verboselog( machine(), 1, "sio_interrupt( %d )\n", n_port ); |
| 105 | sio->n_status |= SIO_STATUS_IRQ; |
| 106 | if( n_port == 0 ) |
| 107 | { |
| 108 | psx_irq_set( machine(), PSX_IRQ_SIO0 ); |
| 109 | } |
| 110 | else |
| 111 | { |
| 112 | psx_irq_set( machine(), PSX_IRQ_SIO1 ); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | void psxsio_device::sio_timer_adjust( int n_port ) |
| 117 | { |
| 118 | psx_sio *sio = &port[ n_port ]; |
| 119 | attotime n_time; |
| 120 | |
| 121 | if( ( sio->n_status & SIO_STATUS_TX_EMPTY ) == 0 || sio->n_tx_bits != 0 ) |
| 122 | { |
| 123 | int n_prescaler; |
| 124 | |
| 125 | switch( sio->n_mode & 3 ) |
| 126 | { |
| 127 | case 1: |
| 128 | n_prescaler = 1; |
| 129 | break; |
| 130 | case 2: |
| 131 | n_prescaler = 16; |
| 132 | break; |
| 133 | case 3: |
| 134 | n_prescaler = 64; |
| 135 | break; |
| 136 | default: |
| 137 | n_prescaler = 0; |
| 138 | break; |
| 139 | } |
| 140 | |
| 141 | if( sio->n_baud != 0 && n_prescaler != 0 ) |
| 142 | { |
| 143 | n_time = attotime::from_hz(33868800) * (n_prescaler * sio->n_baud); |
| 144 | verboselog( machine(), 2, "sio_timer_adjust( %d ) = %s ( %d x %d )\n", n_port, n_time.as_string(), n_prescaler, sio->n_baud ); |
| 145 | } |
| 146 | else |
| 147 | { |
| 148 | n_time = attotime::never; |
| 149 | verboselog( machine(), 0, "sio_timer_adjust( %d ) invalid baud rate ( %d x %d )\n", n_port, n_prescaler, sio->n_baud ); |
| 150 | } |
| 151 | } |
| 152 | else |
| 153 | { |
| 154 | n_time = attotime::never; |
| 155 | verboselog( machine(), 2, "sio_timer_adjust( %d ) finished\n", n_port ); |
| 156 | } |
| 157 | sio->timer->adjust( n_time, n_port); |
| 158 | } |
| 159 | |
| 160 | void psxsio_device::sio_clock(void *ptr, int param) |
| 161 | { |
| 162 | int n_port = param; |
| 163 | psx_sio *sio = &port[ n_port ]; |
| 164 | verboselog( machine(), 2, "sio tick\n" ); |
| 165 | |
| 166 | if( sio->n_tx_bits == 0 && |
| 167 | ( sio->n_control & SIO_CONTROL_TX_ENA ) != 0 && |
| 168 | ( sio->n_status & SIO_STATUS_TX_EMPTY ) == 0 ) |
| 169 | { |
| 170 | sio->n_tx_bits = 8; |
| 171 | sio->n_tx_shift = sio->n_tx_data; |
| 172 | if( n_port == 0 ) |
| 173 | { |
| 174 | sio->n_rx_bits = 8; |
| 175 | sio->n_rx_shift = 0; |
| 176 | } |
| 177 | sio->n_status |= SIO_STATUS_TX_EMPTY; |
| 178 | sio->n_status |= SIO_STATUS_TX_RDY; |
| 179 | } |
| 180 | |
| 181 | if( sio->n_tx_bits != 0 ) |
| 182 | { |
| 183 | sio->n_tx = ( sio->n_tx & ~PSX_SIO_OUT_DATA ) | ( ( sio->n_tx_shift & 1 ) * PSX_SIO_OUT_DATA ); |
| 184 | sio->n_tx_shift >>= 1; |
| 185 | sio->n_tx_bits--; |
| 186 | |
| 187 | if( sio->fn_handler != NULL ) |
| 188 | { |
| 189 | if( n_port == 0 ) |
| 190 | { |
| 191 | sio->n_tx &= ~PSX_SIO_OUT_CLOCK; |
| 192 | (*sio->fn_handler)( machine(), sio->n_tx ); |
| 193 | sio->n_tx |= PSX_SIO_OUT_CLOCK; |
| 194 | } |
| 195 | (*sio->fn_handler)( machine(), sio->n_tx ); |
| 196 | } |
| 197 | |
| 198 | if( sio->n_tx_bits == 0 && |
| 199 | ( sio->n_control & SIO_CONTROL_TX_IENA ) != 0 ) |
| 200 | { |
| 201 | sio_interrupt( n_port ); |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | if( sio->n_rx_bits != 0 ) |
| 206 | { |
| 207 | sio->n_rx_shift = ( sio->n_rx_shift >> 1 ) | ( ( ( sio->n_rx & PSX_SIO_IN_DATA ) / PSX_SIO_IN_DATA ) << 7 ); |
| 208 | sio->n_rx_bits--; |
| 209 | |
| 210 | if( sio->n_rx_bits == 0 ) |
| 211 | { |
| 212 | if( ( sio->n_status & SIO_STATUS_RX_RDY ) != 0 ) |
| 213 | { |
| 214 | sio->n_status |= SIO_STATUS_OVERRUN; |
| 215 | } |
| 216 | else |
| 217 | { |
| 218 | sio->n_rx_data = sio->n_rx_shift; |
| 219 | sio->n_status |= SIO_STATUS_RX_RDY; |
| 220 | } |
| 221 | if( ( sio->n_control & SIO_CONTROL_RX_IENA ) != 0 ) |
| 222 | { |
| 223 | sio_interrupt( n_port ); |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | sio_timer_adjust( n_port ); |
| 229 | } |
| 230 | |
| 231 | WRITE32_MEMBER( psxsio_device::write ) |
| 232 | { |
| 233 | int n_port = offset / 4; |
| 234 | psx_sio *sio = &port[ n_port ]; |
| 235 | |
| 236 | switch( offset % 4 ) |
| 237 | { |
| 238 | case 0: |
| 239 | verboselog( machine(), 1, "psx_sio_w %d data %02x (%08x)\n", n_port, data, mem_mask ); |
| 240 | sio->n_tx_data = data; |
| 241 | sio->n_status &= ~( SIO_STATUS_TX_RDY ); |
| 242 | sio->n_status &= ~( SIO_STATUS_TX_EMPTY ); |
| 243 | sio_timer_adjust( n_port ); |
| 244 | break; |
| 245 | case 1: |
| 246 | verboselog( machine(), 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); |
| 247 | break; |
| 248 | case 2: |
| 249 | if( ACCESSING_BITS_0_15 ) |
| 250 | { |
| 251 | sio->n_mode = data & 0xffff; |
| 252 | verboselog( machine(), 1, "psx_sio_w %d mode %04x\n", n_port, data & 0xffff ); |
| 253 | } |
| 254 | if( ACCESSING_BITS_16_31 ) |
| 255 | { |
| 256 | verboselog( machine(), 1, "psx_sio_w %d control %04x\n", n_port, data >> 16 ); |
| 257 | sio->n_control = data >> 16; |
| 258 | |
| 259 | if( ( sio->n_control & SIO_CONTROL_RESET ) != 0 ) |
| 260 | { |
| 261 | verboselog( machine(), 1, "psx_sio_w reset\n" ); |
| 262 | sio->n_status |= SIO_STATUS_TX_EMPTY | SIO_STATUS_TX_RDY; |
| 263 | sio->n_status &= ~( SIO_STATUS_RX_RDY | SIO_STATUS_OVERRUN | SIO_STATUS_IRQ ); |
| 264 | } |
| 265 | if( ( sio->n_control & SIO_CONTROL_IACK ) != 0 ) |
| 266 | { |
| 267 | verboselog( machine(), 1, "psx_sio_w iack\n" ); |
| 268 | sio->n_status &= ~( SIO_STATUS_IRQ ); |
| 269 | sio->n_control &= ~( SIO_CONTROL_IACK ); |
| 270 | } |
| 271 | if( ( sio->n_control & SIO_CONTROL_DTR ) != 0 ) |
| 272 | { |
| 273 | sio->n_tx |= PSX_SIO_OUT_DTR; |
| 274 | } |
| 275 | else |
| 276 | { |
| 277 | sio->n_tx &= ~PSX_SIO_OUT_DTR; |
| 278 | } |
| 279 | |
| 280 | if( ( ( sio->n_tx ^ sio->n_tx_prev ) & PSX_SIO_OUT_DTR ) != 0 ) |
| 281 | { |
| 282 | if( sio->fn_handler != NULL ) |
| 283 | { |
| 284 | (*sio->fn_handler)( machine(), sio->n_tx ); |
| 285 | } |
| 286 | } |
| 287 | sio->n_tx_prev = sio->n_tx; |
| 288 | |
| 289 | } |
| 290 | break; |
| 291 | case 3: |
| 292 | if( ACCESSING_BITS_0_15 ) |
| 293 | { |
| 294 | verboselog( machine(), 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); |
| 295 | } |
| 296 | if( ACCESSING_BITS_16_31 ) |
| 297 | { |
| 298 | sio->n_baud = data >> 16; |
| 299 | verboselog( machine(), 1, "psx_sio_w %d baud %04x\n", n_port, data >> 16 ); |
| 300 | } |
| 301 | break; |
| 302 | default: |
| 303 | verboselog( machine(), 0, "psx_sio_w( %08x, %08x, %08x )\n", offset, data, mem_mask ); |
| 304 | break; |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | READ32_MEMBER( psxsio_device::read ) |
| 309 | { |
| 310 | int n_port = offset / 4; |
| 311 | psx_sio *sio = &port[ n_port ]; |
| 312 | UINT32 data; |
| 313 | |
| 314 | switch( offset % 4 ) |
| 315 | { |
| 316 | case 0: |
| 317 | data = sio->n_rx_data; |
| 318 | sio->n_status &= ~( SIO_STATUS_RX_RDY ); |
| 319 | sio->n_rx_data = 0xff; |
| 320 | verboselog( machine(), 1, "psx_sio_r %d data %02x (%08x)\n", n_port, data, mem_mask ); |
| 321 | break; |
| 322 | case 1: |
| 323 | data = sio->n_status; |
| 324 | if( ACCESSING_BITS_0_15 ) |
| 325 | { |
| 326 | verboselog( machine(), 1, "psx_sio_r %d status %04x\n", n_port, data & 0xffff ); |
| 327 | } |
| 328 | if( ACCESSING_BITS_16_31 ) |
| 329 | { |
| 330 | verboselog( machine(), 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| 331 | } |
| 332 | break; |
| 333 | case 2: |
| 334 | data = ( sio->n_control << 16 ) | sio->n_mode; |
| 335 | if( ACCESSING_BITS_0_15 ) |
| 336 | { |
| 337 | verboselog( machine(), 1, "psx_sio_r %d mode %04x\n", n_port, data & 0xffff ); |
| 338 | } |
| 339 | if( ACCESSING_BITS_16_31 ) |
| 340 | { |
| 341 | verboselog( machine(), 1, "psx_sio_r %d control %04x\n", n_port, data >> 16 ); |
| 342 | } |
| 343 | break; |
| 344 | case 3: |
| 345 | data = sio->n_baud << 16; |
| 346 | if( ACCESSING_BITS_0_15 ) |
| 347 | { |
| 348 | verboselog( machine(), 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| 349 | } |
| 350 | if( ACCESSING_BITS_16_31 ) |
| 351 | { |
| 352 | verboselog( machine(), 1, "psx_sio_r %d baud %04x\n", n_port, data >> 16 ); |
| 353 | } |
| 354 | break; |
| 355 | default: |
| 356 | data = 0; |
| 357 | verboselog( machine(), 0, "psx_sio_r( %08x, %08x ) %08x\n", offset, mem_mask, data ); |
| 358 | break; |
| 359 | } |
| 360 | return data; |
| 361 | } |
| 362 | |
| 363 | void psxsio_device::input( int n_port, int n_mask, int n_data ) |
| 364 | { |
| 365 | psx_sio *sio = &port[ n_port ]; |
| 366 | verboselog( machine(), 1, "psx_sio_input( %d, %02x, %02x )\n", n_port, n_mask, n_data ); |
| 367 | sio->n_rx = ( sio->n_rx & ~n_mask ) | ( n_data & n_mask ); |
| 368 | |
| 369 | if( ( sio->n_rx & PSX_SIO_IN_DSR ) != 0 ) |
| 370 | { |
| 371 | sio->n_status |= SIO_STATUS_DSR; |
| 372 | if( ( sio->n_rx_prev & PSX_SIO_IN_DSR ) == 0 && |
| 373 | ( sio->n_control & SIO_CONTROL_DSR_IENA ) != 0 ) |
| 374 | { |
| 375 | sio_interrupt( n_port ); |
| 376 | } |
| 377 | } |
| 378 | else |
| 379 | { |
| 380 | sio->n_status &= ~SIO_STATUS_DSR; |
| 381 | } |
| 382 | sio->n_rx_prev = sio->n_rx; |
| 383 | } |
src/emu/machine/k053252.c
| r0 | r11557 | |
| 1 | /*************************************************************************************************************************** |
| 2 | |
| 3 | Konami 053252 chip emulation, codenamed "CCU" |
| 4 | |
| 5 | device emulation by Angelo Salese, based off notes by Olivier Galibert |
| 6 | |
| 7 | ============================================================================================================================ |
| 8 | |
| 9 | left res = current in game, right res = computed |
| 10 | |
| 11 | hexion: 02 FF 00 4D 00 73 00 00 01 1F 05 0E B7 7C 00 00 512x256 ~ 512x256 <- writes to e and f regs, in an irq ack fashion |
| 12 | overdriv: 01 7F 00 22 00 0D 00 03 01 07 10 0F 73 00 00 00 304x256 ~ 305x224 |
| 13 | esckids: 01 7F 00 12 00 0D 00 01 01 07 08 07 73 00 00 00 304x224 ~ 321x240 |
| 14 | rollerg: 01 7F 00 23 00 1D 02 00 01 07 10 0F 73 00 02 00 288x224 ~ 288x224 <- writes to 6 and e regs, in an irq ack fashion |
| 15 | gaiapols: 01 FB 00 19 00 37 00 00 01 06 10 0E 75 00 D1 00 376x224 ~ 380x224 |
| 16 | mmaulers: 01 7F 00 19 00 27 00 00 01 07 10 0F 73 00 00 00 288x224 ~ 288x224 |
| 17 | mystwarr: 01 7F 00 12 00 2E 00 00 01 07 11 0E 73 00 00 00 288x224 ~ 288x224 |
| 18 | metamrph: 01 7F 00 11 00 27 01 00 01 07 10 0F 74 00 00 00 288x224 ~ 288x224 |
| 19 | viostorm: 01 FF 00 16 00 39 00 00 01 07 11 0E 75 00 00 00 384x224 ~ 385x224 |
| 20 | mtlchamp: 01 FF 00 21 00 37 00 00 01 07 11 0E 74 00 00 00 384x224 ~ 384x224 |
| 21 | dbz: 01 FF 00 21 00 37 00 00 01 20 0C 0E 54 00 00 00 384x256 ~ 384x256 |
| 22 | dbz2: 01 FF 00 21 00 37 00 00 01 20 0C 0E 54 00 00 00 384x256 ~ 384x256 |
| 23 | xexex: 01 FF 00 21 00 37 01 00 00 20 0C 0E 54 00 00 00 384x256 ~ 384x256 (*) |
| 24 | (all konamigx, cowboys of moo mesa, run & gun, dj main) |
| 25 | |
| 26 | (*) hblank duration 512 (0x200), hdisp 384 (0x180), vblank duration 288 (0x120), vdisp 256 (0x100) |
| 27 | |
| 28 | Definitions from GX, look similar, all values big-endian, write-only: |
| 29 | |
| 30 | 0-1: bits 9-0: HC - Total hblank duration (-1) Hres ~ (HC+1) - HFP - HBP - 8*(HSW+1) |
| 31 | 2-3: bits 8-0: HFP - HBlank front porch |
| 32 | 4-5: bits 8-0: HBP - HBlank back porch |
| 33 | 6 : bits 7-0: INT1EN |
| 34 | 7 : bits 7-0: INT2EN |
| 35 | 8-9: bits 8-0: VC - Total vblank duration |
| 36 | a : bits 7-0: VFP - VBlank front porch Vres ~ VC - VFP - VBP - (VSW+1) |
| 37 | b : bits 7-0: VBP - VBlank back porch |
| 38 | c : bits 7-4: VSW - V-Sync Width |
| 39 | c : bits 3-0: HSW - H-Sync Width |
| 40 | d : bits 7-0: INT-TIME |
| 41 | e : bits 7-0: INT1ACK |
| 42 | f : bits 7-0: INT2ACK |
| 43 | |
| 44 | Read-only: |
| 45 | e-f: bits 8-0: VCT |
| 46 | |
| 47 | TODO: |
| 48 | - xexex sets up 0x20 as the VC? default value? |
| 49 | - xexex layers are offsetted if you try to use the CCU |
| 50 | - understand how to interpret the back / front porch values, and remove the offset x/y hack |
| 51 | |
| 52 | ***************************************************************************************************************************/ |
| 53 | |
| 54 | |
| 55 | #include "emu.h" |
| 56 | #include "k053252.h" |
| 57 | |
| 58 | typedef struct _k053252_state k053252_state; |
| 59 | struct _k053252_state |
| 60 | { |
| 61 | UINT8 regs[16]; |
| 62 | UINT16 hc,hfp,hbp; |
| 63 | UINT16 vc,vfp,vbp; |
| 64 | UINT8 vsw,hsw; |
| 65 | |
| 66 | screen_device *screen; |
| 67 | devcb_resolved_write_line int1_en; |
| 68 | devcb_resolved_write_line int2_en; |
| 69 | devcb_resolved_write_line int1_ack; |
| 70 | devcb_resolved_write_line int2_ack; |
| 71 | //devcb_resolved_write8 int_time; |
| 72 | int offsx,offsy; |
| 73 | }; |
| 74 | |
| 75 | |
| 76 | /***************************************************************************** |
| 77 | INLINE FUNCTIONS |
| 78 | *****************************************************************************/ |
| 79 | |
| 80 | INLINE k053252_state *k053252_get_safe_token( device_t *device ) |
| 81 | { |
| 82 | assert(device != NULL); |
| 83 | assert(device->type() == K053252); |
| 84 | |
| 85 | return (k053252_state *)downcast<legacy_device_base *>(device)->token(); |
| 86 | } |
| 87 | |
| 88 | INLINE const k053252_interface *k053252_get_interface( device_t *device ) |
| 89 | { |
| 90 | assert(device != NULL); |
| 91 | assert(device->type() == K053252); |
| 92 | |
| 93 | return (const k053252_interface *) device->static_config(); |
| 94 | } |
| 95 | |
| 96 | /***************************************************************************** |
| 97 | DEVICE HANDLERS |
| 98 | *****************************************************************************/ |
| 99 | |
| 100 | READ8_DEVICE_HANDLER( k053252_r ) |
| 101 | { |
| 102 | k053252_state *k053252 = k053252_get_safe_token(device); |
| 103 | |
| 104 | //TODO: debugger_access() |
| 105 | popmessage("Warning: k053252 read %02x, contact MAMEdev",offset); |
| 106 | |
| 107 | return k053252->regs[offset]; |
| 108 | } |
| 109 | |
| 110 | static void k053252_res_change( device_t *device ) |
| 111 | { |
| 112 | k053252_state *k053252 = k053252_get_safe_token(device); |
| 113 | |
| 114 | if(k053252->screen != NULL) |
| 115 | { |
| 116 | if(k053252->hc && k053252->vc && |
| 117 | k053252->hbp && k053252->hfp && |
| 118 | k053252->vbp && k053252->vfp && |
| 119 | k053252->hsw && k053252->vsw) //safety checks |
| 120 | { |
| 121 | rectangle visarea; |
| 122 | //(HC+1) - HFP - HBP - 8*(HSW+1) |
| 123 | //VC - VFP - VBP - (VSW+1) |
| 124 | attoseconds_t refresh = HZ_TO_ATTOSECONDS(device->clock()) * (k053252->hc) * k053252->vc; |
| 125 | |
| 126 | //printf("H %d %d %d %d\n",k053252->hc,k053252->hfp,k053252->hbp,k053252->hsw); |
| 127 | //printf("V %d %d %d %d\n",k053252->vc,k053252->vfp,k053252->vbp,k053252->vsw); |
| 128 | |
| 129 | visarea.min_x = k053252->offsx; |
| 130 | visarea.min_y = k053252->offsy; |
| 131 | visarea.max_x = k053252->offsx + k053252->hc - k053252->hfp - k053252->hbp - 8*(k053252->hsw) - 1; |
| 132 | visarea.max_y = k053252->offsy + k053252->vc - k053252->vfp - k053252->vbp - (k053252->vsw) - 1; |
| 133 | |
| 134 | k053252->screen->configure(k053252->hc, k053252->vc, visarea, refresh); |
| 135 | } |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | WRITE8_DEVICE_HANDLER( k053252_w ) |
| 140 | { |
| 141 | k053252_state *k053252 = k053252_get_safe_token(device); |
| 142 | |
| 143 | k053252->regs[offset] = data; |
| 144 | |
| 145 | switch(offset) |
| 146 | { |
| 147 | case 0x00: |
| 148 | case 0x01: |
| 149 | k053252->hc = (k053252->regs[1]&0xff); |
| 150 | k053252->hc |= ((k053252->regs[0]&0x03)<<8); |
| 151 | k053252->hc ++; |
| 152 | logerror("%d (%04x) HC set\n",k053252->hc,k053252->hc); |
| 153 | k053252_res_change(device); |
| 154 | break; |
| 155 | case 0x02: |
| 156 | case 0x03: |
| 157 | k053252->hfp = (k053252->regs[3]&0xff); |
| 158 | k053252->hfp |= ((k053252->regs[2]&0x01)<<8); |
| 159 | logerror("%d (%04x) HFP set\n",k053252->hfp,k053252->hfp); |
| 160 | k053252_res_change(device); |
| 161 | break; |
| 162 | case 0x04: |
| 163 | case 0x05: |
| 164 | k053252->hbp = (k053252->regs[5]&0xff); |
| 165 | k053252->hbp |= ((k053252->regs[4]&0x01)<<8); |
| 166 | logerror("%d (%04x) HBP set\n",k053252->hbp,k053252->hbp); |
| 167 | k053252_res_change(device); |
| 168 | break; |
| 169 | case 0x06: k053252->int1_en(data); break; |
| 170 | case 0x07: k053252->int2_en(data); break; |
| 171 | case 0x08: |
| 172 | case 0x09: |
| 173 | k053252->vc = (k053252->regs[9]&0xff); |
| 174 | k053252->vc |= ((k053252->regs[8]&0x01)<<8); |
| 175 | logerror("%d (%04x) VC set\n",k053252->vc,k053252->vc); |
| 176 | k053252_res_change(device); |
| 177 | break; |
| 178 | case 0x0a: |
| 179 | k053252->vfp = (k053252->regs[0x0a]&0xff); |
| 180 | logerror("%d (%04x) VFP set\n",k053252->vfp,k053252->vfp); |
| 181 | k053252_res_change(device); |
| 182 | break; |
| 183 | case 0x0b: |
| 184 | k053252->vbp = (k053252->regs[0x0b]&0xff); |
| 185 | logerror("%d (%04x) VBP set\n",k053252->vbp,k053252->vbp); |
| 186 | k053252_res_change(device); |
| 187 | break; |
| 188 | case 0x0c: |
| 189 | k053252->vsw = ((k053252->regs[0x0c]&0xf0) >> 4) + 1; |
| 190 | k053252->hsw = ((k053252->regs[0x0c]&0x0f) >> 0) + 1; |
| 191 | logerror("%02x VSW / %02x HSW set\n",k053252->vsw,k053252->hsw); |
| 192 | k053252_res_change(device); |
| 193 | break; |
| 194 | //case 0x0d: k053252->int_time(data); break; |
| 195 | case 0x0e: k053252->int1_ack(1); break; |
| 196 | case 0x0f: k053252->int2_ack(1); break; |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | |
| 201 | |
| 202 | /***************************************************************************** |
| 203 | DEVICE INTERFACE |
| 204 | *****************************************************************************/ |
| 205 | |
| 206 | static DEVICE_START( k053252 ) |
| 207 | { |
| 208 | k053252_state *k053252 = k053252_get_safe_token(device); |
| 209 | const k053252_interface *intf = k053252_get_interface(device); |
| 210 | |
| 211 | device->save_item(NAME(k053252->regs)); |
| 212 | k053252->screen = device->machine().device<screen_device>(intf->screen); |
| 213 | k053252->int1_en.resolve(intf->int1_en, *device); |
| 214 | k053252->int2_en.resolve(intf->int2_en, *device); |
| 215 | k053252->int1_ack.resolve(intf->int1_ack, *device); |
| 216 | k053252->int2_ack.resolve(intf->int2_ack, *device); |
| 217 | //k053252->int_time.resolve(intf->int_time, *device); |
| 218 | k053252->offsx = intf->offsx; |
| 219 | k053252->offsy = intf->offsy; |
| 220 | } |
| 221 | |
| 222 | static DEVICE_RESET( k053252 ) |
| 223 | { |
| 224 | k053252_state *k053252 = k053252_get_safe_token(device); |
| 225 | int i; |
| 226 | |
| 227 | for (i = 0; i < 16; i++) |
| 228 | k053252->regs[i] = 0; |
| 229 | |
| 230 | k053252->regs[0x08] = 1; // Xexex apparently does a wrong assignment for VC (sets up the INT enable register instead) |
| 231 | } |
| 232 | |
| 233 | |
| 234 | DEVICE_GET_INFO( k053252 ) |
| 235 | { |
| 236 | switch (state) |
| 237 | { |
| 238 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 239 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(k053252_state); break; |
| 240 | |
| 241 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 242 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(k053252); break; |
| 243 | case DEVINFO_FCT_STOP: /* Nothing */ break; |
| 244 | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(k053252); break; |
| 245 | |
| 246 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 247 | case DEVINFO_STR_NAME: strcpy(info->s, "Konami 053252"); break; |
| 248 | case DEVINFO_STR_FAMILY: strcpy(info->s, "Konami Video IC"); break; |
| 249 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 250 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 251 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright MAME Team"); break; |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | DEFINE_LEGACY_DEVICE(K053252, k053252); |
| 256 | |