mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-12-16 04:08:48 +00:00
Path3 Masking: Fixed a bug which caused persona 3 not to boot, previous a hack had been put in place to get around this. VIF: Fixed a VIF error with the rare game Realta Nua, now goes through the prologue correctly. Game requires the EE timing hack to get rid of most of the noise (Path3 masking problem with new GIF unit, unfixable). Expecting bugs, I will be monitoring this. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5147 96395faa-99c1-11dd-bbfe-3dabce05a288
73 lines
2.0 KiB
C++
73 lines
2.0 KiB
C++
/* PCSX2 - PS2 Emulator for PCs
|
|
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
|
*
|
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
*
|
|
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with PCSX2.
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
|
|
// This module contains code shared by both the dynarec and interpreter versions
|
|
// of the VU0 micro.
|
|
|
|
#include "PrecompiledHeader.h"
|
|
#include "Common.h"
|
|
#include <cmath>
|
|
#include "VUmicro.h"
|
|
#include "MTVU.h"
|
|
|
|
#ifdef PCSX2_DEBUG
|
|
u32 vudump = 0;
|
|
#endif
|
|
|
|
#define VF_VAL(x) ((x==0x80000000)?0:(x))
|
|
|
|
// This is called by the COP2 as per the CTC instruction
|
|
void vu1ResetRegs()
|
|
{
|
|
VU0.VI[REG_VPU_STAT].UL &= ~0xff00; // stop vu1
|
|
VU0.VI[REG_FBRST].UL &= ~0xff00; // stop vu1
|
|
vif1Regs.stat.VEW = false;
|
|
}
|
|
|
|
void vu1Finish() {
|
|
if (THREAD_VU1) {
|
|
if (VU0.VI[REG_VPU_STAT].UL & 0x100) DevCon.Error("MTVU: VU0.VI[REG_VPU_STAT].UL & 0x100");
|
|
return;
|
|
}
|
|
while (VU0.VI[REG_VPU_STAT].UL & 0x100) {
|
|
VUM_LOG("vu1ExecMicro > Stalling until current microprogram finishes");
|
|
CpuVU1->Execute(vu1RunCycles);
|
|
}
|
|
}
|
|
|
|
void __fastcall vu1ExecMicro(u32 addr)
|
|
{
|
|
vif1Regs.stat.VEW = true;
|
|
|
|
if (THREAD_VU1) {
|
|
vu1Thread.ExecuteVU(addr, vif1Regs.top, vif1Regs.itop);
|
|
VU0.VI[REG_VPU_STAT].UL &= ~0xFF00;
|
|
return;
|
|
}
|
|
static int count = 0;
|
|
vu1Finish();
|
|
|
|
VUM_LOG("vu1ExecMicro %x (count=%d)", addr, count++);
|
|
|
|
VU0.VI[REG_VPU_STAT].UL &= ~0xFF00;
|
|
VU0.VI[REG_VPU_STAT].UL |= 0x0100;
|
|
|
|
if ((s32)addr != -1) VU1.VI[REG_TPC].UL = addr;
|
|
_vuExecMicroDebug(VU1);
|
|
|
|
CpuVU1->Execute(vu1RunCycles);
|
|
}
|