trunk/src/mame/drivers/taitojc.c
| r31824 | r31825 | |
| 311 | 311 | D482445 - 256k x16 Video DRAM. Compatible with Toshiba TC524165/TC52V4165 (also used on Namco System 11 CPU boards) |
| 312 | 312 | LC321664- 64k x16 DRAM |
| 313 | 313 | TC51832 - 32k x8 SRAM |
| 314 | | MB8422 - 16k-bit (2kbytes) Dual Port SRAM |
| 314 | MB8421 - 16k-bit (2kbytes) Dual Port SRAM |
| 315 | 315 | |
| 316 | 316 | Measurements: |
| 317 | 317 | HSync - 24.639kHz / 24.690kHz (alternates between the two frequencies slowly every ~2 seconds) |
| r31824 | r31825 | |
| 380 | 380 | #include "cpu/mc68hc11/mc68hc11.h" |
| 381 | 381 | #include "sound/es5506.h" |
| 382 | 382 | #include "sound/okim6295.h" |
| 383 | #include "machine/mb8421.h" |
| 384 | #include "machine/taitoio.h" |
| 383 | 385 | #include "machine/eepromser.h" |
| 384 | 386 | #include "audio/taito_en.h" |
| 385 | 387 | #include "includes/taitojc.h" |
| r31824 | r31825 | |
| 444 | 446 | #define VBSTART (400) |
| 445 | 447 | |
| 446 | 448 | |
| 449 | #define DSP_IDLESKIP 1 /* dsp idle skipping speedup hack */ |
| 450 | |
| 451 | |
| 447 | 452 | /*************************************************************************** |
| 448 | 453 | |
| 449 | | maincpu I/O |
| 454 | Interrupts |
| 450 | 455 | |
| 451 | 456 | ***************************************************************************/ |
| 452 | 457 | |
| 453 | | #define DEBUG_DSP 0 |
| 454 | | #define DEBUG_BLOCK_MOVES 0 |
| 455 | | |
| 456 | | READ32_MEMBER(taitojc_state::dsp_shared_r) |
| 458 | WRITE_LINE_MEMBER(taitojc_state::mb8421_intl) |
| 457 | 459 | { |
| 458 | | return m_dsp_shared_ram[offset] << 16; |
| 460 | m_maincpu->set_input_line(6, state ? ASSERT_LINE : CLEAR_LINE); |
| 459 | 461 | } |
| 460 | 462 | |
| 461 | | #if DEBUG_DSP |
| 462 | | |
| 463 | | void taitojc_state::debug_dsp_command() |
| 463 | WRITE_LINE_MEMBER(taitojc_state::mb8421_intr) |
| 464 | 464 | { |
| 465 | | UINT16 *cmd = &m_dsp_shared_ram[0x1fc0/2]; |
| 466 | | |
| 467 | | switch (cmd[0]) |
| 465 | // this is hacky, acquiring the internal dsp romdump should allow it to be cleaned up |
| 466 | if (state) |
| 468 | 467 | { |
| 469 | | case 0x00: |
| 468 | if (m_mb8421->peek(0x7ff) & 0x08) |
| 470 | 469 | { |
| 471 | | printf("DSP: NOP\n"); |
| 472 | | break; |
| 470 | m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 473 | 471 | } |
| 474 | | case 0x01: |
| 472 | else |
| 475 | 473 | { |
| 476 | | printf("DSP: Move to Shared RAM: %04X\n", cmd[1]); |
| 477 | | break; |
| 478 | | } |
| 479 | | case 0x02: |
| 480 | | { |
| 481 | | printf("DSP: Move from Shared RAM: %04X\n", cmd[1]); |
| 482 | | break; |
| 483 | | } |
| 484 | | case 0x03: |
| 485 | | { |
| 486 | | printf("DSP: Block move DM to DM: %04X, %04X, %04X\n", cmd[1], cmd[2], cmd[3]+1); |
| 487 | | if (cmd[2] >= 0x7800 && cmd[2] < 0x8000) |
| 488 | | { |
| 489 | | int i, j; |
| 490 | | int saddr = cmd[2] - 0x7800; |
| 491 | | int daddr = cmd[1]; |
| 492 | | int length = cmd[3]+1; |
| 493 | | |
| 494 | | for (j=0; j < length; j+=16) |
| 495 | | { |
| 496 | | int ll = (length - j); |
| 497 | | if (ll > 16) ll = 16; |
| 498 | | |
| 499 | | #if DEBUG_BLOCK_MOVES |
| 500 | | printf(" %04X: ", daddr); |
| 501 | | #endif |
| 502 | | for (i=0; i < ll; i++) |
| 503 | | { |
| 504 | | UINT16 d = m_dsp_shared_ram[saddr++]; |
| 505 | | if (daddr >= 0x8000 && daddr < 0x10000) |
| 506 | | { |
| 507 | | m_debug_dsp_ram[daddr-0x8000] = d; |
| 508 | | } |
| 509 | | daddr++; |
| 510 | | |
| 511 | | #if DEBUG_BLOCK_MOVES |
| 512 | | printf("%04X ", d); |
| 513 | | #endif |
| 514 | | } |
| 515 | | #if DEBUG_BLOCK_MOVES |
| 516 | | printf("\n"); |
| 517 | | #endif |
| 518 | | } |
| 519 | | } |
| 520 | | break; |
| 521 | | } |
| 522 | | case 0x04: |
| 523 | | { |
| 524 | | printf("DSP: Block move PM to DM: %04X, %04X, %04X\n", cmd[1], cmd[2], cmd[3]+1); |
| 525 | | break; |
| 526 | | } |
| 527 | | case 0x05: |
| 528 | | { |
| 529 | | printf("DSP: Block move DM to PM: %04X, %04X, %04X\n", cmd[1], cmd[2], cmd[3]+1); |
| 530 | | break; |
| 531 | | } |
| 532 | | case 0x08: |
| 533 | | { |
| 534 | | printf("DSP: Jump to address: %04X, %04X, %04X\n", cmd[1], cmd[3], cmd[4]); |
| 535 | | break; |
| 536 | | } |
| 537 | | case 0x09: |
| 538 | | { |
| 539 | | printf("DSP: Call Sub operation: %04X\n", cmd[1]); |
| 540 | | if (cmd[1] == 0x8000) |
| 541 | | { |
| 542 | | int addr = 0; |
| 543 | | int end = 0; |
| 544 | | while (!end) |
| 545 | | { |
| 546 | | int i; |
| 547 | | UINT16 cmd = m_debug_dsp_ram[addr++]; |
| 548 | | int length = cmd & 0xff; |
| 549 | | |
| 550 | | if ((cmd >> 11) == 6) |
| 551 | | end = 1; |
| 552 | | |
| 553 | | printf(" %04X (%02X): ", cmd, cmd >> 11); |
| 554 | | for (i=0; i < length; i++) |
| 555 | | { |
| 556 | | printf("%04X ", m_debug_dsp_ram[addr+i]); |
| 557 | | } |
| 558 | | printf("\n"); |
| 559 | | |
| 560 | | addr += length; |
| 561 | | }; |
| 562 | | } |
| 563 | | break; |
| 564 | | } |
| 565 | | case 0x0d: |
| 566 | | { |
| 567 | | printf("DSP: Calculate ROM checksum\n"); |
| 568 | | break; |
| 569 | | } |
| 570 | | case 0x10: |
| 571 | | { |
| 572 | | printf("DSP: Test RAM\n"); |
| 573 | | break; |
| 574 | | } |
| 575 | | case 0x11: |
| 576 | | { |
| 577 | | printf("DSP: Test Program Checksum: %04X, %04X\n", cmd[1], cmd[2]+1); |
| 578 | | break; |
| 579 | | } |
| 580 | | default: |
| 581 | | { |
| 582 | | printf("DSP: Unknown command %04X\n", cmd[0]); |
| 583 | | break; |
| 584 | | } |
| 585 | | } |
| 586 | | |
| 587 | | printf("\n"); |
| 588 | | } |
| 589 | | #endif // DEBUG_DSP |
| 590 | | |
| 591 | | WRITE32_MEMBER(taitojc_state::dsp_shared_w) |
| 592 | | { |
| 593 | | //osd_printf_debug("dsp_shared: %08X, %04X at %08X\n", offset, data >> 16, space.device().safe_pc()); |
| 594 | | if (ACCESSING_BITS_24_31) |
| 595 | | { |
| 596 | | m_dsp_shared_ram[offset] &= 0x00ff; |
| 597 | | m_dsp_shared_ram[offset] |= (data >> 16) & 0xff00; |
| 598 | | } |
| 599 | | if (ACCESSING_BITS_16_23) |
| 600 | | { |
| 601 | | m_dsp_shared_ram[offset] &= 0xff00; |
| 602 | | m_dsp_shared_ram[offset] |= (data >> 16) & 0x00ff; |
| 603 | | } |
| 604 | | |
| 605 | | #if DEBUG_DSP |
| 606 | | if (offset == 0x1fc0/4) |
| 607 | | { |
| 608 | | debug_dsp_command(machine()); |
| 609 | | } |
| 610 | | #endif |
| 611 | | |
| 612 | | if (offset == 0x1ffc/4) |
| 613 | | { |
| 614 | | if ((data & 0x80000) == 0) |
| 615 | | { |
| 616 | 474 | /* |
| 475 | regarding m_has_dsp_hack: |
| 617 | 476 | All games minus Dangerous Curves tests if the DSP is alive with this code snippet: |
| 618 | 477 | |
| 619 | 478 | 0008C370: 4A79 1000 1FC0 tst.w $10001fc0.l |
| r31824 | r31825 | |
| 629 | 488 | } |
| 630 | 489 | m_first_dsp_reset = 0; |
| 631 | 490 | } |
| 632 | | else |
| 633 | | { |
| 634 | | m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 635 | | } |
| 636 | 491 | } |
| 637 | 492 | } |
| 638 | 493 | |
| 494 | INTERRUPT_GEN_MEMBER(taitojc_state::taitojc_vblank) |
| 495 | { |
| 496 | device.execute().set_input_line_and_vector(2, HOLD_LINE, 0x82); // where does it come from? |
| 497 | } |
| 639 | 498 | |
| 499 | WRITE8_MEMBER(taitojc_state::jc_irq_unk_w) |
| 500 | { |
| 501 | // gets written to at the end of irq6 routine |
| 502 | // writes $02 or $06, depending on a value in DSP RAM, what does it mean? |
| 503 | } |
| 640 | 504 | |
| 505 | |
| 506 | /*************************************************************************** |
| 507 | |
| 508 | maincpu I/O |
| 509 | |
| 510 | ***************************************************************************/ |
| 511 | |
| 512 | READ8_MEMBER(taitojc_state::dsp_shared_r) |
| 513 | { |
| 514 | return m_dsp_shared_ram_hi[offset]; |
| 515 | } |
| 516 | |
| 517 | WRITE8_MEMBER(taitojc_state::dsp_shared_w) |
| 518 | { |
| 519 | m_dsp_shared_ram_hi[offset] = data; |
| 520 | } |
| 521 | |
| 522 | |
| 641 | 523 | READ8_MEMBER(taitojc_state::mcu_comm_r) |
| 642 | 524 | { |
| 643 | 525 | switch (offset) |
| r31824 | r31825 | |
| 714 | 596 | } |
| 715 | 597 | |
| 716 | 598 | |
| 717 | | WRITE8_MEMBER(taitojc_state::jc_irq_ack_w) |
| 718 | | { |
| 719 | | // gets written to at the end of irq6 routine |
| 720 | | // writes $02 or $06, depending on a value in DSP RAM, what does it mean? |
| 721 | | m_maincpu->set_input_line(6, CLEAR_LINE); |
| 722 | | } |
| 723 | | |
| 724 | | |
| 725 | 599 | /* |
| 726 | 600 | |
| 727 | 601 | Some games (Dangerous Curves, Side by Side, Side by Side 2) were released as Twin cabinets, |
| r31824 | r31825 | |
| 753 | 627 | AM_RANGE(0x06400000, 0x0641ffff) AM_READWRITE(taitojc_palette_r, taitojc_palette_w) AM_SHARE("palette_ram") |
| 754 | 628 | AM_RANGE(0x06600000, 0x0660001f) AM_DEVREADWRITE8("tc0640fio", tc0640fio_device, read, write, 0xff000000) |
| 755 | 629 | AM_RANGE(0x0660004c, 0x0660004f) AM_WRITE_PORT("EEPROMOUT") |
| 756 | | AM_RANGE(0x06800000, 0x06800003) AM_WRITE8(jc_irq_ack_w, 0x00ff0000) |
| 630 | AM_RANGE(0x06800000, 0x06800003) AM_WRITE8(jc_irq_unk_w, 0x00ff0000) |
| 757 | 631 | AM_RANGE(0x06a00000, 0x06a01fff) AM_READWRITE(snd_share_r, snd_share_w) AM_SHARE("snd_shared") |
| 758 | 632 | AM_RANGE(0x06c00000, 0x06c0001f) AM_READWRITE8(jc_lan_r, jc_lan_w, 0x00ff0000) |
| 759 | 633 | AM_RANGE(0x08000000, 0x080fffff) AM_RAM AM_SHARE("main_ram") |
| 760 | | AM_RANGE(0x10000000, 0x10001fff) AM_READWRITE(dsp_shared_r, dsp_shared_w) |
| 634 | AM_RANGE(0x10000000, 0x10001fff) AM_DEVREADWRITE8("mb8421", mb8421_device, left_r, left_w, 0x00ff0000) |
| 635 | AM_RANGE(0x10000000, 0x10001fff) AM_READWRITE8(dsp_shared_r, dsp_shared_w, 0xff000000) // which chip is this? |
| 761 | 636 | ADDRESS_MAP_END |
| 762 | 637 | |
| 763 | 638 | |
| r31824 | r31825 | |
| 973 | 848 | { |
| 974 | 849 | int index; |
| 975 | 850 | int x, y; |
| 976 | | //osd_printf_debug("texture write %08X, %04X\n", dsp_addr1, data); |
| 977 | 851 | |
| 978 | 852 | x = (m_dsp_tex_offset >> 0 & 0x1f) | (m_dsp_tex_offset >> 5 & 0x20); |
| 979 | 853 | y = (m_dsp_tex_offset >> 5 & 0x1f) | (m_dsp_tex_offset >> 6 & 0x20); |
| r31824 | r31825 | |
| 992 | 866 | WRITE16_MEMBER(taitojc_state::dsp_texaddr_w) |
| 993 | 867 | { |
| 994 | 868 | m_dsp_tex_address = data; |
| 995 | | // osd_printf_debug("texaddr = %08X at %08X\n", data, space.device().safe_pc()); |
| 996 | 869 | |
| 997 | 870 | m_texture_x = (((data >> 0) & 0x1f) << 1) | ((data >> 12) & 0x1); |
| 998 | 871 | m_texture_y = (((data >> 5) & 0x1f) << 1) | ((data >> 13) & 0x1); |
| r31824 | r31825 | |
| 1017 | 890 | } |
| 1018 | 891 | } |
| 1019 | 892 | |
| 1020 | | READ16_MEMBER(taitojc_state::dsp_to_main_r) |
| 1021 | | { |
| 1022 | | return m_dsp_shared_ram[0x7fe]; |
| 1023 | | } |
| 1024 | | |
| 1025 | | WRITE16_MEMBER(taitojc_state::dsp_to_main_w) |
| 1026 | | { |
| 1027 | | m_maincpu->set_input_line(6, ASSERT_LINE); // probably not correct to do it here |
| 1028 | | |
| 1029 | | COMBINE_DATA(&m_dsp_shared_ram[0x7fe]); |
| 1030 | | } |
| 1031 | | |
| 1032 | | |
| 1033 | 893 | static ADDRESS_MAP_START( tms_program_map, AS_PROGRAM, 16, taitojc_state ) |
| 1034 | 894 | AM_RANGE(0x4000, 0x7fff) AM_RAM |
| 1035 | 895 | ADDRESS_MAP_END |
| r31824 | r31825 | |
| 1048 | 908 | AM_RANGE(0x701d, 0x701d) AM_READ(dsp_math_projection_y_r) |
| 1049 | 909 | AM_RANGE(0x701f, 0x701f) AM_READ(dsp_math_projection_x_r) |
| 1050 | 910 | AM_RANGE(0x7022, 0x7022) AM_READ(dsp_math_unk_r) |
| 1051 | | AM_RANGE(0x7ffe, 0x7ffe) AM_READWRITE(dsp_to_main_r, dsp_to_main_w) |
| 1052 | | AM_RANGE(0x7800, 0x7fff) AM_RAM AM_SHARE("dsp_shared") |
| 911 | AM_RANGE(0x7800, 0x7fff) AM_DEVREADWRITE8("mb8421", mb8421_device, right_r, right_w, 0x00ff) |
| 912 | AM_RANGE(0x7800, 0x7fff) AM_READWRITE8(dsp_shared_r, dsp_shared_w, 0xff00) // which chip is this? |
| 1053 | 913 | AM_RANGE(0x8000, 0xffff) AM_RAM |
| 1054 | 914 | ADDRESS_MAP_END |
| 1055 | 915 | |
| r31824 | r31825 | |
| 1120 | 980 | PORT_START("EEPROMOUT") |
| 1121 | 981 | PORT_BIT( 0x04000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, di_write) |
| 1122 | 982 | PORT_BIT( 0x08000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, clk_write) |
| 1123 | | PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write) |
| 983 | PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write) |
| 1124 | 984 | INPUT_PORTS_END |
| 1125 | 985 | |
| 1126 | 986 | // Mascon must always be in a defined state, Densha de Go 2 in particular returns black screen if the Mascon input is undefined |
| r31824 | r31825 | |
| 1229 | 1089 | m_dsp_tex_offset = 0; |
| 1230 | 1090 | m_polygon_fifo_ptr = 0; |
| 1231 | 1091 | |
| 1092 | memset(m_dsp_shared_ram_hi, 0, sizeof(m_dsp_shared_ram_hi)); |
| 1232 | 1093 | memset(m_viewport_data, 0, sizeof(m_viewport_data)); |
| 1233 | 1094 | memset(m_projection_data, 0, sizeof(m_projection_data)); |
| 1234 | 1095 | memset(m_intersection_data, 0, sizeof(m_intersection_data)); |
| r31824 | r31825 | |
| 1237 | 1098 | m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); |
| 1238 | 1099 | } |
| 1239 | 1100 | |
| 1240 | | INTERRUPT_GEN_MEMBER(taitojc_state::taitojc_vblank) |
| 1101 | void taitojc_state::machine_start() |
| 1241 | 1102 | { |
| 1242 | | device.execute().set_input_line_and_vector(2, HOLD_LINE, 0x82); // where does it come from? |
| 1103 | // register for savestates |
| 1104 | save_item(NAME(m_texture_x)); |
| 1105 | save_item(NAME(m_texture_y)); |
| 1106 | save_item(NAME(m_dsp_rom_pos)); |
| 1107 | save_item(NAME(m_dsp_tex_address)); |
| 1108 | save_item(NAME(m_dsp_tex_offset)); |
| 1109 | save_item(NAME(m_first_dsp_reset)); |
| 1110 | save_item(NAME(m_dsp_shared_ram_hi)); |
| 1111 | save_item(NAME(m_viewport_data)); |
| 1112 | save_item(NAME(m_projection_data)); |
| 1113 | save_item(NAME(m_intersection_data)); |
| 1114 | save_item(NAME(m_gfx_index)); |
| 1115 | save_item(NAME(m_polygon_fifo_ptr)); |
| 1116 | |
| 1117 | save_item(NAME(m_mcu_comm_main)); |
| 1118 | save_item(NAME(m_mcu_comm_hc11)); |
| 1119 | save_item(NAME(m_mcu_data_main)); |
| 1120 | save_item(NAME(m_mcu_data_hc11)); |
| 1121 | save_item(NAME(m_mcu_output)); |
| 1122 | |
| 1123 | save_item(NAME(m_speed_meter)); |
| 1124 | save_item(NAME(m_brake_meter)); |
| 1243 | 1125 | } |
| 1244 | 1126 | |
| 1245 | 1127 | |
| r31824 | r31825 | |
| 1263 | 1145 | |
| 1264 | 1146 | MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") |
| 1265 | 1147 | |
| 1148 | MCFG_DEVICE_ADD("mb8421", MB8421, 0) |
| 1149 | MCFG_MB8421_INTL_HANDLER(WRITELINE(taitojc_state, mb8421_intl)) |
| 1150 | MCFG_MB8421_INTR_HANDLER(WRITELINE(taitojc_state, mb8421_intr)) |
| 1151 | |
| 1266 | 1152 | MCFG_DEVICE_ADD("tc0640fio", TC0640FIO, 0) |
| 1267 | 1153 | MCFG_TC0640FIO_READ_0_CB(IOPORT("SERVICE")) |
| 1268 | 1154 | MCFG_TC0640FIO_READ_1_CB(IOPORT("COINS")) |
| r31824 | r31825 | |
| 1311 | 1197 | |
| 1312 | 1198 | READ16_MEMBER(taitojc_state::taitojc_dsp_idle_skip_r) |
| 1313 | 1199 | { |
| 1314 | | if(space.device().safe_pc()==0x404c) |
| 1200 | if (space.device().safe_pc() == 0x404c) |
| 1315 | 1201 | space.device().execute().spin_until_time(attotime::from_usec(500)); |
| 1316 | 1202 | |
| 1317 | | return m_dsp_shared_ram[0x7f0]; |
| 1203 | return m_dsp_shared_ram_hi[0x7f0] << 8 | m_mb8421->peek(0x7f0); |
| 1318 | 1204 | } |
| 1319 | 1205 | |
| 1320 | 1206 | READ16_MEMBER(taitojc_state::dendego2_dsp_idle_skip_r) |
| 1321 | 1207 | { |
| 1322 | | if(space.device().safe_pc()==0x402e) |
| 1208 | if (space.device().safe_pc() == 0x402e) |
| 1323 | 1209 | space.device().execute().spin_until_time(attotime::from_usec(500)); |
| 1324 | 1210 | |
| 1325 | | return m_dsp_shared_ram[0x7f0]; |
| 1211 | return m_dsp_shared_ram_hi[0x7f0] << 8 | m_mb8421->peek(0x7f0); |
| 1326 | 1212 | } |
| 1327 | 1213 | |
| 1328 | | WRITE16_MEMBER(taitojc_state::dsp_idle_skip_w) |
| 1329 | | { |
| 1330 | | COMBINE_DATA(&m_dsp_shared_ram[0x7f0]); |
| 1331 | | } |
| 1332 | 1214 | |
| 1333 | | |
| 1334 | 1215 | DRIVER_INIT_MEMBER(taitojc_state,taitojc) |
| 1335 | 1216 | { |
| 1336 | 1217 | m_polygon_fifo = auto_alloc_array(machine(), UINT16, TAITOJC_POLYGON_FIFO_SIZE); |
| 1337 | 1218 | |
| 1338 | 1219 | m_has_dsp_hack = 1; |
| 1339 | 1220 | |
| 1340 | | m_dsp->space(AS_DATA).install_readwrite_handler(0x7ff0, 0x7ff0, read16_delegate(FUNC(taitojc_state::taitojc_dsp_idle_skip_r),this), write16_delegate(FUNC(taitojc_state::dsp_idle_skip_w),this)); |
| 1221 | if (DSP_IDLESKIP) |
| 1222 | m_dsp->space(AS_DATA).install_read_handler(0x7ff0, 0x7ff0, read16_delegate(FUNC(taitojc_state::taitojc_dsp_idle_skip_r),this)); |
| 1341 | 1223 | } |
| 1342 | 1224 | |
| 1343 | 1225 | DRIVER_INIT_MEMBER(taitojc_state,dendego2) |
| 1344 | 1226 | { |
| 1345 | 1227 | DRIVER_INIT_CALL(taitojc); |
| 1346 | 1228 | |
| 1347 | | m_dsp->space(AS_DATA).install_readwrite_handler(0x7ff0, 0x7ff0, read16_delegate(FUNC(taitojc_state::dendego2_dsp_idle_skip_r),this), write16_delegate(FUNC(taitojc_state::dsp_idle_skip_w),this)); |
| 1229 | if (DSP_IDLESKIP) |
| 1230 | m_dsp->space(AS_DATA).install_read_handler(0x7ff0, 0x7ff0, read16_delegate(FUNC(taitojc_state::dendego2_dsp_idle_skip_r),this)); |
| 1348 | 1231 | } |
| 1349 | 1232 | |
| 1350 | 1233 | DRIVER_INIT_MEMBER(taitojc_state,dangcurv) |
| r31824 | r31825 | |
| 2041 | 1924 | GAME( 1995, landgearj, landgear, taitojc, landgear, taitojc_state, taitojc, ROT0, "Taito", "Landing Gear (Ver 4.2 J)", GAME_IMPERFECT_GRAPHICS ) // LANDING GEAR VER 4.2 J Feb 8 1996 09:46:22 |
| 2042 | 1925 | GAME( 1995, landgeara, landgear, taitojc, landgear, taitojc_state, taitojc, ROT0, "Taito", "Landing Gear (Ver 3.1 O)", GAME_IMPERFECT_GRAPHICS ) // LANDING GEAR VER 3.1 O Feb 8 1996 09:46:22 |
| 2043 | 1926 | GAME( 1995, landgearja,landgear, taitojc, landgear, taitojc_state, taitojc, ROT0, "Taito", "Landing Gear (Ver 3.0 J)", GAME_IMPERFECT_GRAPHICS ) // LANDING GEAR VER 3.0 J Feb 8 1996 09:46:22 |
| 2044 | | GAME( 1996, sidebs, 0, taitojc, sidebs, taitojc_state, taitojc, ROT0, "Taito", "Side by Side (Ver 2.7 J)", GAME_IMPERFECT_GRAPHICS ) // SIDE BY SIDE VER 2.7 J 1996/10/11 14:54:10 |
| 2045 | | GAME( 1996, sidebsja, sidebs, taitojc, sidebs, taitojc_state, taitojc, ROT0, "Taito", "Side by Side (Ver 2.5 J)", GAME_IMPERFECT_GRAPHICS ) // SIDE BY SIDE VER 2.5 J 1996/ 6/20 18:13:14 |
| 2046 | | GAMEL(1996, dendego, 0, dendego, dendego, taitojc_state, taitojc, ROT0, "Taito", "Densha de GO! (Ver 2.2 J)", GAME_IMPERFECT_GRAPHICS, layout_dendego ) // DENSYA DE GO VER 2.2 J 1997/ 2/ 4 12:00:28 |
| 2047 | | GAMEL(1996, dendegox, dendego, dendego, dendego, taitojc_state, taitojc, ROT0, "Taito", "Densha de GO! EX (Ver 2.4 J)", GAME_IMPERFECT_GRAPHICS, layout_dendego ) // DENSYA DE GO VER 2.4 J 1997/ 4/18 13:38:34 |
| 2048 | | GAME( 1997, sidebs2, 0, taitojc, sidebs, taitojc_state, taitojc, ROT0, "Taito", "Side by Side 2 (Ver 2.6 A)", GAME_IMPERFECT_GRAPHICS ) // SIDE BY SIDE2 VER 2.6 A 1997/ 6/19 09:39:22 |
| 2049 | | GAME( 1997, sidebs2j, sidebs2, taitojc, sidebs, taitojc_state, taitojc, ROT0, "Taito", "Side by Side 2 Evoluzione (Ver 2.4 J)", GAME_IMPERFECT_GRAPHICS ) // SIDE BY SIDE2 VER 2.4 J 1997/ 5/26 13:06:37 |
| 2050 | | GAMEL(1998, dendego2, 0, dendego, dendego, taitojc_state, dendego2, ROT0, "Taito", "Densha de GO! 2 Kousoku-hen (Ver 2.5 J)", GAME_IMPERFECT_GRAPHICS, layout_dendego ) // DENSYA DE GO2 VER 2.5 J 1998/ 3/ 2 15:30:55 |
| 2051 | | GAMEL(1998, dendego23k,dendego2, dendego, dendego, taitojc_state, dendego2, ROT0, "Taito", "Densha de GO! 2 Kousoku-hen 3000-bandai (Ver 2.20 J)", GAME_IMPERFECT_GRAPHICS, layout_dendego ) // DENSYA DE GO! 2 3000 VER 2.20 J 1998/ 7/15 17:42:38 |
| 1927 | GAME( 1996, sidebs, 0, taitojc, sidebs, taitojc_state, taitojc, ROT0, "Taito", "Side by Side (Ver 2.7 J)", GAME_IMPERFECT_GRAPHICS ) // SIDE BY SIDE VER 2.7 J 1996/10/11 14:54:10 |
| 1928 | GAME( 1996, sidebsja, sidebs, taitojc, sidebs, taitojc_state, taitojc, ROT0, "Taito", "Side by Side (Ver 2.5 J)", GAME_IMPERFECT_GRAPHICS ) // SIDE BY SIDE VER 2.5 J 1996/ 6/20 18:13:14 |
| 1929 | GAMEL(1996, dendego, 0, dendego, dendego, taitojc_state, taitojc, ROT0, "Taito", "Densha de GO! (Ver 2.2 J)", GAME_IMPERFECT_GRAPHICS, layout_dendego ) // DENSYA DE GO VER 2.2 J 1997/ 2/ 4 12:00:28 |
| 1930 | GAMEL(1996, dendegox, dendego, dendego, dendego, taitojc_state, taitojc, ROT0, "Taito", "Densha de GO! EX (Ver 2.4 J)", GAME_IMPERFECT_GRAPHICS, layout_dendego ) // DENSYA DE GO VER 2.4 J 1997/ 4/18 13:38:34 |
| 1931 | GAME( 1997, sidebs2, 0, taitojc, sidebs, taitojc_state, taitojc, ROT0, "Taito", "Side by Side 2 (Ver 2.6 A)", GAME_IMPERFECT_GRAPHICS ) // SIDE BY SIDE2 VER 2.6 A 1997/ 6/19 09:39:22 |
| 1932 | GAME( 1997, sidebs2j, sidebs2, taitojc, sidebs, taitojc_state, taitojc, ROT0, "Taito", "Side by Side 2 Evoluzione (Ver 2.4 J)", GAME_IMPERFECT_GRAPHICS ) // SIDE BY SIDE2 VER 2.4 J 1997/ 5/26 13:06:37 |
| 1933 | GAMEL(1998, dendego2, 0, dendego, dendego, taitojc_state, dendego2, ROT0, "Taito", "Densha de GO! 2 Kousoku-hen (Ver 2.5 J)", GAME_IMPERFECT_GRAPHICS, layout_dendego ) // DENSYA DE GO2 VER 2.5 J 1998/ 3/ 2 15:30:55 |
| 1934 | GAMEL(1998, dendego23k,dendego2, dendego, dendego, taitojc_state, dendego2, ROT0, "Taito", "Densha de GO! 2 Kousoku-hen 3000-bandai (Ver 2.20 J)", GAME_IMPERFECT_GRAPHICS, layout_dendego ) // DENSYA DE GO! 2 3000 VER 2.20 J 1998/ 7/15 17:42:38 |
trunk/src/mame/includes/taitojc.h
| r31824 | r31825 | |
| 1 | 1 | #include "video/poly.h" |
| 2 | #include "machine/mb8421.h" |
| 2 | 3 | #include "machine/taitoio.h" |
| 3 | 4 | |
| 4 | 5 | #define TAITOJC_POLYGON_FIFO_SIZE 0x20000 |
| r31824 | r31825 | |
| 42 | 43 | m_maincpu(*this,"maincpu"), |
| 43 | 44 | m_dsp(*this,"dsp"), |
| 44 | 45 | m_tc0640fio(*this, "tc0640fio"), |
| 46 | m_mb8421(*this, "mb8421"), |
| 45 | 47 | m_gfx2(*this, "gfx2"), |
| 46 | 48 | m_vram(*this, "vram"), |
| 47 | 49 | m_objlist(*this, "objlist"), |
| 48 | 50 | m_snd_shared_ram(*this, "snd_shared"), |
| 49 | 51 | m_main_ram(*this, "main_ram"), |
| 50 | | m_dsp_shared_ram(*this, "dsp_shared"), |
| 51 | 52 | m_palette_ram(*this, "palette_ram"), |
| 52 | 53 | m_gfxdecode(*this, "gfxdecode"), |
| 53 | 54 | m_screen(*this, "screen"), |
| r31824 | r31825 | |
| 61 | 62 | // device/memory pointers |
| 62 | 63 | required_device<cpu_device> m_maincpu; |
| 63 | 64 | required_device<cpu_device> m_dsp; |
| 64 | | optional_device<tc0640fio_device> m_tc0640fio; |
| 65 | required_device<tc0640fio_device> m_tc0640fio; |
| 66 | required_device<mb8421_device> m_mb8421; |
| 65 | 67 | required_memory_region m_gfx2; |
| 66 | 68 | |
| 67 | 69 | required_shared_ptr<UINT32> m_vram; |
| 68 | 70 | required_shared_ptr<UINT32> m_objlist; |
| 69 | | optional_shared_ptr<UINT32> m_snd_shared_ram; |
| 71 | required_shared_ptr<UINT32> m_snd_shared_ram; |
| 70 | 72 | required_shared_ptr<UINT32> m_main_ram; |
| 71 | | required_shared_ptr<UINT16> m_dsp_shared_ram; |
| 72 | 73 | required_shared_ptr<UINT32> m_palette_ram; |
| 73 | 74 | |
| 74 | 75 | required_device<gfxdecode_device> m_gfxdecode; |
| r31824 | r31825 | |
| 85 | 86 | UINT16 m_dsp_tex_offset; |
| 86 | 87 | |
| 87 | 88 | int m_first_dsp_reset; |
| 89 | UINT8 m_dsp_shared_ram_hi[0x800]; |
| 88 | 90 | INT16 m_viewport_data[3]; |
| 89 | 91 | INT16 m_projection_data[3]; |
| 90 | 92 | INT16 m_intersection_data[3]; |
| r31824 | r31825 | |
| 108 | 110 | UINT8 m_mcu_data_hc11; |
| 109 | 111 | UINT8 m_mcu_output; |
| 110 | 112 | |
| 111 | | UINT16 m_debug_dsp_ram[0x8000]; |
| 112 | | |
| 113 | 113 | UINT8 m_has_dsp_hack; |
| 114 | 114 | |
| 115 | 115 | int m_speed_meter; |
| r31824 | r31825 | |
| 117 | 117 | |
| 118 | 118 | DECLARE_READ8_MEMBER(mcu_comm_r); |
| 119 | 119 | DECLARE_WRITE8_MEMBER(mcu_comm_w); |
| 120 | | DECLARE_READ32_MEMBER(dsp_shared_r); |
| 121 | | DECLARE_WRITE32_MEMBER(dsp_shared_w); |
| 120 | DECLARE_READ8_MEMBER(dsp_shared_r); |
| 121 | DECLARE_WRITE8_MEMBER(dsp_shared_w); |
| 122 | 122 | DECLARE_READ32_MEMBER(snd_share_r); |
| 123 | 123 | DECLARE_WRITE32_MEMBER(snd_share_w); |
| 124 | 124 | DECLARE_READ8_MEMBER(jc_pcbid_r); |
| 125 | 125 | DECLARE_READ8_MEMBER(jc_lan_r); |
| 126 | 126 | DECLARE_WRITE8_MEMBER(jc_lan_w); |
| 127 | | DECLARE_WRITE8_MEMBER(jc_irq_ack_w); |
| 127 | DECLARE_WRITE8_MEMBER(jc_irq_unk_w); |
| 128 | 128 | DECLARE_WRITE8_MEMBER(dendego_speedmeter_w); |
| 129 | 129 | DECLARE_WRITE8_MEMBER(dendego_brakemeter_w); |
| 130 | 130 | |
| r31824 | r31825 | |
| 143 | 143 | DECLARE_WRITE16_MEMBER(dsp_texaddr_w); |
| 144 | 144 | DECLARE_WRITE16_MEMBER(dsp_polygon_fifo_w); |
| 145 | 145 | DECLARE_WRITE16_MEMBER(dsp_unk2_w); |
| 146 | | DECLARE_READ16_MEMBER(dsp_to_main_r); |
| 147 | | DECLARE_WRITE16_MEMBER(dsp_to_main_w); |
| 148 | 146 | |
| 149 | 147 | DECLARE_WRITE16_MEMBER(dsp_math_viewport_w); |
| 150 | 148 | DECLARE_WRITE16_MEMBER(dsp_math_projection_w); |
| r31824 | r31825 | |
| 156 | 154 | |
| 157 | 155 | DECLARE_READ16_MEMBER(taitojc_dsp_idle_skip_r); |
| 158 | 156 | DECLARE_READ16_MEMBER(dendego2_dsp_idle_skip_r); |
| 159 | | DECLARE_WRITE16_MEMBER(dsp_idle_skip_w); |
| 160 | 157 | |
| 161 | 158 | DECLARE_READ32_MEMBER(taitojc_palette_r); |
| 162 | 159 | DECLARE_WRITE32_MEMBER(taitojc_palette_w); |
| r31824 | r31825 | |
| 169 | 166 | DECLARE_DRIVER_INIT(taitojc); |
| 170 | 167 | TILE_GET_INFO_MEMBER(taitojc_tile_info); |
| 171 | 168 | virtual void machine_reset(); |
| 169 | virtual void machine_start(); |
| 172 | 170 | virtual void video_start(); |
| 173 | 171 | UINT32 screen_update_taitojc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 174 | 172 | UINT32 screen_update_dendego(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 175 | 173 | INTERRUPT_GEN_MEMBER(taitojc_vblank); |
| 174 | DECLARE_WRITE_LINE_MEMBER(mb8421_intl); |
| 175 | DECLARE_WRITE_LINE_MEMBER(mb8421_intr); |
| 176 | 176 | void draw_object(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32 w1, UINT32 w2, UINT8 bank_type); |
| 177 | 177 | void draw_object_bank(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 bank_type, UINT8 pri); |
| 178 | 178 | void taitojc_clear_frame(); |
| 179 | | void debug_dsp_command(); |
| 180 | 179 | }; |