mirror of
https://github.com/holub/mame
synced 2025-05-19 20:29:09 +03:00
Added DMA mode 0x0e in seicop.c, used by Seibu Cup Soccer, Godzilla and SD Gundam [Angelo Salese]
This commit is contained in:
parent
f6f047ff6d
commit
188c6e5455
@ -2155,7 +2155,7 @@ ROM_START( cupsocsb2 )
|
|||||||
ROM_LOAD16_BYTE( "sc_14.bin", 0x00001, 0x080000, CRC(566086c2) SHA1(b7d09ce978f99ecc0d1975b31330ed49317701d5) )
|
ROM_LOAD16_BYTE( "sc_14.bin", 0x00001, 0x080000, CRC(566086c2) SHA1(b7d09ce978f99ecc0d1975b31330ed49317701d5) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
#define CUPSOC_DEBUG_MODE 1
|
#define CUPSOC_DEBUG_MODE 0
|
||||||
|
|
||||||
static DRIVER_INIT( cupsoc )
|
static DRIVER_INIT( cupsoc )
|
||||||
{
|
{
|
||||||
|
@ -2584,8 +2584,8 @@ static WRITE16_HANDLER( generic_cop_w )
|
|||||||
0x87 is used by Denjin Makai (DMA with inverted word endianess)
|
0x87 is used by Denjin Makai (DMA with inverted word endianess)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(dma_trigger != 0x87)
|
//if(dma_trigger != 0x87)
|
||||||
printf("SRC: %08x %08x DST:%08x SIZE:%08x TRIGGER: %08x\n",dma_src,dma_src_param,dma_dst,dma_size,dma_trigger);
|
// printf("SRC: %08x %08x DST:%08x SIZE:%08x TRIGGER: %08x\n",dma_src,dma_src_param,dma_dst,dma_size,dma_trigger);
|
||||||
|
|
||||||
if(dma_trigger == 0x81)
|
if(dma_trigger == 0x81)
|
||||||
return;
|
return;
|
||||||
@ -2600,6 +2600,38 @@ static WRITE16_HANDLER( generic_cop_w )
|
|||||||
src+=2;
|
src+=2;
|
||||||
dst+=2;
|
dst+=2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Seibu Cup Soccer trigger this*/
|
||||||
|
if (dma_trigger == 0x0e)
|
||||||
|
{
|
||||||
|
static UINT32 src,dst,size,i;
|
||||||
|
printf("SRC: %08x DST:%08x SIZE:%08x TRIGGER: %08x\n",dma_src,dma_dst,dma_size,dma_trigger);
|
||||||
|
|
||||||
|
src = dma_src;
|
||||||
|
dst = dma_dst;
|
||||||
|
size = ((dma_size - dma_dst) / 0x20) + 1;
|
||||||
|
|
||||||
|
for(i=0;i<size;i++)
|
||||||
|
{
|
||||||
|
space->write_dword(dst+0x00, space->read_dword(src+0x00));
|
||||||
|
space->write_dword(dst+0x04, space->read_dword(src+0x04));
|
||||||
|
space->write_dword(dst+0x08, space->read_dword(src+0x08));
|
||||||
|
space->write_dword(dst+0x0c, space->read_dword(src+0x0c));
|
||||||
|
space->write_dword(dst+0x10, space->read_dword(src+0x10));
|
||||||
|
space->write_dword(dst+0x14, space->read_dword(src+0x14));
|
||||||
|
space->write_dword(dst+0x18, space->read_dword(src+0x18));
|
||||||
|
space->write_dword(dst+0x1c, space->read_dword(src+0x1c));
|
||||||
|
|
||||||
|
//printf("%08x %08x\n",src,dst);
|
||||||
|
|
||||||
|
dst+=0x20;
|
||||||
|
src+=0x20;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// I think the value it writes here must match the other value for anything to happen.. maybe */
|
// I think the value it writes here must match the other value for anything to happen.. maybe */
|
||||||
@ -2607,6 +2639,8 @@ static WRITE16_HANDLER( generic_cop_w )
|
|||||||
|
|
||||||
if ((cop_clearfill_lasttrigger==0x14) || (cop_clearfill_lasttrigger==0x15)) return;
|
if ((cop_clearfill_lasttrigger==0x14) || (cop_clearfill_lasttrigger==0x15)) return;
|
||||||
|
|
||||||
|
//printf("SRC: %08x DST:%08x SIZE:%08x TRIGGER: %08x\n",dma_src,dma_dst,dma_size,dma_trigger);
|
||||||
|
|
||||||
/* do the fill */
|
/* do the fill */
|
||||||
if (cop_clearfill_value[cop_clearfill_lasttrigger]==0x0000)
|
if (cop_clearfill_value[cop_clearfill_lasttrigger]==0x0000)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user