Fix Linux. Use defines for CPU_INT.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2522 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-01-25 22:40:01 +00:00
parent 79a212a3bc
commit c455ea38e5
10 changed files with 42 additions and 32 deletions

View File

@ -291,6 +291,8 @@ set(pcsx2GuiSources
gui/AppMain.cpp
gui/AppRes.cpp
gui/ConsoleLogger.cpp
gui/CpuUsageProvider.cpp
gui/CpuUsageProviderLnx.cpp
gui/Dialogs/AboutBoxDialog.cpp
gui/Dialogs/AppConfigDialog.cpp
gui/Dialogs/AssertionDialog.cpp
@ -342,6 +344,7 @@ set(pcsx2GuiHeaders
gui/AppConfig.h
gui/AppForwardDefs.h
gui/ConsoleLogger.h
gui/CpuUsageProvider.h
gui/Dialogs/ConfigurationDialog.h
gui/Dialogs/LogOptionsDialog.h
gui/Dialogs/ModalPopups.h

View File

@ -72,7 +72,7 @@ __forceinline void gsInterrupt()
{
Console.Warning("gs dma masked, re-scheduling...");
// re-raise the int shortly in the future
CPU_INT( 2, 64 );
CPU_INT( DMAC_GIF, 64 );
return;
}
@ -196,7 +196,7 @@ void GIFdma()
if ((gif->madr + (gif->qwc * 16)) > dmacRegs->stadr.ADDR)
{
CPU_INT(2, gscycles);
CPU_INT(DMAC_GIF, gscycles);
gscycles = 0;
return;
}
@ -213,7 +213,7 @@ void GIFdma()
{
// We are in image mode doing DIRECTHL, Path 1 is in queue, and in intermittant mode.
GIF_LOG("Waiting VU %x, PATH2 %x, GIFMODE %x Progress %x", gifRegs->stat.P1Q, (vif1.cmd & 0x7f), gifRegs->mode._u32, Path3progress);
CPU_INT(2, 16);
CPU_INT(DMAC_GIF, 16);
return;
}
@ -235,14 +235,14 @@ void GIFdma()
if (Path3progress == STOPPED_MODE) /*|| (vif1Regs->stat._u32 |= VIF1_STAT_VGW) == 0*/
{
vif1Regs->stat.VGW = false;
if (gif->qwc == 0) CPU_INT(2, 16);
if (gif->qwc == 0) CPU_INT(DMAC_GIF, 16);
return;
}
//Check with Path3 masking games
if (gif->qwc > 0) {
GIFchain();
CPU_INT(2, gscycles * BIAS);
CPU_INT(DMAC_GIF, gscycles * BIAS);
return;
}
//else DevCon.WriteLn("GIFdma() case 1, but qwc = 0!"); //Don't do 0 GIFchain and then return
@ -260,7 +260,7 @@ void GIFdma()
//Check with Path3 masking games
if (gif->qwc > 0) {
GIFchain(); //Transfers the data set by the switch
CPU_INT(2, gscycles * BIAS);
CPU_INT(DMAC_GIF, gscycles * BIAS);
return;
}
//else DevCon.WriteLn("GIFdma() case 2, but qwc = 0!"); //Don't do 0 GIFchain and then return, fixes Dual Hearts
@ -283,7 +283,7 @@ void GIFdma()
prevcycles = gscycles;
gif->tadr -= 16;
hwDmacIrq(DMAC_STALL_SIS);
CPU_INT(2, gscycles);
CPU_INT(DMAC_GIF, gscycles);
gscycles = 0;
return;
}
@ -305,11 +305,11 @@ void GIFdma()
checkTieBit(ptag);
GIF_LOG("gifdmaChain %8.8x_%8.8x size=%d, id=%d, addr=%lx", ptag[1]._u32, ptag[0]._u32, gif->qwc, ptag->ID, gif->madr);
CPU_INT(2, gscycles * BIAS);
CPU_INT(DMAC_GIF, gscycles * BIAS);
}
else
{
CPU_INT(2, gscycles * BIAS);
CPU_INT(DMAC_GIF, gscycles * BIAS);
gscycles = 0;
}
}

View File

@ -351,6 +351,9 @@
<Unit filename="../gui/CheckedStaticBox.h" />
<Unit filename="../gui/ConsoleLogger.cpp" />
<Unit filename="../gui/ConsoleLogger.h" />
<Unit filename="../gui/CpuUsageProvider.cpp" />
<Unit filename="../gui/CpuUsageProvider.h" />
<Unit filename="../gui/CpuUsageProviderLnx.cpp" />
<Unit filename="../gui/Dialogs/AboutBoxDialog.cpp" />
<Unit filename="../gui/Dialogs/AppConfigDialog.cpp" />
<Unit filename="../gui/Dialogs/AssertionDialog.cpp" />

