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 disk control interface v1 support
[pcsx_rearmed.git]
/
plugins
/
dfsound
/
dma.c
diff --git
a/plugins/dfsound/dma.c
b/plugins/dfsound/dma.c
index
85b746c
..
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
=spuMem[spuAddr>>1]
;
\r
- spu
Addr+=
2;
\r
-
if(spuAddr>0x7ffff) 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++
=spuMem[spuAddr>>1]; // spu addr got by writeregister
\r
- spu
Addr+=2; // inc spu addr
\r
- if(spuAddr>0x7ffff) 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
- spuMem[spuAddr>>1] = val; // spu addr got by writeregister
\r
+ *(unsigned short *)(spu.spuMemC + spu.spuAddr) = val;
\r
\r
\r
- spuAddr+=2; // inc spu addr
\r
- if(spuAddr>0x7ffff) 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
\r
- if(spuAddr + iSize*2 < 0x80000)
\r
+ if(spu
.spu
Addr + iSize*2 < 0x80000)
\r
{
\r
{
\r
- memcpy(
&spuMem[spuAddr>>1]
, pusPSXMem, iSize*2);
\r
- spuAddr += iSize*2;
\r
+ memcpy(
spu.spuMemC + spu.spuAddr
, pusPSXMem, iSize*2);
\r
+ spu
.spu
Addr += iSize*2;
\r
return;
\r
}
\r
\r
for(i=0;i<iSize;i++)
\r
{
\r
return;
\r
}
\r
\r
for(i=0;i<iSize;i++)
\r
{
\r
- spuMem[spuAddr>>1] = *pusPSXMem++; // spu addr got by writeregister
\r
- spu
Addr+=2; // inc spu addr
\r
- spu
Addr&=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