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
(Android) Only build in libpcsxcore/lightrec/mem.c when
[pcsx_rearmed.git]
/
libpcsxcore
/
psxdma.c
diff --git
a/libpcsxcore/psxdma.c
b/libpcsxcore/psxdma.c
index
b0f3fba
..
0480ce6
100644
(file)
--- a/
libpcsxcore/psxdma.c
+++ b/
libpcsxcore/psxdma.c
@@
-45,7
+45,7
@@
void psxDma4(u32 madr, u32 bcr, u32 chcr) { // SPU
PSXDMA_LOG("*** DMA4 SPU - mem2spu *** %x addr = %x size = %x\n", chcr, madr, bcr);
#endif
ptr = (u16 *)PSXM(madr);
PSXDMA_LOG("*** DMA4 SPU - mem2spu *** %x addr = %x size = %x\n", chcr, madr, bcr);
#endif
ptr = (u16 *)PSXM(madr);
- if (ptr ==
NULL
) {
+ if (ptr ==
INVALID_PTR
) {
#ifdef CPU_LOG
CPU_LOG("*** DMA4 SPU - mem2spu *** NULL Pointer!!!\n");
#endif
#ifdef CPU_LOG
CPU_LOG("*** DMA4 SPU - mem2spu *** NULL Pointer!!!\n");
#endif
@@
-62,7
+62,7
@@
void psxDma4(u32 madr, u32 bcr, u32 chcr) { // SPU
PSXDMA_LOG("*** DMA4 SPU - spu2mem *** %x addr = %x size = %x\n", chcr, madr, bcr);
#endif
ptr = (u16 *)PSXM(madr);
PSXDMA_LOG("*** DMA4 SPU - spu2mem *** %x addr = %x size = %x\n", chcr, madr, bcr);
#endif
ptr = (u16 *)PSXM(madr);
- if (ptr ==
NULL
) {
+ if (ptr ==
INVALID_PTR
) {
#ifdef CPU_LOG
CPU_LOG("*** DMA4 SPU - spu2mem *** NULL Pointer!!!\n");
#endif
#ifdef CPU_LOG
CPU_LOG("*** DMA4 SPU - spu2mem *** NULL Pointer!!!\n");
#endif
@@
-138,7
+138,7
@@
void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU
PSXDMA_LOG("*** DMA2 GPU - vram2mem *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
ptr = (u32 *)PSXM(madr);
PSXDMA_LOG("*** DMA2 GPU - vram2mem *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
ptr = (u32 *)PSXM(madr);
- if (ptr ==
NULL
) {
+ if (ptr ==
INVALID_PTR
) {
#ifdef CPU_LOG
CPU_LOG("*** DMA2 GPU - vram2mem *** NULL Pointer!!!\n");
#endif
#ifdef CPU_LOG
CPU_LOG("*** DMA2 GPU - vram2mem *** NULL Pointer!!!\n");
#endif
@@
-160,7
+160,7
@@
void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU
PSXDMA_LOG("*** DMA 2 - GPU mem2vram *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
ptr = (u32 *)PSXM(madr);
PSXDMA_LOG("*** DMA 2 - GPU mem2vram *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
ptr = (u32 *)PSXM(madr);
- if (ptr ==
NULL
) {
+ if (ptr ==
INVALID_PTR
) {
#ifdef CPU_LOG
CPU_LOG("*** DMA2 GPU - mem2vram *** NULL Pointer!!!\n");
#endif
#ifdef CPU_LOG
CPU_LOG("*** DMA2 GPU - mem2vram *** NULL Pointer!!!\n");
#endif
@@
-220,7
+220,7
@@
void gpuInterrupt() {
}
void psxDma6(u32 madr, u32 bcr, u32 chcr) {
}
void psxDma6(u32 madr, u32 bcr, u32 chcr) {
- u32
size
;
+ u32
words
;
u32 *mem = (u32 *)PSXM(madr);
#ifdef PSXDMA_LOG
u32 *mem = (u32 *)PSXM(madr);
#ifdef PSXDMA_LOG
@@
-228,7
+228,7
@@
void psxDma6(u32 madr, u32 bcr, u32 chcr) {
#endif
if (chcr == 0x11000002) {
#endif
if (chcr == 0x11000002) {
- if (mem ==
NULL
) {
+ if (mem ==
INVALID_PTR
) {
#ifdef CPU_LOG
CPU_LOG("*** DMA6 OT *** NULL Pointer!!!\n");
#endif
#ifdef CPU_LOG
CPU_LOG("*** DMA6 OT *** NULL Pointer!!!\n");
#endif
@@
-238,7
+238,7
@@
void psxDma6(u32 madr, u32 bcr, u32 chcr) {
}
// already 32-bit size
}
// already 32-bit size
-
size
= bcr;
+
words
= bcr;
while (bcr--) {
*mem-- = SWAP32((madr - 4) & 0xffffff);
while (bcr--) {
*mem-- = SWAP32((madr - 4) & 0xffffff);
@@
-246,7
+246,10
@@
void psxDma6(u32 madr, u32 bcr, u32 chcr) {
}
mem++; *mem = 0xffffff;
}
mem++; *mem = 0xffffff;
- GPUOTCDMA_INT(size);
+ //GPUOTCDMA_INT(size);
+ // halted
+ psxRegs.cycle += words;
+ GPUOTCDMA_INT(16);
return;
}
#ifdef PSXDMA_LOG
return;
}
#ifdef PSXDMA_LOG