View File

@ -202,7 +202,7 @@ static __forceinline void _dmaSPR0()
if (!done)
{
ptag = (tDMA_TAG*)&psSu32(spr0->sadr); //Set memory pointer to SADR
CPU_INT(8, ptag[0].QWC / BIAS); // the lower 16bits of the tag / BIAS);
CPU_INT(DMAC_FROM_SPR, ptag[0].QWC / BIAS); // the lower 16bits of the tag / BIAS);
return;
}
SPR_LOG("spr0 dmaChain complete %8.8x_%8.8x size=%d, id=%d, addr=%lx spr=%lx",
@ -264,13 +264,13 @@ void dmaSPR0() // fromSPR
{
tDMA_TAG *ptag;
ptag = (tDMA_TAG*)&psSu32(spr0->sadr); //Set memory pointer to SADR
CPU_INT(8, ptag[0].QWC / BIAS);
CPU_INT(DMAC_FROM_SPR, ptag[0].QWC / BIAS);
return;
}
// COMPLETE HACK!!! For now at least.. FFX Videos dont rely on interrupts or reading DMA values
// It merely assumes that the last one has finished then starts another one (broke with the DMA fix)
// This "shouldn't" cause any problems as SPR is generally faster than the other DMAS anyway. (Refraction)
CPU_INT(8, spr0->qwc / BIAS);
CPU_INT(DMAC_FROM_SPR, spr0->qwc / BIAS);
}
__forceinline static void SPR1transfer(u32 *data, int size)
@ -387,7 +387,7 @@ void _dmaSPR1() // toSPR work function
if (!done)
{
ptag = dmaGetAddr(spr1->tadr); //Set memory pointer to TADR
CPU_INT(9, (ptag[0].QWC / BIAS));// the lower 16 bits of the tag / BIAS);
CPU_INT(DMAC_TO_SPR, (ptag[0].QWC / BIAS));// the lower 16 bits of the tag / BIAS);
}
break;
}
@ -411,13 +411,13 @@ void dmaSPR1() // toSPR
{
tDMA_TAG *ptag;
ptag = dmaGetAddr(spr1->tadr); //Set memory pointer to TADR
CPU_INT(9, ptag[0].QWC / BIAS);
CPU_INT(DMAC_TO_SPR, ptag[0].QWC / BIAS);
return;
}
// COMPLETE HACK!!! For now at least.. FFX Videos dont rely on interrupts or reading DMA values
// It merely assumes that the last one has finished then starts another one (broke with the DMA fix)
// This "shouldn't" cause any problems as SPR is generally faster than the other DMAS anyway. (Refraction)
CPU_INT(9, spr1->qwc / BIAS);
CPU_INT(DMAC_TO_SPR, spr1->qwc / BIAS);
}
void SPRTOinterrupt()

View File

@ -251,7 +251,7 @@ static __forceinline void SIF0EEend(int &cycles)
sif0.end = 0;
eesifbusy[0] = false;
if (cycles == 0) DevCon.Warning("EESIF0cycles = 0"); // No transfer happened
else CPU_INT(5, cycles*BIAS); // Hence no Interrupt
else CPU_INT(DMAC_SIF0, cycles*BIAS); // Hence no Interrupt
}
static __forceinline void SIF1EEend(int &cycles)
@ -264,7 +264,7 @@ static __forceinline void SIF1EEend(int &cycles)
// Other games reach like 50k cycles here, but the EE will long have given up by then and just retry.
// (Cause of double interrupts on the EE)
if (cycles == 0) DevCon.Warning("EESIF1cycles = 0"); // No transfer happened
else CPU_INT(6, min((int)(cycles*BIAS), 384)); // Hence no Interrupt (fixes Eternal Poison reboot when selecting new game)
else CPU_INT(DMAC_SIF1, min((int)(cycles*BIAS), 384)); // Hence no Interrupt (fixes Eternal Poison reboot when selecting new game)
}
static __forceinline void SIF0IOPend(int &psxCycles)

View File

