src/mame/drivers/nss.c
| r7740 | r7741 | |
| 449 | 449 | MDRV_DRIVER_DATA(snes_state) |
| 450 | 450 | |
| 451 | 451 | /* basic machine hardware */ |
| 452 | | MDRV_CPU_ADD("maincpu", G65816, 3580000) /* 2.68Mhz, also 3.58Mhz */ |
| 452 | MDRV_CPU_ADD("maincpu", 5A22, 3580000*6) /* 2.68Mhz, also 3.58Mhz */ |
| 453 | 453 | MDRV_CPU_PROGRAM_MAP(snes_map) |
| 454 | 454 | |
| 455 | 455 | MDRV_CPU_ADD("soundcpu", SPC700, 2048000/2) /* 2.048 Mhz, but internal divider */ |
src/emu/cpu/g65816/g65816.c
| r7740 | r7741 | |
| 100 | 100 | assert(device != NULL); |
| 101 | 101 | assert(device->token != NULL); |
| 102 | 102 | assert(device->type == CPU); |
| 103 | | assert(cpu_get_type(device) == CPU_G65816); |
| 103 | assert(cpu_get_type(device) == CPU_G65816 || cpu_get_type(device) == CPU_5A22); |
| 104 | 104 | return (g65816i_cpu_struct *)device->token; |
| 105 | 105 | } |
| 106 | 106 | |
| r7740 | r7741 | |
| 339 | 339 | g65816_set_irq_callback(cpustate, irqcallback); |
| 340 | 340 | cpustate->device = device; |
| 341 | 341 | cpustate->program = device->space(AS_PROGRAM); |
| 342 | cpustate->cpu_type = CPU_TYPE_G65816; |
| 342 | 343 | |
| 343 | 344 | state_save_register_device_item(device, 0, cpustate->a); |
| 344 | 345 | state_save_register_device_item(device, 0, cpustate->b); |
| r7740 | r7741 | |
| 523 | 524 | } |
| 524 | 525 | } |
| 525 | 526 | |
| 527 | /* |
| 528 | SNES specific, used to handle master cycles |
| 529 | */ |
| 530 | |
| 531 | static CPU_INIT( 5a22 ) |
| 532 | { |
| 533 | g65816i_cpu_struct *cpustate = get_safe_token(device); |
| 534 | |
| 535 | CPU_INIT_CALL(g65816); |
| 536 | |
| 537 | cpustate->cpu_type = CPU_TYPE_5A22; |
| 538 | } |
| 539 | |
| 540 | |
| 541 | CPU_GET_INFO( 5a22 ) |
| 542 | { |
| 543 | switch (state) |
| 544 | { |
| 545 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 546 | case CPUINFO_FCT_INIT: info->init = CPU_INIT_NAME(5a22); break; |
| 547 | |
| 548 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 549 | case DEVINFO_STR_NAME: strcpy(info->s, "5A22"); break; |
| 550 | |
| 551 | default: CPU_GET_INFO_CALL(g65816); break; |
| 552 | } |
| 553 | } |
| 554 | |
| 526 | 555 | /* ======================================================================== */ |
| 527 | 556 | /* ============================== END OF FILE ============================= */ |
| 528 | 557 | /* ======================================================================== */ |
src/mess/drivers/snes.c
| r7740 | r7741 | |
| 514 | 514 | state->scope[port].pause_lock = 0; |
| 515 | 515 | |
| 516 | 516 | /* If we have pressed fire or cursor and we are on-screen and SuperScope is in Port2, then latch video signal. |
| 517 | | Notice that we only latch Port2 because its IOBit pin is connected to bit7 of the IO Port, while Port1 has |
| 517 | Notice that we only latch Port2 because its IOBit pin is connected to bit7 of the IO Port, while Port1 has |
| 518 | 518 | IOBit pin connected to bit6 of the IO Port, and the latter is not detected by the H/V Counters. In other |
| 519 | 519 | words, you can connect SuperScope to Port1, but there is no way SNES could detect its on-screen position */ |
| 520 | 520 | if ((state->scope[port].buttons & 0xc0) && !(state->scope[port].buttons & 0x02) && port == 1) |
| r7740 | r7741 | |
| 692 | 692 | MDRV_DRIVER_DATA(snes_state) |
| 693 | 693 | |
| 694 | 694 | /* basic machine hardware */ |
| 695 | | MDRV_CPU_ADD("maincpu", G65816, MCLK_NTSC/6) /* 2.68 MHz, also 3.58 MHz */ |
| 695 | MDRV_CPU_ADD("maincpu", 5A22, MCLK_NTSC) /* 2.68 MHz, also 3.58 MHz */ |
| 696 | 696 | MDRV_CPU_PROGRAM_MAP(snes_map) |
| 697 | 697 | |
| 698 | 698 | MDRV_CPU_ADD("soundcpu", SPC700, 1024000) /* 1.024 MHz */ |
| r7740 | r7741 | |
| 737 | 737 | |
| 738 | 738 | static MACHINE_DRIVER_START( snespal ) |
| 739 | 739 | MDRV_IMPORT_FROM(snes) |
| 740 | | MDRV_CPU_REPLACE("maincpu", G65816, MCLK_PAL/6) |
| 740 | MDRV_CPU_REPLACE("maincpu", 5A22, MCLK_PAL) |
| 741 | 741 | |
| 742 | 742 | MDRV_SCREEN_MODIFY("screen") |
| 743 | 743 | MDRV_SCREEN_RAW_PARAMS(DOTCLK_PAL, SNES_HTOTAL, 0, SNES_SCR_WIDTH, SNES_VTOTAL_PAL, 0, SNES_SCR_HEIGHT_PAL) |