notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing files
[pcsx_rearmed.git]
/
plugins
/
dfsound
/
dma.c
diff --git
a/plugins/dfsound/dma.c
b/plugins/dfsound/dma.c
index
d3706b9
..
43019f1
100644
(file)
--- a/
plugins/dfsound/dma.c
+++ b/
plugins/dfsound/dma.c
@@
-27,9
+27,9
@@
\r
unsigned short CALLBACK SPUreadDMA(void)
\r
{
\r
\r
unsigned short CALLBACK SPUreadDMA(void)
\r
{
\r
- unsigned short s
=spu.spuMem[spu.spuAddr>>1]
;
\r
- spu.spuAddr
+=
2;
\r
-
if(spu.spuAddr>0x7ffff) spu.spuAddr=0
;
\r
+ unsigned short s
= *(unsigned short *)(spu.spuMemC + spu.spuAddr)
;
\r
+ spu.spuAddr
+=
2;
\r
+
spu.spuAddr &= 0x7fffe
;
\r
\r
return s;
\r
}
\r
\r
return s;
\r
}
\r
@@
-43,13
+43,13
@@
void CALLBACK SPUreadDMAMem(unsigned short *pusPSXMem, int iSize,
{
\r
int i;
\r
\r
{
\r
int i;
\r
\r
- do_samples_if_needed(cycles);
\r
+ do_samples_if_needed(cycles
, 1
);
\r
\r
for(i=0;i<iSize;i++)
\r
{
\r
\r
for(i=0;i<iSize;i++)
\r
{
\r
- *pusPSXMem++
=spu.spuMem[spu.spuAddr>>1]; // spu addr got by writeregister
\r
- spu.spuAddr
+=2; // inc spu addr
\r
- if(spu.spuAddr>0x7ffff) spu.spuAddr=0; // wrap
\r
+ *pusPSXMem++
= *(unsigned short *)(spu.spuMemC + spu.spuAddr);
\r
+ spu.spuAddr
+= 2;
\r
+ spu.spuAddr &= 0x7fffe;
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-67,10
+67,11
@@
void CALLBACK SPUreadDMAMem(unsigned short *pusPSXMem, int iSize,
\r
void CALLBACK SPUwriteDMA(unsigned short val)
\r
{
\r
\r
void CALLBACK SPUwriteDMA(unsigned short val)
\r
{
\r
- spu.spuMem[spu.spuAddr>>1] = val; // spu addr got by writeregister
\r
+ *(unsigned short *)(spu.spuMemC + spu.spuAddr) = val;
\r
\r
\r
- spu.spuAddr+=2; // inc spu addr
\r
- if(spu.spuAddr>0x7ffff) spu.spuAddr=0; // wrap
\r
+ spu.spuAddr += 2;
\r
+ spu.spuAddr &= 0x7fffe;
\r
+ spu.bMemDirty = 1;
\r
}
\r
\r
////////////////////////////////////////////////////////////////////////
\r
}
\r
\r
////////////////////////////////////////////////////////////////////////
\r
@@
-82,20
+83,21
@@
void CALLBACK SPUwriteDMAMem(unsigned short *pusPSXMem, int iSize,
{
\r
int i;
\r
\r
{
\r
int i;
\r
\r
- do_samples_if_needed(cycles);
\r
+ do_samples_if_needed(cycles, 1);
\r
+ spu.bMemDirty = 1;
\r
\r
if(spu.spuAddr + iSize*2 < 0x80000)
\r
{
\r
\r
if(spu.spuAddr + iSize*2 < 0x80000)
\r
{
\r
- memcpy(
&spu.spuMem[spu.spuAddr>>1]
, pusPSXMem, iSize*2);
\r
+ memcpy(
spu.spuMemC + spu.spuAddr
, pusPSXMem, iSize*2);
\r
spu.spuAddr += iSize*2;
\r
return;
\r
}
\r
\r
for(i=0;i<iSize;i++)
\r
{
\r
spu.spuAddr += iSize*2;
\r
return;
\r
}
\r
\r
for(i=0;i<iSize;i++)
\r
{
\r
- spu.spuMem[spu.spuAddr>>1] = *pusPSXMem++; // spu addr got by writeregister
\r
- spu.spuAddr
+=2; // inc spu addr
\r
- spu.spuAddr
&=0x7ffff; // wrap
\r
+ *(unsigned short *)(spu.spuMemC + spu.spuAddr) = *pusPSXMem++;
\r
+ spu.spuAddr
+= 2;
\r
+ spu.spuAddr
&= 0x7fffe;
\r
}
\r
}
\r
\r
}
\r
}
\r
\r