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
unbreak some old savestates
[pcsx_rearmed.git]
/
libpcsxcore
/
psxdma.c
diff --git
a/libpcsxcore/psxdma.c
b/libpcsxcore/psxdma.c
index
c0aee7e
..
0ffec81
100644
(file)
--- a/
libpcsxcore/psxdma.c
+++ b/
libpcsxcore/psxdma.c
@@
-156,6
+156,8
@@
void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU
HW_DMA2_MADR = SWAPu32(madr + words_copy * 4);
HW_DMA2_MADR = SWAPu32(madr + words_copy * 4);
+ // careful: gpu_state_change() also messes with this
+ HW_GPU_STATUS &= SWAP32(~PSXGPU_nBUSY);
// already 32-bit word size ((size * 4) / 4)
GPUDMA_INT(words / 4);
return;
// already 32-bit word size ((size * 4) / 4)
GPUDMA_INT(words / 4);
return;
@@
-177,6
+179,8
@@
void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU
HW_DMA2_MADR = SWAPu32(madr);
HW_DMA2_MADR = SWAPu32(madr);
+ // careful: gpu_state_change() also messes with this
+ HW_GPU_STATUS &= SWAP32(~PSXGPU_nBUSY);
// already 32-bit word size ((size * 4) / 4)
GPUDMA_INT(words / 4);
return;
// already 32-bit word size ((size * 4) / 4)
GPUDMA_INT(words / 4);
return;
@@
-214,6
+218,8
@@
void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU
DMA_INTERRUPT(2);
}
DMA_INTERRUPT(2);
}
+// note: this is also (ab)used for non-dma prim command
+// to delay gpu returning to idle state, see gpu_state_change()
void gpuInterrupt() {
if (HW_DMA2_CHCR == SWAP32(0x01000401) && !(HW_DMA2_MADR & SWAP32(0x800000)))
{
void gpuInterrupt() {
if (HW_DMA2_CHCR == SWAP32(0x01000401) && !(HW_DMA2_MADR & SWAP32(0x800000)))
{