/* Pcsx2 - Pc Ps2 Emulator * Copyright (C) 2002-2005 Pcsx2 Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include "Common.h" #include "VUmicro.h" /*****************************************/ /* NEW FLAGS */ //By asadr. Thnkx F|RES :p /*****************************************/ __inline void vuUpdateDI(VURegs * VU) { // u32 Flag_S = 0; // u32 Flag_I = 0; // u32 Flag_D = 0; // // /* // FLAG D - I // */ // Flag_I = (VU->statusflag >> 4) & 0x1; // Flag_D = (VU->statusflag >> 5) & 0x1; // // VU->statusflag|= (Flag_I | (VU0.VI[REG_STATUS_FLAG].US[0] >> 4)) << 10; // VU->statusflag|= (Flag_D | (VU0.VI[REG_STATUS_FLAG].US[0] >> 5)) << 11; } #define VU_MAC_UPDATE(name, shift) \ u32 name(VURegs * VU, float f) { \ u32 v = *(u32*)&f; \ int exp = (v >> 23) & 0xff; \ u32 s = v & 0x80000000; \ \ if (s) VU->macflag |= 0x0010<macflag &= ~(0x0010<macflag = (VU->macflag & ~(0x1100<macflag = (VU->macflag&~(0x1000<macflag = (VU->macflag&~(0x0100<macflag = (VU->macflag & ~(0x1101<macflag&= ~(0x1111<macflag & 0x000F) newflag = 0x1; if (VU->macflag & 0x00F0) newflag |= 0x2; if (VU->macflag & 0x0F00) newflag |= 0x4; if (VU->macflag & 0xF000) newflag |= 0x8; VU->statusflag = (VU->statusflag&0xc30)|newflag|((VU->statusflag&0xf)<<6); }