mirror of https://github.com/PCSX2/pcsx2.git
Fix superVU xgkick stuffs.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3535 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
4c03fb26d3
commit
c7096a1d53
|
@ -240,20 +240,6 @@ extern BaseVUmicroCPU* CpuVU0;
|
|||
extern BaseVUmicroCPU* CpuVU1;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// These functions initialize memory for both VUs.
|
||||
//
|
||||
void vuMicroMemAlloc();
|
||||
void vuMicroMemShutdown();
|
||||
void vuMicroMemReset();
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Everything else does stuff on a per-VU basis.
|
||||
//
|
||||
void iDumpVU0Registers();
|
||||
void iDumpVU1Registers();
|
||||
|
||||
|
||||
extern void (*VU0_LOWER_OPCODE[128])();
|
||||
extern void (*VU0_UPPER_OPCODE[64])();
|
||||
|
||||
|
@ -286,18 +272,24 @@ extern void (*VU1regs_UPPER_FD_01_TABLE[32])(_VURegsNum *VUregsn);
|
|||
extern void (*VU1regs_UPPER_FD_10_TABLE[32])(_VURegsNum *VUregsn);
|
||||
extern void (*VU1regs_UPPER_FD_11_TABLE[32])(_VURegsNum *VUregsn);
|
||||
|
||||
extern void vuMicroMemAlloc();
|
||||
extern void vuMicroMemShutdown();
|
||||
extern void vuMicroMemReset();
|
||||
|
||||
// VU0
|
||||
extern void vu0ResetRegs();
|
||||
extern void __fastcall vu0ExecMicro(u32 addr);
|
||||
extern void vu0Exec(VURegs* VU);
|
||||
extern void vu0Finish();
|
||||
extern void recResetVU0( void );
|
||||
extern void iDumpVU0Registers();
|
||||
|
||||
// VU1
|
||||
extern void vu1Finish();
|
||||
extern void vu1ResetRegs();
|
||||
extern void __fastcall vu1ExecMicro(u32 addr);
|
||||
extern void vu1Exec(VURegs* VU);
|
||||
extern void iDumpVU1Registers();
|
||||
|
||||
void VU0_UPPER_FD_00();
|
||||
void VU0_UPPER_FD_01();
|
||||
|
|
|
@ -1128,9 +1128,7 @@ void __fastcall mVU_XGKICK_(u32 addr) {
|
|||
if (size > diff) {
|
||||
//DevCon.Status("XGkick Wrap!");
|
||||
memcpy_qwc(pDest, microVU1.regs->Mem + (addr*16), diff);
|
||||
size -= diff;
|
||||
pDest += diff*16;
|
||||
memcpy_qwc(pDest, microVU1.regs->Mem, size);
|
||||
memcpy_qwc(pDest+(diff*16), microVU1.regs->Mem, size-diff);
|
||||
}
|
||||
else {
|
||||
memcpy_qwc(pDest, microVU1.regs->Mem + (addr*16), size);
|
||||
|
|
|
@ -1976,13 +1976,12 @@ void __fastcall VU1XGKICK_MTGSTransfer(u32 *pMem, u32 addr)
|
|||
{
|
||||
addr &= 0x3fff;
|
||||
u8* data = VU1.Mem + (addr);
|
||||
u32 diff = 0x400 - (addr >> 4);
|
||||
u32 diff = 0x400 - (addr / 16);
|
||||
u32 size;
|
||||
u8* pDest;
|
||||
|
||||
if(gifRegs->stat.APATH <= GIF_APATH1 || (gifRegs->stat.APATH == GIF_APATH3 && gifRegs->stat.IP3 == true) && SIGNAL_IMR_Pending == false)
|
||||
{
|
||||
|
||||
if(Path1WritePos != 0)
|
||||
{
|
||||
//Flush any pending transfers so things dont go up in the wrong order
|
||||
|
@ -2003,22 +2002,17 @@ void __fastcall VU1XGKICK_MTGSTransfer(u32 *pMem, u32 addr)
|
|||
size = GIFPath_ParseTagQuick(GIF_PATH_1, data, diff);
|
||||
pDest = &Path1Buffer[Path1WritePos*16];
|
||||
|
||||
Path1WritePos += size;
|
||||
|
||||
pxAssumeMsg((Path1WritePos+size < sizeof(Path1Buffer)), "XGKick Buffer Overflow detected on Path1Buffer!");
|
||||
|
||||
//DevCon.Warning("Storing size %x PATH 1", size);
|
||||
if (size > diff) {
|
||||
// fixme: one of these days the following *16's will get cleaned up when we introduce
|
||||
// a special qwc/simd16 optimized version of memcpy_aligned. :)
|
||||
//DevCon.Status("XGkick Wrap!");
|
||||
memcpy_aligned(pDest, VU1.Mem + addr, diff);
|
||||
Path1WritePos += size;
|
||||
size -= diff;
|
||||
pDest += diff*16;
|
||||
memcpy_aligned(pDest, VU1.Mem, size);
|
||||
memcpy_qwc(pDest, VU1.Mem + addr, diff);
|
||||
memcpy_qwc(pDest+(diff*16), VU1.Mem, size-diff);
|
||||
}
|
||||
else {
|
||||
memcpy_aligned(pDest, VU1.Mem + addr, size);
|
||||
Path1WritePos += size;
|
||||
memcpy_qwc(pDest, VU1.Mem + addr, size);
|
||||
}
|
||||
//if(!gifRegs->stat.P1Q) CPU_INT(28, 128);
|
||||
gifRegs->stat.P1Q = true;
|
||||
|
|
Loading…
Reference in New Issue