@ -151,7 +151,7 @@ _f void vif0FBRST(u32 value) {
_VIF0chain();
vif0ch->chcr.STR = true;
CPU_INT(0, g_vifCycles); // Gets the timing right - Flatout
CPU_INT(DMAC_VIF0, g_vifCycles); // Gets the timing right - Flatout
}
}
}
@ -173,7 +173,7 @@ _f void vif1FBRST(u32 value) {
{
vif1Regs->mskpath3 = 0;
gifRegs->stat.IMT = false;
if (gif->chcr.STR) CPU_INT(2, 4);
if (gif->chcr.STR) CPU_INT(DMAC_GIF, 4);
}
vif1Regs->err.reset();
@ -232,7 +232,7 @@ _f void vif1FBRST(u32 value) {
case MFD_RESERVED:
case MFD_GIF: // Wonder if this should be with VIF?
// Gets the timing right - Flatout
CPU_INT(1, vif1ch->qwc * BIAS);
CPU_INT(DMAC_VIF1, vif1ch->qwc * BIAS);
break;
}

View File

@ -270,7 +270,7 @@ void vif0Interrupt()
else
_VIF0chain();
CPU_INT(0, /*g_vifCycles*/ VifCycleVoodoo);
CPU_INT(DMAC_VIF0, /*g_vifCycles*/ VifCycleVoodoo);
return;
}
}
@ -291,7 +291,7 @@ void vif0Interrupt()
else
_chainVIF0();
CPU_INT(0, /*g_vifCycles*/ VifCycleVoodoo);
CPU_INT(DMAC_VIF0, /*g_vifCycles*/ VifCycleVoodoo);
return;
}
@ -325,11 +325,11 @@ void dmaVIF0()
}
vif0.done = true;
CPU_INT(0, /*g_vifCycles*/ VifCycleVoodoo);
CPU_INT(DMAC_VIF0, /*g_vifCycles*/ VifCycleVoodoo);
return;
}
// Chain Mode
vif0.done = false;
CPU_INT(0, 0);
CPU_INT(DMAC_VIF0, 0);
}

View File

@ -227,7 +227,7 @@ void vif1TransferFromMemory()
vif1ch->qwc = 0;
vif1.done = true;
CPU_INT(1, 0);
CPU_INT(DMAC_VIF1, 0);
return; //An error has occurred.
}
@ -391,7 +391,7 @@ __forceinline void vif1Interrupt()
{
if (gif->chcr.STR)
{
CPU_INT(1, gif->qwc * BIAS);
CPU_INT(DMAC_VIF1, gif->qwc * BIAS);
return;
}
else
@ -420,14 +420,14 @@ __forceinline void vif1Interrupt()
if (vif1.stallontag)
vif1SetupTransfer();
else
_VIF1chain();//CPU_INT(13, vif1ch->qwc * BIAS);
_VIF1chain();//CPU_INT(DMAC_STALL_SIS, vif1ch->qwc * BIAS);
}
}
if (vif1.inprogress & 0x1)
{
_VIF1chain();
CPU_INT(1, /*g_vifCycles*/ VifCycleVoodoo);
CPU_INT(DMAC_VIF1, /*g_vifCycles*/ VifCycleVoodoo);
return;
}
@ -442,13 +442,13 @@ __forceinline void vif1Interrupt()
if ((vif1.inprogress & 0x1) == 0) vif1SetupTransfer();
CPU_INT(1, /*g_vifCycles*/ VifCycleVoodoo);
CPU_INT(DMAC_VIF1, /*g_vifCycles*/ VifCycleVoodoo);
return;
}
if (vif1.vifstalled && vif1.irq)
{
CPU_INT(1, 0);
CPU_INT(DMAC_VIF1, 0);
return; //Dont want to end if vif is stalled.
}
#ifdef PCSX2_DEVBUILD

View File

@ -81,7 +81,7 @@ void Vif1MskPath3() {
//Let the Gif know it can transfer again (making sure any vif stall isnt unset prematurely)
Path3progress = TRANSFER_MODE;
gifRegs->stat.IMT = false;
CPU_INT(2, 4);
CPU_INT(DMAC_GIF, 4);
}
schedulepath3msk = 0;
@ -333,7 +333,7 @@ _vifT void vifCMD_FlushA()
// Gif is already transferring so wait for it.
if (((Path3progress != STOPPED_MODE) || !vif1Regs->mskpath3) && gif->chcr.STR) {
vif1Regs->stat.VGW = true;
CPU_INT(2, 4);
CPU_INT(DMAC_GIF, 4);
}
vifX.cmd &= ~0x7f;

View File

@ -17,7 +17,11 @@
#include "CpuUsageProvider.h"
#include "System.h"
#ifndef __LINUX__
#include "SysThreads.h"
#endif
#include "GS.h"
DefaultCpuUsageProvider::DefaultCpuUsageProvider()