Previous 15994 Revisions Next

r9309 Sunday 3rd October, 2010 at 10:06:23 UTC by Angelo Salese
[32x]: Attempt to understand how 68S bit works, fixes item 5 in Marsch
[src/mame/drivers]megadriv.c

src/mame/drivers/megadriv.c
r9308r9309
4343     - cosmiccp: black screen, Master SH-2 stalls on a RTS? (unchecked)
4444     - eccodemo: black screen after the Sega logo, faulty comms check
4545     - fifa96 / nbajamte: dies on the gameplay, waiting for a comm change that never occurs;
46     - marsch1: doesn't boot, Master / Slave communicates through SCI
4647     - nbajamte: missing I2C hookup, startup fails due of that (same I2C type as plain MD version);
4748     - nflquart: black screen, missing h irq?
4849     - sangoku4: black screen after the Sega logo
r9308r9309
8586#2 FM Bit
8687#3 Irq Register
8788#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
8990#6 DREQ SRC Address
9091#7 DREQ DST Address
9192#8 DREQ SIZE Address
r9308r9309
210211MD or SH-2 DMA check:
211212#122 SH-2 Master CPU Write DMA (68S) (ERROR)
212213#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
224Sound 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 (!)
247GFX 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
216253*/
217254
218255
r9308r9309
25012538static UINT16 a15106_reg;
25022539
25032540
2504static READ16_HANDLER( _32x_68k_a15106_r)
2541static READ16_HANDLER( _32x_68k_a15106_r )
25052542{
25062543   UINT16 retval;
25072544
r9308r9309
25342571         memory_install_rom(space, 0x0000100, 0x03fffff, 0, 0, memory_region(space->machine, "maincpu")+0x100);
25352572      }
25362573
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
25372584      //printf("_32x_68k_a15106_w %04x\n", data);
25382585      /*
25392586        if (a15106_reg & 0x4)
r9308r9309
26312678   {
26322679      case 0x00/2: // a15108 / 4008
26332680      case 0x02/2: // a1510a / 400a
2681         if (space != _68kspace)
2682         {
2683            printf("attempting to WRITE DREQ SRC with SH2!\n");
2684            return;
2685         }
2686
26342687         dreq_src_addr[offset&1] = ((offset&1) == 0) ? (data & 0xff) : (data & 0xfffe);
26352688
26362689         //if((dreq_src_addr[0]<<16)|dreq_src_addr[1])
r9308r9309
26402693
26412694      case 0x04/2: // a1510c / 400c
26422695      case 0x06/2: // a1510e / 400e
2696         if (space != _68kspace)
2697         {
2698            printf("attempting to WRITE DREQ DST with SH2!\n");
2699            return;
2700         }
2701
26432702         dreq_dst_addr[offset&1] = ((offset&1) == 0) ? (data & 0xff) : (data & 0xffff);
26442703
26452704         //if((dreq_dst_addr[0]<<16)|dreq_dst_addr[1])
r9308r9309
26482707         break;
26492708
26502709      case 0x08/2: // a15110 / 4010
2710         if (space != _68kspace)
2711         {
2712            printf("attempting to WRITE DREQ SIZE with SH2!\n");
2713            return;
2714         }
2715
26512716         dreq_size = data & 0xfffc;
26522717
26532718         //   if(dreq_size)
r9308r9309
26742739            return;
26752740         }
26762741
2742         if((a15106_reg & 4) == 0)
2743         {
2744            printf("attempting to WRITE FIFO with 68S cleared!");
2745            return;
2746         }
2747
26772748         current_fifo_block[current_fifo_write_pos] = data;
26782749         current_fifo_write_pos++;
26792750
r9308r9309
33923463static READ16_HANDLER( _32x_sh2_common_4006_r )
33933464{
33943465   //printf("DREQ read!\n"); // tempo reads it, shut up for now
3395   return 0;
3466   return _32x_68k_a15106_r(space,offset,mem_mask);
33963467}
33973468
33983469static WRITE16_HANDLER( _32x_sh2_common_4006_w )
33993470{
3400   printf("DREQ write!\n");
3471   printf("DREQ write!\n"); //register is read only on SH-2 side
34013472}
34023473
34033474

Previous 15994 Revisions Next


© 1998-2018 The MESS Team