src/mame/drivers/megadriv.c
| r9308 | r9309 | |
| 43 | 43 | - cosmiccp: black screen, Master SH-2 stalls on a RTS? (unchecked) |
| 44 | 44 | - eccodemo: black screen after the Sega logo, faulty comms check |
| 45 | 45 | - fifa96 / nbajamte: dies on the gameplay, waiting for a comm change that never occurs; |
| 46 | - marsch1: doesn't boot, Master / Slave communicates through SCI |
| 46 | 47 | - nbajamte: missing I2C hookup, startup fails due of that (same I2C type as plain MD version); |
| 47 | 48 | - nflquart: black screen, missing h irq? |
| 48 | 49 | - sangoku4: black screen after the Sega logo |
| r9308 | r9309 | |
| 85 | 86 | #2 FM Bit |
| 86 | 87 | #3 Irq Register |
| 87 | 88 | #4 Bank Control Register |
| 88 | | #5 DREQ Control FULL bit (ERROR - presumably 7 bytes written, but FIFO sets FULL size?) |
| 89 | #5 DREQ Control FULL bit |
| 89 | 90 | #6 DREQ SRC Address |
| 90 | 91 | #7 DREQ DST Address |
| 91 | 92 | #8 DREQ SIZE Address |
| r9308 | r9309 | |
| 210 | 211 | MD or SH-2 DMA check: |
| 211 | 212 | #122 SH-2 Master CPU Write DMA (68S) (ERROR) |
| 212 | 213 | #123 SH-2 Slave CPU Write DMA (68S) (ERROR) |
| 213 | | #124 MD ROM to VRAM DMA |
| 214 | | (asserts after this) |
| 215 | | |
| 214 | #124 MD ROM to VRAM DMA (asserts after this) |
| 215 | ----- |
| 216 | #127 SH-2 Master ROM to SDRAM DMA |
| 217 | #128 SH-2 Slave ROM to SDRAM DMA |
| 218 | #129 SH-2 Master ROM to Frame DMA |
| 219 | #130 SH-2 Slave ROM to Frame DMA |
| 220 | #131 SH-2 Master SDRAM to Frame DMA |
| 221 | #132 SH-2 Slave SDRAM to Frame DMA |
| 222 | #133 SH-2 Master Frame to SDRAM DMA |
| 223 | #134 SH-2 Slave Frame to SDRAM DMA |
| 224 | Sound Test (these don't explicitly fails): |
| 225 | #135 MD 68k Monaural Sound |
| 226 | #136 MD 68k L Sound |
| 227 | #137 MD 68k R Sound |
| 228 | #138 MD 68k L -> R Sound |
| 229 | #139 MD 68k R -> L Sound |
| 230 | #140 SH-2 Master Monaural Sound |
| 231 | #141 SH-2 Master L Sound |
| 232 | #142 SH-2 Master R Sound |
| 233 | #143 SH-2 Master L -> R Pan |
| 234 | #144 SH-2 Master R -> L Pan |
| 235 | #145 SH-2 Slave Monaural Sound |
| 236 | #146 SH-2 Slave L Sound |
| 237 | #147 SH-2 Slave R Sound |
| 238 | #148 SH-2 Slave L -> R Pan |
| 239 | #149 SH-2 Slave R -> L Pan |
| 240 | #150 SH-2 Master PWM Interrupt |
| 241 | #151 SH-2 Slave PWM Interrupt |
| 242 | #152 SH-2 Master PWM DMA Write (!) |
| 243 | #153 SH-2 Slave PWM DMA Write (!) |
| 244 | #154 Z80 PWM Monaural Sound (!) |
| 245 | #155 Z80 PWM L Sound (!) |
| 246 | #156 Z80 PWM R Sound (!) |
| 247 | GFX check (these don't explicitly fails): |
| 248 | #157 Direct Color Mode |
| 249 | #158 Packed Pixel Mode |
| 250 | #159 Runlength Mode |
| 251 | #160 Runlength Mode |
| 252 | #161 Runlength Mode |
| 216 | 253 | */ |
| 217 | 254 | |
| 218 | 255 | |
| r9308 | r9309 | |
| 2501 | 2538 | static UINT16 a15106_reg; |
| 2502 | 2539 | |
| 2503 | 2540 | |
| 2504 | | static READ16_HANDLER( _32x_68k_a15106_r) |
| 2541 | static READ16_HANDLER( _32x_68k_a15106_r ) |
| 2505 | 2542 | { |
| 2506 | 2543 | UINT16 retval; |
| 2507 | 2544 | |
| r9308 | r9309 | |
| 2534 | 2571 | memory_install_rom(space, 0x0000100, 0x03fffff, 0, 0, memory_region(space->machine, "maincpu")+0x100); |
| 2535 | 2572 | } |
| 2536 | 2573 | |
| 2574 | if((a15106_reg & 4) == 0) // clears the FIFO state |
| 2575 | { |
| 2576 | current_fifo_block = fifo_block_a; |
| 2577 | current_fifo_readblock = fifo_block_b; |
| 2578 | current_fifo_write_pos = 0; |
| 2579 | current_fifo_read_pos = 0; |
| 2580 | fifo_block_a_full = 0; |
| 2581 | fifo_block_b_full = 0; |
| 2582 | } |
| 2583 | |
| 2537 | 2584 | //printf("_32x_68k_a15106_w %04x\n", data); |
| 2538 | 2585 | /* |
| 2539 | 2586 | if (a15106_reg & 0x4) |
| r9308 | r9309 | |
| 2631 | 2678 | { |
| 2632 | 2679 | case 0x00/2: // a15108 / 4008 |
| 2633 | 2680 | case 0x02/2: // a1510a / 400a |
| 2681 | if (space != _68kspace) |
| 2682 | { |
| 2683 | printf("attempting to WRITE DREQ SRC with SH2!\n"); |
| 2684 | return; |
| 2685 | } |
| 2686 | |
| 2634 | 2687 | dreq_src_addr[offset&1] = ((offset&1) == 0) ? (data & 0xff) : (data & 0xfffe); |
| 2635 | 2688 | |
| 2636 | 2689 | //if((dreq_src_addr[0]<<16)|dreq_src_addr[1]) |
| r9308 | r9309 | |
| 2640 | 2693 | |
| 2641 | 2694 | case 0x04/2: // a1510c / 400c |
| 2642 | 2695 | case 0x06/2: // a1510e / 400e |
| 2696 | if (space != _68kspace) |
| 2697 | { |
| 2698 | printf("attempting to WRITE DREQ DST with SH2!\n"); |
| 2699 | return; |
| 2700 | } |
| 2701 | |
| 2643 | 2702 | dreq_dst_addr[offset&1] = ((offset&1) == 0) ? (data & 0xff) : (data & 0xffff); |
| 2644 | 2703 | |
| 2645 | 2704 | //if((dreq_dst_addr[0]<<16)|dreq_dst_addr[1]) |
| r9308 | r9309 | |
| 2648 | 2707 | break; |
| 2649 | 2708 | |
| 2650 | 2709 | case 0x08/2: // a15110 / 4010 |
| 2710 | if (space != _68kspace) |
| 2711 | { |
| 2712 | printf("attempting to WRITE DREQ SIZE with SH2!\n"); |
| 2713 | return; |
| 2714 | } |
| 2715 | |
| 2651 | 2716 | dreq_size = data & 0xfffc; |
| 2652 | 2717 | |
| 2653 | 2718 | // if(dreq_size) |
| r9308 | r9309 | |
| 2674 | 2739 | return; |
| 2675 | 2740 | } |
| 2676 | 2741 | |
| 2742 | if((a15106_reg & 4) == 0) |
| 2743 | { |
| 2744 | printf("attempting to WRITE FIFO with 68S cleared!"); |
| 2745 | return; |
| 2746 | } |
| 2747 | |
| 2677 | 2748 | current_fifo_block[current_fifo_write_pos] = data; |
| 2678 | 2749 | current_fifo_write_pos++; |
| 2679 | 2750 | |
| r9308 | r9309 | |
| 3392 | 3463 | static READ16_HANDLER( _32x_sh2_common_4006_r ) |
| 3393 | 3464 | { |
| 3394 | 3465 | //printf("DREQ read!\n"); // tempo reads it, shut up for now |
| 3395 | | return 0; |
| 3466 | return _32x_68k_a15106_r(space,offset,mem_mask); |
| 3396 | 3467 | } |
| 3397 | 3468 | |
| 3398 | 3469 | static WRITE16_HANDLER( _32x_sh2_common_4006_w ) |
| 3399 | 3470 | { |
| 3400 | | printf("DREQ write!\n"); |
| 3471 | printf("DREQ write!\n"); //register is read only on SH-2 side |
| 3401 | 3472 | } |
| 3402 | 3473 | |
| 3403 | 3474 | |