/[pcsx2_0.9.7]/trunk/pcsx2/VU0micro.cpp
ViewVC logotype

Annotation of /trunk/pcsx2/VU0micro.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (hide annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (10 years, 4 months ago) by william
File size: 1571 byte(s)
Auto Commited Import of: pcsx2-0.9.7-r3738-debug in ./trunk
1 william 31 /* PCSX2 - PS2 Emulator for PCs
2     * Copyright (C) 2002-2010 PCSX2 Dev Team
3     *
4     * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5     * of the GNU Lesser General Public License as published by the Free Software Found-
6     * ation, either version 3 of the License, or (at your option) any later version.
7     *
8     * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9     * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10     * PURPOSE. See the GNU General Public License for more details.
11     *
12     * You should have received a copy of the GNU General Public License along with PCSX2.
13     * If not, see <http://www.gnu.org/licenses/>.
14     */
15    
16    
17     // This module contains code shared by both the dynarec and interpreter versions
18     // of the VU0 micro.
19    
20    
21     #include "PrecompiledHeader.h"
22     #include "Common.h"
23 william 62 #include "VUmicro.h"
24 william 31
25     #include <cmath>
26    
27     using namespace R5900;
28    
29     #define VF_VAL(x) ((x==0x80000000)?0:(x))
30    
31     // This is called by the COP2 as per the CTC instruction
32     void vu0ResetRegs()
33     {
34     VU0.VI[REG_VPU_STAT].UL &= ~0xff; // stop vu0
35     VU0.VI[REG_FBRST].UL &= ~0xff; // stop vu0
36 william 62 vif0Regs.stat.VEW = false;
37 william 31 }
38    
39     void __fastcall vu0ExecMicro(u32 addr) {
40     VUM_LOG("vu0ExecMicro %x", addr);
41    
42     if(VU0.VI[REG_VPU_STAT].UL & 0x1) {
43     DevCon.Warning("vu0ExecMicro > Stalling for previous microprogram to finish");
44     vu0Finish();
45     }
46    
47     VU0.VI[REG_VPU_STAT].UL &= ~0xFF;
48     VU0.VI[REG_VPU_STAT].UL |= 0x01;
49    
50     if ((s32)addr != -1) VU0.VI[REG_TPC].UL = addr;
51     _vuExecMicroDebug(VU0);
52     CpuVU0->ExecuteBlock(1);
53     }

  ViewVC Help
Powered by ViewVC 1.1.22