fixed some crashing with the Network Access Disc

This commit is contained in:
refractionpcsx2
2007-12-09 06:19:50 +00:00
parent e68376fcaf
commit 45636cf72e
2 changed files with 7 additions and 7 deletions

View File

@@ -468,8 +468,8 @@ void rcntUpdate()
hwIntcIrq(counters[i].interrupt);
// SysPrintf("counter[%d] overflow interrupt (%x)\n", i, cpuRegs.cycle);
}
counters[i].count -= 0xffff;
if(counters[i].target > 0x10000) {
counters[i].count = 0;
if(counters[i].target > 0xffff) {
//SysPrintf("EE %x Correcting target\n", i);
counters[i].target -= 0x10000;
}
@@ -491,7 +491,7 @@ void rcntUpdate()
counters[i].mode|= 0x0400; // Target flag
hwIntcIrq(counters[i].interrupt);
if (counters[i].mode & 0x40) //The PS2 only resets if the interrupt is enabled - Tested on PS2
counters[i].count -= counters[i].target; // Reset on target
counters[i].count = 0; // Reset on target
}

View File

@@ -283,7 +283,7 @@ void _testRcnt16target(int i) {
psxHu32(0x1070)|= psxCounters[i].interrupt;
if (psxCounters[i].mode & 0x08) { // Reset on target
psxCounters[i].count -= psxCounters[i].target;
psxCounters[i].count = 0;
if(psxCounters[i].target > 0xffff) {
//SysPrintf("IOP 16 Correcting target\n");
psxCounters[i].target -= 0x10000;
@@ -306,7 +306,7 @@ void _testRcnt16overflow(int i) {
if(psxCounters[i].mode & 0x80)
psxCounters[i].mode&= ~0x0400; // Interrupt flag
}
psxCounters[i].count -= 0xffff;
psxCounters[i].count = 0;
if(psxCounters[i].target > 0xffff) {
//SysPrintf("IOP 16 Correcting target\n");
psxCounters[i].target -= 0x10000;
@@ -331,7 +331,7 @@ void _testRcnt32target(int i) {
psxHu32(0x1070)|= psxCounters[i].interrupt;
if (psxCounters[i].mode & 0x08) { // Reset on target
psxCounters[i].count -= psxCounters[i].target;
psxCounters[i].count = 0;
if(psxCounters[i].target > 0xffffffff) {
//SysPrintf("IOP 32 Correcting target\n");
psxCounters[i].target -= 0x100000000;
@@ -354,7 +354,7 @@ void _testRcnt32overflow(int i) {
if(psxCounters[i].mode & 0x80)
psxCounters[i].mode&= ~0x0400; // Interrupt flag
}
psxCounters[i].count -= 0xffffffff;
psxCounters[i].count = 0;
if(psxCounters[i].target > 0xffffffff) {
//SysPrintf("IOP 32 Correcting target\n");
psxCounters[i].target -= 0x100000000;