src/mame/drivers/saturn.c
| r11594 | r11595 | |
| 162 | 162 | #include "imagedev/cartslot.h" |
| 163 | 163 | #include "coreutil.h" |
| 164 | 164 | |
| 165 | | #define USE_SLAVE 1 |
| 166 | 165 | |
| 167 | | #ifdef MAME_DEBUG |
| 166 | |
| 168 | 167 | #define LOG_CDB 0 |
| 169 | | #define LOG_SMPC 1 |
| 170 | | #define LOG_SCU 1 |
| 171 | | #define LOG_IRQ 0 |
| 172 | | #define LOG_IOGA 1 |
| 173 | | #else |
| 174 | | #define LOG_CDB 0 |
| 175 | 168 | #define LOG_SMPC 0 |
| 176 | 169 | #define LOG_SCU 0 |
| 177 | 170 | #define LOG_IRQ 0 |
| 178 | 171 | #define LOG_IOGA 0 |
| 179 | | #endif |
| 180 | 172 | |
| 173 | |
| 174 | |
| 181 | 175 | #define MASTER_CLOCK_352 57272800 |
| 182 | 176 | #define MASTER_CLOCK_320 53748200 |
| 183 | | #define PIXEL_CLOCK 50160000/2/4 /*hand-tuned to match fps ~59.82*/ |
| 177 | #define PIXEL_CLOCK 50160000/2/4 /*TODO: fix me up! */ |
| 184 | 178 | |
| 185 | 179 | /**************************************************************************************/ |
| 186 | 180 | /*to be added into a stv Header file,remember to remove all the static...*/ |
| 187 | 181 | |
| 188 | | static UINT8 *smpc_ram; |
| 189 | 182 | //static void stv_dump_ram(void); |
| 190 | 183 | |
| 191 | | UINT32* stv_workram_l; |
| 192 | | UINT32* stv_workram_h; |
| 193 | | cpu_device *stv_maincpu; |
| 194 | | cpu_device *stv_slave; |
| 195 | | cpu_device *stv_audiocpu; |
| 196 | | static UINT32* stv_backupram; |
| 197 | 184 | static UINT32* ioga; |
| 198 | 185 | static UINT16* scsp_regs; |
| 199 | | static UINT16* sound_ram; |
| 200 | 186 | static int saturn_region; |
| 201 | 187 | |
| 202 | | int stv_enable_slave_sh2; |
| 203 | 188 | /*VDP2 stuff*/ |
| 204 | 189 | /*SMPC stuff*/ |
| 205 | | static UINT8 NMI_reset; |
| 206 | | static void system_reset(void); |
| 207 | | static UINT8 en_68k; |
| 208 | 190 | /*SCU stuff*/ |
| 191 | /* TODO: not stated because IRQ system needs to be rewritten anyway ... */ |
| 209 | 192 | static int timer_0; /* Counter for Timer 0 irq*/ |
| 210 | 193 | static int timer_1; /* Counter for Timer 1 irq*/ |
| 211 | | /*Maybe add these in a struct...*/ |
| 212 | | static UINT32 scu_src_0, /* Source DMA lv 0 address*/ |
| 213 | | scu_src_1, /* lv 1*/ |
| 214 | | scu_src_2, /* lv 2*/ |
| 215 | | scu_dst_0, /* Destination DMA lv 0 address*/ |
| 216 | | scu_dst_1, /* lv 1*/ |
| 217 | | scu_dst_2, /* lv 2*/ |
| 218 | | scu_src_add_0, /* Source Addition for DMA lv 0*/ |
| 219 | | scu_src_add_1, /* lv 1*/ |
| 220 | | scu_src_add_2, /* lv 2*/ |
| 221 | | scu_dst_add_0, /* Destination Addition for DMA lv 0*/ |
| 222 | | scu_dst_add_1, /* lv 1*/ |
| 223 | | scu_dst_add_2; /* lv 2*/ |
| 224 | | static INT32 scu_size_0, /* Transfer DMA size lv 0*/ |
| 225 | | scu_size_1, /* lv 1*/ |
| 226 | | scu_size_2; /* lv 2*/ |
| 227 | 194 | |
| 228 | 195 | static struct |
| 229 | 196 | { |
| r11594 | r11595 | |
| 242 | 209 | UINT8 abus; |
| 243 | 210 | }stv_irq; |
| 244 | 211 | |
| 245 | | static void dma_direct_lv0(address_space *space); /*DMA level 0 direct transfer function*/ |
| 246 | | static void dma_direct_lv1(address_space *space); /*DMA level 1 direct transfer function*/ |
| 247 | | static void dma_direct_lv2(address_space *space); /*DMA level 2 direct transfer function*/ |
| 248 | | static void dma_indirect_lv0(address_space *space); /*DMA level 0 indirect transfer function*/ |
| 249 | | static void dma_indirect_lv1(address_space *space); /*DMA level 1 indirect transfer function*/ |
| 250 | | static void dma_indirect_lv2(address_space *space); /*DMA level 2 indirect transfer function*/ |
| 212 | static void scu_dma_direct(address_space *space, UINT8 dma_ch); /*DMA level 0 direct transfer function*/ |
| 213 | static void scu_dma_indirect(address_space *space, UINT8 dma_ch); /*DMA level 0 indirect transfer function*/ |
| 251 | 214 | |
| 252 | 215 | |
| 253 | 216 | int minit_boost,sinit_boost; |
| r11594 | r11595 | |
| 262 | 225 | #define ABUSIRQ(_irq_,_vector_) \ |
| 263 | 226 | { cputag_set_input_line_and_vector(device->machine(), "maincpu", _irq_, HOLD_LINE , _vector_); } |
| 264 | 227 | #if 0 |
| 265 | | if(stv_scu[42] & 1)//IRQ ACK |
| 228 | if(state->m_scu_regs[42] & 1)//IRQ ACK |
| 266 | 229 | { |
| 267 | 230 | ABUSIRQ(7,0x50,0x00010000); |
| 268 | 231 | ABUSIRQ(7,0x51,0x00020000); |
| r11594 | r11595 | |
| 454 | 417 | |
| 455 | 418 | |
| 456 | 419 | |
| 457 | | static void system_reset() |
| 420 | static void system_reset(address_space *space) |
| 458 | 421 | { |
| 422 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 423 | |
| 459 | 424 | /*Only backup ram and SMPC ram are retained after that this command is issued.*/ |
| 460 | | memset(stv_scu ,0x00,0x000100); |
| 425 | memset(state->m_scu_regs ,0x00,0x000100); |
| 461 | 426 | memset(scsp_regs ,0x00,0x001000); |
| 462 | | memset(sound_ram ,0x00,0x080000); |
| 463 | | memset(stv_workram_h,0x00,0x100000); |
| 464 | | memset(stv_workram_l,0x00,0x100000); |
| 427 | memset(state->m_sound_ram ,0x00,0x080000); |
| 428 | memset(state->m_workram_h,0x00,0x100000); |
| 429 | memset(state->m_workram_l,0x00,0x100000); |
| 465 | 430 | memset(stv_vdp2_regs,0x00,0x040000); |
| 466 | 431 | memset(stv_vdp2_vram,0x00,0x100000); |
| 467 | 432 | memset(stv_vdp2_cram,0x00,0x080000); |
| r11594 | r11595 | |
| 470 | 435 | /*Order is surely wrong but whatever...*/ |
| 471 | 436 | } |
| 472 | 437 | |
| 473 | | static UINT8 stv_SMPC_r8 (address_space *space, int offset) |
| 438 | static READ8_HANDLER( stv_SMPC_r8 ) |
| 474 | 439 | { |
| 440 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 475 | 441 | int return_data; |
| 476 | 442 | |
| 443 | return_data = state->m_smpc_ram[offset]; |
| 477 | 444 | |
| 478 | | return_data = smpc_ram[offset]; |
| 479 | | |
| 480 | 445 | if (offset == 0x61) // ?? many games need this or the controls don't work |
| 481 | 446 | return_data = 0x20 ^ 0xff; |
| 482 | 447 | |
| r11594 | r11595 | |
| 497 | 462 | return return_data; |
| 498 | 463 | } |
| 499 | 464 | |
| 500 | | static void stv_SMPC_w8 (address_space *space, int offset, UINT8 data) |
| 465 | static TIMER_CALLBACK( stv_bankswitch_state ) |
| 501 | 466 | { |
| 502 | | system_time systime; |
| 467 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 468 | static const char *const keynames[] = { "game0", "game1", "game2", "game3" }; |
| 469 | UINT8* game_region; |
| 503 | 470 | |
| 471 | if(state->m_prev_bankswitch != param) |
| 472 | { |
| 473 | game_region = machine.region(keynames[param])->base(); |
| 474 | |
| 475 | if (game_region) |
| 476 | memcpy(machine.region("abus")->base(), game_region, 0x3000000); |
| 477 | else |
| 478 | memset(machine.region("abus")->base(), 0x00, 0x3000000); |
| 479 | |
| 480 | state->m_prev_bankswitch = param; |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | static void stv_select_game(running_machine &machine, int gameno) |
| 485 | { |
| 486 | machine.scheduler().timer_set(attotime::zero, FUNC(stv_bankswitch_state), gameno); |
| 487 | } |
| 488 | |
| 489 | static WRITE8_HANDLER( stv_SMPC_w8 ) |
| 490 | { |
| 491 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 492 | system_time systime; |
| 504 | 493 | space->machine().base_datetime(systime); |
| 505 | 494 | |
| 506 | 495 | // if(LOG_SMPC) logerror ("8-bit SMPC Write to Offset %02x with Data %02x\n", offset, data); |
| 507 | | smpc_ram[offset] = data; |
| 496 | state->m_smpc_ram[offset] = data; |
| 508 | 497 | |
| 509 | 498 | if(offset == 0x75) |
| 510 | 499 | { |
| r11594 | r11595 | |
| 512 | 501 | eeprom->set_clock_line((data & 0x08) ? ASSERT_LINE : CLEAR_LINE); |
| 513 | 502 | eeprom->write_bit(data & 0x10); |
| 514 | 503 | eeprom->set_cs_line((data & 0x04) ? CLEAR_LINE : ASSERT_LINE); |
| 504 | state->m_stv_multi_bank = data & 3; |
| 515 | 505 | |
| 506 | stv_select_game(space->machine(), state->m_stv_multi_bank); |
| 516 | 507 | |
| 517 | 508 | // if (data & 0x01) |
| 518 | 509 | // if(LOG_SMPC) logerror("bit 0 active\n"); |
| r11594 | r11595 | |
| 520 | 511 | // if(LOG_SMPC) logerror("bit 1 active\n"); |
| 521 | 512 | // if (data & 0x10) |
| 522 | 513 | //if(LOG_SMPC) logerror("bit 4 active\n");//LOT |
| 523 | | //if(LOG_SMPC) logerror("SMPC: ram [0x75] = %02x\n",smpc_ram[0x75]); |
| 514 | //if(LOG_SMPC) logerror("SMPC: ram [0x75] = %02x\n",state->m_smpc_ram[0x75]); |
| 524 | 515 | PDR1 = (data & 0x60); |
| 525 | 516 | } |
| 526 | 517 | |
| r11594 | r11595 | |
| 530 | 521 | ACTIVE LOW |
| 531 | 522 | bit 4(0x10) - Enable Sound System |
| 532 | 523 | */ |
| 533 | | //popmessage("PDR2 = %02x",smpc_ram[0x77]); |
| 534 | | if(!(smpc_ram[0x77] & 0x10)) |
| 535 | | { |
| 536 | | if(LOG_SMPC) logerror("SMPC: M68k on\n"); |
| 537 | | cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, CLEAR_LINE); |
| 538 | | en_68k = 1; |
| 539 | | } |
| 540 | | else |
| 541 | | { |
| 542 | | if(LOG_SMPC) logerror("SMPC: M68k off\n"); |
| 543 | | cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, ASSERT_LINE); |
| 544 | | en_68k = 0; |
| 545 | | } |
| 546 | | //if(LOG_SMPC) logerror("SMPC: ram [0x77] = %02x\n",smpc_ram[0x77]); |
| 524 | //popmessage("PDR2 = %02x",state->m_smpc_ram[0x77]); |
| 525 | |
| 526 | if(LOG_SMPC) logerror("SMPC: M68k %s\n",(state->m_smpc_ram[0x77] & 0x10) ? "off" : "on"); |
| 527 | cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, (state->m_smpc_ram[0x77] & 0x10) ? ASSERT_LINE : CLEAR_LINE); |
| 528 | state->m_en_68k = ((state->m_smpc_ram[0x77] & 0x10) >> 4) ^ 1; |
| 529 | |
| 530 | //if(LOG_SMPC) logerror("SMPC: ram [0x77] = %02x\n",state->m_smpc_ram[0x77]); |
| 547 | 531 | PDR2 = (data & 0x60); |
| 548 | 532 | } |
| 549 | 533 | |
| 550 | 534 | if(offset == 0x7d) |
| 551 | 535 | { |
| 552 | | if(smpc_ram[0x7d] & 1) |
| 536 | if(state->m_smpc_ram[0x7d] & 1) |
| 553 | 537 | SH2_DIRECT_MODE_PORT_1; |
| 554 | 538 | else |
| 555 | 539 | SMPC_CONTROL_MODE_PORT_1; |
| 556 | 540 | |
| 557 | | if(smpc_ram[0x7d] & 2) |
| 541 | if(state->m_smpc_ram[0x7d] & 2) |
| 558 | 542 | SH2_DIRECT_MODE_PORT_2; |
| 559 | 543 | else |
| 560 | 544 | SMPC_CONTROL_MODE_PORT_2; |
| r11594 | r11595 | |
| 564 | 548 | if(offset == 0x7f) |
| 565 | 549 | { |
| 566 | 550 | //enable PAD irq & VDP2 external latch for port 1/2 |
| 567 | | EXLE1 = smpc_ram[0x7f] & 1 ? 1 : 0; |
| 568 | | EXLE2 = smpc_ram[0x7f] & 2 ? 1 : 0; |
| 551 | EXLE1 = state->m_smpc_ram[0x7f] & 1 ? 1 : 0; |
| 552 | EXLE2 = state->m_smpc_ram[0x7f] & 2 ? 1 : 0; |
| 569 | 553 | if(EXLE1 || EXLE2) |
| 570 | 554 | { |
| 571 | 555 | //if(LOG_SMPC) logerror ("Interrupt: PAD irq at scanline %04x, Vector 0x48 Level 0x08\n",scanline); |
| r11594 | r11595 | |
| 579 | 563 | { |
| 580 | 564 | case 0x00: |
| 581 | 565 | if(LOG_SMPC) logerror ("SMPC: Master ON\n"); |
| 582 | | smpc_ram[0x5f]=0x00; |
| 566 | state->m_smpc_ram[0x5f]=0x00; |
| 583 | 567 | break; |
| 584 | 568 | //in theory 0x01 is for Master OFF,but obviously is not used. |
| 585 | 569 | case 0x02: |
| 586 | 570 | if(LOG_SMPC) logerror ("SMPC: Slave ON\n"); |
| 587 | | smpc_ram[0x5f]=0x02; |
| 588 | | #if USE_SLAVE |
| 589 | | stv_enable_slave_sh2 = 1; |
| 571 | state->m_smpc_ram[0x5f]=0x02; |
| 590 | 572 | cputag_set_input_line(space->machine(), "slave", INPUT_LINE_RESET, CLEAR_LINE); |
| 591 | | #endif |
| 592 | 573 | break; |
| 593 | 574 | case 0x03: |
| 594 | 575 | if(LOG_SMPC) logerror ("SMPC: Slave OFF\n"); |
| 595 | | smpc_ram[0x5f]=0x03; |
| 596 | | stv_enable_slave_sh2 = 0; |
| 576 | state->m_smpc_ram[0x5f]=0x03; |
| 597 | 577 | space->machine().scheduler().trigger(1000); |
| 598 | 578 | cputag_set_input_line(space->machine(), "slave", INPUT_LINE_RESET, ASSERT_LINE); |
| 599 | 579 | break; |
| 600 | 580 | case 0x06: |
| 601 | 581 | if(LOG_SMPC) logerror ("SMPC: Sound ON\n"); |
| 602 | 582 | /* wrong? */ |
| 603 | | smpc_ram[0x5f]=0x06; |
| 583 | state->m_smpc_ram[0x5f]=0x06; |
| 604 | 584 | cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, CLEAR_LINE); |
| 605 | 585 | break; |
| 606 | 586 | case 0x07: |
| 607 | 587 | if(LOG_SMPC) logerror ("SMPC: Sound OFF\n"); |
| 608 | | smpc_ram[0x5f]=0x07; |
| 588 | state->m_smpc_ram[0x5f]=0x07; |
| 609 | 589 | break; |
| 610 | 590 | /*CD (SH-1) ON/OFF,guess that this is needed for Sports Fishing games...*/ |
| 611 | 591 | //case 0x08: |
| 612 | 592 | //case 0x09: |
| 613 | 593 | case 0x0d: |
| 614 | 594 | if(LOG_SMPC) logerror ("SMPC: System Reset\n"); |
| 615 | | smpc_ram[0x5f]=0x0d; |
| 595 | state->m_smpc_ram[0x5f]=0x0d; |
| 616 | 596 | cputag_set_input_line(space->machine(), "maincpu", INPUT_LINE_RESET, PULSE_LINE); |
| 617 | | system_reset(); |
| 597 | system_reset(space); |
| 618 | 598 | break; |
| 619 | 599 | case 0x0e: |
| 620 | 600 | if(LOG_SMPC) logerror ("SMPC: Change Clock to 352\n"); |
| 621 | | smpc_ram[0x5f]=0x0e; |
| 601 | state->m_smpc_ram[0x5f]=0x0e; |
| 622 | 602 | space->machine().device("maincpu")->set_unscaled_clock(MASTER_CLOCK_352/2); |
| 623 | 603 | space->machine().device("slave")->set_unscaled_clock(MASTER_CLOCK_352/2); |
| 624 | 604 | space->machine().device("audiocpu")->set_unscaled_clock(MASTER_CLOCK_352/5); |
| r11594 | r11595 | |
| 626 | 606 | break; |
| 627 | 607 | case 0x0f: |
| 628 | 608 | if(LOG_SMPC) logerror ("SMPC: Change Clock to 320\n"); |
| 629 | | smpc_ram[0x5f]=0x0f; |
| 609 | state->m_smpc_ram[0x5f]=0x0f; |
| 630 | 610 | space->machine().device("maincpu")->set_unscaled_clock(MASTER_CLOCK_320/2); |
| 631 | 611 | space->machine().device("slave")->set_unscaled_clock(MASTER_CLOCK_320/2); |
| 632 | 612 | space->machine().device("audiocpu")->set_unscaled_clock(MASTER_CLOCK_320/5); |
| r11594 | r11595 | |
| 635 | 615 | /*"Interrupt Back"*/ |
| 636 | 616 | case 0x10: |
| 637 | 617 | if(LOG_SMPC) logerror ("SMPC: Status Acquire\n"); |
| 638 | | smpc_ram[0x5f]=0x10; |
| 639 | | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 640 | | //smpc_ram[0x23] = DectoBCD(systime.local_time.year /100); |
| 641 | | //smpc_ram[0x25] = DectoBCD(systime.local_time.year %100); |
| 642 | | //smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month+1); |
| 643 | | //smpc_ram[0x29] = DectoBCD(systime.local_time.mday); |
| 644 | | //smpc_ram[0x2b] = DectoBCD(systime.local_time.hour); |
| 645 | | //smpc_ram[0x2d] = DectoBCD(systime.local_time.minute); |
| 646 | | //smpc_ram[0x2f] = DectoBCD(systime.local_time.second); |
| 618 | state->m_smpc_ram[0x5f]=0x10; |
| 619 | state->m_smpc_ram[0x21] = (0x80) | ((state->m_NMI_reset & 1) << 6); |
| 620 | //state->m_smpc_ram[0x23] = DectoBCD(systime.local_time.year /100); |
| 621 | //state->m_smpc_ram[0x25] = DectoBCD(systime.local_time.year %100); |
| 622 | //state->m_smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month+1); |
| 623 | //state->m_smpc_ram[0x29] = DectoBCD(systime.local_time.mday); |
| 624 | //state->m_smpc_ram[0x2b] = DectoBCD(systime.local_time.hour); |
| 625 | //state->m_smpc_ram[0x2d] = DectoBCD(systime.local_time.minute); |
| 626 | //state->m_smpc_ram[0x2f] = DectoBCD(systime.local_time.second); |
| 647 | 627 | |
| 648 | | smpc_ram[0x31]=0x00; //? |
| 628 | state->m_smpc_ram[0x31]=0x00; //? |
| 649 | 629 | |
| 650 | | //smpc_ram[0x33]=input_port_read(space->machine(), "FAKE"); |
| 630 | //state->m_smpc_ram[0x33]=input_port_read(space->machine(), "FAKE"); |
| 651 | 631 | |
| 652 | | smpc_ram[0x35]=0x00; |
| 653 | | smpc_ram[0x37]=0x00; |
| 632 | state->m_smpc_ram[0x35]=0x00; |
| 633 | state->m_smpc_ram[0x37]=0x00; |
| 654 | 634 | |
| 655 | | smpc_ram[0x39]=0xff; |
| 656 | | smpc_ram[0x3b]=0xff; |
| 657 | | smpc_ram[0x3d]=0xff; |
| 658 | | smpc_ram[0x3f]=0xff; |
| 659 | | smpc_ram[0x41]=0xff; |
| 660 | | smpc_ram[0x43]=0xff; |
| 661 | | smpc_ram[0x45]=0xff; |
| 662 | | smpc_ram[0x47]=0xff; |
| 663 | | smpc_ram[0x49]=0xff; |
| 664 | | smpc_ram[0x4b]=0xff; |
| 665 | | smpc_ram[0x4d]=0xff; |
| 666 | | smpc_ram[0x4f]=0xff; |
| 667 | | smpc_ram[0x51]=0xff; |
| 668 | | smpc_ram[0x53]=0xff; |
| 669 | | smpc_ram[0x55]=0xff; |
| 670 | | smpc_ram[0x57]=0xff; |
| 671 | | smpc_ram[0x59]=0xff; |
| 672 | | smpc_ram[0x5b]=0xff; |
| 673 | | smpc_ram[0x5d]=0xff; |
| 635 | state->m_smpc_ram[0x39]=0xff; |
| 636 | state->m_smpc_ram[0x3b]=0xff; |
| 637 | state->m_smpc_ram[0x3d]=0xff; |
| 638 | state->m_smpc_ram[0x3f]=0xff; |
| 639 | state->m_smpc_ram[0x41]=0xff; |
| 640 | state->m_smpc_ram[0x43]=0xff; |
| 641 | state->m_smpc_ram[0x45]=0xff; |
| 642 | state->m_smpc_ram[0x47]=0xff; |
| 643 | state->m_smpc_ram[0x49]=0xff; |
| 644 | state->m_smpc_ram[0x4b]=0xff; |
| 645 | state->m_smpc_ram[0x4d]=0xff; |
| 646 | state->m_smpc_ram[0x4f]=0xff; |
| 647 | state->m_smpc_ram[0x51]=0xff; |
| 648 | state->m_smpc_ram[0x53]=0xff; |
| 649 | state->m_smpc_ram[0x55]=0xff; |
| 650 | state->m_smpc_ram[0x57]=0xff; |
| 651 | state->m_smpc_ram[0x59]=0xff; |
| 652 | state->m_smpc_ram[0x5b]=0xff; |
| 653 | state->m_smpc_ram[0x5d]=0xff; |
| 674 | 654 | |
| 675 | 655 | // /*This is for RTC,cartridge code and similar stuff...*/ |
| 676 | 656 | /*System Manager(SMPC) irq*/ |
| r11594 | r11595 | |
| 682 | 662 | /* RTC write*/ |
| 683 | 663 | case 0x16: |
| 684 | 664 | if(LOG_SMPC) logerror("SMPC: RTC write\n"); |
| 685 | | smpc_ram[0x2f] = smpc_ram[0x0d]; |
| 686 | | smpc_ram[0x2d] = smpc_ram[0x0b]; |
| 687 | | smpc_ram[0x2b] = smpc_ram[0x09]; |
| 688 | | smpc_ram[0x29] = smpc_ram[0x07]; |
| 689 | | smpc_ram[0x27] = smpc_ram[0x05]; |
| 690 | | smpc_ram[0x25] = smpc_ram[0x03]; |
| 691 | | smpc_ram[0x23] = smpc_ram[0x01]; |
| 692 | | smpc_ram[0x5f]=0x16; |
| 665 | state->m_smpc_ram[0x2f] = state->m_smpc_ram[0x0d]; |
| 666 | state->m_smpc_ram[0x2d] = state->m_smpc_ram[0x0b]; |
| 667 | state->m_smpc_ram[0x2b] = state->m_smpc_ram[0x09]; |
| 668 | state->m_smpc_ram[0x29] = state->m_smpc_ram[0x07]; |
| 669 | state->m_smpc_ram[0x27] = state->m_smpc_ram[0x05]; |
| 670 | state->m_smpc_ram[0x25] = state->m_smpc_ram[0x03]; |
| 671 | state->m_smpc_ram[0x23] = state->m_smpc_ram[0x01]; |
| 672 | state->m_smpc_ram[0x5f]=0x16; |
| 693 | 673 | break; |
| 694 | 674 | /* SMPC memory setting*/ |
| 695 | 675 | case 0x17: |
| 696 | 676 | if(LOG_SMPC) logerror ("SMPC: memory setting\n"); |
| 697 | | smpc_ram[0x5f]=0x17; |
| 677 | state->m_smpc_ram[0x5f]=0x17; |
| 698 | 678 | break; |
| 699 | 679 | case 0x18: |
| 700 | 680 | if(LOG_SMPC) logerror ("SMPC: NMI request\n"); |
| 701 | | smpc_ram[0x5f]=0x18; |
| 681 | state->m_smpc_ram[0x5f]=0x18; |
| 702 | 682 | /*NMI is unconditionally requested?*/ |
| 703 | 683 | cputag_set_input_line(space->machine(), "maincpu", INPUT_LINE_NMI, PULSE_LINE); |
| 704 | 684 | break; |
| 705 | 685 | case 0x19: |
| 706 | 686 | if(LOG_SMPC) logerror ("SMPC: NMI Enable\n"); |
| 707 | | smpc_ram[0x5f]=0x19; |
| 708 | | NMI_reset = 0; |
| 709 | | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 687 | state->m_smpc_ram[0x5f]=0x19; |
| 688 | state->m_NMI_reset = 0; |
| 689 | state->m_smpc_ram[0x21] = (0x80) | ((state->m_NMI_reset & 1) << 6); |
| 710 | 690 | break; |
| 711 | 691 | case 0x1a: |
| 712 | 692 | if(LOG_SMPC) logerror ("SMPC: NMI Disable\n"); |
| 713 | | smpc_ram[0x5f]=0x1a; |
| 714 | | NMI_reset = 1; |
| 715 | | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 693 | state->m_smpc_ram[0x5f]=0x1a; |
| 694 | state->m_NMI_reset = 1; |
| 695 | state->m_smpc_ram[0x21] = (0x80) | ((state->m_NMI_reset & 1) << 6); |
| 716 | 696 | break; |
| 717 | 697 | default: |
| 718 | 698 | if(LOG_SMPC) logerror ("cpu '%s' (PC=%08X) SMPC: undocumented Command %02x\n", space->device().tag(), cpu_get_pc(&space->device()), data); |
| 719 | 699 | } |
| 720 | 700 | |
| 721 | 701 | // we've processed the command, clear status flag |
| 722 | | smpc_ram[0x63] = 0x00; |
| 702 | state->m_smpc_ram[0x63] = 0x00; |
| 723 | 703 | /*TODO:emulate the timing of each command...*/ |
| 724 | 704 | } |
| 725 | 705 | } |
| r11594 | r11595 | |
| 727 | 707 | |
| 728 | 708 | static void smpc_intbackhelper(running_machine &machine) |
| 729 | 709 | { |
| 710 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 730 | 711 | int pad; |
| 731 | 712 | static const char *const padnames[] = { "JOY1", "JOY2" }; |
| 732 | 713 | |
| r11594 | r11595 | |
| 739 | 720 | pad = input_port_read(machine, padnames[intback_stage-2]); |
| 740 | 721 | |
| 741 | 722 | // if (LOG_SMPC) logerror("SMPC: providing PAD data for intback, pad %d\n", intback_stage-2); |
| 742 | | smpc_ram[33] = 0xf1; // no tap, direct connect |
| 743 | | smpc_ram[35] = 0x02; // saturn pad |
| 744 | | smpc_ram[37] = pad>>8; |
| 745 | | smpc_ram[39] = pad & 0xff; |
| 723 | state->m_smpc_ram[33] = 0xf1; // no tap, direct connect |
| 724 | state->m_smpc_ram[35] = 0x02; // saturn pad |
| 725 | state->m_smpc_ram[37] = pad>>8; |
| 726 | state->m_smpc_ram[39] = pad & 0xff; |
| 746 | 727 | |
| 747 | 728 | if (intback_stage == 3) |
| 748 | 729 | { |
| r11594 | r11595 | |
| 756 | 737 | intback_stage++; |
| 757 | 738 | } |
| 758 | 739 | |
| 759 | | static UINT8 saturn_SMPC_r8(address_space *space, int offset) |
| 740 | static READ8_HANDLER( saturn_SMPC_r8 ) |
| 760 | 741 | { |
| 742 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 761 | 743 | int return_data; |
| 762 | 744 | |
| 763 | | return_data = smpc_ram[offset]; |
| 745 | return_data = state->m_smpc_ram[offset]; |
| 764 | 746 | |
| 765 | 747 | if ((offset == 0x61)) |
| 766 | 748 | return_data = smpcSR; |
| r11594 | r11595 | |
| 813 | 795 | return return_data; |
| 814 | 796 | } |
| 815 | 797 | |
| 816 | | static void saturn_SMPC_w8(address_space *space, int offset, UINT8 data) |
| 798 | static WRITE8_HANDLER( saturn_SMPC_w8 ) |
| 817 | 799 | { |
| 800 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 818 | 801 | system_time systime; |
| 819 | 802 | UINT8 last; |
| 820 | 803 | running_machine &machine = space->machine(); |
| r11594 | r11595 | |
| 822 | 805 | /* get the current date/time from the core */ |
| 823 | 806 | machine.current_datetime(systime); |
| 824 | 807 | |
| 825 | | if (LOG_SMPC) logerror ("8-bit SMPC Write to Offset %02x (reg %d) with Data %02x (prev %02x)\n", offset, offset>>1, data, smpc_ram[offset]); |
| 808 | if (LOG_SMPC) logerror ("8-bit SMPC Write to Offset %02x (reg %d) with Data %02x (prev %02x)\n", offset, offset>>1, data, state->m_smpc_ram[offset]); |
| 826 | 809 | |
| 827 | 810 | // if (offset == 0x7d) printf("IOSEL2 %d IOSEL1 %d\n", (data>>1)&1, data&1); |
| 828 | 811 | |
| 829 | | last = smpc_ram[offset]; |
| 812 | last = state->m_smpc_ram[offset]; |
| 830 | 813 | |
| 831 | 814 | if ((intback_stage > 0) && (offset == 1) && (((data ^ 0x80)&0x80) == (last&0x80))) |
| 832 | 815 | { |
| r11594 | r11595 | |
| 845 | 828 | intback_stage = 0; |
| 846 | 829 | } |
| 847 | 830 | |
| 848 | | smpc_ram[offset] = data; |
| 831 | state->m_smpc_ram[offset] = data; |
| 849 | 832 | |
| 850 | 833 | if (offset == 0x75) // PDR1 |
| 851 | 834 | { |
| 852 | | PDR1 = (data & smpc_ram[0x79]); |
| 835 | PDR1 = (data & state->m_smpc_ram[0x79]); |
| 853 | 836 | } |
| 854 | 837 | |
| 855 | 838 | if (offset == 0x77) // PDR2 |
| 856 | 839 | { |
| 857 | | PDR2 = (data & smpc_ram[0x7b]); |
| 840 | PDR2 = (data & state->m_smpc_ram[0x7b]); |
| 858 | 841 | } |
| 859 | 842 | |
| 860 | 843 | if(offset == 0x7d) |
| 861 | 844 | { |
| 862 | | if(smpc_ram[0x7d] & 1) |
| 845 | if(state->m_smpc_ram[0x7d] & 1) |
| 863 | 846 | SH2_DIRECT_MODE_PORT_1; |
| 864 | 847 | else |
| 865 | 848 | SMPC_CONTROL_MODE_PORT_1; |
| 866 | 849 | |
| 867 | | if(smpc_ram[0x7d] & 2) |
| 850 | if(state->m_smpc_ram[0x7d] & 2) |
| 868 | 851 | SH2_DIRECT_MODE_PORT_2; |
| 869 | 852 | else |
| 870 | 853 | SMPC_CONTROL_MODE_PORT_2; |
| r11594 | r11595 | |
| 873 | 856 | if(offset == 0x7f) |
| 874 | 857 | { |
| 875 | 858 | //enable PAD irq & VDP2 external latch for port 1/2 |
| 876 | | EXLE1 = smpc_ram[0x7f] & 1 ? 1 : 0; |
| 877 | | EXLE2 = smpc_ram[0x7f] & 2 ? 1 : 0; |
| 859 | EXLE1 = state->m_smpc_ram[0x7f] & 1 ? 1 : 0; |
| 860 | EXLE2 = state->m_smpc_ram[0x7f] & 2 ? 1 : 0; |
| 878 | 861 | if(EXLE1 || EXLE2) |
| 879 | | if(!(stv_scu[40] & 0x0100)) /*Pad irq*/ |
| 862 | if(!(state->m_scu_regs[40] & 0x0100)) /*Pad irq*/ |
| 880 | 863 | { |
| 881 | 864 | if(LOG_SMPC) logerror ("Interrupt: PAD irq, Vector 0x48 Level 0x08\n"); |
| 882 | 865 | cputag_set_input_line_and_vector(machine, "maincpu", 8, HOLD_LINE , 0x48); |
| r11594 | r11595 | |
| 889 | 872 | { |
| 890 | 873 | case 0x00: |
| 891 | 874 | if(LOG_SMPC) logerror ("SMPC: Master ON\n"); |
| 892 | | smpc_ram[0x5f]=0x00; |
| 875 | state->m_smpc_ram[0x5f]=0x00; |
| 893 | 876 | break; |
| 894 | 877 | //in theory 0x01 is for Master OFF,but obviously is not used. |
| 895 | 878 | case 0x02: |
| 896 | 879 | if(LOG_SMPC) logerror ("SMPC: Slave ON\n"); |
| 897 | | smpc_ram[0x5f]=0x02; |
| 898 | | stv_enable_slave_sh2 = 1; |
| 880 | state->m_smpc_ram[0x5f]=0x02; |
| 899 | 881 | cputag_set_input_line(machine, "slave", INPUT_LINE_RESET, CLEAR_LINE); |
| 900 | 882 | break; |
| 901 | 883 | case 0x03: |
| 902 | 884 | if(LOG_SMPC) logerror ("SMPC: Slave OFF\n"); |
| 903 | | smpc_ram[0x5f]=0x03; |
| 904 | | stv_enable_slave_sh2 = 0; |
| 885 | state->m_smpc_ram[0x5f]=0x03; |
| 905 | 886 | machine.scheduler().trigger(1000); |
| 906 | 887 | cputag_set_input_line(machine, "slave", INPUT_LINE_RESET, ASSERT_LINE); |
| 907 | 888 | break; |
| 908 | 889 | case 0x06: |
| 909 | 890 | if(LOG_SMPC) logerror ("SMPC: Sound ON\n"); |
| 910 | 891 | /* wrong? */ |
| 911 | | smpc_ram[0x5f]=0x06; |
| 892 | state->m_smpc_ram[0x5f]=0x06; |
| 912 | 893 | cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, CLEAR_LINE); |
| 913 | | en_68k = 1; |
| 894 | state->m_en_68k = 1; |
| 914 | 895 | break; |
| 915 | 896 | case 0x07: |
| 916 | 897 | if(LOG_SMPC) logerror ("SMPC: Sound OFF\n"); |
| 917 | 898 | cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE); |
| 918 | | en_68k = 0; |
| 919 | | smpc_ram[0x5f]=0x07; |
| 899 | state->m_en_68k = 0; |
| 900 | state->m_smpc_ram[0x5f]=0x07; |
| 920 | 901 | break; |
| 921 | 902 | /*CD (SH-1) ON/OFF,guess that this is needed for Sports Fishing games...*/ |
| 922 | 903 | //case 0x08: |
| 923 | 904 | //case 0x09: |
| 924 | 905 | case 0x0d: |
| 925 | 906 | if(LOG_SMPC) logerror ("SMPC: System Reset\n"); |
| 926 | | smpc_ram[0x5f]=0x0d; |
| 907 | state->m_smpc_ram[0x5f]=0x0d; |
| 927 | 908 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_RESET, PULSE_LINE); |
| 928 | | system_reset(); |
| 909 | system_reset(space); |
| 929 | 910 | break; |
| 930 | 911 | case 0x0e: |
| 931 | 912 | if(LOG_SMPC) logerror ("SMPC: Change Clock to 352\n"); |
| 932 | | smpc_ram[0x5f]=0x0e; |
| 913 | state->m_smpc_ram[0x5f]=0x0e; |
| 933 | 914 | machine.device("maincpu")->set_unscaled_clock(MASTER_CLOCK_352/2); |
| 934 | 915 | machine.device("slave")->set_unscaled_clock(MASTER_CLOCK_352/2); |
| 935 | 916 | machine.device("audiocpu")->set_unscaled_clock(MASTER_CLOCK_352/5); |
| r11594 | r11595 | |
| 937 | 918 | break; |
| 938 | 919 | case 0x0f: |
| 939 | 920 | if(LOG_SMPC) logerror ("SMPC: Change Clock to 320\n"); |
| 940 | | smpc_ram[0x5f]=0x0f; |
| 921 | state->m_smpc_ram[0x5f]=0x0f; |
| 941 | 922 | machine.device("maincpu")->set_unscaled_clock(MASTER_CLOCK_320/2); |
| 942 | 923 | machine.device("slave")->set_unscaled_clock(MASTER_CLOCK_320/2); |
| 943 | 924 | machine.device("audiocpu")->set_unscaled_clock(MASTER_CLOCK_320/5); |
| r11594 | r11595 | |
| 946 | 927 | /*"Interrupt Back"*/ |
| 947 | 928 | case 0x10: |
| 948 | 929 | if(LOG_SMPC) logerror ("SMPC: Status Acquire (IntBack)\n"); |
| 949 | | smpc_ram[0x5f]=0x10; |
| 950 | | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 951 | | smpc_ram[0x23] = dec_2_bcd(systime.local_time.year / 100); |
| 952 | | smpc_ram[0x25] = dec_2_bcd(systime.local_time.year % 100); |
| 953 | | smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month + 1); |
| 954 | | smpc_ram[0x29] = dec_2_bcd(systime.local_time.mday); |
| 955 | | smpc_ram[0x2b] = dec_2_bcd(systime.local_time.hour); |
| 956 | | smpc_ram[0x2d] = dec_2_bcd(systime.local_time.minute); |
| 957 | | smpc_ram[0x2f] = dec_2_bcd(systime.local_time.second); |
| 930 | state->m_smpc_ram[0x5f]=0x10; |
| 931 | state->m_smpc_ram[0x21] = (0x80) | ((state->m_NMI_reset & 1) << 6); |
| 932 | state->m_smpc_ram[0x23] = dec_2_bcd(systime.local_time.year / 100); |
| 933 | state->m_smpc_ram[0x25] = dec_2_bcd(systime.local_time.year % 100); |
| 934 | state->m_smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month + 1); |
| 935 | state->m_smpc_ram[0x29] = dec_2_bcd(systime.local_time.mday); |
| 936 | state->m_smpc_ram[0x2b] = dec_2_bcd(systime.local_time.hour); |
| 937 | state->m_smpc_ram[0x2d] = dec_2_bcd(systime.local_time.minute); |
| 938 | state->m_smpc_ram[0x2f] = dec_2_bcd(systime.local_time.second); |
| 958 | 939 | |
| 959 | | smpc_ram[0x31]=0x00; //? |
| 940 | state->m_smpc_ram[0x31]=0x00; //? |
| 960 | 941 | |
| 961 | 942 | |
| 962 | | smpc_ram[0x35]=0x00; |
| 963 | | smpc_ram[0x37]=0x00; |
| 943 | state->m_smpc_ram[0x35]=0x00; |
| 944 | state->m_smpc_ram[0x37]=0x00; |
| 964 | 945 | |
| 965 | | smpc_ram[0x39] = SMEM[0]; |
| 966 | | smpc_ram[0x3b] = SMEM[1]; |
| 967 | | smpc_ram[0x3d] = SMEM[2]; |
| 968 | | smpc_ram[0x3f] = SMEM[3]; |
| 946 | state->m_smpc_ram[0x39] = SMEM[0]; |
| 947 | state->m_smpc_ram[0x3b] = SMEM[1]; |
| 948 | state->m_smpc_ram[0x3d] = SMEM[2]; |
| 949 | state->m_smpc_ram[0x3f] = SMEM[3]; |
| 969 | 950 | |
| 970 | | smpc_ram[0x41]=0xff; |
| 971 | | smpc_ram[0x43]=0xff; |
| 972 | | smpc_ram[0x45]=0xff; |
| 973 | | smpc_ram[0x47]=0xff; |
| 974 | | smpc_ram[0x49]=0xff; |
| 975 | | smpc_ram[0x4b]=0xff; |
| 976 | | smpc_ram[0x4d]=0xff; |
| 977 | | smpc_ram[0x4f]=0xff; |
| 978 | | smpc_ram[0x51]=0xff; |
| 979 | | smpc_ram[0x53]=0xff; |
| 980 | | smpc_ram[0x55]=0xff; |
| 981 | | smpc_ram[0x57]=0xff; |
| 982 | | smpc_ram[0x59]=0xff; |
| 983 | | smpc_ram[0x5b]=0xff; |
| 984 | | smpc_ram[0x5d]=0xff; |
| 951 | state->m_smpc_ram[0x41]=0xff; |
| 952 | state->m_smpc_ram[0x43]=0xff; |
| 953 | state->m_smpc_ram[0x45]=0xff; |
| 954 | state->m_smpc_ram[0x47]=0xff; |
| 955 | state->m_smpc_ram[0x49]=0xff; |
| 956 | state->m_smpc_ram[0x4b]=0xff; |
| 957 | state->m_smpc_ram[0x4d]=0xff; |
| 958 | state->m_smpc_ram[0x4f]=0xff; |
| 959 | state->m_smpc_ram[0x51]=0xff; |
| 960 | state->m_smpc_ram[0x53]=0xff; |
| 961 | state->m_smpc_ram[0x55]=0xff; |
| 962 | state->m_smpc_ram[0x57]=0xff; |
| 963 | state->m_smpc_ram[0x59]=0xff; |
| 964 | state->m_smpc_ram[0x5b]=0xff; |
| 965 | state->m_smpc_ram[0x5d]=0xff; |
| 985 | 966 | |
| 986 | 967 | smpcSR = 0x60; // peripheral data ready, no reset, etc. |
| 987 | | pmode = smpc_ram[1]>>4; |
| 968 | pmode = state->m_smpc_ram[1]>>4; |
| 988 | 969 | |
| 989 | 970 | intback_stage = 1; |
| 990 | 971 | |
| 991 | 972 | // /*This is for RTC,cartridge code and similar stuff...*/ |
| 992 | | // if(!(stv_scu[40] & 0x0080)) /*System Manager(SMPC) irq*/ /* we can't check this .. breaks controls .. probably issues elsewhere? */ |
| 973 | // if(!(state->m_scu_regs[40] & 0x0080)) /*System Manager(SMPC) irq*/ /* we can't check this .. breaks controls .. probably issues elsewhere? */ |
| 993 | 974 | { |
| 994 | 975 | // if(LOG_SMPC) logerror ("Interrupt: System Manager (SMPC) at scanline %04x, Vector 0x47 Level 0x08\n",scanline); |
| 995 | 976 | smpc_intbackhelper(machine); |
| r11594 | r11595 | |
| 999 | 980 | /* RTC write*/ |
| 1000 | 981 | case 0x16: |
| 1001 | 982 | if(LOG_SMPC) logerror("SMPC: RTC write\n"); |
| 1002 | | smpc_ram[0x2f] = smpc_ram[0x0d]; |
| 1003 | | smpc_ram[0x2d] = smpc_ram[0x0b]; |
| 1004 | | smpc_ram[0x2b] = smpc_ram[0x09]; |
| 1005 | | smpc_ram[0x29] = smpc_ram[0x07]; |
| 1006 | | smpc_ram[0x27] = smpc_ram[0x05]; |
| 1007 | | smpc_ram[0x25] = smpc_ram[0x03]; |
| 1008 | | smpc_ram[0x23] = smpc_ram[0x01]; |
| 1009 | | smpc_ram[0x5f]=0x16; |
| 983 | state->m_smpc_ram[0x2f] = state->m_smpc_ram[0x0d]; |
| 984 | state->m_smpc_ram[0x2d] = state->m_smpc_ram[0x0b]; |
| 985 | state->m_smpc_ram[0x2b] = state->m_smpc_ram[0x09]; |
| 986 | state->m_smpc_ram[0x29] = state->m_smpc_ram[0x07]; |
| 987 | state->m_smpc_ram[0x27] = state->m_smpc_ram[0x05]; |
| 988 | state->m_smpc_ram[0x25] = state->m_smpc_ram[0x03]; |
| 989 | state->m_smpc_ram[0x23] = state->m_smpc_ram[0x01]; |
| 990 | state->m_smpc_ram[0x5f]=0x16; |
| 1010 | 991 | break; |
| 1011 | 992 | /* SMPC memory setting*/ |
| 1012 | 993 | case 0x17: |
| 1013 | 994 | if(LOG_SMPC) logerror ("SMPC: memory setting\n"); |
| 1014 | | SMEM[0] = smpc_ram[1]; |
| 1015 | | SMEM[1] = smpc_ram[3]; |
| 1016 | | SMEM[2] = smpc_ram[5]; |
| 1017 | | SMEM[3] = smpc_ram[7]; |
| 995 | SMEM[0] = state->m_smpc_ram[1]; |
| 996 | SMEM[1] = state->m_smpc_ram[3]; |
| 997 | SMEM[2] = state->m_smpc_ram[5]; |
| 998 | SMEM[3] = state->m_smpc_ram[7]; |
| 1018 | 999 | |
| 1019 | | smpc_ram[0x5f]=0x17; |
| 1000 | state->m_smpc_ram[0x5f]=0x17; |
| 1020 | 1001 | break; |
| 1021 | 1002 | case 0x18: |
| 1022 | 1003 | if(LOG_SMPC) logerror ("SMPC: NMI request\n"); |
| 1023 | | smpc_ram[0x5f]=0x18; |
| 1004 | state->m_smpc_ram[0x5f]=0x18; |
| 1024 | 1005 | /*NMI is unconditionally requested?*/ |
| 1025 | 1006 | cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); |
| 1026 | 1007 | break; |
| 1027 | 1008 | case 0x19: |
| 1028 | 1009 | if(LOG_SMPC) logerror ("SMPC: NMI Enable\n"); |
| 1029 | | smpc_ram[0x5f]=0x19; |
| 1030 | | NMI_reset = 0; |
| 1031 | | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 1010 | state->m_smpc_ram[0x5f]=0x19; |
| 1011 | state->m_NMI_reset = 0; |
| 1012 | state->m_smpc_ram[0x21] = (0x80) | ((state->m_NMI_reset & 1) << 6); |
| 1032 | 1013 | break; |
| 1033 | 1014 | case 0x1a: |
| 1034 | 1015 | if(LOG_SMPC) logerror ("SMPC: NMI Disable\n"); |
| 1035 | | smpc_ram[0x5f]=0x1a; |
| 1036 | | NMI_reset = 1; |
| 1037 | | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 1016 | state->m_smpc_ram[0x5f]=0x1a; |
| 1017 | state->m_NMI_reset = 1; |
| 1018 | state->m_smpc_ram[0x21] = (0x80) | ((state->m_NMI_reset & 1) << 6); |
| 1038 | 1019 | |
| 1039 | 1020 | break; |
| 1040 | 1021 | default: |
| r11594 | r11595 | |
| 1042 | 1023 | } |
| 1043 | 1024 | |
| 1044 | 1025 | // we've processed the command, clear status flag |
| 1045 | | smpc_ram[0x63] = 0x00; |
| 1026 | state->m_smpc_ram[0x63] = 0x00; |
| 1046 | 1027 | /*TODO:emulate the timing of each command...*/ |
| 1047 | 1028 | } |
| 1048 | 1029 | } |
| 1049 | 1030 | |
| 1050 | | |
| 1051 | | |
| 1052 | | static READ32_HANDLER ( stv_SMPC_r32 ) |
| 1053 | | { |
| 1054 | | int byte = 0; |
| 1055 | | int readdata = 0; |
| 1056 | | /* registers are all byte accesses, convert here */ |
| 1057 | | offset = offset << 2; // multiply offset by 4 |
| 1058 | | |
| 1059 | | if (ACCESSING_BITS_24_31) { byte = 0; readdata = stv_SMPC_r8(space, offset+byte) << 24; } |
| 1060 | | if (ACCESSING_BITS_16_23) { byte = 1; readdata = stv_SMPC_r8(space, offset+byte) << 16; } |
| 1061 | | if (ACCESSING_BITS_8_15) { byte = 2; readdata = stv_SMPC_r8(space, offset+byte) << 8; } |
| 1062 | | if (ACCESSING_BITS_0_7) { byte = 3; readdata = stv_SMPC_r8(space, offset+byte) << 0; } |
| 1063 | | |
| 1064 | | return readdata; |
| 1065 | | } |
| 1066 | | |
| 1067 | | |
| 1068 | | static WRITE32_HANDLER ( stv_SMPC_w32 ) |
| 1069 | | { |
| 1070 | | int byte = 0; |
| 1071 | | int writedata = 0; |
| 1072 | | /* registers are all byte accesses, convert here so we can use the data more easily later */ |
| 1073 | | offset = offset << 2; // multiply offset by 4 |
| 1074 | | |
| 1075 | | if (ACCESSING_BITS_24_31) { byte = 0; writedata = data >> 24; } |
| 1076 | | if (ACCESSING_BITS_16_23) { byte = 1; writedata = data >> 16; } |
| 1077 | | if (ACCESSING_BITS_8_15) { byte = 2; writedata = data >> 8; } |
| 1078 | | if (ACCESSING_BITS_0_7) { byte = 3; writedata = data >> 0; } |
| 1079 | | |
| 1080 | | writedata &= 0xff; |
| 1081 | | |
| 1082 | | offset += byte; |
| 1083 | | |
| 1084 | | stv_SMPC_w8(space, offset,writedata); |
| 1085 | | } |
| 1086 | | |
| 1087 | | |
| 1088 | | static READ32_HANDLER ( saturn_SMPC_r32 ) |
| 1089 | | { |
| 1090 | | int byte = 0; |
| 1091 | | int readdata = 0; |
| 1092 | | /* registers are all byte accesses, convert here */ |
| 1093 | | offset = offset << 2; // multiply offset by 4 |
| 1094 | | |
| 1095 | | if (ACCESSING_BITS_24_31) { byte = 0; readdata = saturn_SMPC_r8(space, offset+byte) << 24; } |
| 1096 | | if (ACCESSING_BITS_16_23) { byte = 1; readdata = saturn_SMPC_r8(space, offset+byte) << 16; } |
| 1097 | | if (ACCESSING_BITS_8_15) { byte = 2; readdata = saturn_SMPC_r8(space, offset+byte) << 8; } |
| 1098 | | if (ACCESSING_BITS_0_7) { byte = 3; readdata = saturn_SMPC_r8(space, offset+byte) << 0; } |
| 1099 | | |
| 1100 | | return readdata; |
| 1101 | | } |
| 1102 | | |
| 1103 | | |
| 1104 | | static WRITE32_HANDLER ( saturn_SMPC_w32 ) |
| 1105 | | { |
| 1106 | | int byte = 0; |
| 1107 | | int writedata = 0; |
| 1108 | | /* registers are all byte accesses, convert here so we can use the data more easily later */ |
| 1109 | | offset = offset << 2; // multiply offset by 4 |
| 1110 | | |
| 1111 | | if (ACCESSING_BITS_24_31) { byte = 0; writedata = data >> 24; } |
| 1112 | | if (ACCESSING_BITS_16_23) { byte = 1; writedata = data >> 16; } |
| 1113 | | if (ACCESSING_BITS_8_15) { byte = 2; writedata = data >> 8; } |
| 1114 | | if (ACCESSING_BITS_0_7) { byte = 3; writedata = data >> 0; } |
| 1115 | | |
| 1116 | | writedata &= 0xff; |
| 1117 | | |
| 1118 | | offset += byte; |
| 1119 | | |
| 1120 | | saturn_SMPC_w8(space, offset,writedata); |
| 1121 | | } |
| 1122 | | |
| 1123 | 1031 | /* |
| 1124 | 1032 | I/O overview: |
| 1125 | 1033 | PORT-A 1st player inputs |
| r11594 | r11595 | |
| 1244 | 1152 | //popmessage("(PC=%06x) offs 5 %04x %02x",cpu_get_pc(&space->device()),port_sel,((ioga[5] & 0xff0000) >> 16)); |
| 1245 | 1153 | logerror("(PC=%06x) offs 5 %04x %02x\n",cpu_get_pc(&space->device()),port_sel,((ioga[5] & 0xff0000) >> 16)); |
| 1246 | 1154 | |
| 1247 | | //stv_workram_h[0x8e830/4] = ((ioga[5] & 0xff0000) >> 16) ^ 0x3; |
| 1248 | | //stv_workram_h[0x8e834/4] = ((ioga[5] & 0xff0000) >> 16) ^ 0x3; |
| 1249 | | return (ioga[5] & 0xff0000) >> 16;//stv_workram_h[0x8e830/4];//sound board data |
| 1155 | //stv_m_workram_h[0x8e830/4] = ((ioga[5] & 0xff0000) >> 16) ^ 0x3; |
| 1156 | //stv_m_workram_h[0x8e834/4] = ((ioga[5] & 0xff0000) >> 16) ^ 0x3; |
| 1157 | return (ioga[5] & 0xff0000) >> 16;//stv_m_workram_h[0x8e830/4];//sound board data |
| 1250 | 1158 | } |
| 1251 | 1159 | default: return 0xffffffff; |
| 1252 | 1160 | } |
| r11594 | r11595 | |
| 1420 | 1328 | -Set boundaries. |
| 1421 | 1329 | */ |
| 1422 | 1330 | |
| 1423 | | #define DIRECT_MODE(_lv_) (!(stv_scu[5+(_lv_*8)] & 0x01000000)) |
| 1424 | | #define INDIRECT_MODE(_lv_) (stv_scu[5+(_lv_*8)] & 0x01000000) |
| 1425 | | #define DRUP(_lv_) (stv_scu[5+(_lv_*8)] & 0x00010000) |
| 1426 | | #define DWUP(_lv_) (stv_scu[5+(_lv_*8)] & 0x00000100) |
| 1331 | #define DIRECT_MODE(_lv_) (!(state->m_scu_regs[5+(_lv_*8)] & 0x01000000)) |
| 1332 | #define INDIRECT_MODE(_lv_) (state->m_scu_regs[5+(_lv_*8)] & 0x01000000) |
| 1333 | #define DRUP(_lv_) (state->m_scu_regs[5+(_lv_*8)] & 0x00010000) |
| 1334 | #define DWUP(_lv_) (state->m_scu_regs[5+(_lv_*8)] & 0x00000100) |
| 1427 | 1335 | |
| 1428 | | #define DMA_STATUS (stv_scu[31]) |
| 1336 | #define DMA_STATUS (state->m_scu_regs[31]) |
| 1429 | 1337 | /*These macros sets the various DMA status flags.*/ |
| 1430 | | #define D0MV_1 if(!(DMA_STATUS & 0x10)) DMA_STATUS^=0x10 |
| 1431 | | #define D1MV_1 if(!(DMA_STATUS & 0x100)) DMA_STATUS^=0x100 |
| 1432 | | #define D2MV_1 if(!(DMA_STATUS & 0x1000)) DMA_STATUS^=0x1000 |
| 1433 | | #define D0MV_0 if(DMA_STATUS & 0x10) DMA_STATUS^=0x10 |
| 1434 | | #define D1MV_0 if(DMA_STATUS & 0x100) DMA_STATUS^=0x100 |
| 1435 | | #define D2MV_0 if(DMA_STATUS & 0x1000) DMA_STATUS^=0x1000 |
| 1338 | #define D0MV_1 DMA_STATUS|=0x10 |
| 1339 | #define D1MV_1 DMA_STATUS|=0x100 |
| 1340 | #define D2MV_1 DMA_STATUS|=0x1000 |
| 1341 | #define D0MV_0 DMA_STATUS&=~0x10 |
| 1342 | #define D1MV_0 DMA_STATUS&=~0x100 |
| 1343 | #define D2MV_0 DMA_STATUS&=~0x1000 |
| 1436 | 1344 | |
| 1437 | | static UINT32 scu_index_0,scu_index_1,scu_index_2; |
| 1438 | | static UINT8 scsp_to_main_irq; |
| 1439 | | |
| 1440 | 1345 | static UINT32 scu_add_tmp; |
| 1441 | 1346 | |
| 1442 | 1347 | /*For area checking*/ |
| 1443 | | #define ABUS(_lv_) ((scu_##_lv_ & 0x07ffffff) >= 0x02000000) && ((scu_##_lv_ & 0x07ffffff) <= 0x04ffffff) |
| 1348 | #define ABUS(_lv_) ((state->m_scu_src[_lv_] & 0x07ffffff) >= 0x02000000) && ((state->m_scu_src[_lv_] & 0x07ffffff) <= 0x04ffffff) |
| 1444 | 1349 | #define BBUS(_lv_) ((scu_##_lv_ & 0x07ffffff) >= 0x05a00000) && ((scu_##_lv_ & 0x07ffffff) <= 0x05ffffff) |
| 1445 | 1350 | #define VDP1_REGS(_lv_) ((scu_##_lv_ & 0x07ffffff) >= 0x05d00000) && ((scu_##_lv_ & 0x07ffffff) <= 0x05dfffff) |
| 1446 | 1351 | #define VDP2(_lv_) ((scu_##_lv_ & 0x07ffffff) >= 0x05e00000) && ((scu_##_lv_ & 0x07ffffff) <= 0x05fdffff) |
| r11594 | r11595 | |
| 1448 | 1353 | #define WORK_RAM_H(_lv_) ((scu_##_lv_ & 0x07ffffff) >= 0x06000000) && ((scu_##_lv_ & 0x07ffffff) <= 0x060fffff) |
| 1449 | 1354 | #define SOUND_RAM(_lv_) ((scu_##_lv_ & 0x07ffffff) >= 0x05a00000) && ((scu_##_lv_ & 0x07ffffff) <= 0x05afffff) |
| 1450 | 1355 | |
| 1451 | | static READ32_HANDLER( stv_scu_r32 ) |
| 1356 | static READ32_HANDLER( saturn_scu_r ) |
| 1452 | 1357 | { |
| 1358 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 1359 | |
| 1453 | 1360 | /*TODO: write only registers must return 0...*/ |
| 1454 | 1361 | //popmessage("%02x",DMA_STATUS); |
| 1455 | 1362 | //if (offset == 23) |
| r11594 | r11595 | |
| 1459 | 1366 | if (offset == 31) |
| 1460 | 1367 | { |
| 1461 | 1368 | if(LOG_SCU) logerror("(PC=%08x) DMA status reg read\n",cpu_get_pc(&space->device())); |
| 1462 | | return stv_scu[offset]; |
| 1369 | return state->m_scu_regs[offset]; |
| 1463 | 1370 | } |
| 1464 | 1371 | else if ( offset == 35 ) |
| 1465 | 1372 | { |
| 1466 | | if(LOG_SCU) logerror( "DSP mem read at %08X\n", stv_scu[34]); |
| 1373 | if(LOG_SCU) logerror( "DSP mem read at %08X\n", state->m_scu_regs[34]); |
| 1467 | 1374 | return dsp_ram_addr_r(); |
| 1468 | 1375 | } |
| 1469 | 1376 | else if( offset == 41) /*IRQ reg status read*/ |
| 1470 | 1377 | { |
| 1471 | 1378 | if(LOG_SCU) logerror("(PC=%08x) IRQ status reg read %08x\n",cpu_get_pc(&space->device()),mem_mask); |
| 1472 | 1379 | |
| 1473 | | stv_scu[41] = (stv_irq.vblank_in & 1)<<0; |
| 1474 | | stv_scu[41]|= (stv_irq.vblank_out & 1)<<1; |
| 1475 | | stv_scu[41]|= (stv_irq.hblank_in & 1)<<2; |
| 1476 | | stv_scu[41]|= (stv_irq.timer_0 & 1)<<3; |
| 1477 | | stv_scu[41]|= (stv_irq.timer_1 & 1)<<4; |
| 1478 | | stv_scu[41]|= (stv_irq.dsp_end & 1)<<5; |
| 1479 | | stv_scu[41]|= (stv_irq.sound_req & 1)<<6; |
| 1480 | | stv_scu[41]|= (stv_irq.smpc & 1)<<7; |
| 1481 | | stv_scu[41]|= (stv_irq.pad & 1)<<8; |
| 1482 | | stv_scu[41]|= (stv_irq.dma_end[0] & 1)<<9; |
| 1483 | | stv_scu[41]|= (stv_irq.dma_end[1] & 1)<<10; |
| 1484 | | stv_scu[41]|= (stv_irq.dma_end[2] & 1)<<11; |
| 1485 | | stv_scu[41]|= (stv_irq.dma_ill & 1)<<12; |
| 1486 | | stv_scu[41]|= (stv_irq.vdp1_end & 1)<<13; |
| 1487 | | stv_scu[41]|= (stv_irq.abus & 1)<<15; |
| 1380 | state->m_scu_regs[41] = (stv_irq.vblank_in & 1)<<0; |
| 1381 | state->m_scu_regs[41]|= (stv_irq.vblank_out & 1)<<1; |
| 1382 | state->m_scu_regs[41]|= (stv_irq.hblank_in & 1)<<2; |
| 1383 | state->m_scu_regs[41]|= (stv_irq.timer_0 & 1)<<3; |
| 1384 | state->m_scu_regs[41]|= (stv_irq.timer_1 & 1)<<4; |
| 1385 | state->m_scu_regs[41]|= (stv_irq.dsp_end & 1)<<5; |
| 1386 | state->m_scu_regs[41]|= (stv_irq.sound_req & 1)<<6; |
| 1387 | state->m_scu_regs[41]|= (stv_irq.smpc & 1)<<7; |
| 1388 | state->m_scu_regs[41]|= (stv_irq.pad & 1)<<8; |
| 1389 | state->m_scu_regs[41]|= (stv_irq.dma_end[0] & 1)<<9; |
| 1390 | state->m_scu_regs[41]|= (stv_irq.dma_end[1] & 1)<<10; |
| 1391 | state->m_scu_regs[41]|= (stv_irq.dma_end[2] & 1)<<11; |
| 1392 | state->m_scu_regs[41]|= (stv_irq.dma_ill & 1)<<12; |
| 1393 | state->m_scu_regs[41]|= (stv_irq.vdp1_end & 1)<<13; |
| 1394 | state->m_scu_regs[41]|= (stv_irq.abus & 1)<<15; |
| 1488 | 1395 | |
| 1489 | | return stv_scu[41] ^ 0xffffffff; |
| 1396 | return state->m_scu_regs[41] ^ 0xffffffff; |
| 1490 | 1397 | } |
| 1491 | 1398 | else if( offset == 50 ) |
| 1492 | 1399 | { |
| r11594 | r11595 | |
| 1495 | 1402 | } |
| 1496 | 1403 | else |
| 1497 | 1404 | { |
| 1498 | | if(LOG_SCU) logerror("(PC=%08x) SCU reg read at %d = %08x\n",cpu_get_pc(&space->device()),offset,stv_scu[offset]); |
| 1499 | | return stv_scu[offset]; |
| 1405 | if(LOG_SCU) logerror("(PC=%08x) SCU reg read at %d = %08x\n",cpu_get_pc(&space->device()),offset,state->m_scu_regs[offset]); |
| 1406 | return state->m_scu_regs[offset]; |
| 1500 | 1407 | } |
| 1501 | 1408 | } |
| 1502 | 1409 | |
| 1503 | | static WRITE32_HANDLER( stv_scu_w32 ) |
| 1410 | #define DMA_CH ((offset & 0x18) / 8) |
| 1411 | |
| 1412 | static WRITE32_HANDLER( saturn_scu_w ) |
| 1504 | 1413 | { |
| 1505 | | COMBINE_DATA(&stv_scu[offset]); |
| 1414 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 1506 | 1415 | |
| 1416 | COMBINE_DATA(&state->m_scu_regs[offset]); |
| 1417 | |
| 1507 | 1418 | switch(offset) |
| 1508 | 1419 | { |
| 1509 | 1420 | /*LV 0 DMA*/ |
| 1510 | | case 0: scu_src_0 = ((stv_scu[0] & 0x07ffffff) >> 0); break; |
| 1511 | | case 1: scu_dst_0 = ((stv_scu[1] & 0x07ffffff) >> 0); break; |
| 1512 | | case 2: scu_size_0 = ((stv_scu[2] & 0x000fffff) >> 0); break; |
| 1513 | | case 3: |
| 1421 | case 0: case 8: case 16: state->m_scu_src[DMA_CH] = ((state->m_scu_regs[offset] & 0x07ffffff) >> 0); break; |
| 1422 | case 1: case 9: case 17: state->m_scu_dst[DMA_CH] = ((state->m_scu_regs[offset] & 0x07ffffff) >> 0); break; |
| 1423 | case 2: case 10: case 18: state->m_scu_size[DMA_CH] = ((state->m_scu_regs[offset] & ((offset == 2) ? 0x000fffff : 0x1fff)) >> 0); break; |
| 1424 | case 3: case 11: case 19: |
| 1514 | 1425 | /*Read address add value for DMA lv 0*/ |
| 1515 | | if(stv_scu[3] & 0x100) |
| 1516 | | scu_src_add_0 = 4; |
| 1517 | | else |
| 1518 | | scu_src_add_0 = 1; |
| 1426 | state->m_scu_src_add[DMA_CH] = (state->m_scu_regs[offset] & 0x100) ? 4 : 1; |
| 1519 | 1427 | |
| 1520 | 1428 | /*Write address add value for DMA lv 0*/ |
| 1521 | | switch(stv_scu[3] & 7) |
| 1522 | | { |
| 1523 | | case 0: scu_dst_add_0 = 2; break; |
| 1524 | | case 1: scu_dst_add_0 = 4; break; |
| 1525 | | case 2: scu_dst_add_0 = 8; break; |
| 1526 | | case 3: scu_dst_add_0 = 16; break; |
| 1527 | | case 4: scu_dst_add_0 = 32; break; |
| 1528 | | case 5: scu_dst_add_0 = 64; break; |
| 1529 | | case 6: scu_dst_add_0 = 128; break; |
| 1530 | | case 7: scu_dst_add_0 = 256; break; |
| 1531 | | } |
| 1429 | state->m_scu_dst_add[DMA_CH] = 2 << (state->m_scu_regs[offset] & 7); |
| 1532 | 1430 | break; |
| 1533 | | case 4: |
| 1431 | case 4: case 12: case 20: |
| 1534 | 1432 | /* |
| 1535 | | -stv_scu[4] bit 0 is DMA starting bit. |
| 1433 | -state->m_scu_regs[4] bit 0 is DMA starting bit. |
| 1536 | 1434 | Used when the start factor is 7.Toggle after execution. |
| 1537 | | -stv_scu[4] bit 8 is DMA Enable bit. |
| 1435 | -state->m_scu_regs[4] bit 8 is DMA Enable bit. |
| 1538 | 1436 | This is an execution mask flag. |
| 1539 | | -stv_scu[5] bit 0,bit 1 and bit 2 is DMA starting factor. |
| 1437 | -state->m_scu_regs[5] bit 0,bit 1 and bit 2 is DMA starting factor. |
| 1540 | 1438 | It must be 7 for this specific condition. |
| 1541 | | -stv_scu[5] bit 24 is Indirect Mode/Direct Mode (0/1). |
| 1439 | -state->m_scu_regs[5] bit 24 is Indirect Mode/Direct Mode (0/1). |
| 1542 | 1440 | */ |
| 1543 | | if(stv_scu[4] & 1 && ((stv_scu[5] & 7) == 7) && stv_scu[4] & 0x100) |
| 1441 | if(state->m_scu_regs[offset] & 1 && ((state->m_scu_regs[offset+1] & 7) == 7) && state->m_scu_regs[offset] & 0x100) |
| 1544 | 1442 | { |
| 1545 | | if(DIRECT_MODE(0)) { dma_direct_lv0(space); } |
| 1546 | | else { dma_indirect_lv0(space); } |
| 1443 | if(DIRECT_MODE(DMA_CH)) { scu_dma_direct(space,DMA_CH); } |
| 1444 | else { scu_dma_indirect(space,DMA_CH); } |
| 1547 | 1445 | |
| 1548 | | stv_scu[4]^=1;//disable starting bit. |
| 1549 | | |
| 1550 | | /*Sound IRQ*/ |
| 1551 | | if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1) |
| 1552 | | { |
| 1553 | | //cputag_set_input_line_and_vector(space->machine(), "maincpu", 9, HOLD_LINE , 0x46); |
| 1554 | | logerror("SCSP: Main CPU interrupt\n"); |
| 1555 | | #if 0 |
| 1556 | | if((scu_dst_0 & 0x7ffffff) != 0x05a00000) |
| 1557 | | { |
| 1558 | | if(!(stv_scu[40] & 0x1000)) |
| 1559 | | { |
| 1560 | | cputag_set_input_line_and_vector(space->machine(), "maincpu", 3, HOLD_LINE, 0x4c); |
| 1561 | | logerror("SCU: Illegal DMA interrupt\n"); |
| 1562 | | } |
| 1563 | | } |
| 1564 | | #endif |
| 1565 | | } |
| 1446 | state->m_scu_regs[offset]&=~1;//disable starting bit. |
| 1566 | 1447 | } |
| 1567 | 1448 | break; |
| 1568 | | case 5: |
| 1569 | | if(INDIRECT_MODE(0)) |
| 1449 | case 5: case 13: case 21: |
| 1450 | if(INDIRECT_MODE(DMA_CH)) |
| 1570 | 1451 | { |
| 1571 | | if(LOG_SCU) logerror("Indirect Mode DMA lv 0 set\n"); |
| 1572 | | if(!DWUP(0)) scu_index_0 = scu_dst_0; |
| 1452 | if(LOG_SCU) logerror("Indirect Mode DMA lv %d set\n",DMA_CH); |
| 1453 | if(!DWUP(DMA_CH)) state->m_scu_index[DMA_CH] = state->m_scu_dst[DMA_CH]; |
| 1573 | 1454 | } |
| 1574 | 1455 | |
| 1575 | 1456 | /*Start factor enable bits,bit 2,bit 1 and bit 0*/ |
| 1576 | | if((stv_scu[5] & 7) != 7) |
| 1577 | | if(LOG_SCU) logerror("Start factor chosen for lv 0 = %d\n",stv_scu[5] & 7); |
| 1457 | if((state->m_scu_regs[offset] & 7) != 7) |
| 1458 | if(LOG_SCU) logerror("Start factor chosen for lv %d = %d\n",state->m_scu_regs[offset+1] & 7,DMA_CH); |
| 1578 | 1459 | break; |
| 1579 | | /*LV 1 DMA*/ |
| 1580 | | case 8: scu_src_1 = ((stv_scu[8] & 0x07ffffff) >> 0); break; |
| 1581 | | case 9: scu_dst_1 = ((stv_scu[9] & 0x07ffffff) >> 0); break; |
| 1582 | | case 10: scu_size_1 = ((stv_scu[10] & 0x00001fff) >> 0); break; |
| 1583 | | case 11: |
| 1584 | | /*Read address add value for DMA lv 1*/ |
| 1585 | | if(stv_scu[11] & 0x100) |
| 1586 | | scu_src_add_1 = 4; |
| 1587 | | else |
| 1588 | | scu_src_add_1 = 1; |
| 1589 | 1460 | |
| 1590 | | /*Write address add value for DMA lv 1*/ |
| 1591 | | switch(stv_scu[11] & 7) |
| 1592 | | { |
| 1593 | | case 0: scu_dst_add_1 = 2; break; |
| 1594 | | case 1: scu_dst_add_1 = 4; break; |
| 1595 | | case 2: scu_dst_add_1 = 8; break; |
| 1596 | | case 3: scu_dst_add_1 = 16; break; |
| 1597 | | case 4: scu_dst_add_1 = 32; break; |
| 1598 | | case 5: scu_dst_add_1 = 64; break; |
| 1599 | | case 6: scu_dst_add_1 = 128; break; |
| 1600 | | case 7: scu_dst_add_1 = 256; break; |
| 1601 | | } |
| 1602 | | break; |
| 1603 | | case 12: |
| 1604 | | if(stv_scu[12] & 1 && ((stv_scu[13] & 7) == 7) && stv_scu[12] & 0x100) |
| 1605 | | { |
| 1606 | | if(DIRECT_MODE(1)) { dma_direct_lv1(space); } |
| 1607 | | else { dma_indirect_lv1(space); } |
| 1608 | | |
| 1609 | | stv_scu[12]^=1; |
| 1610 | | |
| 1611 | | /*Sound IRQ*/ |
| 1612 | | if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1) |
| 1613 | | { |
| 1614 | | //cputag_set_input_line_and_vector(space->machine(), "maincpu", 9, HOLD_LINE , 0x46); |
| 1615 | | logerror("SCSP: Main CPU interrupt\n"); |
| 1616 | | } |
| 1617 | | } |
| 1618 | | break; |
| 1619 | | case 13: |
| 1620 | | if(INDIRECT_MODE(1)) |
| 1621 | | { |
| 1622 | | if(LOG_SCU) logerror("Indirect Mode DMA lv 1 set\n"); |
| 1623 | | if(!DWUP(1)) scu_index_1 = scu_dst_1; |
| 1624 | | } |
| 1625 | | |
| 1626 | | if((stv_scu[13] & 7) != 7) |
| 1627 | | if(LOG_SCU) logerror("Start factor chosen for lv 1 = %d\n",stv_scu[13] & 7); |
| 1628 | | break; |
| 1629 | | /*LV 2 DMA*/ |
| 1630 | | case 16: scu_src_2 = ((stv_scu[16] & 0x07ffffff) >> 0); break; |
| 1631 | | case 17: scu_dst_2 = ((stv_scu[17] & 0x07ffffff) >> 0); break; |
| 1632 | | case 18: scu_size_2 = ((stv_scu[18] & 0x00001fff) >> 0); break; |
| 1633 | | case 19: |
| 1634 | | /*Read address add value for DMA lv 2*/ |
| 1635 | | if(stv_scu[19] & 0x100) |
| 1636 | | scu_src_add_2 = 4; |
| 1637 | | else |
| 1638 | | scu_src_add_2 = 1; |
| 1639 | | |
| 1640 | | /*Write address add value for DMA lv 2*/ |
| 1641 | | switch(stv_scu[19] & 7) |
| 1642 | | { |
| 1643 | | case 0: scu_dst_add_2 = 2; break; |
| 1644 | | case 1: scu_dst_add_2 = 4; break; |
| 1645 | | case 2: scu_dst_add_2 = 8; break; |
| 1646 | | case 3: scu_dst_add_2 = 16; break; |
| 1647 | | case 4: scu_dst_add_2 = 32; break; |
| 1648 | | case 5: scu_dst_add_2 = 64; break; |
| 1649 | | case 6: scu_dst_add_2 = 128; break; |
| 1650 | | case 7: scu_dst_add_2 = 256; break; |
| 1651 | | } |
| 1652 | | break; |
| 1653 | | case 20: |
| 1654 | | if(stv_scu[20] & 1 && ((stv_scu[21] & 7) == 7) && stv_scu[20] & 0x100) |
| 1655 | | { |
| 1656 | | if(DIRECT_MODE(2)) { dma_direct_lv2(space); } |
| 1657 | | else { dma_indirect_lv2(space); } |
| 1658 | | |
| 1659 | | stv_scu[20]^=1; |
| 1660 | | |
| 1661 | | /*Sound IRQ*/ |
| 1662 | | if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1) |
| 1663 | | { |
| 1664 | | //cputag_set_input_line_and_vector(space->machine(), "maincpu", 9, HOLD_LINE , 0x46); |
| 1665 | | logerror("SCSP: Main CPU interrupt\n"); |
| 1666 | | } |
| 1667 | | } |
| 1668 | | break; |
| 1669 | | case 21: |
| 1670 | | if(INDIRECT_MODE(2)) |
| 1671 | | { |
| 1672 | | if(LOG_SCU) logerror("Indirect Mode DMA lv 2 set\n"); |
| 1673 | | if(!DWUP(2)) scu_index_2 = scu_dst_2; |
| 1674 | | } |
| 1675 | | |
| 1676 | | if((stv_scu[21] & 7) != 7) |
| 1677 | | if(LOG_SCU) logerror("Start factor chosen for lv 2 = %d\n",stv_scu[21] & 7); |
| 1678 | | break; |
| 1679 | 1461 | case 24: |
| 1680 | | if(LOG_SCU) logerror("DMA Forced Stop Register set = %02x\n",stv_scu[24]); |
| 1462 | if(LOG_SCU) logerror("DMA Forced Stop Register set = %02x\n",state->m_scu_regs[24]); |
| 1681 | 1463 | break; |
| 1682 | 1464 | case 31: if(LOG_SCU) logerror("Warning: DMA status WRITE! Offset %02x(%d)\n",offset*4,offset); break; |
| 1683 | 1465 | /*DSP section*/ |
| r11594 | r11595 | |
| 1698 | 1480 | dsp_ram_addr_w(data); |
| 1699 | 1481 | if(LOG_SCU) logerror("SCU DSP: Data RAM Data Port Access %08x\n",data); |
| 1700 | 1482 | break; |
| 1701 | | case 36: if(LOG_SCU) logerror("timer 0 compare data = %03x\n",stv_scu[36]);break; |
| 1702 | | case 37: if(LOG_SCU) logerror("timer 1 set data = %08x\n",stv_scu[37]); break; |
| 1703 | | case 38: if(LOG_SCU) logerror("timer 1 mode data = %08x\n",stv_scu[38]); break; |
| 1483 | case 36: if(LOG_SCU) logerror("timer 0 compare data = %03x\n",state->m_scu_regs[36]);break; |
| 1484 | case 37: if(LOG_SCU) logerror("timer 1 set data = %08x\n",state->m_scu_regs[37]); break; |
| 1485 | case 38: if(LOG_SCU) logerror("timer 1 mode data = %08x\n",state->m_scu_regs[38]); break; |
| 1704 | 1486 | case 40: |
| 1705 | 1487 | /*An interrupt is masked when his specific bit is 1.*/ |
| 1706 | 1488 | /*Are bit 16-bit 31 for External A-Bus irq mask like the status register?*/ |
| 1707 | 1489 | |
| 1708 | | stv_irq.vblank_in = (((stv_scu[40] & 0x0001)>>0) ^ 1); |
| 1709 | | stv_irq.vblank_out = (((stv_scu[40] & 0x0002)>>1) ^ 1); |
| 1710 | | stv_irq.hblank_in = (((stv_scu[40] & 0x0004)>>2) ^ 1); |
| 1711 | | stv_irq.timer_0 = (((stv_scu[40] & 0x0008)>>3) ^ 1); |
| 1712 | | stv_irq.timer_1 = (((stv_scu[40] & 0x0010)>>4) ^ 1); |
| 1713 | | stv_irq.dsp_end = (((stv_scu[40] & 0x0020)>>5) ^ 1); |
| 1714 | | stv_irq.sound_req = (((stv_scu[40] & 0x0040)>>6) ^ 1); |
| 1715 | | stv_irq.smpc = (((stv_scu[40] & 0x0080)>>7)); //NOTE: SCU bug |
| 1716 | | stv_irq.pad = (((stv_scu[40] & 0x0100)>>8) ^ 1); |
| 1717 | | stv_irq.dma_end[2] = (((stv_scu[40] & 0x0200)>>9) ^ 1); |
| 1718 | | stv_irq.dma_end[1] = (((stv_scu[40] & 0x0400)>>10) ^ 1); |
| 1719 | | stv_irq.dma_end[0] = (((stv_scu[40] & 0x0800)>>11) ^ 1); |
| 1720 | | stv_irq.dma_ill = (((stv_scu[40] & 0x1000)>>12) ^ 1); |
| 1721 | | stv_irq.vdp1_end = (((stv_scu[40] & 0x2000)>>13) ^ 1); |
| 1722 | | stv_irq.abus = (((stv_scu[40] & 0x8000)>>15) ^ 1); |
| 1490 | stv_irq.vblank_in = (((state->m_scu_regs[40] & 0x0001)>>0) ^ 1); |
| 1491 | stv_irq.vblank_out = (((state->m_scu_regs[40] & 0x0002)>>1) ^ 1); |
| 1492 | stv_irq.hblank_in = (((state->m_scu_regs[40] & 0x0004)>>2) ^ 1); |
| 1493 | stv_irq.timer_0 = (((state->m_scu_regs[40] & 0x0008)>>3) ^ 1); |
| 1494 | stv_irq.timer_1 = (((state->m_scu_regs[40] & 0x0010)>>4) ^ 1); |
| 1495 | stv_irq.dsp_end = (((state->m_scu_regs[40] & 0x0020)>>5) ^ 1); |
| 1496 | stv_irq.sound_req = (((state->m_scu_regs[40] & 0x0040)>>6) ^ 1); |
| 1497 | stv_irq.smpc = (((state->m_scu_regs[40] & 0x0080)>>7)); //NOTE: SCU bug |
| 1498 | stv_irq.pad = (((state->m_scu_regs[40] & 0x0100)>>8) ^ 1); |
| 1499 | stv_irq.dma_end[2] = (((state->m_scu_regs[40] & 0x0200)>>9) ^ 1); |
| 1500 | stv_irq.dma_end[1] = (((state->m_scu_regs[40] & 0x0400)>>10) ^ 1); |
| 1501 | stv_irq.dma_end[0] = (((state->m_scu_regs[40] & 0x0800)>>11) ^ 1); |
| 1502 | stv_irq.dma_ill = (((state->m_scu_regs[40] & 0x1000)>>12) ^ 1); |
| 1503 | stv_irq.vdp1_end = (((state->m_scu_regs[40] & 0x2000)>>13) ^ 1); |
| 1504 | stv_irq.abus = (((state->m_scu_regs[40] & 0x8000)>>15) ^ 1); |
| 1723 | 1505 | |
| 1724 | 1506 | /*Take out the common settings to keep logging quiet.*/ |
| 1725 | | if(stv_scu[40] != 0xfffffffe && |
| 1726 | | stv_scu[40] != 0xfffffffc && |
| 1727 | | stv_scu[40] != 0xffffffff) |
| 1507 | if(state->m_scu_regs[40] != 0xfffffffe && |
| 1508 | state->m_scu_regs[40] != 0xfffffffc && |
| 1509 | state->m_scu_regs[40] != 0xffffffff) |
| 1728 | 1510 | { |
| 1729 | 1511 | if(LOG_SCU) logerror("cpu %s (PC=%08X) IRQ mask reg set %08x = %d%d%d%d|%d%d%d%d|%d%d%d%d|%d%d%d%d\n", |
| 1730 | 1512 | space->device().tag(), cpu_get_pc(&space->device()), |
| 1731 | | stv_scu[offset], |
| 1732 | | stv_scu[offset] & 0x8000 ? 1 : 0, /*A-Bus irq*/ |
| 1733 | | stv_scu[offset] & 0x4000 ? 1 : 0, /*<reserved>*/ |
| 1734 | | stv_scu[offset] & 0x2000 ? 1 : 0, /*Sprite draw end irq(VDP1)*/ |
| 1735 | | stv_scu[offset] & 0x1000 ? 1 : 0, /*Illegal DMA irq*/ |
| 1736 | | stv_scu[offset] & 0x0800 ? 1 : 0, /*Lv 0 DMA end irq*/ |
| 1737 | | stv_scu[offset] & 0x0400 ? 1 : 0, /*Lv 1 DMA end irq*/ |
| 1738 | | stv_scu[offset] & 0x0200 ? 1 : 0, /*Lv 2 DMA end irq*/ |
| 1739 | | stv_scu[offset] & 0x0100 ? 1 : 0, /*PAD irq*/ |
| 1740 | | stv_scu[offset] & 0x0080 ? 1 : 0, /*System Manager(SMPC) irq*/ |
| 1741 | | stv_scu[offset] & 0x0040 ? 1 : 0, /*Snd req*/ |
| 1742 | | stv_scu[offset] & 0x0020 ? 1 : 0, /*DSP irq end*/ |
| 1743 | | stv_scu[offset] & 0x0010 ? 1 : 0, /*Timer 1 irq*/ |
| 1744 | | stv_scu[offset] & 0x0008 ? 1 : 0, /*Timer 0 irq*/ |
| 1745 | | stv_scu[offset] & 0x0004 ? 1 : 0, /*HBlank-IN*/ |
| 1746 | | stv_scu[offset] & 0x0002 ? 1 : 0, /*VBlank-OUT*/ |
| 1747 | | stv_scu[offset] & 0x0001 ? 1 : 0);/*VBlank-IN*/ |
| 1513 | state->m_scu_regs[offset], |
| 1514 | state->m_scu_regs[offset] & 0x8000 ? 1 : 0, /*A-Bus irq*/ |
| 1515 | state->m_scu_regs[offset] & 0x4000 ? 1 : 0, /*<reserved>*/ |
| 1516 | state->m_scu_regs[offset] & 0x2000 ? 1 : 0, /*Sprite draw end irq(VDP1)*/ |
| 1517 | state->m_scu_regs[offset] & 0x1000 ? 1 : 0, /*Illegal DMA irq*/ |
| 1518 | state->m_scu_regs[offset] & 0x0800 ? 1 : 0, /*Lv 0 DMA end irq*/ |
| 1519 | state->m_scu_regs[offset] & 0x0400 ? 1 : 0, /*Lv 1 DMA end irq*/ |
| 1520 | state->m_scu_regs[offset] & 0x0200 ? 1 : 0, /*Lv 2 DMA end irq*/ |
| 1521 | state->m_scu_regs[offset] & 0x0100 ? 1 : 0, /*PAD irq*/ |
| 1522 | state->m_scu_regs[offset] & 0x0080 ? 1 : 0, /*System Manager(SMPC) irq*/ |
| 1523 | state->m_scu_regs[offset] & 0x0040 ? 1 : 0, /*Snd req*/ |
| 1524 | state->m_scu_regs[offset] & 0x0020 ? 1 : 0, /*DSP irq end*/ |
| 1525 | state->m_scu_regs[offset] & 0x0010 ? 1 : 0, /*Timer 1 irq*/ |
| 1526 | state->m_scu_regs[offset] & 0x0008 ? 1 : 0, /*Timer 0 irq*/ |
| 1527 | state->m_scu_regs[offset] & 0x0004 ? 1 : 0, /*HBlank-IN*/ |
| 1528 | state->m_scu_regs[offset] & 0x0002 ? 1 : 0, /*VBlank-OUT*/ |
| 1529 | state->m_scu_regs[offset] & 0x0001 ? 1 : 0);/*VBlank-IN*/ |
| 1748 | 1530 | } |
| 1749 | 1531 | break; |
| 1750 | 1532 | /*Interrupt Control reg Set*/ |
| 1751 | 1533 | case 41: |
| 1752 | 1534 | /*This is r/w by introdon...*/ |
| 1753 | | if(LOG_SCU) logerror("IRQ status reg set:%08x %08x\n",stv_scu[41],mem_mask); |
| 1535 | if(LOG_SCU) logerror("IRQ status reg set:%08x %08x\n",state->m_scu_regs[41],mem_mask); |
| 1754 | 1536 | |
| 1755 | | stv_irq.vblank_in = ((stv_scu[41] & 0x0001)>>0); |
| 1756 | | stv_irq.vblank_out = ((stv_scu[41] & 0x0002)>>1); |
| 1757 | | stv_irq.hblank_in = ((stv_scu[41] & 0x0004)>>2); |
| 1758 | | stv_irq.timer_0 = ((stv_scu[41] & 0x0008)>>3); |
| 1759 | | stv_irq.timer_1 = ((stv_scu[41] & 0x0010)>>4); |
| 1760 | | stv_irq.dsp_end = ((stv_scu[41] & 0x0020)>>5); |
| 1761 | | stv_irq.sound_req = ((stv_scu[41] & 0x0040)>>6); |
| 1762 | | stv_irq.smpc = ((stv_scu[41] & 0x0080)>>7); |
| 1763 | | stv_irq.pad = ((stv_scu[41] & 0x0100)>>8); |
| 1764 | | stv_irq.dma_end[2] = ((stv_scu[41] & 0x0200)>>9); |
| 1765 | | stv_irq.dma_end[1] = ((stv_scu[41] & 0x0400)>>10); |
| 1766 | | stv_irq.dma_end[0] = ((stv_scu[41] & 0x0800)>>11); |
| 1767 | | stv_irq.dma_ill = ((stv_scu[41] & 0x1000)>>12); |
| 1768 | | stv_irq.vdp1_end = ((stv_scu[41] & 0x2000)>>13); |
| 1769 | | stv_irq.abus = ((stv_scu[41] & 0x8000)>>15); |
| 1537 | stv_irq.vblank_in = ((state->m_scu_regs[41] & 0x0001)>>0); |
| 1538 | stv_irq.vblank_out = ((state->m_scu_regs[41] & 0x0002)>>1); |
| 1539 | stv_irq.hblank_in = ((state->m_scu_regs[41] & 0x0004)>>2); |
| 1540 | stv_irq.timer_0 = ((state->m_scu_regs[41] & 0x0008)>>3); |
| 1541 | stv_irq.timer_1 = ((state->m_scu_regs[41] & 0x0010)>>4); |
| 1542 | stv_irq.dsp_end = ((state->m_scu_regs[41] & 0x0020)>>5); |
| 1543 | stv_irq.sound_req = ((state->m_scu_regs[41] & 0x0040)>>6); |
| 1544 | stv_irq.smpc = ((state->m_scu_regs[41] & 0x0080)>>7); |
| 1545 | stv_irq.pad = ((state->m_scu_regs[41] & 0x0100)>>8); |
| 1546 | stv_irq.dma_end[2] = ((state->m_scu_regs[41] & 0x0200)>>9); |
| 1547 | stv_irq.dma_end[1] = ((state->m_scu_regs[41] & 0x0400)>>10); |
| 1548 | stv_irq.dma_end[0] = ((state->m_scu_regs[41] & 0x0800)>>11); |
| 1549 | stv_irq.dma_ill = ((state->m_scu_regs[41] & 0x1000)>>12); |
| 1550 | stv_irq.vdp1_end = ((state->m_scu_regs[41] & 0x2000)>>13); |
| 1551 | stv_irq.abus = ((state->m_scu_regs[41] & 0x8000)>>15); |
| 1770 | 1552 | |
| 1771 | 1553 | break; |
| 1772 | | case 42: if(LOG_SCU) logerror("A-Bus IRQ ACK %08x\n",stv_scu[42]); break; |
| 1773 | | case 49: if(LOG_SCU) logerror("SCU SDRAM set: %02x\n",stv_scu[49]); break; |
| 1554 | case 42: if(LOG_SCU) logerror("A-Bus IRQ ACK %08x\n",state->m_scu_regs[42]); break; |
| 1555 | case 49: if(LOG_SCU) logerror("SCU SDRAM set: %02x\n",state->m_scu_regs[49]); break; |
| 1774 | 1556 | default: if(LOG_SCU) logerror("Warning: unused SCU reg set %d = %08x\n",offset,data); |
| 1775 | 1557 | } |
| 1776 | 1558 | } |
| r11594 | r11595 | |
| 1778 | 1560 | /*Lv 0 DMA end irq*/ |
| 1779 | 1561 | static TIMER_CALLBACK( dma_lv0_ended ) |
| 1780 | 1562 | { |
| 1563 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 1564 | |
| 1781 | 1565 | cputag_set_input_line_and_vector(machine, "maincpu", 5, (stv_irq.dma_end[0]) ? HOLD_LINE : CLEAR_LINE, 0x4b); |
| 1782 | 1566 | |
| 1783 | 1567 | D0MV_0; |
| r11594 | r11595 | |
| 1786 | 1570 | /*Lv 1 DMA end irq*/ |
| 1787 | 1571 | static TIMER_CALLBACK( dma_lv1_ended ) |
| 1788 | 1572 | { |
| 1573 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 1574 | |
| 1789 | 1575 | cputag_set_input_line_and_vector(machine, "maincpu", 6, (stv_irq.dma_end[1]) ? HOLD_LINE : CLEAR_LINE, 0x4a); |
| 1790 | 1576 | |
| 1791 | 1577 | D1MV_0; |
| r11594 | r11595 | |
| 1794 | 1580 | /*Lv 2 DMA end irq*/ |
| 1795 | 1581 | static TIMER_CALLBACK( dma_lv2_ended ) |
| 1796 | 1582 | { |
| 1583 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 1584 | |
| 1797 | 1585 | cputag_set_input_line_and_vector(machine, "maincpu", 6, (stv_irq.dma_end[2]) ? HOLD_LINE : CLEAR_LINE, 0x49); |
| 1798 | 1586 | |
| 1799 | 1587 | D2MV_0; |
| 1800 | 1588 | } |
| 1801 | 1589 | |
| 1802 | | static void dma_direct_lv0(address_space *space) |
| 1590 | static void scu_dma_direct(address_space *space, UINT8 dma_ch) |
| 1803 | 1591 | { |
| 1592 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 1804 | 1593 | static UINT32 tmp_src,tmp_dst,tmp_size; |
| 1805 | 1594 | if(LOG_SCU) logerror("DMA lv 0 transfer START\n" |
| 1806 | | "Start %08x End %08x Size %04x\n",scu_src_0,scu_dst_0,scu_size_0); |
| 1807 | | if(LOG_SCU) logerror("Start Add %04x Destination Add %04x\n",scu_src_add_0,scu_dst_add_0); |
| 1595 | "Start %08x End %08x Size %04x\n",state->m_scu_src[0],state->m_scu_dst[0],state->m_scu_size[0]); |
| 1596 | if(LOG_SCU) logerror("Start Add %04x Destination Add %04x\n",state->m_scu_src_add[0],state->m_scu_dst_add[0]); |
| 1808 | 1597 | |
| 1809 | 1598 | D0MV_1; |
| 1810 | 1599 | |
| 1811 | | if(scu_size_0 == 0) scu_size_0 = 0x00100000; |
| 1600 | /* max size */ |
| 1601 | if(state->m_scu_size[dma_ch] == 0) { state->m_scu_size[dma_ch] = (dma_ch == 0) ? 0x00100000 : 0x2000; } |
| 1812 | 1602 | |
| 1813 | | scsp_to_main_irq = 0; |
| 1814 | | |
| 1815 | 1603 | /*set here the boundaries checks*/ |
| 1816 | 1604 | /*...*/ |
| 1817 | 1605 | |
| 1606 | if((state->m_scu_dst_add[dma_ch] != state->m_scu_src_add[dma_ch]) && (ABUS(dma_ch))) |
| 1607 | { |
| 1608 | logerror("A-Bus invalid transfer,sets to default\n"); |
| 1609 | scu_add_tmp = (state->m_scu_dst_add[dma_ch]*0x100) | (state->m_scu_src_add[dma_ch]); |
| 1610 | state->m_scu_dst_add[dma_ch] = state->m_scu_src_add[dma_ch] = 4; |
| 1611 | scu_add_tmp |= 0x80000000; |
| 1612 | } |
| 1613 | |
| 1614 | #if 0 |
| 1818 | 1615 | if(SOUND_RAM(dst_0)) |
| 1819 | 1616 | { |
| 1820 | 1617 | logerror("Sound RAM DMA write\n"); |
| 1821 | 1618 | scsp_to_main_irq = 1; |
| 1822 | 1619 | } |
| 1823 | 1620 | |
| 1824 | | if((scu_dst_add_0 != scu_src_add_0) && (ABUS(src_0))) |
| 1825 | | { |
| 1826 | | logerror("A-Bus invalid transfer,sets to default\n"); |
| 1827 | | scu_add_tmp = (scu_dst_add_0*0x100) | (scu_src_add_0); |
| 1828 | | scu_dst_add_0 = scu_src_add_0 = 4; |
| 1829 | | scu_add_tmp |= 0x80000000; |
| 1830 | | } |
| 1831 | 1621 | /*Let me know if you encounter any of these three*/ |
| 1832 | 1622 | if(ABUS(dst_0)) |
| 1833 | 1623 | { |
| r11594 | r11595 | |
| 1847 | 1637 | if(VDP1_REGS(dst_0)) |
| 1848 | 1638 | { |
| 1849 | 1639 | logerror("VDP1 register access,must be in word units\n"); |
| 1850 | | scu_add_tmp = (scu_dst_add_0*0x100) | (scu_src_add_0); |
| 1851 | | scu_dst_add_0 = scu_src_add_0 = 2; |
| 1640 | scu_add_tmp = (state->m_scu_dst_add[0]*0x100) | (state->m_scu_src_add[0]); |
| 1641 | state->m_scu_dst_add[0] = state->m_scu_src_add[0] = 2; |
| 1852 | 1642 | scu_add_tmp |= 0x80000000; |
| 1853 | 1643 | } |
| 1854 | 1644 | if(DRUP(0)) |
| 1855 | 1645 | { |
| 1856 | 1646 | logerror("Data read update = 1,read address add value must be 1 too\n"); |
| 1857 | | scu_add_tmp = (scu_dst_add_0*0x100) | (scu_src_add_0); |
| 1858 | | scu_src_add_0 = 4; |
| 1647 | scu_add_tmp = (state->m_scu_dst_add[0]*0x100) | (state->m_scu_src_add[0]); |
| 1648 | state->m_scu_src_add[0] = 4; |
| 1859 | 1649 | scu_add_tmp |= 0x80000000; |
| 1860 | 1650 | } |
| 1861 | 1651 | |
| 1862 | | if (WORK_RAM_H(dst_0) && (scu_dst_add_0 != 4)) |
| 1652 | if (WORK_RAM_H(dst_0) && (state->m_scu_dst_add[0] != 4)) |
| 1863 | 1653 | { |
| 1864 | | scu_add_tmp = (scu_dst_add_0*0x100) | (scu_src_add_0); |
| 1865 | | scu_dst_add_0 = 4; |
| 1654 | scu_add_tmp = (state->m_scu_dst_add[0]*0x100) | (state->m_scu_src_add[0]); |
| 1655 | state->m_scu_dst_add[0] = 4; |
| 1866 | 1656 | scu_add_tmp |= 0x80000000; |
| 1867 | 1657 | } |
| 1658 | #endif |
| 1868 | 1659 | |
| 1869 | | tmp_size = scu_size_0; |
| 1870 | | if(!(DRUP(0))) tmp_src = scu_src_0; |
| 1871 | | if(!(DWUP(0))) tmp_dst = scu_dst_0; |
| 1660 | tmp_size = state->m_scu_size[dma_ch]; |
| 1661 | if(!(DRUP(dma_ch))) tmp_src = state->m_scu_src[dma_ch]; |
| 1662 | if(!(DWUP(dma_ch))) tmp_dst = state->m_scu_dst[dma_ch]; |
| 1872 | 1663 | |
| 1873 | | for (; scu_size_0 > 0; scu_size_0-=scu_dst_add_0) |
| 1664 | for (; state->m_scu_size[dma_ch] > 0; state->m_scu_size[dma_ch]-=state->m_scu_dst_add[dma_ch]) |
| 1874 | 1665 | { |
| 1875 | | if(scu_dst_add_0 == 2) |
| 1876 | | space->write_word(scu_dst_0,space->read_word(scu_src_0)); |
| 1877 | | else if(scu_dst_add_0 == 8) |
| 1666 | if(state->m_scu_dst_add[dma_ch] == 2) |
| 1667 | space->write_word(state->m_scu_dst[dma_ch],space->read_word(state->m_scu_src[dma_ch])); |
| 1668 | else if(state->m_scu_dst_add[dma_ch] == 8) |
| 1878 | 1669 | { |
| 1879 | | space->write_word(scu_dst_0,space->read_word(scu_src_0)); |
| 1880 | | space->write_word(scu_dst_0+2,space->read_word(scu_src_0)); |
| 1881 | | space->write_word(scu_dst_0+4,space->read_word(scu_src_0+2)); |
| 1882 | | space->write_word(scu_dst_0+6,space->read_word(scu_src_0+2)); |
| 1670 | space->write_word(state->m_scu_dst[dma_ch], space->read_word(state->m_scu_src[dma_ch] )); |
| 1671 | space->write_word(state->m_scu_dst[dma_ch]+2,space->read_word(state->m_scu_src[dma_ch] )); |
| 1672 | space->write_word(state->m_scu_dst[dma_ch]+4,space->read_word(state->m_scu_src[dma_ch]+2)); |
| 1673 | space->write_word(state->m_scu_dst[dma_ch]+6,space->read_word(state->m_scu_src[dma_ch]+2)); |
| 1883 | 1674 | } |
| 1884 | 1675 | else |
| 1885 | 1676 | { |
| 1886 | | space->write_word(scu_dst_0,space->read_word(scu_src_0)); |
| 1887 | | space->write_word(scu_dst_0+2,space->read_word(scu_src_0+2)); |
| 1677 | space->write_word(state->m_scu_dst[dma_ch], space->read_word(state->m_scu_src[dma_ch] )); |
| 1678 | space->write_word(state->m_scu_dst[dma_ch]+2,space->read_word(state->m_scu_src[dma_ch]+2)); |
| 1888 | 1679 | } |
| 1889 | 1680 | |
| 1890 | | scu_dst_0+=scu_dst_add_0; |
| 1891 | | scu_src_0+=scu_src_add_0; |
| 1681 | state->m_scu_dst[dma_ch]+=state->m_scu_dst_add[dma_ch]; |
| 1682 | state->m_scu_src[dma_ch]+=state->m_scu_src_add[dma_ch]; |
| 1892 | 1683 | } |
| 1893 | 1684 | |
| 1894 | | scu_size_0 = tmp_size; |
| 1895 | | if(!(DRUP(0))) scu_src_0 = tmp_src; |
| 1896 | | if(!(DWUP(0))) scu_dst_0 = tmp_dst; |
| 1685 | state->m_scu_size[dma_ch] = tmp_size; |
| 1686 | if(!(DRUP(dma_ch))) state->m_scu_src[dma_ch] = tmp_src; |
| 1687 | if(!(DWUP(dma_ch))) state->m_scu_dst[dma_ch] = tmp_dst; |
| 1897 | 1688 | |
| 1898 | 1689 | if(LOG_SCU) logerror("DMA transfer END\n"); |
| 1899 | 1690 | |
| 1900 | | /*TODO: timing of this*/ |
| 1901 | | space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv0_ended)); |
| 1902 | | |
| 1903 | | if(scu_add_tmp & 0x80000000) |
| 1691 | /*TODO: timing of this, clean up */ |
| 1692 | switch(dma_ch) |
| 1904 | 1693 | { |
| 1905 | | scu_dst_add_0 = (scu_add_tmp & 0xff00) >> 8; |
| 1906 | | scu_src_add_0 = (scu_add_tmp & 0x00ff) >> 0; |
| 1907 | | scu_add_tmp^=0x80000000; |
| 1694 | case 0: space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv0_ended)); break; |
| 1695 | case 1: space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv1_ended)); break; |
| 1696 | case 2: space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv2_ended)); break; |
| 1908 | 1697 | } |
| 1909 | | } |
| 1910 | 1698 | |
| 1911 | | static void dma_direct_lv1(address_space *space) |
| 1912 | | { |
| 1913 | | static UINT32 tmp_src,tmp_dst,tmp_size; |
| 1914 | | if(LOG_SCU) logerror("DMA lv 1 transfer START\n" |
| 1915 | | "Start %08x End %08x Size %04x\n",scu_src_1,scu_dst_1,scu_size_1); |
| 1916 | | if(LOG_SCU) logerror("Start Add %04x Destination Add %04x\n",scu_src_add_1,scu_dst_add_1); |
| 1917 | | |
| 1918 | | D1MV_1; |
| 1919 | | |
| 1920 | | if(scu_size_1 == 0) scu_size_1 = 0x00002000; |
| 1921 | | |
| 1922 | | scsp_to_main_irq = 0; |
| 1923 | | |
| 1924 | | /*set here the boundaries checks*/ |
| 1925 | | /*...*/ |
| 1926 | | |
| 1927 | | if(SOUND_RAM(dst_1)) |
| 1928 | | { |
| 1929 | | logerror("Sound RAM DMA write\n"); |
| 1930 | | scsp_to_main_irq = 1; |
| 1931 | | } |
| 1932 | | |
| 1933 | | if((scu_dst_add_1 != scu_src_add_1) && (ABUS(src_1))) |
| 1934 | | { |
| 1935 | | logerror("A-Bus invalid transfer,sets to default\n"); |
| 1936 | | scu_add_tmp = (scu_dst_add_1*0x100) | (scu_src_add_1); |
| 1937 | | scu_dst_add_1 = scu_src_add_1 = 4; |
| 1938 | | scu_add_tmp |= 0x80000000; |
| 1939 | | } |
| 1940 | | /*Let me know if you encounter any of these ones*/ |
| 1941 | | if(ABUS(dst_1)) |
| 1942 | | { |
| 1943 | | logerror("A-Bus invalid write\n"); |
| 1944 | | /*...*/ |
| 1945 | | } |
| 1946 | | if(WORK_RAM_L(dst_1)) |
| 1947 | | { |
| 1948 | | logerror("WorkRam-L invalid write\n"); |
| 1949 | | /*...*/ |
| 1950 | | } |
| 1951 | | if(VDP1_REGS(dst_1)) |
| 1952 | | { |
| 1953 | | logerror("VDP1 register access,must be in word units\n"); |
| 1954 | | scu_add_tmp = (scu_dst_add_1*0x100) | (scu_src_add_1); |
| 1955 | | scu_dst_add_1 = scu_src_add_1 = 2; |
| 1956 | | scu_add_tmp |= 0x80000000; |
| 1957 | | } |
| 1958 | | if(VDP2(src_1)) |
| 1959 | | { |
| 1960 | | logerror("VDP-2 invalid read\n"); |
| 1961 | | /*...*/ |
| 1962 | | } |
| 1963 | | if(DRUP(1)) |
| 1964 | | { |
| 1965 | | logerror("Data read update = 1,read address add value must be 1 too\n"); |
| 1966 | | scu_add_tmp = (scu_dst_add_1*0x100) | (scu_src_add_1); |
| 1967 | | scu_src_add_1 = 4; |
| 1968 | | scu_add_tmp |= 0x80000000; |
| 1969 | | } |
| 1970 | | |
| 1971 | | if (WORK_RAM_H(dst_1) && (scu_dst_add_1 != 4)) |
| 1972 | | { |
| 1973 | | scu_add_tmp = (scu_dst_add_1*0x100) | (scu_src_add_1); |
| 1974 | | scu_src_add_1 = 4; |
| 1975 | | scu_add_tmp |= 0x80000000; |
| 1976 | | } |
| 1977 | | |
| 1978 | | tmp_size = scu_size_1; |
| 1979 | | if(!(DRUP(1))) tmp_src = scu_src_1; |
| 1980 | | if(!(DWUP(1))) tmp_dst = scu_dst_1; |
| 1981 | | |
| 1982 | | for (; scu_size_1 > 0; scu_size_1-=scu_dst_add_1) |
| 1983 | | { |
| 1984 | | if(scu_dst_add_1 == 2) |
| 1985 | | space->write_word(scu_dst_1,space->read_word(scu_src_1)); |
| 1986 | | else |
| 1987 | | { |
| 1988 | | space->write_word(scu_dst_1,space->read_word(scu_src_1)); |
| 1989 | | space->write_word(scu_dst_1+2,space->read_word(scu_src_1+2)); |
| 1990 | | } |
| 1991 | | |
| 1992 | | scu_dst_1+=scu_dst_add_1; |
| 1993 | | scu_src_1+=scu_src_add_1; |
| 1994 | | } |
| 1995 | | |
| 1996 | | scu_size_1 = tmp_size; |
| 1997 | | if(!(DRUP(1))) scu_src_1 = tmp_src; |
| 1998 | | if(!(DWUP(1))) scu_dst_1 = tmp_dst; |
| 1999 | | |
| 2000 | | if(LOG_SCU) logerror("DMA transfer END\n"); |
| 2001 | | |
| 2002 | | space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv1_ended)); |
| 2003 | | |
| 2004 | 1699 | if(scu_add_tmp & 0x80000000) |
| 2005 | 1700 | { |
| 2006 | | scu_dst_add_1 = (scu_add_tmp & 0xff00) >> 8; |
| 2007 | | scu_src_add_1 = (scu_add_tmp & 0x00ff) >> 0; |
| 1701 | state->m_scu_dst_add[dma_ch] = (scu_add_tmp & 0xff00) >> 8; |
| 1702 | state->m_scu_src_add[dma_ch] = (scu_add_tmp & 0x00ff) >> 0; |
| 2008 | 1703 | scu_add_tmp^=0x80000000; |
| 2009 | 1704 | } |
| 2010 | 1705 | } |
| 2011 | 1706 | |
| 2012 | | static void dma_direct_lv2(address_space *space) |
| 1707 | static void scu_dma_indirect(address_space *space,UINT8 dma_ch) |
| 2013 | 1708 | { |
| 2014 | | static UINT32 tmp_src,tmp_dst,tmp_size; |
| 2015 | | if(LOG_SCU) logerror("DMA lv 2 transfer START\n" |
| 2016 | | "Start %08x End %08x Size %04x\n",scu_src_2,scu_dst_2,scu_size_2); |
| 2017 | | if(LOG_SCU) logerror("Start Add %04x Destination Add %04x\n",scu_src_add_2,scu_dst_add_2); |
| 1709 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 2018 | 1710 | |
| 2019 | | D2MV_1; |
| 2020 | | |
| 2021 | | scsp_to_main_irq = 0; |
| 2022 | | |
| 2023 | | if(scu_size_2 == 0) scu_size_2 = 0x00002000; |
| 2024 | | |
| 2025 | | /*set here the boundaries checks*/ |
| 2026 | | /*...*/ |
| 2027 | | |
| 2028 | | if(SOUND_RAM(dst_2)) |
| 2029 | | { |
| 2030 | | logerror("Sound RAM DMA write\n"); |
| 2031 | | scsp_to_main_irq = 1; |
| 2032 | | } |
| 2033 | | |
| 2034 | | if((scu_dst_add_2 != scu_src_add_2) && (ABUS(src_2))) |
| 2035 | | { |
| 2036 | | logerror("A-Bus invalid transfer,sets to default\n"); |
| 2037 | | scu_add_tmp = (scu_dst_add_2*0x100) | (scu_src_add_2); |
| 2038 | | scu_dst_add_2 = scu_src_add_2 = 4; |
| 2039 | | scu_add_tmp |= 0x80000000; |
| 2040 | | } |
| 2041 | | /*Let me know if you encounter any of these ones*/ |
| 2042 | | if(ABUS(dst_2)) |
| 2043 | | { |
| 2044 | | logerror("A-Bus invalid write\n"); |
| 2045 | | /*...*/ |
| 2046 | | } |
| 2047 | | if(WORK_RAM_L(dst_2)) |
| 2048 | | { |
| 2049 | | logerror("WorkRam-L invalid write\n"); |
| 2050 | | /*...*/ |
| 2051 | | } |
| 2052 | | if(VDP1_REGS(dst_2)) |
| 2053 | | { |
| 2054 | | logerror("VDP1 register access,must be in word units\n"); |
| 2055 | | scu_add_tmp = (scu_dst_add_2*0x100) | (scu_src_add_2); |
| 2056 | | scu_dst_add_2 = scu_src_add_2 = 2; |
| 2057 | | scu_add_tmp |= 0x80000000; |
| 2058 | | } |
| 2059 | | if(VDP2(src_2)) |
| 2060 | | { |
| 2061 | | logerror("VDP-2 invalid read\n"); |
| 2062 | | /*...*/ |
| 2063 | | } |
| 2064 | | if(DRUP(2)) |
| 2065 | | { |
| 2066 | | logerror("Data read update = 1,read address add value must be 1 too\n"); |
| 2067 | | scu_add_tmp = (scu_dst_add_2*0x100) | (scu_src_add_2); |
| 2068 | | scu_src_add_2 = 4; |
| 2069 | | scu_add_tmp |= 0x80000000; |
| 2070 | | } |
| 2071 | | |
| 2072 | | if (WORK_RAM_H(dst_2) && (scu_dst_add_2 != 4)) |
| 2073 | | { |
| 2074 | | scu_add_tmp = (scu_dst_add_2*0x100) | (scu_src_add_2); |
| 2075 | | scu_src_add_2 = 4; |
| 2076 | | scu_add_tmp |= 0x80000000; |
| 2077 | | } |
| 2078 | | |
| 2079 | | tmp_size = scu_size_2; |
| 2080 | | if(!(DRUP(2))) tmp_src = scu_src_2; |
| 2081 | | if(!(DWUP(2))) tmp_dst = scu_dst_2; |
| 2082 | | |
| 2083 | | for (; scu_size_2 > 0; scu_size_2-=scu_dst_add_2) |
| 2084 | | { |
| 2085 | | if(scu_dst_add_2 == 2) |
| 2086 | | space->write_word(scu_dst_2,space->read_word(scu_src_2)); |
| 2087 | | else |
| 2088 | | { |
| 2089 | | space->write_word(scu_dst_2,space->read_word(scu_src_2)); |
| 2090 | | space->write_word(scu_dst_2+2,space->read_word(scu_src_2+2)); |
| 2091 | | } |
| 2092 | | |
| 2093 | | scu_dst_2+=scu_dst_add_2; |
| 2094 | | scu_src_2+=scu_src_add_2; |
| 2095 | | } |
| 2096 | | |
| 2097 | | scu_size_2 = tmp_size; |
| 2098 | | if(!(DRUP(2))) scu_src_2 = tmp_src; |
| 2099 | | if(!(DWUP(2))) scu_dst_2 = tmp_dst; |
| 2100 | | |
| 2101 | | if(LOG_SCU) logerror("DMA transfer END\n"); |
| 2102 | | |
| 2103 | | space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv2_ended)); |
| 2104 | | |
| 2105 | | if(scu_add_tmp & 0x80000000) |
| 2106 | | { |
| 2107 | | scu_dst_add_2 = (scu_add_tmp & 0xff00) >> 8; |
| 2108 | | scu_src_add_2 = (scu_add_tmp & 0x00ff) >> 0; |
| 2109 | | scu_add_tmp^=0x80000000; |
| 2110 | | } |
| 2111 | | } |
| 2112 | | |
| 2113 | | static void dma_indirect_lv0(address_space *space) |
| 2114 | | { |
| 2115 | 1711 | /*Helper to get out of the cycle*/ |
| 2116 | 1712 | UINT8 job_done = 0; |
| 2117 | 1713 | /*temporary storage for the transfer data*/ |
| r11594 | r11595 | |
| 2119 | 1715 | |
| 2120 | 1716 | D0MV_1; |
| 2121 | 1717 | |
| 2122 | | scsp_to_main_irq = 0; |
| 1718 | if(state->m_scu_index[dma_ch] == 0) { state->m_scu_index[dma_ch] = state->m_scu_dst[0]; } |
| 2123 | 1719 | |
| 2124 | | if(scu_index_0 == 0) { scu_index_0 = scu_dst_0; } |
| 2125 | | |
| 2126 | 1720 | do{ |
| 2127 | | tmp_src = scu_index_0; |
| 1721 | tmp_src = state->m_scu_index[dma_ch]; |
| 2128 | 1722 | |
| 2129 | | /*Thanks for Runik of Saturnin for pointing this out...*/ |
| 2130 | | scu_size_0 = space->read_dword(scu_index_0); |
| 2131 | | scu_src_0 = space->read_dword(scu_index_0+8); |
| 2132 | | scu_dst_0 = space->read_dword(scu_index_0+4); |
| 1723 | state->m_scu_size[dma_ch] = space->read_dword(state->m_scu_index[dma_ch]); |
| 1724 | state->m_scu_src[dma_ch] = space->read_dword(state->m_scu_index[dma_ch]+8); |
| 1725 | state->m_scu_dst[dma_ch] = space->read_dword(state->m_scu_index[dma_ch]+4); |
| 2133 | 1726 | |
| 2134 | 1727 | /*Indirect Mode end factor*/ |
| 2135 | | if(scu_src_0 & 0x80000000) |
| 1728 | if(state->m_scu_src[dma_ch] & 0x80000000) |
| 2136 | 1729 | job_done = 1; |
| 2137 | 1730 | |
| 1731 | #if 0 |
| 2138 | 1732 | if(SOUND_RAM(dst_0)) |
| 2139 | 1733 | { |
| 2140 | 1734 | logerror("Sound RAM DMA write\n"); |
| 2141 | 1735 | scsp_to_main_irq = 1; |
| 2142 | 1736 | } |
| 1737 | #endif |
| 2143 | 1738 | |
| 2144 | | if(LOG_SCU) logerror("DMA lv 0 indirect mode transfer START\n" |
| 2145 | | "Start %08x End %08x Size %04x\n",scu_src_0,scu_dst_0,scu_size_0); |
| 2146 | | if(LOG_SCU) logerror("Start Add %04x Destination Add %04x\n",scu_src_add_0,scu_dst_add_0); |
| 1739 | if(LOG_SCU) logerror("DMA lv %d indirect mode transfer START\n" |
| 1740 | "Start %08x End %08x Size %04x\n",dma_ch,state->m_scu_src[dma_ch],state->m_scu_dst[dma_ch],state->m_scu_size[dma_ch]); |
| 1741 | if(LOG_SCU) logerror("Start Add %04x Destination Add %04x\n",state->m_scu_src_add[dma_ch],state->m_scu_dst_add[dma_ch]); |
| 2147 | 1742 | |
| 2148 | 1743 | //guess,but I believe it's right. |
| 2149 | | scu_src_0 &=0x07ffffff; |
| 2150 | | scu_dst_0 &=0x07ffffff; |
| 2151 | | scu_size_0 &=0xfffff; |
| 1744 | state->m_scu_src[dma_ch] &=0x07ffffff; |
| 1745 | state->m_scu_dst[dma_ch] &=0x07ffffff; |
| 1746 | state->m_scu_size[dma_ch] &= ((dma_ch == 0) ? 0xfffff : 0x1fff); |
| 2152 | 1747 | |
| 2153 | | for (; scu_size_0 > 0; scu_size_0-=scu_dst_add_0) |
| 1748 | if(state->m_scu_size[dma_ch] == 0) { state->m_scu_size[dma_ch] = (dma_ch == 0) ? 0x00100000 : 0x2000; } |
| 1749 | |
| 1750 | for (; state->m_scu_size[dma_ch] > 0; state->m_scu_size[dma_ch]-=state->m_scu_dst_add[dma_ch]) |
| 2154 | 1751 | { |
| 2155 | | if(scu_dst_add_0 == 2) |
| 2156 | | space->write_word(scu_dst_0,space->read_word(scu_src_0)); |
| 1752 | if(state->m_scu_dst_add[dma_ch] == 2) |
| 1753 | space->write_word(state->m_scu_dst[dma_ch],space->read_word(state->m_scu_src[dma_ch])); |
| 2157 | 1754 | else |
| 2158 | 1755 | { |
| 2159 | 1756 | /* some games, eg columns97 are a bit weird, I'm not sure this is correct |
| r11594 | r11595 | |
| 2161 | 1758 | can't access 2 byte boundaries, and the end of the sprite list never gets marked, |
| 2162 | 1759 | the length of the transfer is also set to a 2 byte boundary, maybe the add values |
| 2163 | 1760 | should be different, I don't know */ |
| 2164 | | space->write_word(scu_dst_0,space->read_word(scu_src_0)); |
| 2165 | | space->write_word(scu_dst_0+2,space->read_word(scu_src_0+2)); |
| 1761 | space->write_word(state->m_scu_dst[dma_ch],space->read_word(state->m_scu_src[dma_ch])); |
| 1762 | space->write_word(state->m_scu_dst[dma_ch]+2,space->read_word(state->m_scu_src[dma_ch]+2)); |
| 2166 | 1763 | } |
| 2167 | | scu_dst_0+=scu_dst_add_0; |
| 2168 | | scu_src_0+=scu_src_add_0; |
| 1764 | state->m_scu_dst[dma_ch]+=state->m_scu_dst_add[dma_ch]; |
| 1765 | state->m_scu_src[dma_ch]+=state->m_scu_src_add[dma_ch]; |
| 2169 | 1766 | } |
| 2170 | 1767 | |
| 2171 | | //if(DRUP(0)) space->write_dword(tmp_src+8,scu_src_0|job_done ? 0x80000000 : 0); |
| 2172 | | //if(DWUP(0)) space->write_dword(tmp_src+4,scu_dst_0); |
| 1768 | //if(DRUP(0)) space->write_dword(tmp_src+8,state->m_scu_src[0]|job_done ? 0x80000000 : 0); |
| 1769 | //if(DWUP(0)) space->write_dword(tmp_src+4,state->m_scu_dst[0]); |
| 2173 | 1770 | |
| 2174 | | scu_index_0 = tmp_src+0xc; |
| 1771 | state->m_scu_index[dma_ch] = tmp_src+0xc; |
| 2175 | 1772 | |
| 2176 | 1773 | }while(job_done == 0); |
| 2177 | 1774 | |
| 2178 | | space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv0_ended)); |
| 1775 | /*TODO: timing of this, clean up */ |
| 1776 | switch(dma_ch) |
| 1777 | { |
| 1778 | case 0: space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv0_ended)); break; |
| 1779 | case 1: space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv1_ended)); break; |
| 1780 | case 2: space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv2_ended)); break; |
| 1781 | } |
| 2179 | 1782 | } |
| 2180 | 1783 | |
| 2181 | | static void dma_indirect_lv1(address_space *space) |
| 2182 | | { |
| 2183 | | /*Helper to get out of the cycle*/ |
| 2184 | | UINT8 job_done = 0; |
| 2185 | | /*temporary storage for the transfer data*/ |
| 2186 | | UINT32 tmp_src; |
| 2187 | 1784 | |
| 2188 | | D1MV_1; |
| 1785 | /**************************************************************************************/ |
| 2189 | 1786 | |
| 2190 | | scsp_to_main_irq = 0; |
| 1787 | static WRITE16_HANDLER( saturn_soundram_w ) |
| 1788 | { |
| 1789 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 2191 | 1790 | |
| 2192 | | if(scu_index_1 == 0) { scu_index_1 = scu_dst_1; } |
| 1791 | //space->machine().scheduler().synchronize(); // force resync |
| 2193 | 1792 | |
| 2194 | | do{ |
| 2195 | | tmp_src = scu_index_1; |
| 2196 | | |
| 2197 | | scu_size_1 = space->read_dword(scu_index_1); |
| 2198 | | scu_src_1 = space->read_dword(scu_index_1+8); |
| 2199 | | scu_dst_1 = space->read_dword(scu_index_1+4); |
| 2200 | | |
| 2201 | | /*Indirect Mode end factor*/ |
| 2202 | | if(scu_src_1 & 0x80000000) |
| 2203 | | job_done = 1; |
| 2204 | | |
| 2205 | | if(SOUND_RAM(dst_1)) |
| 2206 | | { |
| 2207 | | logerror("Sound RAM DMA write\n"); |
| 2208 | | scsp_to_main_irq = 1; |
| 2209 | | } |
| 2210 | | |
| 2211 | | if(LOG_SCU) logerror("DMA lv 1 indirect mode transfer START\n" |
| 2212 | | "Start %08x End %08x Size %04x\n",scu_src_1,scu_dst_1,scu_size_1); |
| 2213 | | if(LOG_SCU) logerror("Start Add %04x Destination Add %04x\n",scu_src_add_1,scu_dst_add_1); |
| 2214 | | |
| 2215 | | //guess,but I believe it's right. |
| 2216 | | scu_src_1 &=0x07ffffff; |
| 2217 | | scu_dst_1 &=0x07ffffff; |
| 2218 | | scu_size_1 &=0xffff; |
| 2219 | | |
| 2220 | | |
| 2221 | | for (; scu_size_1 > 0; scu_size_1-=scu_dst_add_1) |
| 2222 | | { |
| 2223 | | |
| 2224 | | if(scu_dst_add_1 == 2) |
| 2225 | | space->write_word(scu_dst_1,space->read_word(scu_src_1)); |
| 2226 | | else |
| 2227 | | { |
| 2228 | | /* some games, eg columns97 are a bit weird, I'm not sure this is correct |
| 2229 | | they start a dma on a 2 byte boundary in 4 byte add mode, using the dword reads we |
| 2230 | | can't access 2 byte boundaries, and the end of the sprite list never gets marked, |
| 2231 | | the length of the transfer is also set to a 2 byte boundary, maybe the add values |
| 2232 | | should be different, I don't know */ |
| 2233 | | space->write_word(scu_dst_1,space->read_word(scu_src_1)); |
| 2234 | | space->write_word(scu_dst_1+2,space->read_word(scu_src_1+2)); |
| 2235 | | } |
| 2236 | | scu_dst_1+=scu_dst_add_1; |
| 2237 | | scu_src_1+=scu_src_add_1; |
| 2238 | | } |
| 2239 | | |
| 2240 | | //if(DRUP(1)) space->write_dword(tmp_src+8,scu_src_1|job_done ? 0x80000000 : 0); |
| 2241 | | //if(DWUP(1)) space->write_dword(tmp_src+4,scu_dst_1); |
| 2242 | | |
| 2243 | | scu_index_1 = tmp_src+0xc; |
| 2244 | | |
| 2245 | | }while(job_done == 0); |
| 2246 | | |
| 2247 | | space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv1_ended)); |
| 1793 | COMBINE_DATA(&state->m_sound_ram[offset]); |
| 2248 | 1794 | } |
| 2249 | 1795 | |
| 2250 | | static void dma_indirect_lv2(address_space *space) |
| 1796 | static READ16_HANDLER( saturn_soundram_r ) |
| 2251 | 1797 | { |
| 2252 | | /*Helper to get out of the cycle*/ |
| 2253 | | UINT8 job_done = 0; |
| 2254 | | /*temporary storage for the transfer data*/ |
| 2255 | | UINT32 tmp_src; |
| 1798 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 2256 | 1799 | |
| 2257 | | D2MV_1; |
| 1800 | //space->machine().scheduler().synchronize(); // force resync |
| 2258 | 1801 | |
| 2259 | | scsp_to_main_irq = 0; |
| 2260 | | |
| 2261 | | if(scu_index_2 == 0) { scu_index_2 = scu_dst_2; } |
| 2262 | | |
| 2263 | | do{ |
| 2264 | | tmp_src = scu_index_2; |
| 2265 | | |
| 2266 | | scu_size_2 = space->read_dword(scu_index_2); |
| 2267 | | scu_src_2 = space->read_dword(scu_index_2+8); |
| 2268 | | scu_dst_2 = space->read_dword(scu_index_2+4); |
| 2269 | | |
| 2270 | | /*Indirect Mode end factor*/ |
| 2271 | | if(scu_src_2 & 0x80000000) |
| 2272 | | job_done = 1; |
| 2273 | | |
| 2274 | | if(SOUND_RAM(dst_2)) |
| 2275 | | { |
| 2276 | | logerror("Sound RAM DMA write\n"); |
| 2277 | | scsp_to_main_irq = 1; |
| 2278 | | } |
| 2279 | | |
| 2280 | | if(LOG_SCU) logerror("DMA lv 2 indirect mode transfer START\n" |
| 2281 | | "Start %08x End %08x Size %04x\n",scu_src_2,scu_dst_2,scu_size_2); |
| 2282 | | if(LOG_SCU) logerror("Start Add %04x Destination Add %04x\n",scu_src_add_2,scu_dst_add_2); |
| 2283 | | |
| 2284 | | //guess,but I believe it's right. |
| 2285 | | scu_src_2 &=0x07ffffff; |
| 2286 | | scu_dst_2 &=0x07ffffff; |
| 2287 | | scu_size_2 &=0xffff; |
| 2288 | | |
| 2289 | | for (; scu_size_2 > 0; scu_size_2-=scu_dst_add_2) |
| 2290 | | { |
| 2291 | | if(scu_dst_add_2 == 2) |
| 2292 | | space->write_word(scu_dst_2,space->read_word(scu_src_2)); |
| 2293 | | else |
| 2294 | | { |
| 2295 | | /* some games, eg columns97 are a bit weird, I'm not sure this is correct |
| 2296 | | they start a dma on a 2 byte boundary in 4 byte add mode, using the dword reads we |
| 2297 | | can't access 2 byte boundaries, and the end of the sprite list never gets marked, |
| 2298 | | the length of the transfer is also set to a 2 byte boundary, maybe the add values |
| 2299 | | should be different, I don't know */ |
| 2300 | | space->write_word(scu_dst_2,space->read_word(scu_src_2)); |
| 2301 | | space->write_word(scu_dst_2+2,space->read_word(scu_src_2+2)); |
| 2302 | | } |
| 2303 | | |
| 2304 | | scu_dst_2+=scu_dst_add_2; |
| 2305 | | scu_src_2+=scu_src_add_2; |
| 2306 | | } |
| 2307 | | |
| 2308 | | //if(DRUP(2)) space->write_dword(tmp_src+8,scu_src_2|job_done ? 0x80000000 : 0); |
| 2309 | | //if(DWUP(2)) space->write_dword(tmp_src+4,scu_dst_2); |
| 2310 | | |
| 2311 | | scu_index_2 = tmp_src+0xc; |
| 2312 | | |
| 2313 | | }while(job_done == 0); |
| 2314 | | |
| 2315 | | space->machine().scheduler().timer_set(attotime::from_usec(300), FUNC(dma_lv2_ended)); |
| 1802 | return state->m_sound_ram[offset]; |
| 2316 | 1803 | } |
| 2317 | 1804 | |
| 2318 | | |
| 2319 | | /**************************************************************************************/ |
| 2320 | | |
| 2321 | | static WRITE32_HANDLER( stv_sh2_soundram_w ) |
| 2322 | | { |
| 2323 | | COMBINE_DATA(sound_ram+offset*2+1); |
| 2324 | | data >>= 16; |
| 2325 | | mem_mask >>= 16; |
| 2326 | | COMBINE_DATA(sound_ram+offset*2); |
| 2327 | | } |
| 2328 | | |
| 2329 | | static READ32_HANDLER( stv_sh2_soundram_r ) |
| 2330 | | { |
| 2331 | | return (sound_ram[offset*2]<<16)|sound_ram[offset*2+1]; |
| 2332 | | } |
| 2333 | | |
| 2334 | | /* communication,SLAVE CPU acquires data from the MASTER CPU and triggers an irq. * |
| 2335 | | * Enter into Radiant Silver Gun specific menu for a test... */ |
| 1805 | /* communication,SLAVE CPU acquires data from the MASTER CPU and triggers an irq. */ |
| 2336 | 1806 | static WRITE32_HANDLER( minit_w ) |
| 2337 | 1807 | { |
| 2338 | 1808 | logerror("cpu %s (PC=%08X) MINIT write = %08x\n", space->device().tag(), cpu_get_pc(&space->device()),data); |
| r11594 | r11595 | |
| 2348 | 1818 | sh2_set_frt_input(space->machine().device("maincpu"), PULSE_LINE); |
| 2349 | 1819 | } |
| 2350 | 1820 | |
| 2351 | | |
| 2352 | | #ifdef UNUSED_FUNCTION |
| 2353 | | static READ32_HANDLER( stv_sh2_random_r ) |
| 1821 | static READ32_HANDLER(saturn_m_backupram_r) |
| 2354 | 1822 | { |
| 2355 | | return 0xffffffff; |
| 2356 | | } |
| 2357 | | #endif |
| 1823 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 2358 | 1824 | |
| 2359 | | |
| 2360 | | static UINT32 backup[64*1024/4]; |
| 2361 | | |
| 2362 | | static READ32_HANDLER(satram_r) |
| 2363 | | { |
| 2364 | | return backup[offset] & 0x00ff00ff; // yes, it makes sure the "holes" are there. |
| 1825 | return state->m_backupram[offset] & 0x00ff00ff; // yes, it makes sure the "holes" are there. |
| 2365 | 1826 | } |
| 2366 | 1827 | |
| 2367 | | static WRITE32_HANDLER(satram_w) |
| 1828 | static WRITE32_HANDLER(saturn_m_backupram_w) |
| 2368 | 1829 | { |
| 2369 | | COMBINE_DATA(&backup[offset]); |
| 1830 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 1831 | |
| 1832 | COMBINE_DATA(&state->m_backupram[offset]); |
| 2370 | 1833 | } |
| 2371 | 1834 | |
| 2372 | 1835 | static NVRAM_HANDLER(saturn) |
| 2373 | 1836 | { |
| 1837 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 1838 | |
| 2374 | 1839 | static const UINT32 init[8] = |
| 2375 | 1840 | { |
| 2376 | 1841 | 0x420061, 0x63006b, 0x550070, 0x520061, 0x6d0020, 0x46006f, 0x72006d, 0x610074, |
| r11594 | r11595 | |
| 2378 | 1843 | int i; |
| 2379 | 1844 | |
| 2380 | 1845 | if (read_or_write) |
| 2381 | | file->write(backup, 64*1024/4); |
| 1846 | file->write(state->m_backupram, 64*1024/4); |
| 2382 | 1847 | else |
| 2383 | 1848 | { |
| 2384 | 1849 | if (file) |
| 2385 | 1850 | { |
| 2386 | | file->read(backup, 64*1024/4); |
| 1851 | file->read(state->m_backupram, 64*1024/4); |
| 2387 | 1852 | } |
| 2388 | 1853 | else |
| 2389 | 1854 | { |
| 2390 | | memset(backup, 0, 64*1024/4); |
| 1855 | memset(state->m_backupram, 0, 64*1024/4); |
| 2391 | 1856 | for (i = 0; i < 8; i++) |
| 2392 | 1857 | { |
| 2393 | | backup[i] = init[i]; |
| 2394 | | backup[i+8] = init[i]; |
| 2395 | | backup[i+16] = init[i]; |
| 2396 | | backup[i+24] = init[i]; |
| 1858 | state->m_backupram[i] = init[i]; |
| 1859 | state->m_backupram[i+8] = init[i]; |
| 1860 | state->m_backupram[i+16] = init[i]; |
| 1861 | state->m_backupram[i+24] = init[i]; |
| 2397 | 1862 | } |
| 2398 | 1863 | } |
| 2399 | 1864 | } |
| r11594 | r11595 | |
| 2401 | 1866 | |
| 2402 | 1867 | static ADDRESS_MAP_START( saturn_mem, AS_PROGRAM, 32 ) |
| 2403 | 1868 | AM_RANGE(0x00000000, 0x0007ffff) AM_ROM AM_SHARE("share6") // bios |
| 2404 | | AM_RANGE(0x00100000, 0x0010007f) AM_READWRITE(saturn_SMPC_r32, saturn_SMPC_w32) |
| 2405 | | AM_RANGE(0x00180000, 0x0018ffff) AM_READWRITE(satram_r, satram_w) |
| 2406 | | AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_MIRROR(0x100000) AM_SHARE("share2") AM_BASE(&stv_workram_l) |
| 2407 | | AM_RANGE(0x01000000, 0x01000003) AM_WRITE(minit_w) |
| 2408 | | AM_RANGE(0x01406f40, 0x01406f43) AM_WRITE(minit_w) // prikura seems to write here .. |
| 2409 | | AM_RANGE(0x01800000, 0x01800003) AM_WRITE(sinit_w) |
| 1869 | AM_RANGE(0x00100000, 0x0010007f) AM_READWRITE8(saturn_SMPC_r8, saturn_SMPC_w8,0xffffffff) |
| 1870 | AM_RANGE(0x00180000, 0x0018ffff) AM_READWRITE(saturn_m_backupram_r, saturn_m_backupram_w) AM_SHARE("share1") AM_BASE_MEMBER(saturn_state,m_backupram) |
| 1871 | AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_MIRROR(0x100000) AM_SHARE("share2") AM_BASE_MEMBER(saturn_state,m_workram_l) |
| 1872 | AM_RANGE(0x01000000, 0x01000003) AM_MIRROR(0x7ffffc) AM_WRITE(minit_w) |
| 1873 | AM_RANGE(0x01800000, 0x01800003) AM_MIRROR(0x7ffffc) AM_WRITE(sinit_w) |
| 2410 | 1874 | AM_RANGE(0x02000000, 0x023fffff) AM_ROM AM_SHARE("share7") AM_REGION("maincpu", 0x80000) // cartridge space |
| 2411 | 1875 | AM_RANGE(0x05800000, 0x0589ffff) AM_READWRITE(stvcd_r, stvcd_w) |
| 2412 | 1876 | /* Sound */ |
| 2413 | | AM_RANGE(0x05a00000, 0x05a7ffff) AM_READWRITE(stv_sh2_soundram_r, stv_sh2_soundram_w) |
| 1877 | AM_RANGE(0x05a00000, 0x05a7ffff) AM_READWRITE16(saturn_soundram_r, saturn_soundram_w,0xffffffff) |
| 2414 | 1878 | AM_RANGE(0x05b00000, 0x05b00fff) AM_DEVREADWRITE16("scsp", scsp_r, scsp_w, 0xffffffff) |
| 2415 | 1879 | /* VDP1 */ |
| 2416 | 1880 | /*0x05c00000-0x05c7ffff VRAM*/ |
| r11594 | r11595 | |
| 2423 | 1887 | AM_RANGE(0x05e00000, 0x05efffff) AM_READWRITE(stv_vdp2_vram_r, stv_vdp2_vram_w) |
| 2424 | 1888 | AM_RANGE(0x05f00000, 0x05f7ffff) AM_READWRITE(stv_vdp2_cram_r, stv_vdp2_cram_w) |
| 2425 | 1889 | AM_RANGE(0x05f80000, 0x05fbffff) AM_READWRITE(stv_vdp2_regs_r, stv_vdp2_regs_w) |
| 2426 | | AM_RANGE(0x05fe0000, 0x05fe00cf) AM_READWRITE(stv_scu_r32, stv_scu_w32) |
| 2427 | | AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_MIRROR(0x01f00000) AM_SHARE("share3") AM_BASE(&stv_workram_h) |
| 1890 | AM_RANGE(0x05fe0000, 0x05fe00cf) AM_READWRITE(saturn_scu_r, saturn_scu_w) |
| 1891 | AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_MIRROR(0x01f00000) AM_SHARE("share3") AM_BASE_MEMBER(saturn_state,m_workram_h) |
| 2428 | 1892 | AM_RANGE(0x20000000, 0x2007ffff) AM_ROM AM_SHARE("share6") // bios mirror |
| 2429 | 1893 | AM_RANGE(0x22000000, 0x24ffffff) AM_ROM AM_SHARE("share7") // cart mirror |
| 2430 | 1894 | ADDRESS_MAP_END |
| 2431 | 1895 | |
| 2432 | | |
| 2433 | 1896 | static ADDRESS_MAP_START( stv_mem, AS_PROGRAM, 32 ) |
| 2434 | 1897 | AM_RANGE(0x00000000, 0x0007ffff) AM_ROM AM_SHARE("share6") // bios |
| 2435 | | AM_RANGE(0x00100000, 0x0010007f) AM_READWRITE(stv_SMPC_r32, stv_SMPC_w32) |
| 2436 | | AM_RANGE(0x00180000, 0x0018ffff) AM_RAM AM_SHARE("share1") AM_BASE(&stv_backupram) |
| 2437 | | AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_MIRROR(0x100000) AM_SHARE("share2") AM_BASE(&stv_workram_l) |
| 1898 | AM_RANGE(0x00100000, 0x0010007f) AM_READWRITE8(stv_SMPC_r8, stv_SMPC_w8,0xffffffff) |
| 1899 | AM_RANGE(0x00180000, 0x0018ffff) AM_READWRITE(saturn_m_backupram_r,saturn_m_backupram_w) AM_SHARE("share1") AM_BASE_MEMBER(saturn_state,m_backupram) |
| 1900 | AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_MIRROR(0x100000) AM_SHARE("share2") AM_BASE_MEMBER(saturn_state,m_workram_l) |
| 2438 | 1901 | AM_RANGE(0x00400000, 0x0040001f) AM_READWRITE(stv_io_r32, stv_io_w32) AM_BASE(&ioga) AM_SHARE("share4") AM_MIRROR(0x20) |
| 2439 | | AM_RANGE(0x01000000, 0x01000003) AM_WRITE(minit_w) |
| 2440 | | AM_RANGE(0x01406f40, 0x01406f43) AM_WRITE(minit_w) // prikura seems to write here .. |
| 2441 | | // AM_RANGE(0x01000000, 0x01000003) AM_WRITE(minit_w) AM_MIRROR(0x00080000) |
| 2442 | | AM_RANGE(0x01800000, 0x01800003) AM_WRITE(sinit_w) |
| 2443 | | AM_RANGE(0x02000000, 0x04ffffff) AM_ROM AM_SHARE("share7") AM_REGION("user1", 0) // cartridge |
| 1902 | AM_RANGE(0x01000000, 0x01000003) AM_MIRROR(0x7ffffc) AM_WRITE(minit_w) |
| 1903 | AM_RANGE(0x01800000, 0x01800003) AM_MIRROR(0x7ffffc) AM_WRITE(sinit_w) |
| 1904 | AM_RANGE(0x02000000, 0x04ffffff) AM_ROM AM_SHARE("share7") AM_REGION("abus", 0) // cartridge |
| 2444 | 1905 | AM_RANGE(0x05800000, 0x0589ffff) AM_READWRITE(stvcd_r, stvcd_w) |
| 2445 | 1906 | /* Sound */ |
| 2446 | | AM_RANGE(0x05a00000, 0x05afffff) AM_READWRITE(stv_sh2_soundram_r, stv_sh2_soundram_w) |
| 2447 | | //AM_RANGE(0x05a80000, 0x05afffff) AM_READ(stv_sh2_random_r) |
| 1907 | AM_RANGE(0x05a00000, 0x05afffff) AM_READWRITE16(saturn_soundram_r, saturn_soundram_w,0xffffffff) |
| 2448 | 1908 | AM_RANGE(0x05b00000, 0x05b00fff) AM_DEVREADWRITE16("scsp", scsp_r, scsp_w, 0xffffffff) |
| 2449 | 1909 | /* VDP1 */ |
| 2450 | 1910 | AM_RANGE(0x05c00000, 0x05c7ffff) AM_READWRITE(stv_vdp1_vram_r, stv_vdp1_vram_w) |
| r11594 | r11595 | |
| 2453 | 1913 | AM_RANGE(0x05e00000, 0x05efffff) AM_READWRITE(stv_vdp2_vram_r, stv_vdp2_vram_w) |
| 2454 | 1914 | AM_RANGE(0x05f00000, 0x05f7ffff) AM_READWRITE(stv_vdp2_cram_r, stv_vdp2_cram_w) |
| 2455 | 1915 | AM_RANGE(0x05f80000, 0x05fbffff) AM_READWRITE(stv_vdp2_regs_r, stv_vdp2_regs_w) |
| 2456 | | AM_RANGE(0x05fe0000, 0x05fe00cf) AM_READWRITE(stv_scu_r32, stv_scu_w32) |
| 2457 | | AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_MIRROR(0x01f00000) AM_SHARE("share3") AM_BASE(&stv_workram_h) |
| 1916 | AM_RANGE(0x05fe0000, 0x05fe00cf) AM_READWRITE(saturn_scu_r, saturn_scu_w) |
| 1917 | AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_MIRROR(0x01f00000) AM_SHARE("share3") AM_BASE_MEMBER(saturn_state,m_workram_h) |
| 2458 | 1918 | AM_RANGE(0x20000000, 0x2007ffff) AM_ROM AM_SHARE("share6") // bios mirror |
| 2459 | 1919 | AM_RANGE(0x22000000, 0x24ffffff) AM_ROM AM_SHARE("share7") // cart mirror |
| 2460 | 1920 | ADDRESS_MAP_END |
| 2461 | 1921 | |
| 2462 | 1922 | static ADDRESS_MAP_START( sound_mem, AS_PROGRAM, 16 ) |
| 2463 | | AM_RANGE(0x000000, 0x0fffff) AM_RAM AM_BASE(&sound_ram) |
| 1923 | AM_RANGE(0x000000, 0x0fffff) AM_RAM AM_BASE_MEMBER(saturn_state,m_sound_ram) |
| 2464 | 1924 | AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE("scsp", scsp_r, scsp_w) |
| 2465 | 1925 | ADDRESS_MAP_END |
| 2466 | 1926 | |
| r11594 | r11595 | |
| 2842 | 2302 | |
| 2843 | 2303 | static WRITE32_HANDLER ( w60ffc44_write ) |
| 2844 | 2304 | { |
| 2845 | | COMBINE_DATA(&stv_workram_h[0xffc44/4]); |
| 2305 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 2846 | 2306 | |
| 2307 | COMBINE_DATA(&state->m_workram_h[0xffc44/4]); |
| 2308 | |
| 2847 | 2309 | logerror("cpu %s (PC=%08X): 60ffc44_write write = %08X & %08X\n", space->device().tag(), cpu_get_pc(&space->device()), data, mem_mask); |
| 2848 | 2310 | //sinit_w(offset,data,mem_mask); |
| 2849 | 2311 | } |
| 2850 | 2312 | |
| 2851 | 2313 | static WRITE32_HANDLER ( w60ffc48_write ) |
| 2852 | 2314 | { |
| 2853 | | COMBINE_DATA(&stv_workram_h[0xffc48/4]); |
| 2315 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 2854 | 2316 | |
| 2317 | COMBINE_DATA(&state->m_workram_h[0xffc48/4]); |
| 2318 | |
| 2855 | 2319 | logerror("cpu %s (PC=%08X): 60ffc48_write write = %08X & %08X\n", space->device().tag(), cpu_get_pc(&space->device()), data, mem_mask); |
| 2856 | 2320 | //minit_w(offset,data,mem_mask); |
| 2857 | 2321 | } |
| r11594 | r11595 | |
| 2862 | 2326 | |
| 2863 | 2327 | DRIVER_INIT ( stv ) |
| 2864 | 2328 | { |
| 2329 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 2865 | 2330 | system_time systime; |
| 2866 | 2331 | |
| 2867 | 2332 | machine.base_datetime(systime); |
| r11594 | r11595 | |
| 2872 | 2337 | minit_boost_timeslice = attotime::zero; |
| 2873 | 2338 | sinit_boost_timeslice = attotime::zero; |
| 2874 | 2339 | |
| 2875 | | smpc_ram = auto_alloc_array(machine, UINT8, 0x80); |
| 2876 | | stv_scu = auto_alloc_array(machine, UINT32, 0x100/4); |
| 2340 | state->m_smpc_ram = auto_alloc_array(machine, UINT8, 0x80); |
| 2341 | state->m_scu_regs = auto_alloc_array(machine, UINT32, 0x100/4); |
| 2877 | 2342 | scsp_regs = auto_alloc_array(machine, UINT16, 0x1000/2); |
| 2878 | 2343 | |
| 2879 | 2344 | install_stvbios_speedups(machine); |
| r11594 | r11595 | |
| 2890 | 2355 | machine.device("slave")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x60ffc44, 0x60ffc47, FUNC(w60ffc44_write) ); |
| 2891 | 2356 | machine.device("slave")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x60ffc48, 0x60ffc4b, FUNC(w60ffc48_write) ); |
| 2892 | 2357 | |
| 2893 | | smpc_ram[0x31] = 0x00; //CTG1=0 CTG0=0 (correct??) |
| 2894 | | // smpc_ram[0x33] = input_port_read(machine, "FAKE"); |
| 2895 | | smpc_ram[0x5f] = 0x10; |
| 2358 | state->m_smpc_ram[0x31] = 0x00; //CTG1=0 CTG0=0 (correct??) |
| 2359 | // state->m_smpc_ram[0x33] = input_port_read(machine, "FAKE"); |
| 2360 | state->m_smpc_ram[0x5f] = 0x10; |
| 2896 | 2361 | |
| 2897 | 2362 | #ifdef MAME_DEBUG |
| 2898 | 2363 | /*Uncomment this to enable header info*/ |
| r11594 | r11595 | |
| 2911 | 2376 | #ifdef UNUSED_FUNCTION |
| 2912 | 2377 | static void print_game_info(void) |
| 2913 | 2378 | { |
| 2914 | | UINT8 *ROM = machine.region("user1")->base(); |
| 2379 | UINT8 *ROM = machine.region("game0")->base(); |
| 2915 | 2380 | static FILE *print_file = NULL; |
| 2916 | 2381 | UINT8 STR[0x100]; |
| 2917 | 2382 | UINT32 src_i,dst_i; |
| r11594 | r11595 | |
| 3018 | 2483 | |
| 3019 | 2484 | static void scsp_irq(device_t *device, int irq) |
| 3020 | 2485 | { |
| 2486 | saturn_state *state = device->machine().driver_data<saturn_state>(); |
| 2487 | |
| 3021 | 2488 | // don't bother the 68k if it's off |
| 3022 | | if (!en_68k) |
| 2489 | if (!state->m_en_68k) |
| 3023 | 2490 | { |
| 3024 | 2491 | return; |
| 3025 | 2492 | } |
| r11594 | r11595 | |
| 3047 | 2514 | |
| 3048 | 2515 | static TIMER_CALLBACK(stv_rtc_increment) |
| 3049 | 2516 | { |
| 2517 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 3050 | 2518 | static const UINT8 dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 }; |
| 3051 | 2519 | static int year_num, year_count; |
| 3052 | 2520 | |
| 3053 | 2521 | /* |
| 3054 | | smpc_ram[0x23] = DectoBCD(systime.local_time.year /100); |
| 3055 | | smpc_ram[0x25] = DectoBCD(systime.local_time.year %100); |
| 3056 | | smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month+1); |
| 3057 | | smpc_ram[0x29] = DectoBCD(systime.local_time.mday); |
| 3058 | | smpc_ram[0x2b] = DectoBCD(systime.local_time.hour); |
| 3059 | | smpc_ram[0x2d] = DectoBCD(systime.local_time.minute); |
| 3060 | | smpc_ram[0x2f] = DectoBCD(systime.local_time.second); |
| 2522 | state->m_smpc_ram[0x23] = DectoBCD(systime.local_time.year /100); |
| 2523 | state->m_smpc_ram[0x25] = DectoBCD(systime.local_time.year %100); |
| 2524 | state->m_smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month+1); |
| 2525 | state->m_smpc_ram[0x29] = DectoBCD(systime.local_time.mday); |
| 2526 | state->m_smpc_ram[0x2b] = DectoBCD(systime.local_time.hour); |
| 2527 | state->m_smpc_ram[0x2d] = DectoBCD(systime.local_time.minute); |
| 2528 | state->m_smpc_ram[0x2f] = DectoBCD(systime.local_time.second); |
| 3061 | 2529 | */ |
| 3062 | 2530 | |
| 3063 | | smpc_ram[0x2f]++; |
| 2531 | state->m_smpc_ram[0x2f]++; |
| 3064 | 2532 | |
| 3065 | 2533 | /* seconds from 9 -> 10*/ |
| 3066 | | if((smpc_ram[0x2f] & 0x0f) >= 0x0a) { smpc_ram[0x2f]+=0x10; smpc_ram[0x2f]&=0xf0; } |
| 2534 | if((state->m_smpc_ram[0x2f] & 0x0f) >= 0x0a) { state->m_smpc_ram[0x2f]+=0x10; state->m_smpc_ram[0x2f]&=0xf0; } |
| 3067 | 2535 | /* seconds from 59 -> 0 */ |
| 3068 | | if((smpc_ram[0x2f] & 0xf0) >= 0x60) { smpc_ram[0x2d]++; smpc_ram[0x2f] = 0; } |
| 2536 | if((state->m_smpc_ram[0x2f] & 0xf0) >= 0x60) { state->m_smpc_ram[0x2d]++; state->m_smpc_ram[0x2f] = 0; } |
| 3069 | 2537 | /* minutes from 9 -> 10 */ |
| 3070 | | if((smpc_ram[0x2d] & 0x0f) >= 0x0a) { smpc_ram[0x2d]+=0x10; smpc_ram[0x2d]&=0xf0; } |
| 2538 | if((state->m_smpc_ram[0x2d] & 0x0f) >= 0x0a) { state->m_smpc_ram[0x2d]+=0x10; state->m_smpc_ram[0x2d]&=0xf0; } |
| 3071 | 2539 | /* minutes from 59 -> 0 */ |
| 3072 | | if((smpc_ram[0x2d] & 0xf0) >= 0x60) { smpc_ram[0x2b]++; smpc_ram[0x2d] = 0; } |
| 2540 | if((state->m_smpc_ram[0x2d] & 0xf0) >= 0x60) { state->m_smpc_ram[0x2b]++; state->m_smpc_ram[0x2d] = 0; } |
| 3073 | 2541 | /* hours from 9 -> 10 */ |
| 3074 | | if((smpc_ram[0x2b] & 0x0f) >= 0x0a) { smpc_ram[0x2b]+=0x10; smpc_ram[0x2b]&=0xf0; } |
| 2542 | if((state->m_smpc_ram[0x2b] & 0x0f) >= 0x0a) { state->m_smpc_ram[0x2b]+=0x10; state->m_smpc_ram[0x2b]&=0xf0; } |
| 3075 | 2543 | /* hours from 23 -> 0 */ |
| 3076 | | if((smpc_ram[0x2b] & 0xff) >= 0x24) { smpc_ram[0x29]++; smpc_ram[0x27]+=0x10; smpc_ram[0x2b] = 0; } |
| 2544 | if((state->m_smpc_ram[0x2b] & 0xff) >= 0x24) { state->m_smpc_ram[0x29]++; state->m_smpc_ram[0x27]+=0x10; state->m_smpc_ram[0x2b] = 0; } |
| 3077 | 2545 | /* week day name sunday -> monday */ |
| 3078 | | if((smpc_ram[0x27] & 0xf0) >= 0x70) { smpc_ram[0x27]&=0x0f; } |
| 2546 | if((state->m_smpc_ram[0x27] & 0xf0) >= 0x70) { state->m_smpc_ram[0x27]&=0x0f; } |
| 3079 | 2547 | /* day number 9 -> 10 */ |
| 3080 | | if((smpc_ram[0x29] & 0x0f) >= 0x0a) { smpc_ram[0x29]+=0x10; smpc_ram[0x29]&=0xf0; } |
| 2548 | if((state->m_smpc_ram[0x29] & 0x0f) >= 0x0a) { state->m_smpc_ram[0x29]+=0x10; state->m_smpc_ram[0x29]&=0xf0; } |
| 3081 | 2549 | |
| 3082 | 2550 | // year BCD to dec conversion (for the leap year stuff) |
| 3083 | 2551 | { |
| 3084 | | year_num = (smpc_ram[0x25] & 0xf); |
| 2552 | year_num = (state->m_smpc_ram[0x25] & 0xf); |
| 3085 | 2553 | |
| 3086 | | for(year_count = 0; year_count < (smpc_ram[0x25] & 0xf0); year_count += 0x10) |
| 2554 | for(year_count = 0; year_count < (state->m_smpc_ram[0x25] & 0xf0); year_count += 0x10) |
| 3087 | 2555 | year_num += 0xa; |
| 3088 | 2556 | |
| 3089 | | year_num += (smpc_ram[0x23] & 0xf)*0x64; |
| 2557 | year_num += (state->m_smpc_ram[0x23] & 0xf)*0x64; |
| 3090 | 2558 | |
| 3091 | | for(year_count = 0; year_count < (smpc_ram[0x23] & 0xf0); year_count += 0x10) |
| 2559 | for(year_count = 0; year_count < (state->m_smpc_ram[0x23] & 0xf0); year_count += 0x10) |
| 3092 | 2560 | year_num += 0x3e8; |
| 3093 | 2561 | } |
| 3094 | 2562 | |
| 3095 | 2563 | /* month +1 check */ |
| 3096 | 2564 | /* the RTC have a range of 1980 - 2100, so we don't actually need to support the leap year special conditions */ |
| 3097 | | if(((year_num % 4) == 0) && (smpc_ram[0x27] & 0xf) == 2) |
| 2565 | if(((year_num % 4) == 0) && (state->m_smpc_ram[0x27] & 0xf) == 2) |
| 3098 | 2566 | { |
| 3099 | | if((smpc_ram[0x29] & 0xff) >= dpm[(smpc_ram[0x27] & 0xf)-1]+1+1) |
| 3100 | | { smpc_ram[0x27]++; smpc_ram[0x29] = 0x01; } |
| 2567 | if((state->m_smpc_ram[0x29] & 0xff) >= dpm[(state->m_smpc_ram[0x27] & 0xf)-1]+1+1) |
| 2568 | { state->m_smpc_ram[0x27]++; state->m_smpc_ram[0x29] = 0x01; } |
| 3101 | 2569 | } |
| 3102 | | else if((smpc_ram[0x29] & 0xff) >= dpm[(smpc_ram[0x27] & 0xf)-1]+1){ smpc_ram[0x27]++; smpc_ram[0x29] = 0x01; } |
| 2570 | else if((state->m_smpc_ram[0x29] & 0xff) >= dpm[(state->m_smpc_ram[0x27] & 0xf)-1]+1){ state->m_smpc_ram[0x27]++; state->m_smpc_ram[0x29] = 0x01; } |
| 3103 | 2571 | /* year +1 check */ |
| 3104 | | if((smpc_ram[0x27] & 0x0f) > 12) { smpc_ram[0x25]++; smpc_ram[0x27] = (smpc_ram[0x27] & 0xf0) | 0x01; } |
| 2572 | if((state->m_smpc_ram[0x27] & 0x0f) > 12) { state->m_smpc_ram[0x25]++; state->m_smpc_ram[0x27] = (state->m_smpc_ram[0x27] & 0xf0) | 0x01; } |
| 3105 | 2573 | /* year from 9 -> 10 */ |
| 3106 | | if((smpc_ram[0x25] & 0x0f) >= 0x0a) { smpc_ram[0x25]+=0x10; smpc_ram[0x25]&=0xf0; } |
| 2574 | if((state->m_smpc_ram[0x25] & 0x0f) >= 0x0a) { state->m_smpc_ram[0x25]+=0x10; state->m_smpc_ram[0x25]&=0xf0; } |
| 3107 | 2575 | /* year from 99 -> 100 */ |
| 3108 | | if((smpc_ram[0x25] & 0xf0) >= 0xa0) { smpc_ram[0x23]++; smpc_ram[0x25] = 0; } |
| 2576 | if((state->m_smpc_ram[0x25] & 0xf0) >= 0xa0) { state->m_smpc_ram[0x23]++; state->m_smpc_ram[0x25] = 0; } |
| 3109 | 2577 | |
| 3110 | 2578 | // probably not SO precise, here just for reference ... |
| 3111 | 2579 | /* year from 999 -> 1000 */ |
| 3112 | | //if((smpc_ram[0x23] & 0x0f) >= 0x0a) { smpc_ram[0x23]+=0x10; smpc_ram[0x23]&=0xf0; } |
| 2580 | //if((state->m_smpc_ram[0x23] & 0x0f) >= 0x0a) { state->m_smpc_ram[0x23]+=0x10; state->m_smpc_ram[0x23]&=0xf0; } |
| 3113 | 2581 | /* year from 9999 -> 0 */ |
| 3114 | | //if((smpc_ram[0x23] & 0xf0) >= 0xa0) { smpc_ram[0x23] = 0; } //roll over |
| 2582 | //if((state->m_smpc_ram[0x23] & 0xf0) >= 0xa0) { state->m_smpc_ram[0x23] = 0; } //roll over |
| 3115 | 2583 | } |
| 3116 | 2584 | |
| 3117 | 2585 | static MACHINE_START( stv ) |
| 3118 | 2586 | { |
| 2587 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 3119 | 2588 | system_time systime; |
| 3120 | 2589 | machine.base_datetime(systime); |
| 3121 | 2590 | |
| 3122 | | stv_maincpu = machine.device<cpu_device>("maincpu"); |
| 3123 | | stv_slave = machine.device<cpu_device>("slave"); |
| 3124 | | stv_audiocpu = machine.device<cpu_device>("audiocpu"); |
| 2591 | state->m_maincpu = downcast<legacy_cpu_device*>( machine.device("maincpu") ); |
| 2592 | state->m_slave = downcast<legacy_cpu_device*>( machine.device("slave") ); |
| 2593 | state->m_audiocpu = downcast<legacy_cpu_device*>( machine.device("audiocpu") ); |
| 3125 | 2594 | |
| 3126 | | scsp_set_ram_base(machine.device("scsp"), sound_ram); |
| 2595 | scsp_set_ram_base(machine.device("scsp"), state->m_sound_ram); |
| 3127 | 2596 | |
| 3128 | 2597 | // save states |
| 3129 | | state_save_register_global_pointer(machine, smpc_ram, 0x80); |
| 3130 | | state_save_register_global_pointer(machine, stv_scu, 0x100/4); |
| 2598 | state_save_register_global_pointer(machine, state->m_smpc_ram, 0x80); |
| 2599 | state_save_register_global_pointer(machine, state->m_scu_regs, 0x100/4); |
| 3131 | 2600 | state_save_register_global_pointer(machine, scsp_regs, 0x1000/2); |
| 3132 | 2601 | // state_save_register_global(machine, stv_vblank); |
| 3133 | 2602 | // state_save_register_global(machine, stv_hblank); |
| 3134 | | state_save_register_global(machine, stv_enable_slave_sh2); |
| 3135 | | state_save_register_global(machine, NMI_reset); |
| 3136 | | state_save_register_global(machine, en_68k); |
| 2603 | state_save_register_global(machine, state->m_NMI_reset); |
| 2604 | state_save_register_global(machine, state->m_en_68k); |
| 3137 | 2605 | state_save_register_global(machine, timer_0); |
| 3138 | 2606 | state_save_register_global(machine, timer_1); |
| 3139 | 2607 | // state_save_register_global(machine, scanline); |
| r11594 | r11595 | |
| 3151 | 2619 | |
| 3152 | 2620 | machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(stvcd_exit), &machine)); |
| 3153 | 2621 | |
| 3154 | | smpc_ram[0x23] = DectoBCD(systime.local_time.year /100); |
| 3155 | | smpc_ram[0x25] = DectoBCD(systime.local_time.year %100); |
| 3156 | | smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month+1); |
| 3157 | | smpc_ram[0x29] = DectoBCD(systime.local_time.mday); |
| 3158 | | smpc_ram[0x2b] = DectoBCD(systime.local_time.hour); |
| 3159 | | smpc_ram[0x2d] = DectoBCD(systime.local_time.minute); |
| 3160 | | smpc_ram[0x2f] = DectoBCD(systime.local_time.second); |
| 2622 | state->m_smpc_ram[0x23] = DectoBCD(systime.local_time.year /100); |
| 2623 | state->m_smpc_ram[0x25] = DectoBCD(systime.local_time.year %100); |
| 2624 | state->m_smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month+1); |
| 2625 | state->m_smpc_ram[0x29] = DectoBCD(systime.local_time.mday); |
| 2626 | state->m_smpc_ram[0x2b] = DectoBCD(systime.local_time.hour); |
| 2627 | state->m_smpc_ram[0x2d] = DectoBCD(systime.local_time.minute); |
| 2628 | state->m_smpc_ram[0x2f] = DectoBCD(systime.local_time.second); |
| 3161 | 2629 | |
| 3162 | 2630 | stv_rtc_timer = machine.scheduler().timer_alloc(FUNC(stv_rtc_increment)); |
| 3163 | 2631 | } |
| r11594 | r11595 | |
| 3165 | 2633 | |
| 3166 | 2634 | static MACHINE_START( saturn ) |
| 3167 | 2635 | { |
| 3168 | | scsp_set_ram_base(machine.device("scsp"), sound_ram); |
| 2636 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 2637 | scsp_set_ram_base(machine.device("scsp"), state->m_sound_ram); |
| 3169 | 2638 | |
| 3170 | 2639 | // save states |
| 3171 | | state_save_register_global_pointer(machine, smpc_ram, 0x80); |
| 3172 | | state_save_register_global_pointer(machine, stv_scu, 0x100/4); |
| 2640 | state_save_register_global_pointer(machine, state->m_smpc_ram, 0x80); |
| 2641 | state_save_register_global_pointer(machine, state->m_scu_regs, 0x100/4); |
| 3173 | 2642 | state_save_register_global_pointer(machine, scsp_regs, 0x1000/2); |
| 3174 | 2643 | state_save_register_global(machine, stv_vblank); |
| 3175 | 2644 | state_save_register_global(machine, stv_hblank); |
| 3176 | | state_save_register_global(machine, stv_enable_slave_sh2); |
| 3177 | | state_save_register_global(machine, NMI_reset); |
| 3178 | | state_save_register_global(machine, en_68k); |
| 2645 | state_save_register_global(machine, state->m_NMI_reset); |
| 2646 | state_save_register_global(machine, state->m_en_68k); |
| 3179 | 2647 | state_save_register_global(machine, timer_0); |
| 3180 | 2648 | state_save_register_global(machine, timer_1); |
| 3181 | 2649 | state_save_register_global(machine, IOSEL1); |
| r11594 | r11595 | |
| 3277 | 2745 | } \ |
| 3278 | 2746 | |
| 3279 | 2747 | #define HBLANK_IN_IRQ(m) \ |
| 3280 | | timer_1 = stv_scu[37] & 0x1ff; \ |
| 2748 | timer_1 = state->m_scu_regs[37] & 0x1ff; \ |
| 3281 | 2749 | { \ |
| 3282 | 2750 | /*if(LOG_IRQ) logerror ("Interrupt: HBlank-In at scanline %04x, Vector 0x42 Level 0x0d\n",scanline);*/ \ |
| 3283 | 2751 | cputag_set_input_line_and_vector(m, "maincpu", 0xd, (stv_irq.hblank_in) ? HOLD_LINE : CLEAR_LINE, 0x42); \ |
| 3284 | 2752 | } \ |
| 3285 | 2753 | |
| 3286 | 2754 | #define TIMER_0_IRQ(m) \ |
| 3287 | | if(timer_0 == (stv_scu[36] & 0x3ff)) \ |
| 2755 | if(timer_0 == (state->m_scu_regs[36] & 0x3ff)) \ |
| 3288 | 2756 | { \ |
| 3289 | 2757 | /*if(LOG_IRQ) logerror ("Interrupt: Timer 0 at scanline %04x, Vector 0x43 Level 0x0c\n",scanline);*/ \ |
| 3290 | 2758 | cputag_set_input_line_and_vector(m, "maincpu", 0xc, (stv_irq.timer_0) ? HOLD_LINE : CLEAR_LINE, 0x43 ); \ |
| 3291 | 2759 | } \ |
| 3292 | 2760 | |
| 3293 | 2761 | #define TIMER_1_IRQ(m) \ |
| 3294 | | if((stv_scu[38] & 1)) \ |
| 2762 | if((state->m_scu_regs[38] & 1)) \ |
| 3295 | 2763 | { \ |
| 3296 | | if(!(stv_scu[38] & 0x80)) \ |
| 2764 | if(!(state->m_scu_regs[38] & 0x80)) \ |
| 3297 | 2765 | { \ |
| 3298 | 2766 | /*if(LOG_IRQ) logerror ("Interrupt: Timer 1 at point %04x, Vector 0x44 Level 0x0b\n",point);*/ \ |
| 3299 | 2767 | cputag_set_input_line_and_vector(m, "maincpu", 0xb, (stv_irq.timer_1) ? HOLD_LINE : CLEAR_LINE, 0x44 ); \ |
| 3300 | 2768 | } \ |
| 3301 | 2769 | else \ |
| 3302 | 2770 | { \ |
| 3303 | | if((timer_0) == (stv_scu[36] & 0x3ff)) \ |
| 2771 | if((timer_0) == (state->m_scu_regs[36] & 0x3ff)) \ |
| 3304 | 2772 | { \ |
| 3305 | 2773 | /*if(LOG_IRQ) logerror ("Interrupt: Timer 1 at point %04x, Vector 0x44 Level 0x0b\n",point);*/ \ |
| 3306 | 2774 | cputag_set_input_line_and_vector(m, "maincpu", 0xb, (stv_irq.timer_1) ? HOLD_LINE : CLEAR_LINE, 0x44 ); \ |
| r11594 | r11595 | |
| 3315 | 2783 | |
| 3316 | 2784 | static TIMER_DEVICE_CALLBACK( hblank_in_irq ) |
| 3317 | 2785 | { |
| 2786 | saturn_state *state = timer.machine().driver_data<saturn_state>(); |
| 3318 | 2787 | int scanline = param; |
| 3319 | 2788 | |
| 3320 | 2789 | // h = timer.machine().primary_screen->height(); |
| r11594 | r11595 | |
| 3338 | 2807 | |
| 3339 | 2808 | static TIMER_DEVICE_CALLBACK( timer1_irq ) |
| 3340 | 2809 | { |
| 2810 | saturn_state *state = timer.machine().driver_data<saturn_state>(); |
| 3341 | 2811 | int scanline = param; |
| 3342 | 2812 | |
| 3343 | 2813 | TIMER_1_IRQ(timer.machine()); |
| r11594 | r11595 | |
| 3382 | 2852 | |
| 3383 | 2853 | static MACHINE_RESET( saturn ) |
| 3384 | 2854 | { |
| 2855 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 3385 | 2856 | // don't let the slave cpu and the 68k go anywhere |
| 3386 | 2857 | cputag_set_input_line(machine, "slave", INPUT_LINE_RESET, ASSERT_LINE); |
| 3387 | | stv_enable_slave_sh2 = 0; |
| 3388 | 2858 | cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE); |
| 3389 | 2859 | |
| 3390 | 2860 | smpcSR = 0x40; // this bit is always on according to docs |
| 3391 | 2861 | |
| 3392 | 2862 | timer_0 = 0; |
| 3393 | 2863 | timer_1 = 0; |
| 3394 | | en_68k = 0; |
| 3395 | | NMI_reset = 1; |
| 3396 | | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 2864 | state->m_en_68k = 0; |
| 2865 | state->m_NMI_reset = 1; |
| 2866 | state->m_smpc_ram[0x21] = (0x80) | ((state->m_NMI_reset & 1) << 6); |
| 3397 | 2867 | |
| 3398 | 2868 | DMA_STATUS = 0; |
| 3399 | 2869 | |
| 3400 | | memset(stv_workram_l, 0, 0x100000); |
| 3401 | | memset(stv_workram_h, 0, 0x100000); |
| 2870 | //memset(stv_m_workram_l, 0, 0x100000); |
| 2871 | //memset(stv_m_workram_h, 0, 0x100000); |
| 3402 | 2872 | |
| 3403 | 2873 | machine.device("maincpu")->set_unscaled_clock(MASTER_CLOCK_320/2); |
| 3404 | 2874 | machine.device("slave")->set_unscaled_clock(MASTER_CLOCK_320/2); |
| r11594 | r11595 | |
| 3417 | 2887 | |
| 3418 | 2888 | static MACHINE_RESET( stv ) |
| 3419 | 2889 | { |
| 2890 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 2891 | |
| 3420 | 2892 | // don't let the slave cpu and the 68k go anywhere |
| 3421 | 2893 | cputag_set_input_line(machine, "slave", INPUT_LINE_RESET, ASSERT_LINE); |
| 3422 | | stv_enable_slave_sh2 = 0; |
| 3423 | 2894 | cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE); |
| 3424 | 2895 | |
| 3425 | 2896 | timer_0 = 0; |
| 3426 | 2897 | timer_1 = 0; |
| 3427 | | en_68k = 0; |
| 3428 | | NMI_reset = 1; |
| 3429 | | smpc_ram[0x21] = (0x80) | ((NMI_reset & 1) << 6); |
| 2898 | state->m_en_68k = 0; |
| 2899 | state->m_NMI_reset = 1; |
| 2900 | state->m_smpc_ram[0x21] = (0x80) | ((state->m_NMI_reset & 1) << 6); |
| 3430 | 2901 | |
| 3431 | 2902 | port_sel = mux_data = 0; |
| 3432 | 2903 | port_i = -1; |
| r11594 | r11595 | |
| 3445 | 2916 | scan_timer->adjust(machine.primary_screen->time_until_pos(224, 352)); |
| 3446 | 2917 | |
| 3447 | 2918 | stv_rtc_timer->adjust(attotime::zero, 0, attotime::from_seconds(1)); |
| 2919 | state->m_prev_bankswitch = 0xff; |
| 3448 | 2920 | } |
| 3449 | 2921 | |
| 3450 | 2922 | |
| r11594 | r11595 | |
| 3546 | 3018 | MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) |
| 3547 | 3019 | MACHINE_CONFIG_END |
| 3548 | 3020 | |
| 3021 | struct stv_cart_region |
| 3022 | { |
| 3023 | const char *tag; |
| 3024 | int slot; |
| 3025 | const char *region; |
| 3026 | }; |
| 3549 | 3027 | |
| 3028 | static const struct stv_cart_region stv_cart_table[] = |
| 3029 | { |
| 3030 | { "cart1", 0, "game0" }, |
| 3031 | { "cart2", 1, "game1" }, |
| 3032 | { "cart3", 2, "game2" }, |
| 3033 | { "cart4", 3, "game3" }, |
| 3034 | { 0 } |
| 3035 | }; |
| 3550 | 3036 | |
| 3037 | static DEVICE_IMAGE_LOAD( stv_cart ) |
| 3038 | { |
| 3039 | // saturn_state *state = image.device().machine().driver_data<saturn_state>(); |
| 3040 | const struct stv_cart_region *stv_cart = &stv_cart_table[0], *this_cart; |
| 3041 | //const char *pcb_name; |
| 3042 | |
| 3043 | /* First, determine where this cart has to be loaded */ |
| 3044 | while (stv_cart->tag) |
| 3045 | { |
| 3046 | if (strcmp(stv_cart->tag, image.device().tag()) == 0) |
| 3047 | break; |
| 3048 | |
| 3049 | stv_cart++; |
| 3050 | } |
| 3051 | |
| 3052 | this_cart = stv_cart; |
| 3053 | |
| 3054 | if (image.software_entry() == NULL) |
| 3055 | return IMAGE_INIT_FAIL; |
| 3056 | |
| 3057 | UINT8 *ROM = image.device().machine().region(this_cart->region)->base(); |
| 3058 | UINT32 length = image.get_software_region_length("rom"); |
| 3059 | |
| 3060 | memcpy(ROM, image.get_software_region("rom"), length); |
| 3061 | |
| 3062 | /* fix endianess */ |
| 3063 | { |
| 3064 | UINT8 j[4]; |
| 3065 | int i; |
| 3066 | |
| 3067 | for(i=0;i<length;i+=4) |
| 3068 | { |
| 3069 | j[0] = ROM[i]; |
| 3070 | j[1] = ROM[i+1]; |
| 3071 | j[2] = ROM[i+2]; |
| 3072 | j[3] = ROM[i+3]; |
| 3073 | ROM[i] = j[3]; |
| 3074 | ROM[i+1] = j[2]; |
| 3075 | ROM[i+2] = j[1]; |
| 3076 | ROM[i+3] = j[0]; |
| 3077 | } |
| 3078 | } |
| 3079 | |
| 3080 | //if ((pcb_name = image.get_feature("pcb_type")) == NULL) |
| 3081 | // return IMAGE_INIT_FAIL; |
| 3082 | |
| 3083 | return IMAGE_INIT_PASS; |
| 3084 | } |
| 3085 | |
| 3086 | |
| 3087 | #define MCFG_STV_CARTSLOT_ADD(_tag) \ |
| 3088 | MCFG_CARTSLOT_ADD(_tag) \ |
| 3089 | MCFG_CARTSLOT_INTERFACE("stv_cart") \ |
| 3090 | MCFG_CARTSLOT_LOAD(stv_cart) |
| 3091 | |
| 3092 | MACHINE_CONFIG_FRAGMENT( stv_cartslot ) |
| 3093 | MCFG_STV_CARTSLOT_ADD("cart1") |
| 3094 | MCFG_STV_CARTSLOT_ADD("cart2") |
| 3095 | MCFG_STV_CARTSLOT_ADD("cart3") |
| 3096 | MCFG_STV_CARTSLOT_ADD("cart4") |
| 3097 | |
| 3098 | MCFG_SOFTWARE_LIST_ADD("cart_list","stv") |
| 3099 | MACHINE_CONFIG_END |
| 3100 | |
| 3101 | static MACHINE_CONFIG_DERIVED( stv_slot, stv ) |
| 3102 | MCFG_FRAGMENT_ADD( stv_cartslot ) |
| 3103 | MACHINE_CONFIG_END |
| 3104 | |
| 3105 | |
| 3551 | 3106 | static void saturn_init_driver(running_machine &machine, int rgn) |
| 3552 | 3107 | { |
| 3108 | saturn_state *state = machine.driver_data<saturn_state>(); |
| 3553 | 3109 | system_time systime; |
| 3554 | 3110 | |
| 3555 | 3111 | saturn_region = rgn; |
| r11594 | r11595 | |
| 3567 | 3123 | minit_boost_timeslice = attotime::zero; |
| 3568 | 3124 | sinit_boost_timeslice = attotime::zero; |
| 3569 | 3125 | |
| 3570 | | smpc_ram = auto_alloc_array(machine, UINT8, 0x80); |
| 3571 | | stv_scu = auto_alloc_array(machine, UINT32, 0x100/4); |
| 3126 | state->m_smpc_ram = auto_alloc_array(machine, UINT8, 0x80); |
| 3127 | state->m_scu_regs = auto_alloc_array(machine, UINT32, 0x100/4); |
| 3572 | 3128 | scsp_regs = auto_alloc_array(machine, UINT16, 0x1000/2); |
| 3573 | 3129 | |
| 3574 | | smpc_ram[0x23] = dec_2_bcd(systime.local_time.year / 100); |
| 3575 | | smpc_ram[0x25] = dec_2_bcd(systime.local_time.year % 100); |
| 3576 | | smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month + 1); |
| 3577 | | smpc_ram[0x29] = dec_2_bcd(systime.local_time.mday); |
| 3578 | | smpc_ram[0x2b] = dec_2_bcd(systime.local_time.hour); |
| 3579 | | smpc_ram[0x2d] = dec_2_bcd(systime.local_time.minute); |
| 3580 | | smpc_ram[0x2f] = dec_2_bcd(systime.local_time.second); |
| 3581 | | smpc_ram[0x31] = 0x00; //CTG1=0 CTG0=0 (correct??) |
| 3582 | | // smpc_ram[0x33] = input_port_read(machine, "???"); |
| 3583 | | smpc_ram[0x5f] = 0x10; |
| 3130 | state->m_smpc_ram[0x23] = dec_2_bcd(systime.local_time.year / 100); |
| 3131 | state->m_smpc_ram[0x25] = dec_2_bcd(systime.local_time.year % 100); |
| 3132 | state->m_smpc_ram[0x27] = (systime.local_time.weekday << 4) | (systime.local_time.month + 1); |
| 3133 | state->m_smpc_ram[0x29] = dec_2_bcd(systime.local_time.mday); |
| 3134 | state->m_smpc_ram[0x2b] = dec_2_bcd(systime.local_time.hour); |
| 3135 | state->m_smpc_ram[0x2d] = dec_2_bcd(systime.local_time.minute); |
| 3136 | state->m_smpc_ram[0x2f] = dec_2_bcd(systime.local_time.second); |
| 3137 | state->m_smpc_ram[0x31] = 0x00; //CTG1=0 CTG0=0 (correct??) |
| 3138 | // state->m_smpc_ram[0x33] = input_port_read(machine, "???"); |
| 3139 | state->m_smpc_ram[0x5f] = 0x10; |
| 3584 | 3140 | } |
| 3585 | 3141 | |
| 3586 | 3142 | static DRIVER_INIT( saturnus ) |
| r11594 | r11595 | |
| 3712 | 3268 | \ |
| 3713 | 3269 | ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */ \ |
| 3714 | 3270 | ROM_COPY( "maincpu",0,0,0x080000) \ |
| 3271 | \ |
| 3272 | ROM_REGION32_BE( 0x3000000, "abus", ROMREGION_ERASE00 ) /* SH2 code */ \ |
| 3715 | 3273 | |
| 3274 | |
| 3716 | 3275 | ROM_START( stvbios ) |
| 3717 | 3276 | STV_BIOS |
| 3718 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3277 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) |
| 3278 | |
| 3279 | ROM_REGION32_BE( 0x3000000, "game1", ROMREGION_ERASE00 ) |
| 3280 | |
| 3281 | ROM_REGION32_BE( 0x3000000, "game2", ROMREGION_ERASE00 ) |
| 3282 | |
| 3283 | ROM_REGION32_BE( 0x3000000, "game3", ROMREGION_ERASE00 ) |
| 3719 | 3284 | ROM_END |
| 3720 | 3285 | |
| 3721 | 3286 | /* |
| r11594 | r11595 | |
| 3750 | 3315 | ROM_START( astrass ) |
| 3751 | 3316 | STV_BIOS |
| 3752 | 3317 | |
| 3753 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3318 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3754 | 3319 | |
| 3755 | 3320 | ROM_LOAD16_BYTE( "epr20825.13", 0x0000001, 0x0100000, CRC(94a9ad8f) SHA1(861311c14cfa9f560752aa5b023c147a539cf135) ) |
| 3756 | 3321 | |
| r11594 | r11595 | |
| 3772 | 3337 | ROM_START( bakubaku ) |
| 3773 | 3338 | STV_BIOS |
| 3774 | 3339 | |
| 3775 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3340 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3776 | 3341 | |
| 3777 | 3342 | ROM_LOAD16_BYTE( "fpr17969.13", 0x0000001, 0x0100000, CRC(bee327e5) SHA1(1d226db72d6ef68fd294f60659df7f882b25def6) ) |
| 3778 | 3343 | |
| r11594 | r11595 | |
| 3785 | 3350 | ROM_START( colmns97 ) |
| 3786 | 3351 | STV_BIOS |
| 3787 | 3352 | |
| 3788 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3353 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3789 | 3354 | |
| 3790 | 3355 | ROM_LOAD16_BYTE( "fpr19553.13", 0x000001, 0x100000, CRC(d4fb6a5e) SHA1(bd3cfb4f451b6c9612e42af5ddcbffa14f057329) ) |
| 3791 | 3356 | |
| r11594 | r11595 | |
| 3796 | 3361 | ROM_START( cotton2 ) |
| 3797 | 3362 | STV_BIOS |
| 3798 | 3363 | |
| 3799 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3364 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3800 | 3365 | ROM_LOAD16_WORD_SWAP( "mpr20122.7", 0x0200000, 0x0200000, CRC(d616f78a) SHA1(8039dcdfdafb8327a19a1da46a67c0b3f7eee53a) ) // good |
| 3801 | 3366 | ROM_LOAD16_WORD_SWAP( "mpr20117.2", 0x0400000, 0x0400000, CRC(893656ea) SHA1(11e3160083ba018fbd588f07061a4e55c1efbebb) ) // good |
| 3802 | 3367 | ROM_LOAD16_WORD_SWAP( "mpr20118.3", 0x0800000, 0x0400000, CRC(1b6a1d4c) SHA1(6b234d6b2d24df7f6d400a56698c0af2f78ce0e7) ) // good |
| r11594 | r11595 | |
| 3810 | 3375 | ROM_START( cottonbm ) |
| 3811 | 3376 | STV_BIOS |
| 3812 | 3377 | |
| 3813 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3378 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3814 | 3379 | ROM_LOAD16_WORD_SWAP( "mpr21075.7", 0x0200000, 0x0200000, CRC(200b58ba) SHA1(6daad6d70a3a41172e8d9402af775c03e191232d) ) // good |
| 3815 | 3380 | ROM_LOAD16_WORD_SWAP( "mpr21070.2", 0x0400000, 0x0400000, CRC(56c0bf1d) SHA1(c2b564ce536c637bb723ed96683b27596e87ebe7) ) // good |
| 3816 | 3381 | ROM_LOAD16_WORD_SWAP( "mpr21071.3", 0x0800000, 0x0400000, CRC(2bb18df2) SHA1(e900adb94ad3f48be00a4ce33e915147dc6a8737) ) // good |
| r11594 | r11595 | |
| 3823 | 3388 | ROM_START( decathlt ) |
| 3824 | 3389 | STV_BIOS |
| 3825 | 3390 | |
| 3826 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3391 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3827 | 3392 | |
| 3828 | 3393 | ROM_LOAD16_BYTE( "epr18967a.13", 0x0000001, 0x0100000, CRC(ac59c186) SHA1(7d4924d1e4c1b9257b58a690de988b3f6486e86f) ) |
| 3829 | 3394 | |
| r11594 | r11595 | |
| 3837 | 3402 | ROM_START( decathlto ) |
| 3838 | 3403 | STV_BIOS |
| 3839 | 3404 | |
| 3840 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3405 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3841 | 3406 | |
| 3842 | 3407 | ROM_LOAD16_BYTE( "epr18967.13", 0x0000001, 0x0100000, CRC(c0446674) SHA1(4917089d95613c9d2a936ed9fe3ebd22f461aa4f) ) |
| 3843 | 3408 | |
| r11594 | r11595 | |
| 3852 | 3417 | STV_BIOS |
| 3853 | 3418 | ROM_DEFAULT_BIOS( "us" ) |
| 3854 | 3419 | |
| 3855 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3420 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3856 | 3421 | |
| 3857 | 3422 | ROM_LOAD16_BYTE( "fpr19119.13", 0x0000001, 0x0100000, CRC(de5c4f7c) SHA1(35f670a15e9c86edbe2fe718470f5a75b5b096ac) ) |
| 3858 | 3423 | |
| r11594 | r11595 | |
| 3865 | 3430 | ROM_START( dnmtdeka ) |
| 3866 | 3431 | STV_BIOS |
| 3867 | 3432 | |
| 3868 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3433 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3869 | 3434 | |
| 3870 | 3435 | ROM_LOAD16_BYTE( "fpr19114.13", 0x0000001, 0x0100000, CRC(1fd22a5f) SHA1(c3d9653b12354a73a3e15f23a2ab7992ffb83e46) ) |
| 3871 | 3436 | |
| r11594 | r11595 | |
| 3878 | 3443 | ROM_START( ejihon ) |
| 3879 | 3444 | STV_BIOS |
| 3880 | 3445 | |
| 3881 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3446 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3882 | 3447 | ROM_LOAD16_BYTE( "epr18137.13", 0x0000001, 0x0080000, CRC(151aa9bc) SHA1(0959c60f31634816825acb57413838dcddb17d31) ) |
| 3883 | 3448 | ROM_RELOAD( 0x100001, 0x0080000 ) |
| 3884 | 3449 | |
| r11594 | r11595 | |
| 3892 | 3457 | ROM_START( elandore ) |
| 3893 | 3458 | STV_BIOS |
| 3894 | 3459 | |
| 3895 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3460 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3896 | 3461 | ROM_LOAD16_WORD_SWAP( "mpr21307.7", 0x0200000, 0x0200000, CRC(966ad472) SHA1(d6db41d1c40d08eb6bce8a8a2f491e7533daf670) ) // good (was .11s) |
| 3897 | 3462 | ROM_LOAD16_WORD_SWAP( "mpr21301.2", 0x0400000, 0x0400000, CRC(1a23b0a0) SHA1(f9dbc7ba96dadfb00e5827622b557080449acd83) ) // good (was .12) |
| 3898 | 3463 | ROM_LOAD16_WORD_SWAP( "mpr21302.3", 0x0800000, 0x0400000, CRC(1c91ca33) SHA1(ae11209088e3bf8fc4a92dca850d7303ce949b29) ) // good (was .13) |
| r11594 | r11595 | |
| 3906 | 3471 | ROM_START( ffreveng ) |
| 3907 | 3472 | STV_BIOS |
| 3908 | 3473 | |
| 3909 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3474 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3910 | 3475 | ROM_LOAD16_WORD_SWAP( "opr21872.7", 0x0200000, 0x0200000, CRC(32d36fee) SHA1(441c4254ef2e9301e1006d69462a850ce339314b) ) // good (was .11s) |
| 3911 | 3476 | ROM_LOAD16_WORD_SWAP( "mpr21873.2", 0x0400000, 0x0400000, CRC(dac5bd98) SHA1(6102035ce9eb2f83d7d9b20f989a151f45087c67) ) // good (was .12) |
| 3912 | 3477 | ROM_LOAD16_WORD_SWAP( "mpr21874.3", 0x0800000, 0x0400000, CRC(0a7be2f1) SHA1(e2d13f36e54d1e2cb9d584db829c04a6ff65108c) ) // good (was .13) |
| r11594 | r11595 | |
| 3920 | 3485 | ROM_START( fhboxers ) |
| 3921 | 3486 | STV_BIOS |
| 3922 | 3487 | |
| 3923 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3488 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3924 | 3489 | ROM_LOAD16_BYTE( "fr18541a.13", 0x0000001, 0x0100000, CRC(8c61a17c) SHA1(a8aef27b53482923a506f7daa4b7a38653b4d8a4) ) //(header is read from here, not ic7 even if both are populated on this board) |
| 3925 | 3490 | |
| 3926 | 3491 | ROM_LOAD16_WORD_SWAP( "mpr18538.7", 0x0200000, 0x0200000, CRC(7b5230c5) SHA1(70cebc3281580b43adf42c37318e12159c28a13d) ) // good |
| r11594 | r11595 | |
| 3941 | 3506 | ROM_START( findlove ) |
| 3942 | 3507 | STV_BIOS |
| 3943 | 3508 | |
| 3944 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3509 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3945 | 3510 | ROM_LOAD16_BYTE( "epr20424.13", 0x0000001, 0x0100000, CRC(4e61fa46) SHA1(e34624d98cbdf2dd04d997167d3c4decd2f208f7) ) //(header is read from here, not ic7 even if both are populated on this board) |
| 3946 | 3511 | |
| 3947 | 3512 | ROM_LOAD16_WORD_SWAP( "mpr20431.7", 0x0200000, 0x0200000, CRC(ea656ced) SHA1(b2d6286081bd46a89d1284a2757b87d0bca1bbde) ) // good |
| r11594 | r11595 | |
| 3964 | 3529 | ROM_START( finlarch ) |
| 3965 | 3530 | STV_BIOS |
| 3966 | 3531 | |
| 3967 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3532 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3968 | 3533 | ROM_LOAD16_BYTE( "finlarch.13", 0x0000001, 0x0100000, CRC(4505fa9e) SHA1(96c6399146cf9c8f1d27a8fb6a265f937258004a) ) |
| 3969 | 3534 | ROM_RELOAD ( 0x0100001, 0x0080000 ) |
| 3970 | 3535 | |
| r11594 | r11595 | |
| 3982 | 3547 | ROM_START( gaxeduel ) |
| 3983 | 3548 | STV_BIOS |
| 3984 | 3549 | |
| 3985 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3550 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3986 | 3551 | ROM_LOAD16_BYTE( "epr17766.13", 0x0000001, 0x0080000, CRC(a83fcd62) SHA1(4ce77ebaa0e93c6553ad8f7fb87cbdc32433402b) ) |
| 3987 | 3552 | ROM_RELOAD( 0x0100001, 0x0080000 ) |
| 3988 | 3553 | |
| r11594 | r11595 | |
| 3997 | 3562 | ROM_START( grdforce ) |
| 3998 | 3563 | STV_BIOS |
| 3999 | 3564 | |
| 4000 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3565 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4001 | 3566 | ROM_LOAD16_WORD_SWAP( "mpr20844.7", 0x0200000, 0x0200000, CRC(283e7587) SHA1(477fabc27cfe149ad17757e31f10665dcf8c0860) ) // good |
| 4002 | 3567 | ROM_LOAD16_WORD_SWAP( "mpr20839.2", 0x0400000, 0x0400000, CRC(facd4dd8) SHA1(2582894c98b31ab719f1865d4623dad6736dc877) ) // good |
| 4003 | 3568 | ROM_LOAD16_WORD_SWAP( "mpr20840.3", 0x0800000, 0x0400000, CRC(fe0158e6) SHA1(73460effe69fb8f16dd952271542b7803471a599) ) // good |
| r11594 | r11595 | |
| 4009 | 3574 | ROM_START( groovef ) |
| 4010 | 3575 | STV_BIOS |
| 4011 | 3576 | |
| 4012 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3577 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4013 | 3578 | ROM_LOAD16_WORD_SWAP( "mpr19820.7", 0x0200000, 0x0100000, CRC(e93c4513) SHA1(f9636529224880c49bd2cc5572bd5bf41dbf911a) ) // good |
| 4014 | 3579 | ROM_LOAD16_WORD_SWAP( "mpr19815.2", 0x0400000, 0x0400000, CRC(1b9b14e6) SHA1(b1828c520cb108e2927a23273ebd2939dca52304) ) // good |
| 4015 | 3580 | ROM_LOAD16_WORD_SWAP( "mpr19816.3", 0x0800000, 0x0400000, CRC(83f5731c) SHA1(2f645737f945c59a1a2fabf3b21a761be9e8c8a6) ) // good |
| r11594 | r11595 | |
| 4024 | 3589 | ROM_START( hanagumi ) |
| 4025 | 3590 | STV_BIOS |
| 4026 | 3591 | |
| 4027 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3592 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4028 | 3593 | ROM_LOAD16_WORD_SWAP( "mpr20143.7", 0x0200000, 0x0100000, CRC(7bfc38d0) SHA1(66f223e7ff2b5456a6f4185b7ab36f9cd833351a) ) // good |
| 4029 | 3594 | ROM_LOAD16_WORD_SWAP( "mpr20138.2", 0x0400000, 0x0400000, CRC(fdcf1046) SHA1(cbb1f03879833c17feffdd6f5a4fbff06e1059a2) ) // good |
| 4030 | 3595 | ROM_LOAD16_WORD_SWAP( "mpr20139.3", 0x0800000, 0x0400000, CRC(7f0140e5) SHA1(f2f7de7620d66a596d552e1af491a0592ebc4e51) ) // good |
| r11594 | r11595 | |
| 4042 | 3607 | ROM_START( introdon ) |
| 4043 | 3608 | STV_BIOS |
| 4044 | 3609 | |
| 4045 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3610 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4046 | 3611 | ROM_LOAD16_BYTE( "epr18937.13", 0x0000001, 0x0080000, CRC(1f40d766) SHA1(35d9751c1b23cfbf448f2a9e9cf3b121929368ae) ) |
| 4047 | 3612 | ROM_RELOAD( 0x0100001, 0x0080000) |
| 4048 | 3613 | |
| r11594 | r11595 | |
| 4059 | 3624 | ROM_START( kiwames ) |
| 4060 | 3625 | STV_BIOS |
| 4061 | 3626 | |
| 4062 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3627 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4063 | 3628 | ROM_LOAD16_BYTE( "epr18737.13", 0x0000001, 0x0080000, CRC(cfad6c49) SHA1(fc69980a351ed13307706db506c79c774eabeb66) ) // bad |
| 4064 | 3629 | ROM_RELOAD( 0x0100001, 0x0080000) |
| 4065 | 3630 | |
| r11594 | r11595 | |
| 4074 | 3639 | ROM_START( maruchan ) |
| 4075 | 3640 | STV_BIOS |
| 4076 | 3641 | |
| 4077 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3642 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4078 | 3643 | ROM_LOAD16_BYTE( "epr20416.13", 0x0000001, 0x0100000, CRC(8bf0176d) SHA1(5bd468e2ffed042ee84e2ceb8712ff5883a1d824) ) // bad |
| 4079 | 3644 | |
| 4080 | 3645 | ROM_LOAD16_WORD_SWAP( "mpr20417.2", 0x0400000, 0x0400000, CRC(636c2a08) SHA1(47986b71d68f6a1852e4e2b03ca7b6e48e83718b) ) // good |
| r11594 | r11595 | |
| 4091 | 3656 | ROM_START( myfairld ) |
| 4092 | 3657 | STV_BIOS |
| 4093 | 3658 | |
| 4094 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3659 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4095 | 3660 | ROM_LOAD16_WORD_SWAP( "mpr21000.7", 0x0200000, 0x0200000, CRC(2581c560) SHA1(5fb64f0e09583d50dfea7ad613d45aad30b677a5) ) // good |
| 4096 | 3661 | ROM_LOAD16_WORD_SWAP( "mpr20995.2", 0x0400000, 0x0400000, CRC(1bb73f24) SHA1(8773654810de760c5dffbb561f43e259b074a61b) ) // good |
| 4097 | 3662 | ROM_LOAD16_WORD_SWAP( "mpr20996.3", 0x0800000, 0x0400000, CRC(993c3859) SHA1(93f95e3e080a08961784482607919c1ab3eeb5e5) ) // good |
| r11594 | r11595 | |
| 4108 | 3673 | ROM_START( othellos ) |
| 4109 | 3674 | STV_BIOS |
| 4110 | 3675 | |
| 4111 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3676 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4112 | 3677 | ROM_LOAD16_WORD_SWAP( "mpr20967.7", 0x0200000, 0x0200000, CRC(efc05b97) SHA1(a533366c3aaba90dcac8f3654db9ad902efca258) ) // good |
| 4113 | 3678 | ROM_LOAD16_WORD_SWAP( "mpr20963.2", 0x0400000, 0x0400000, CRC(2cc4f141) SHA1(8bd1998aff8615b34d119fab3637a08ed6e8e1e4) ) // good |
| 4114 | 3679 | ROM_LOAD16_WORD_SWAP( "mpr20964.3", 0x0800000, 0x0400000, CRC(5f5cda94) SHA1(616be219a2512e80c875eddf05137c23aedf6f65) ) // good |
| r11594 | r11595 | |
| 4119 | 3684 | ROM_START( pblbeach ) |
| 4120 | 3685 | STV_BIOS |
| 4121 | 3686 | |
| 4122 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3687 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4123 | 3688 | ROM_LOAD16_BYTE( "epr18852.13", 0x0000001, 0x0080000, CRC(d12414ec) SHA1(0f42ec9e41983781b6892622b00398a102072aa7) ) // bad |
| 4124 | 3689 | ROM_RELOAD ( 0x0100001, 0x0080000 ) |
| 4125 | 3690 | |
| r11594 | r11595 | |
| 4132 | 3697 | ROM_START( prikura ) |
| 4133 | 3698 | STV_BIOS |
| 4134 | 3699 | |
| 4135 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3700 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4136 | 3701 | ROM_LOAD16_WORD_SWAP( "mpr19337.7", 0x0200000, 0x0200000, CRC(76f69ff3) SHA1(5af2e1eb3288d70c2a1c71d0b6370125d65c7757) ) // good |
| 4137 | 3702 | ROM_LOAD16_WORD_SWAP( "mpr19333.2", 0x0400000, 0x0400000, CRC(eb57a6a6) SHA1(cdacaa7a2fb1a343195e2ac5fd02eabf27f89ccd) ) // good |
| 4138 | 3703 | ROM_LOAD16_WORD_SWAP( "mpr19334.3", 0x0800000, 0x0400000, CRC(c9979981) SHA1(be491a4ac118d5025d6a6f2d9267a6d52f21d2b6) ) // good |
| r11594 | r11595 | |
| 4143 | 3708 | ROM_START( puyosun ) |
| 4144 | 3709 | STV_BIOS |
| 4145 | 3710 | |
| 4146 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3711 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4147 | 3712 | ROM_LOAD16_BYTE( "epr19531.13", 0x0000001, 0x0080000, CRC(ac81024f) SHA1(b22c7c1798fade7ae992ff83b138dd23e6292d3f) ) // bad |
| 4148 | 3713 | ROM_RELOAD ( 0x0100001, 0x0080000 ) |
| 4149 | 3714 | |
| r11594 | r11595 | |
| 4160 | 3725 | ROM_START( rsgun ) |
| 4161 | 3726 | STV_BIOS |
| 4162 | 3727 | |
| 4163 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3728 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4164 | 3729 | ROM_LOAD16_WORD_SWAP( "mpr20958.7", 0x0200000, 0x0200000, CRC(cbe5a449) SHA1(b4744ab71ccbadda1921ba43dd1148e57c0f84c5) ) // good (was .11s) |
| 4165 | 3730 | ROM_LOAD16_WORD_SWAP( "mpr20959.2", 0x0400000, 0x0400000, CRC(a953330b) SHA1(965274a7297cb88e281fcbdd3ec5025c6463cc7b) ) // good (was .12) |
| 4166 | 3731 | ROM_LOAD16_WORD_SWAP( "mpr20960.3", 0x0800000, 0x0400000, CRC(b5ab9053) SHA1(87c5d077eb1219c35fa65b4e11d5b62e826f5236) ) // good (was .13) |
| r11594 | r11595 | |
| 4173 | 3738 | ROM_START( sandor ) |
| 4174 | 3739 | STV_BIOS |
| 4175 | 3740 | |
| 4176 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3741 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4177 | 3742 | ROM_LOAD16_BYTE( "sando-r.13", 0x0000001, 0x0100000, CRC(fe63a239) SHA1(01502d4494f968443581cd2c74f25967d41f775e) ) |
| 4178 | 3743 | |
| 4179 | 3744 | ROM_LOAD16_WORD_SWAP( "mpr18635.8", 0x1c00000, 0x0400000, CRC(441e1368) SHA1(acb2a7e8d44c2203b8d3c7a7b70e20ffb120bebf) ) // good |
| r11594 | r11595 | |
| 4205 | 3770 | ROM_START( thunt ) |
| 4206 | 3771 | STV_BIOS |
| 4207 | 3772 | |
| 4208 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3773 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4209 | 3774 | ROM_LOAD16_BYTE( "th-ic7_2.stv", 0x0200000, 0x0080000, CRC(c4e993de) SHA1(7aa433bc2623cb19a09d4ef4c8233a2d29901020) ) |
| 4210 | 3775 | ROM_LOAD16_BYTE( "th-ic7_1.stv", 0x0200001, 0x0080000, CRC(1355cc18) SHA1(a9b731228a807b2b01f933fe0f7dcdbadaf89b7e) ) |
| 4211 | 3776 | |
| r11594 | r11595 | |
| 4218 | 3783 | ROM_START( thuntk ) |
| 4219 | 3784 | STV_BIOS |
| 4220 | 3785 | |
| 4221 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3786 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4222 | 3787 | ROM_LOAD16_BYTE( "2.ic13_2", 0x0200000, 0x0080000, CRC(6cae2926) SHA1(e8d5745b4228de24672da5017cb3dab58344f59f) ) |
| 4223 | 3788 | ROM_LOAD16_BYTE( "1.ic13_1", 0x0200001, 0x0080000, CRC(460727c8) SHA1(da7171b65734264e10692e3408ac93beb374c65e) ) |
| 4224 | 3789 | |
| r11594 | r11595 | |
| 4236 | 3801 | ROM_START( sanjeon ) |
| 4237 | 3802 | STV_BIOS |
| 4238 | 3803 | |
| 4239 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3804 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4240 | 3805 | ROM_LOAD16_BYTE( "ic11", 0x0000001, 0x0200000, CRC(9abae8d4) SHA1(ddbe4c8fff8fa59d63e278e95f245145d2da8aeb) ) |
| 4241 | 3806 | |
| 4242 | 3807 | ROM_LOAD( "ic13", 0x0400000, 0x0200000, CRC(f72c1d13) SHA1(a2b168d187034024b83fbbe2f5eec78816285da9) ) // ic2 good |
| r11594 | r11595 | |
| 4256 | 3821 | ROM_START( sasissu ) |
| 4257 | 3822 | STV_BIOS |
| 4258 | 3823 | |
| 4259 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3824 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4260 | 3825 | ROM_LOAD16_BYTE( "epr20542.13", 0x0000001, 0x0100000, CRC(0e632db5) SHA1(9bc52794892eec22d381387d13a0388042e30714) ) |
| 4261 | 3826 | |
| 4262 | 3827 | ROM_LOAD16_WORD_SWAP( "mpr20544.2", 0x0400000, 0x0400000, CRC(661fff5e) SHA1(41f4ddda7adf004b52cc9a076606a60f31947d19) ) // good |
| r11594 | r11595 | |
| 4271 | 3836 | ROM_START( seabass ) |
| 4272 | 3837 | STV_BIOS |
| 4273 | 3838 | |
| 4274 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3839 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4275 | 3840 | ROM_LOAD16_BYTE( "seabassf.13", 0x0000001, 0x0100000, CRC(6d7c39cc) SHA1(d9d1663134420b75c65ee07d7d547254785f2f83) ) |
| 4276 | 3841 | |
| 4277 | 3842 | ROM_LOAD16_WORD_SWAP( "mpr20551.2", 0x0400000, 0x0400000, CRC(9a0c6dd8) SHA1(26600372cc673ce3678945f4b5dc4e3ab31643a4) ) // good |
| r11594 | r11595 | |
| 4290 | 3855 | ROM_START( shanhigw ) |
| 4291 | 3856 | STV_BIOS |
| 4292 | 3857 | |
| 4293 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3858 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4294 | 3859 | ROM_LOAD16_WORD_SWAP( "mpr18341.7", 0x0200000, 0x0200000, CRC(cc5e8646) SHA1(a733616c118140ff3887d30d595533f9a1beae06) ) // good |
| 4295 | 3860 | ROM_LOAD16_WORD_SWAP( "mpr18340.2", 0x0400000, 0x0200000, CRC(8db23212) SHA1(85d604a5c6ab97188716dbcd77d365af12a238fe) ) // good |
| 4296 | 3861 | ROM_END |
| r11594 | r11595 | |
| 4298 | 3863 | ROM_START( shienryu ) |
| 4299 | 3864 | STV_BIOS |
| 4300 | 3865 | |
| 4301 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3866 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4302 | 3867 | ROM_LOAD16_WORD_SWAP( "mpr19631.7", 0x0200000, 0x0200000, CRC(3a4b1abc) SHA1(3b14b7fdebd4817da32ea374c15a38c695ffeff1) ) // good |
| 4303 | 3868 | ROM_LOAD16_WORD_SWAP( "mpr19632.2", 0x0400000, 0x0400000, CRC(985fae46) SHA1(f953bde91805b97b60d2ab9270f9d2933e064d95) ) // good |
| 4304 | 3869 | ROM_LOAD16_WORD_SWAP( "mpr19633.3", 0x0800000, 0x0400000, CRC(e2f0b037) SHA1(97861d09e10ce5d2b10bf5559574b3f489e28077) ) // good |
| r11594 | r11595 | |
| 4311 | 3876 | STV_BIOS |
| 4312 | 3877 | ROM_DEFAULT_BIOS( "us" ) |
| 4313 | 3878 | |
| 4314 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3879 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4315 | 3880 | ROM_LOAD16_BYTE( "epr18777.13", 0x0000001, 0x0080000, CRC(8d180866) SHA1(d47ebabab6e06400312d39f68cd818852e496b96) ) |
| 4316 | 3881 | ROM_RELOAD ( 0x0100001, 0x0080000 ) |
| 4317 | 3882 | |
| r11594 | r11595 | |
| 4325 | 3890 | ROM_START( sokyugrt ) |
| 4326 | 3891 | STV_BIOS |
| 4327 | 3892 | |
| 4328 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3893 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4329 | 3894 | ROM_LOAD16_BYTE( "fpr19188.13", 0x0000001, 0x0100000, CRC(45a27e32) SHA1(96e1bab8bdadf7071afac2a0a6dd8fd8989f12a6) ) |
| 4330 | 3895 | |
| 4331 | 3896 | ROM_LOAD16_WORD_SWAP( "mpr19189.2", 0x0400000, 0x0400000, CRC(0b202a3e) SHA1(6691b5af2cacd6092ec03886b78c2565953fa297) ) // good |
| r11594 | r11595 | |
| 4338 | 3903 | ROM_START( sss ) |
| 4339 | 3904 | STV_BIOS |
| 4340 | 3905 | |
| 4341 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3906 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4342 | 3907 | ROM_LOAD16_BYTE( "epr21488.13", 0x0000001, 0x0080000, CRC(71c9def1) SHA1(a544a0b4046307172d2c1bf426ed24845f87d894) ) |
| 4343 | 3908 | ROM_RELOAD ( 0x0100001, 0x0080000 ) |
| 4344 | 3909 | |
| r11594 | r11595 | |
| 4355 | 3920 | ROM_START( suikoenb ) |
| 4356 | 3921 | STV_BIOS |
| 4357 | 3922 | |
| 4358 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3923 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4359 | 3924 | ROM_LOAD16_BYTE( "fpr17834.13", 0x0000001, 0x0100000, CRC(746ef686) SHA1(e31c317991a687662a8a2a45aed411001e5f1941) ) |
| 4360 | 3925 | |
| 4361 | 3926 | ROM_LOAD16_WORD_SWAP( "mpr17836.2", 0x0400000, 0x0400000, CRC(55e9642d) SHA1(5198291cd1dce0398eb47760db2c19eae99273b0) ) // good |
| r11594 | r11595 | |
| 4371 | 3936 | ROM_START( twcup98 ) |
| 4372 | 3937 | STV_BIOS |
| 4373 | 3938 | |
| 4374 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3939 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4375 | 3940 | ROM_LOAD16_BYTE( "epr20819.13", 0x0000001, 0x0100000, CRC(d930dfc8) SHA1(f66cc955181720661a0334fe67fa5750ddf9758b) ) |
| 4376 | 3941 | |
| 4377 | 3942 | ROM_LOAD16_WORD_SWAP( "mpr20821.2", 0x0400000, 0x0400000, CRC(2d930d23) SHA1(5fcaf4257f3639cb3aa407d2936f616499a09d97) ) // ic2 good (was .12) |
| r11594 | r11595 | |
| 4383 | 3948 | ROM_START( vfkids ) |
| 4384 | 3949 | STV_BIOS |
| 4385 | 3950 | |
| 4386 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3951 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4387 | 3952 | ROM_LOAD16_BYTE( "fpr18914.13", 0x0000001, 0x0100000, CRC(cd35730a) SHA1(645b52b449766beb740ab8f99957f8f431351ceb) ) |
| 4388 | 3953 | |
| 4389 | 3954 | ROM_LOAD16_WORD_SWAP( "mpr18916.4", 0x0c00000, 0x0400000, CRC(4aae3ddb) SHA1(b75479e73f1bce3f0c27fbd90820fa51eb1914a6) ) // good |
| r11594 | r11595 | |
| 4400 | 3965 | ROM_START( vfremix ) |
| 4401 | 3966 | STV_BIOS |
| 4402 | 3967 | |
| 4403 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3968 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4404 | 3969 | ROM_LOAD16_BYTE( "epr17944.13", 0x0000001, 0x0100000, CRC(a5bdc560) SHA1(d3830480a611b7d88760c672ce46a2ea74076487) ) |
| 4405 | 3970 | |
| 4406 | 3971 | ROM_LOAD16_WORD_SWAP( "mpr17946.2", 0x0400000, 0x0400000, CRC(4cb245f7) SHA1(363d9936b27043b5858c956a45736ac05aefc54e) ) // good |
| r11594 | r11595 | |
| 4415 | 3980 | ROM_START( vmahjong ) |
| 4416 | 3981 | STV_BIOS |
| 4417 | 3982 | |
| 4418 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 3983 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4419 | 3984 | ROM_LOAD16_WORD_SWAP( "mpr19620.7", 0x0200000, 0x0200000, CRC(c98de7e5) SHA1(5346f884793bcb080aa01967e91b54ced4a9802f) ) // good |
| 4420 | 3985 | ROM_LOAD16_WORD_SWAP( "mpr19615.2", 0x0400000, 0x0400000, CRC(c62896da) SHA1(52a5b10ca8af31295d2d700349eca038c418b522) ) // good |
| 4421 | 3986 | ROM_LOAD16_WORD_SWAP( "mpr19616.3", 0x0800000, 0x0400000, CRC(f62207c7) SHA1(87e60183365c6f7e62c7a0667f88df0c7f5457fd) ) // good |
| r11594 | r11595 | |
| 4432 | 3997 | ROM_START( winterht ) |
| 4433 | 3998 | STV_BIOS |
| 4434 | 3999 | |
| 4435 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4000 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4436 | 4001 | ROM_LOAD16_BYTE( "fpr20108.13", 0x0000001, 0x0100000, CRC(1ef9ced0) SHA1(abc90ce341cd17bb77349d611d6879389611f0bf) ) // bad |
| 4437 | 4002 | |
| 4438 | 4003 | ROM_LOAD16_WORD_SWAP( "mpr20110.2", 0x0400000, 0x0400000, CRC(238ef832) SHA1(20fade5730ff8e249a1450c41bfdff6e133f4768) ) // good |
| r11594 | r11595 | |
| 4447 | 4012 | ROM_START( znpwfv ) |
| 4448 | 4013 | STV_BIOS |
| 4449 | 4014 | |
| 4450 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4015 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4451 | 4016 | ROM_LOAD16_BYTE( "epr20398.13", 0x0000001, 0x0100000, CRC(3fb56a0b) SHA1(13c2fa2d94b106d39e46f71d15fbce3607a5965a) ) // bad |
| 4452 | 4017 | |
| 4453 | 4018 | ROM_LOAD16_WORD_SWAP( "mpr20400.2", 0x0400000, 0x0400000, CRC(1edfbe05) SHA1(b0edd3f3d57408101ae6eb0aec742afbb4d289ca) ) // good |
| r11594 | r11595 | |
| 4464 | 4029 | ROM_START( danchih ) |
| 4465 | 4030 | STV_BIOS |
| 4466 | 4031 | |
| 4467 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4032 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4468 | 4033 | ROM_LOAD16_WORD_SWAP( "mpr21974.7", 0x0200000, 0x0200000, CRC(e7472793) SHA1(11b7b11cf492eb9cf69b50e7cfac46a5b86849ac) )// good |
| 4469 | 4034 | ROM_LOAD16_WORD_SWAP( "mpr21970.2", 0x0400000, 0x0400000, CRC(34dd7f4d) SHA1(d5c45da94ec5b6584049caf09516f1ad4ba3adb5) )// good |
| 4470 | 4035 | ROM_LOAD16_WORD_SWAP( "mpr21971.3", 0x0800000, 0x0400000, CRC(8995158c) SHA1(fbbd171d67eebf43630d6054bc1b9132f6b38183) )// good |
| r11594 | r11595 | |
| 4475 | 4040 | ROM_START( danchiq ) |
| 4476 | 4041 | STV_BIOS |
| 4477 | 4042 | |
| 4478 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4043 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4479 | 4044 | ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(e216bfc8) SHA1(7a08fa32281e272dbf5e7daea50a1800cc225c1b) )//ic 7 |
| 4480 | 4045 | ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(b95aa5ac) SHA1(2766c5414643034a0f6d746050557516bd3753df) )//ic 2 |
| 4481 | 4046 | ROM_LOAD16_WORD_SWAP( "ic26", 0x0600000, 0x0200000, CRC(df6ebd48) SHA1(fcccafbee1b8b952b07ed0e7e86219eed9cf4a93) ) |
| r11594 | r11595 | |
| 4491 | 4056 | ROM_START( mausuke ) |
| 4492 | 4057 | STV_BIOS |
| 4493 | 4058 | |
| 4494 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4059 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4495 | 4060 | ROM_LOAD16_BYTE( "ic13.bin", 0x0000001, 0x0100000, CRC(b456f4cd) SHA1(91cbe703ec7c1dd45eb3b05bdfeb06e3570599d1) ) |
| 4496 | 4061 | ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 ) // needs the rom mapped here to appear 'normal' |
| 4497 | 4062 | ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 ) |
| r11594 | r11595 | |
| 4509 | 4074 | ROM_START( batmanfr ) |
| 4510 | 4075 | STV_BIOS |
| 4511 | 4076 | |
| 4512 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4077 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4513 | 4078 | /* Many thanks to Runik to point this out*/ |
| 4514 | 4079 | ROM_LOAD16_BYTE( "350-mpa1.u19", 0x0000000, 0x0100000, CRC(2a5a8c3a) SHA1(374ec55a39ea909cc672e4a629422681d1f2da05) ) |
| 4515 | 4080 | ROM_RELOAD( 0x0200000, 0x0100000 ) |
| r11594 | r11595 | |
| 4554 | 4119 | STV_BIOS |
| 4555 | 4120 | ROM_DEFAULT_BIOS( "euro" ) |
| 4556 | 4121 | |
| 4557 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4122 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4558 | 4123 | ROM_LOAD16_BYTE( "epr-18821.ic13", 0x0000001, 0x0080000, CRC(9a6658e2) SHA1(16dbae3d9ab584713afcb403f89fe71049609245) ) |
| 4559 | 4124 | ROM_RELOAD ( 0x0100001, 0x0080000 ) |
| 4560 | 4125 | |
| r11594 | r11595 | |
| 4579 | 4144 | ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */ |
| 4580 | 4145 | ROM_COPY( "maincpu",0,0,0x080000) |
| 4581 | 4146 | |
| 4582 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4147 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4583 | 4148 | ROM_LOAD( "epr18427.bin", 0x0000000, 0x0100000, CRC(3f25bec8) SHA1(43a5342b882d5aec0f35a8777cb475659f43b1c4) ) |
| 4584 | 4149 | ROM_LOAD16_WORD_SWAP( "mpr18273.ic2", 0x0400000, 0x0200000, NO_DUMP ) |
| 4585 | 4150 | ROM_LOAD16_WORD_SWAP( "mpr18274.ic3", 0x0800000, 0x0200000, NO_DUMP ) |
| r11594 | r11595 | |
| 4597 | 4162 | ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */ |
| 4598 | 4163 | ROM_COPY( "maincpu",0,0,0x080000) |
| 4599 | 4164 | |
| 4600 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4165 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4601 | 4166 | ROM_LOAD16_BYTE( "epr18344.a", 0x0000001, 0x0100000, CRC(5a7de018) SHA1(88e0c2a9a9d4ebf699878c0aa9737af85f95ccf8) ) |
| 4602 | 4167 | |
| 4603 | 4168 | ROM_LOAD16_WORD_SWAP( "mpr18273.ic2", 0x0400000, 0x0200000, NO_DUMP ) |
| r11594 | r11595 | |
| 4611 | 4176 | ROM_START( magzun ) |
| 4612 | 4177 | STV_BIOS |
| 4613 | 4178 | |
| 4614 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4179 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4615 | 4180 | ROM_LOAD16_BYTE( "flash.ic13", 0x0000001, 0x0100000, CRC(e6f0aca0) SHA1(251d4d9c5a332d13af3a144c5eb9d8e7836bdd1b) ) // good |
| 4616 | 4181 | |
| 4617 | 4182 | ROM_LOAD16_WORD_SWAP( "mpr-19354.ic2", 0x0400000, 0x0400000, CRC(a23822e7) SHA1(10ca5d39dcaaf35b80168a08d8a18d77fba1d2ce) ) // good |
| r11594 | r11595 | |
| 4629 | 4194 | ROM_START( stress ) |
| 4630 | 4195 | STV_BIOS |
| 4631 | 4196 | |
| 4632 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4197 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4633 | 4198 | ROM_LOAD16_BYTE( "epr-21300a.ic13", 0x0000001, 0x0100000, CRC(899d829e) SHA1(b6c6da92dc108353998b29c0659d288645541519) ) // good |
| 4634 | 4199 | |
| 4635 | 4200 | ROM_LOAD16_WORD_SWAP( "mpr-21290.ic2", 0x0400000, 0x0400000, CRC(a49d29f3) SHA1(8f6c26fd9e94a9e03dd0029026d205cf481fe151) ) // good |
| r11594 | r11595 | |
| 4648 | 4213 | ROM_START( nclubv3 ) |
| 4649 | 4214 | STV_BIOS |
| 4650 | 4215 | |
| 4651 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4216 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4652 | 4217 | |
| 4653 | 4218 | ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(b4008ed0) SHA1(acb3784acad971eb5f4920760dc23a16330e7bad) ) // OK |
| 4654 | 4219 | ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(4e894850) SHA1(eb7c3399505a45816701197a45062b9f34e5a3e1) ) // OK |
| r11594 | r11595 | |
| 4668 | 4233 | ROM_START( techbowl ) // set to 1p |
| 4669 | 4234 | STV_BIOS |
| 4670 | 4235 | |
| 4671 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4236 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4672 | 4237 | |
| 4673 | 4238 | ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(5058db21) SHA1(eec908bbfb9ec0fdca0002e69f32c1c030086456) ) // OK |
| 4674 | 4239 | ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(34090f6d) SHA1(b8bc344ab826d5c9584afb01dba1c720b8dbc74d) ) // OK |
| r11594 | r11595 | |
| 4683 | 4248 | ROM_START( micrombc ) // set to 1p |
| 4684 | 4249 | STV_BIOS |
| 4685 | 4250 | |
| 4686 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4251 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4687 | 4252 | |
| 4688 | 4253 | ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(8385bc45) SHA1(0bd60d7560cb2313d68470d0572850a7b8c501fd) ) // OK |
| 4689 | 4254 | ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(84ecb42f) SHA1(005dee9a0912d4b1b7f5157bc3cde96548c1e348) ) // OK |
| r11594 | r11595 | |
| 4702 | 4267 | STV_BIOS |
| 4703 | 4268 | ROM_DEFAULT_BIOS( "us" ) |
| 4704 | 4269 | |
| 4705 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4270 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4706 | 4271 | |
| 4707 | 4272 | ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(d2ceade7) SHA1(a4300322e582f403d9207290f3900e1a72fcb9b9) ) // OK |
| 4708 | 4273 | ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(0e968c2d) SHA1(fbcc7533fcb6b87cd8255fc2d307ae618301ea64) ) // OK |
| r11594 | r11595 | |
| 4718 | 4283 | STV_BIOS |
| 4719 | 4284 | ROM_DEFAULT_BIOS( "us" ) |
| 4720 | 4285 | |
| 4721 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4286 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4722 | 4287 | |
| 4723 | 4288 | ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, BAD_DUMP CRC(f88347aa) SHA1(3e9ca105edbd6ce11ea4194eb1733785e87f92b2) ) // BAD |
| 4724 | 4289 | ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(b5871198) SHA1(10d187eebcca5d70c5ae10d1a144685a96491126) ) // OK |
| r11594 | r11595 | |
| 4734 | 4299 | STV_BIOS |
| 4735 | 4300 | ROM_DEFAULT_BIOS( "us" ) |
| 4736 | 4301 | |
| 4737 | | ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4302 | ROM_REGION32_BE( 0x3000000, "game0", ROMREGION_ERASE00 ) /* SH2 code */ |
| 4738 | 4303 | |
| 4739 | 4304 | ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(48ab8371) SHA1(1c2124afad6bc1f4de2619e6b915f78e91addf05) ) // OK |
| 4740 | 4305 | ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(9915faea) SHA1(b96f64a8cbb1b9496bb566d0469975fddb4fbe98) ) // OK |
| r11594 | r11595 | |
| 4769 | 4334 | |
| 4770 | 4335 | static DRIVER_INIT( sanjeon ) |
| 4771 | 4336 | { |
| 4772 | | UINT8 *src = machine.region ( "user1" )->base(); |
| 4337 | UINT8 *src = machine.region ( "game0" )->base(); |
| 4773 | 4338 | int x; |
| 4774 | 4339 | |
| 4775 | 4340 | for (x=0;x<0x3000000;x++) |
| r11594 | r11595 | |
| 4797 | 4362 | CONS( 1995, vsaturn, saturn, 0, saturn, saturn, saturnjp, "JVC", "V-Saturn", GAME_NOT_WORKING ) |
| 4798 | 4363 | CONS( 1995, hisaturn, saturn, 0, saturn, saturn, saturnjp, "Hitachi", "HiSaturn", GAME_NOT_WORKING ) |
| 4799 | 4364 | |
| 4800 | | GAME( 1996, stvbios, 0, stv, stv, stv, ROT0, "Sega", "ST-V Bios", GAME_IS_BIOS_ROOT ) |
| 4365 | GAME( 1996, stvbios, 0, stv_slot, stv, stv, ROT0, "Sega", "ST-V Bios", GAME_IS_BIOS_ROOT ) |
| 4801 | 4366 | |
| 4802 | 4367 | //GAME YEAR, NAME, PARENT, MACH, INP, INIT, MONITOR |
| 4803 | 4368 | /* Playable */ |
| 4804 | | GAME( 1998, astrass, stvbios, stv, stv, astrass, ROT0, "Sunsoft", "Astra SuperStars (J 980514 V1.002)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4805 | | GAME( 1995, bakubaku, stvbios, stv, stv, stv, ROT0, "Sega", "Baku Baku Animal (J 950407 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4806 | | GAME( 1996, batmanfr, stvbios, stv, batmanfr, batmanfr, ROT0, "Acclaim", "Batman Forever (JUE 960507 V1.000)", GAME_NO_SOUND ) |
| 4807 | | GAME( 1996, colmns97, stvbios, stv, stv, colmns97, ROT0, "Sega", "Columns '97 (JET 961209 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4808 | | GAME( 1997, cotton2, stvbios, stv, stv, cotton2, ROT0, "Success", "Cotton 2 (JUET 970902 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4809 | | GAME( 1998, cottonbm, stvbios, stv, stv, cottonbm, ROT0, "Success", "Cotton Boomerang (JUET 980709 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4810 | | GAME( 1995, critcrsh, stvbios, stv, critcrsh, stv, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4811 | | GAME( 1999, danchih, stvbios, stv, stvmp, danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4812 | | GAME( 2000, danchiq, stvbios, stv, stv, danchih, ROT0, "Altron", "Danchi de Quiz Okusan Yontaku Desuyo! (J 001128 V1.200)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4813 | | GAME( 1996, diehard, stvbios, stv, stv, diehard, ROT0, "Sega", "Die Hard Arcade (UET 960515 V1.000)", GAME_IMPERFECT_SOUND ) |
| 4814 | | GAME( 1996, dnmtdeka, diehard, stv, stv, dnmtdeka, ROT0, "Sega", "Dynamite Deka (J 960515 V1.000)", GAME_IMPERFECT_SOUND ) |
| 4815 | | GAME( 1995, ejihon, stvbios, stv, stv, stv, ROT0, "Sega", "Ejihon Tantei Jimusyo (J 950613 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4816 | | GAME( 1995, fhboxers, stvbios, stv, stv, fhboxers, ROT0, "Sega", "Funky Head Boxers (JUETBKAL 951218 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4817 | | GAME( 1994, gaxeduel, stvbios, stv, stv, gaxeduel, ROT0, "Sega", "Golden Axe - The Duel (JUETL 950117 V1.000)", GAME_IMPERFECT_SOUND ) |
| 4818 | | GAME( 1998, grdforce, stvbios, stv, stv, grdforce, ROT0, "Success", "Guardian Force (JUET 980318 V0.105)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4819 | | GAME( 1998, groovef, stvbios, stv, stv, groovef, ROT0, "Atlus", "Groove on Fight - Gouketsuji Ichizoku 3 (J 970416 V1.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4820 | | GAME( 1997, hanagumi, stvbios, stv, stv, hanagumi, ROT0, "Sega", "Hanagumi Taisen Columns - Sakura Wars (J 971007 V1.010)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4821 | | GAME( 1996, introdon, stvbios, stv, stv, stv, ROT0, "Sunsoft / Success", "Karaoke Quiz Intro Don Don! (J 960213 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4822 | | GAME( 1995, kiwames, stvbios, stv, stvmp, stv, ROT0, "Athena", "Pro Mahjong Kiwame S (J 951020 V1.208)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4823 | | GAME( 1997, maruchan, stvbios, stv, stv, maruchan, ROT0, "Sega / Toyosuisan", "Maru-Chan de Goo! (J 971216 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4824 | | GAME( 1996, mausuke, stvbios, stv, stv, mausuke, ROT0, "Data East", "Mausuke no Ojama the World (J 960314 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4825 | | GAME( 1998, myfairld, stvbios, stv, stvmp, stv, ROT0, "Micronet", "Virtual Mahjong 2 - My Fair Lady (J 980608 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4826 | | GAME( 1998, othellos, stvbios, stv, stv, othellos, ROT0, "Success", "Othello Shiyouyo (J 980423 V1.002)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4827 | | GAME( 1995, pblbeach, stvbios, stv, stv, pblbeach, ROT0, "T&E Soft", "Pebble Beach - The Great Shot (JUE 950913 V0.990)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4828 | | GAME( 1996, prikura, stvbios, stv, stv, prikura, ROT0, "Atlus", "Princess Clara Daisakusen (J 960910 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4829 | | GAME( 1996, puyosun, stvbios, stv, stv, puyosun, ROT0, "Compile", "Puyo Puyo Sun (J 961115 V0.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4830 | | GAME( 1998, rsgun, stvbios, stv, stv, rsgun, ROT0, "Treasure", "Radiant Silvergun (JUET 980523 V1.000)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4831 | | GAME( 1998, sasissu, stvbios, stv, stv, sasissu, ROT0, "Sega", "Taisen Tanto-R Sashissu!! (J 980216 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4832 | | GAME( 1999, sanjeon, sasissu, stv, stv, sanjeon, ROT0, "Sega / Deniam", "DaeJeon! SanJeon SuJeon (AJTUE 990412 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4833 | | GAME( 1997, seabass, stvbios, stv, stv, seabass, ROT0, "A wave inc. (Able license)", "Sea Bass Fishing (JUET 971110 V0.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4834 | | GAME( 1995, shanhigw, stvbios, stv, stv, shanhigw, ROT0, "Sunsoft / Activision", "Shanghai - The Great Wall / Shanghai Triple Threat (JUE 950623 V1.005)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4835 | | GAME( 1997, shienryu, stvbios, stv, stv, shienryu, ROT270, "Warashi", "Shienryu (JUET 961226 V1.000)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4836 | | GAME( 1998, sss, stvbios, stv, stv, sss, ROT0, "Capcom / Cave / Victor", "Steep Slope Sliders (JUET 981110 V1.000)", GAME_IMPERFECT_SOUND ) |
| 4837 | | GAME( 1995, sandor, stvbios, stv, stv, sandor, ROT0, "Sega", "Puzzle & Action: Sando-R (J 951114 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4838 | | GAME( 1997, thunt, sandor, stv, stv, thunt, ROT0, "Sega", "Puzzle & Action: Treasure Hunt (JUET 970901 V2.00E)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4839 | | GAME( 1997, thuntk, sandor, stv, stv, sandor, ROT0, "Sega / Deniam", "Puzzle & Action: BoMulEul Chajara (JUET 970125 V2.00K)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4840 | | GAME( 1996, sokyugrt, stvbios, stv, stv, sokyugrt, ROT0, "Raizing / Eighting", "Soukyugurentai / Terra Diver (JUET 960821 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4841 | | GAME( 1995, suikoenb, stvbios, stv, stv, suikoenb, ROT0, "Data East", "Suikoenbu / Outlaws of the Lost Dynasty (JUETL 950314 V2.001)", GAME_IMPERFECT_SOUND ) |
| 4842 | | GAME( 1996, vfkids, stvbios, stv, stv, stv, ROT0, "Sega", "Virtua Fighter Kids (JUET 960319 V0.000)", GAME_IMPERFECT_SOUND ) |
| 4843 | | GAME( 1997, winterht, stvbios, stv, stv, winterht, ROT0, "Sega", "Winter Heat (JUET 971012 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4844 | | GAME( 1997, znpwfv, stvbios, stv, stv, znpwfv, ROT0, "Sega", "Zen Nippon Pro-Wrestling Featuring Virtua (J 971123 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4369 | GAME( 1998, astrass, stvbios, stv, stv, astrass, ROT0, "Sunsoft", "Astra SuperStars (J 980514 V1.002)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4370 | GAME( 1995, bakubaku, stvbios, stv, stv, stv, ROT0, "Sega", "Baku Baku Animal (J 950407 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4371 | GAME( 1996, batmanfr, stvbios, stv, batmanfr, batmanfr, ROT0, "Acclaim", "Batman Forever (JUE 960507 V1.000)", GAME_NO_SOUND ) |
| 4372 | GAME( 1996, colmns97, stvbios, stv, stv, colmns97, ROT0, "Sega", "Columns '97 (JET 961209 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4373 | GAME( 1997, cotton2, stvbios, stv, stv, cotton2, ROT0, "Success", "Cotton 2 (JUET 970902 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4374 | GAME( 1998, cottonbm, stvbios, stv, stv, cottonbm, ROT0, "Success", "Cotton Boomerang (JUET 980709 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4375 | GAME( 1995, critcrsh, stvbios, stv, critcrsh, stv, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4376 | GAME( 1999, danchih, stvbios, stv, stvmp, danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4377 | GAME( 2000, danchiq, stvbios, stv, stv, danchih, ROT0, "Altron", "Danchi de Quiz Okusan Yontaku Desuyo! (J 001128 V1.200)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4378 | GAME( 1996, diehard, stvbios, stv, stv, diehard, ROT0, "Sega", "Die Hard Arcade (UET 960515 V1.000)", GAME_IMPERFECT_SOUND ) |
| 4379 | GAME( 1996, dnmtdeka, diehard, stv, stv, dnmtdeka, ROT0, "Sega", "Dynamite Deka (J 960515 V1.000)", GAME_IMPERFECT_SOUND ) |
| 4380 | GAME( 1995, ejihon, stvbios, stv, stv, stv, ROT0, "Sega", "Ejihon Tantei Jimusyo (J 950613 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4381 | GAME( 1995, fhboxers, stvbios, stv, stv, fhboxers, ROT0, "Sega", "Funky Head Boxers (JUETBKAL 951218 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4382 | GAME( 1994, gaxeduel, stvbios, stv, stv, gaxeduel, ROT0, "Sega", "Golden Axe - The Duel (JUETL 950117 V1.000)", GAME_IMPERFECT_SOUND ) |
| 4383 | GAME( 1998, grdforce, stvbios, stv, stv, grdforce, ROT0, "Success", "Guardian Force (JUET 980318 V0.105)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4384 | GAME( 1998, groovef, stvbios, stv, stv, groovef, ROT0, "Atlus", "Groove on Fight - Gouketsuji Ichizoku 3 (J 970416 V1.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4385 | GAME( 1997, hanagumi, stvbios, stv, stv, hanagumi, ROT0, "Sega", "Hanagumi Taisen Columns - Sakura Wars (J 971007 V1.010)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4386 | GAME( 1996, introdon, stvbios, stv, stv, stv, ROT0, "Sunsoft / Success", "Karaoke Quiz Intro Don Don! (J 960213 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4387 | GAME( 1995, kiwames, stvbios, stv, stvmp, stv, ROT0, "Athena", "Pro Mahjong Kiwame S (J 951020 V1.208)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4388 | GAME( 1997, maruchan, stvbios, stv, stv, maruchan, ROT0, "Sega / Toyosuisan", "Maru-Chan de Goo! (J 971216 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4389 | GAME( 1996, mausuke, stvbios, stv, stv, mausuke, ROT0, "Data East", "Mausuke no Ojama the World (J 960314 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4390 | GAME( 1998, myfairld, stvbios, stv, stvmp, stv, ROT0, "Micronet", "Virtual Mahjong 2 - My Fair Lady (J 980608 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4391 | GAME( 1998, othellos, stvbios, stv, stv, othellos, ROT0, "Success", "Othello Shiyouyo (J 980423 V1.002)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4392 | GAME( 1995, pblbeach, stvbios, stv, stv, pblbeach, ROT0, "T&E Soft", "Pebble Beach - The Great Shot (JUE 950913 V0.990)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4393 | GAME( 1996, prikura, stvbios, stv, stv, prikura, ROT0, "Atlus", "Princess Clara Daisakusen (J 960910 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4394 | GAME( 1996, puyosun, stvbios, stv, stv, puyosun, ROT0, "Compile", "Puyo Puyo Sun (J 961115 V0.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4395 | GAME( 1998, rsgun, stvbios, stv, stv, rsgun, ROT0, "Treasure", "Radiant Silvergun (JUET 980523 V1.000)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4396 | GAME( 1998, sasissu, stvbios, stv, stv, sasissu, ROT0, "Sega", "Taisen Tanto-R Sashissu!! (J 980216 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4397 | GAME( 1999, sanjeon, sasissu, stv, stv, sanjeon, ROT0, "Sega / Deniam", "DaeJeon! SanJeon SuJeon (AJTUE 990412 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4398 | GAME( 1997, seabass, stvbios, stv, stv, seabass, ROT0, "A wave inc. (Able license)", "Sea Bass Fishing (JUET 971110 V0.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4399 | GAME( 1995, shanhigw, stvbios, stv, stv, shanhigw, ROT0, "Sunsoft / Activision", "Shanghai - The Great Wall / Shanghai Triple Threat (JUE 950623 V1.005)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4400 | GAME( 1997, shienryu, stvbios, stv, stv, shienryu, ROT270, "Warashi", "Shienryu (JUET 961226 V1.000)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4401 | GAME( 1998, sss, stvbios, stv, stv, sss, ROT0, "Capcom / Cave / Victor", "Steep Slope Sliders (JUET 981110 V1.000)", GAME_IMPERFECT_SOUND ) |
| 4402 | GAME( 1995, sandor, stvbios, stv, stv, sandor, ROT0, "Sega", "Puzzle & Action: Sando-R (J 951114 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4403 | GAME( 1997, thunt, sandor, stv, stv, thunt, ROT0, "Sega", "Puzzle & Action: Treasure Hunt (JUET 970901 V2.00E)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4404 | GAME( 1997, thuntk, sandor, stv, stv, sandor, ROT0, "Sega / Deniam", "Puzzle & Action: BoMulEul Chajara (JUET 970125 V2.00K)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4405 | GAME( 1996, sokyugrt, stvbios, stv, stv, sokyugrt, ROT0, "Raizing / Eighting", "Soukyugurentai / Terra Diver (JUET 960821 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4406 | GAME( 1995, suikoenb, stvbios, stv, stv, suikoenb, ROT0, "Data East", "Suikoenbu / Outlaws of the Lost Dynasty (JUETL 950314 V2.001)", GAME_IMPERFECT_SOUND ) |
| 4407 | GAME( 1996, vfkids, stvbios, stv, stv, stv, ROT0, "Sega", "Virtua Fighter Kids (JUET 960319 V0.000)", GAME_IMPERFECT_SOUND ) |
| 4408 | GAME( 1997, winterht, stvbios, stv, stv, winterht, ROT0, "Sega", "Winter Heat (JUET 971012 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4409 | GAME( 1997, znpwfv, stvbios, stv, stv, znpwfv, ROT0, "Sega", "Zen Nippon Pro-Wrestling Featuring Virtua (J 971123 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4845 | 4410 | |
| 4846 | 4411 | /* Almost */ |
| 4847 | | GAME( 1997, vmahjong, stvbios, stv, stvmp, stv, ROT0, "Micronet", "Virtual Mahjong (J 961214 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4848 | | GAME( 1998, twcup98, stvbios, stv, stv, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // player movement |
| 4849 | | GAME( 1995, smleague, stvbios, stv, stv, smleague, ROT0, "Sega", "Super Major League (U 960108 V1.000)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4850 | | GAME( 1995, finlarch, smleague,stv, stv, finlarch, ROT0, "Sega", "Final Arch (J 950714 V1.001)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4851 | | GAME( 1998, elandore, stvbios, stv, stv, elandore, ROT0, "Sai-Mate", "Touryuu Densetsu Elan-Doree / Elan Doree - Legend of Dragoon (JUET 980922 V1.006)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4412 | GAME( 1997, vmahjong, stvbios, stv, stvmp, stv, ROT0, "Micronet", "Virtual Mahjong (J 961214 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4413 | GAME( 1998, twcup98, stvbios, stv, stv, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // player movement |
| 4414 | GAME( 1995, smleague, stvbios, stv, stv, smleague, ROT0, "Sega", "Super Major League (U 960108 V1.000)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4415 | GAME( 1995, finlarch, smleague,stv, stv, finlarch, ROT0, "Sega", "Final Arch (J 950714 V1.001)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4416 | GAME( 1998, elandore, stvbios, stv, stv, elandore, ROT0, "Sai-Mate", "Touryuu Densetsu Elan-Doree / Elan Doree - Legend of Dragoon (JUET 980922 V1.006)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) |
| 4852 | 4417 | |
| 4853 | 4418 | /* Unemulated printer device */ |
| 4854 | | GAME( 1998, stress, stvbios, stv, stv, stv, ROT0, "Sega", "Stress Busters (J 981020 V1.000)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4855 | | GAME( 1997, nclubv3, stvbios, stv, stv, nameclv3, ROT0, "Sega", "Name Club Ver.3 (J 970723 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 4856 | | GAME( 1997, pclub2, stvbios, stv, stv, stv, ROT0, "Atlus", "Print Club 2 (U 970921 V1.000)", GAME_NOT_WORKING ) |
| 4857 | | GAME( 1999, pclub2v3, pclub2, stv, stv, stv, ROT0, "Atlus", "Print Club 2 Vol. 3 (U 990310 V1.000)", GAME_NOT_WORKING ) |
| 4858 | | GAME( 1999, pclubpok, stvbios, stv, stv, stv, ROT0, "Atlus", "Print Club Pokemon B (U 991126 V1.000)", GAME_NOT_WORKING ) |
| 4419 | GAME( 1998, stress, stvbios, stv, stv, stv, ROT0, "Sega", "Stress Busters (J 981020 V1.000)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) |
| 4420 | GAME( 1997, nclubv3, stvbios, stv, stv, nameclv3, ROT0, "Sega", "Name Club Ver.3 (J 970723 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 4421 | GAME( 1997, pclub2, stvbios, stv, stv, stv, ROT0, "Atlus", "Print Club 2 (U 970921 V1.000)", GAME_NOT_WORKING ) |
| 4422 | GAME( 1999, pclub2v3, pclub2, stv, stv, stv, ROT0, "Atlus", "Print Club 2 Vol. 3 (U 990310 V1.000)", GAME_NOT_WORKING ) |
| 4423 | GAME( 1999, pclubpok, stvbios, stv, stv, stv, ROT0, "Atlus", "Print Club Pokemon B (U 991126 V1.000)", GAME_NOT_WORKING ) |
| 4859 | 4424 | |
| 4860 | 4425 | /* Doing something.. but not enough yet */ |
| 4861 | | GAME( 1995, vfremix, stvbios, stv, stv, vfremix, ROT0, "Sega", "Virtua Fighter Remix (JUETBKAL 950428 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 4862 | | GAME( 1997, findlove, stvbios, stv, stv, stv, ROT0, "Daiki / FCF", "Find Love (J 971212 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 4863 | | GAME( 1996, decathlt, stvbios, stv, stv, decathlt, ROT0, "Sega", "Decathlete (JUET 960709 V1.001)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION ) |
| 4864 | | GAME( 1996, decathlto, decathlt,stv, stv, decathlt, ROT0, "Sega", "Decathlete (JUET 960424 V1.000)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION ) |
| 4426 | GAME( 1995, vfremix, stvbios, stv, stv, vfremix, ROT0, "Sega", "Virtua Fighter Remix (JUETBKAL 950428 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 4427 | GAME( 1997, findlove, stvbios, stv, stv, stv, ROT0, "Daiki / FCF", "Find Love (J 971212 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) |
| 4428 | GAME( 1996, decathlt, stvbios, stv, stv, decathlt, ROT0, "Sega", "Decathlete (JUET 960709 V1.001)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION ) |
| 4429 | GAME( 1996, decathlto, decathlt,stv, stv, decathlt, ROT0, "Sega", "Decathlete (JUET 960424 V1.000)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION ) |
| 4865 | 4430 | |
| 4866 | 4431 | /* Gives I/O errors */ |
| 4867 | | GAME( 1996, magzun, stvbios, stv, stv, stv, ROT0, "Sega", "Magical Zunou Power (J 961031 V1.000)", GAME_NOT_WORKING ) |
| 4868 | | GAME( 1997, techbowl, stvbios, stv, stv, stv, ROT0, "Sega", "Technical Bowling (J 971212 V1.000)", GAME_NOT_WORKING ) |
| 4869 | | GAME( 1999, micrombc, stvbios, stv, stv, stv, ROT0, "Sega", "Microman Battle Charge (J 990326 V1.000)", GAME_NOT_WORKING ) |
| 4432 | GAME( 1996, magzun, stvbios, stv, stv, stv, ROT0, "Sega", "Magical Zunou Power (J 961031 V1.000)", GAME_NOT_WORKING ) |
| 4433 | GAME( 1997, techbowl, stvbios, stv, stv, stv, ROT0, "Sega", "Technical Bowling (J 971212 V1.000)", GAME_NOT_WORKING ) |
| 4434 | GAME( 1999, micrombc, stvbios, stv, stv, stv, ROT0, "Sega", "Microman Battle Charge (J 990326 V1.000)", GAME_NOT_WORKING ) |
| 4870 | 4435 | |
| 4871 | 4436 | /* Black screen */ |
| 4872 | | GAME( 1999, ffreveng, stvbios, stv, stv, ffreveng, ROT0, "Capcom", "Final Fight Revenge (JUET 990714 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_NO_SOUND | GAME_NOT_WORKING ) |
| 4437 | GAME( 1999, ffreveng, stvbios, stv, stv, ffreveng, ROT0, "Capcom", "Final Fight Revenge (JUET 990714 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_NO_SOUND | GAME_NOT_WORKING ) |
| 4873 | 4438 | |
| 4874 | 4439 | /* CD games */ |
| 4875 | | GAME( 1995, sfish2, 0, stv, stv, stv, ROT0, "Sega", "Sport Fishing 2 (UET 951106 V1.10e)", GAME_NO_SOUND | GAME_NOT_WORKING ) |
| 4876 | | GAME( 1995, sfish2j, sfish2, stv, stv, stv, ROT0, "Sega", "Sport Fishing 2 (J 951201 V1.100)", GAME_NO_SOUND | GAME_NOT_WORKING ) |
| 4440 | GAME( 1995, sfish2, 0, stv, stv, stv, ROT0, "Sega", "Sport Fishing 2 (UET 951106 V1.10e)", GAME_NO_SOUND | GAME_NOT_WORKING ) |
| 4441 | GAME( 1995, sfish2j, sfish2, stv, stv, stv, ROT0, "Sega", "Sport Fishing 2 (J 951201 V1.100)", GAME_NO_SOUND | GAME_NOT_WORKING ) |
| 4877 | 4442 | |
| 4878 | 4443 | /* |
| 4879 | 4444 | This is the known list of undumped ST-V games: |