mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
better fix for the dma, the last one caused an mmu fault on fatal fury
This commit is contained in:
parent
4ef6f9103d
commit
d88da3d539
@ -636,10 +636,10 @@ static READ32_HANDLER( hng64_port_read )
|
|||||||
|
|
||||||
|
|
||||||
/* preliminary dma code, dma is used to copy program code -> ram */
|
/* preliminary dma code, dma is used to copy program code -> ram */
|
||||||
static int hng_dma_start,hng_dma_dst,hng_dma_len;
|
static INT32 hng_dma_start,hng_dma_dst,hng_dma_len;
|
||||||
static void hng64_do_dma (const address_space *space)
|
static void hng64_do_dma (const address_space *space)
|
||||||
{
|
{
|
||||||
logerror("Performing DMA Start %08x Len %08x Dst %08x\n",hng_dma_start, hng_dma_len, hng_dma_dst);
|
printf("Performing DMA Start %08x Len %08x Dst %08x\n",hng_dma_start, hng_dma_len, hng_dma_dst);
|
||||||
|
|
||||||
while (hng_dma_len>=0)
|
while (hng_dma_len>=0)
|
||||||
{
|
{
|
||||||
@ -651,28 +651,26 @@ static void hng64_do_dma (const address_space *space)
|
|||||||
hng_dma_dst+=4;
|
hng_dma_dst+=4;
|
||||||
hng_dma_len--;
|
hng_dma_len--;
|
||||||
}
|
}
|
||||||
|
|
||||||
hng_dma_start+=4;
|
|
||||||
hng_dma_dst+=4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static WRITE32_HANDLER( hng_dma_start_w )
|
static WRITE32_HANDLER( hng_dma_start_w )
|
||||||
{
|
{
|
||||||
logerror ("DMA Start Write %08x\n",data);
|
logerror ("DMA Start Write %08x\n",data);
|
||||||
hng_dma_start = data;
|
COMBINE_DATA(&hng_dma_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WRITE32_HANDLER( hng_dma_dst_w )
|
static WRITE32_HANDLER( hng_dma_dst_w )
|
||||||
{
|
{
|
||||||
logerror ("DMA Dst Write %08x\n",data);
|
logerror ("DMA Dst Write %08x\n",data);
|
||||||
hng_dma_dst = data;
|
COMBINE_DATA(&hng_dma_dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WRITE32_HANDLER( hng_dma_len_w )
|
static WRITE32_HANDLER( hng_dma_len_w )
|
||||||
{
|
{
|
||||||
logerror ("DMA Len Write %08x\n",data);
|
logerror ("DMA Len Write %08x\n",data);
|
||||||
hng_dma_len = data;
|
COMBINE_DATA(&hng_dma_len);
|
||||||
|
|
||||||
hng64_do_dma(space);
|
hng64_do_dma(space);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user