[Project64] Update OpCode.h
This commit is contained in:
parent
4ac266bd94
commit
08cc72f6ed
|
@ -21,7 +21,7 @@ bool DelaySlotEffectsCompare (DWORD PC, DWORD Reg1, DWORD Reg2)
|
|||
{
|
||||
OPCODE Command;
|
||||
|
||||
if (!g_MMU->LW_VAddr(PC + 4, Command.Hex))
|
||||
if (!g_MMU->LW_VAddr(PC + 4, (DWORD &)Command.Hex))
|
||||
{
|
||||
//g_Notify->DisplayError(L"Failed to load word 2");
|
||||
//ExitThread(0);
|
||||
|
@ -276,7 +276,7 @@ void CInterpreterCPU::ExecuteCPU()
|
|||
{
|
||||
while (!Done)
|
||||
{
|
||||
if (g_MMU->LW_VAddr(PROGRAM_COUNTER, Opcode.Hex))
|
||||
if (g_MMU->LW_VAddr(PROGRAM_COUNTER, (DWORD &)Opcode.Hex))
|
||||
{
|
||||
/*if (PROGRAM_COUNTER > 0x80000300 && PROGRAM_COUNTER< 0x80380000)
|
||||
{
|
||||
|
@ -367,7 +367,7 @@ void CInterpreterCPU::ExecuteOps(int Cycles)
|
|||
return;
|
||||
}
|
||||
|
||||
if (g_MMU->LW_VAddr(PROGRAM_COUNTER, Opcode.Hex))
|
||||
if (g_MMU->LW_VAddr(PROGRAM_COUNTER, (DWORD &)Opcode.Hex))
|
||||
{
|
||||
/*if (PROGRAM_COUNTER > 0x80000300 && PROGRAM_COUNTER< 0x80380000)
|
||||
{
|
||||
|
|
|
@ -10,10 +10,13 @@
|
|||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201) // warning C4201: nonstandard extension used : nameless struct/union
|
||||
|
||||
union OPCODE
|
||||
{
|
||||
unsigned long Hex;
|
||||
unsigned char Ascii[4];
|
||||
uint32_t Hex;
|
||||
uint8_t Ascii[4];
|
||||
|
||||
struct
|
||||
{
|
||||
|
@ -57,6 +60,7 @@ union OPCODE
|
|||
unsigned : 6;
|
||||
};
|
||||
};
|
||||
#pragma warning(pop)
|
||||
|
||||
enum R4300iOpCodes
|
||||
{
|
||||
|
@ -135,13 +139,13 @@ enum R4300iCOP1FuntOpCodes
|
|||
R4300i_COP1_FUNCT_ADD = 0, R4300i_COP1_FUNCT_SUB = 1, R4300i_COP1_FUNCT_MUL = 2,
|
||||
R4300i_COP1_FUNCT_DIV = 3, R4300i_COP1_FUNCT_SQRT = 4, R4300i_COP1_FUNCT_ABS = 5,
|
||||
R4300i_COP1_FUNCT_MOV = 6, R4300i_COP1_FUNCT_NEG = 7, R4300i_COP1_FUNCT_ROUND_L = 8,
|
||||
R4300i_COP1_FUNCT_TRUNC_L = 9, R4300i_COP1_FUNCT_CEIL_L = 10,R4300i_COP1_FUNCT_FLOOR_L = 11,
|
||||
R4300i_COP1_FUNCT_ROUND_W = 12,R4300i_COP1_FUNCT_TRUNC_W = 13,R4300i_COP1_FUNCT_CEIL_W = 14,
|
||||
R4300i_COP1_FUNCT_FLOOR_W = 15,R4300i_COP1_FUNCT_CVT_S = 32,R4300i_COP1_FUNCT_CVT_D = 33,
|
||||
R4300i_COP1_FUNCT_CVT_W = 36,R4300i_COP1_FUNCT_CVT_L = 37,R4300i_COP1_FUNCT_C_F = 48,
|
||||
R4300i_COP1_FUNCT_C_UN = 49,R4300i_COP1_FUNCT_C_EQ = 50,R4300i_COP1_FUNCT_C_UEQ = 51,
|
||||
R4300i_COP1_FUNCT_C_OLT = 52,R4300i_COP1_FUNCT_C_ULT = 53,R4300i_COP1_FUNCT_C_OLE = 54,
|
||||
R4300i_COP1_FUNCT_C_ULE = 55,R4300i_COP1_FUNCT_C_SF = 56,R4300i_COP1_FUNCT_C_NGLE = 57,
|
||||
R4300i_COP1_FUNCT_C_SEQ = 58,R4300i_COP1_FUNCT_C_NGL = 59,R4300i_COP1_FUNCT_C_LT = 60,
|
||||
R4300i_COP1_FUNCT_C_NGE = 61,R4300i_COP1_FUNCT_C_LE = 62,R4300i_COP1_FUNCT_C_NGT = 63,
|
||||
R4300i_COP1_FUNCT_TRUNC_L = 9, R4300i_COP1_FUNCT_CEIL_L = 10, R4300i_COP1_FUNCT_FLOOR_L = 11,
|
||||
R4300i_COP1_FUNCT_ROUND_W = 12, R4300i_COP1_FUNCT_TRUNC_W = 13, R4300i_COP1_FUNCT_CEIL_W = 14,
|
||||
R4300i_COP1_FUNCT_FLOOR_W = 15, R4300i_COP1_FUNCT_CVT_S = 32, R4300i_COP1_FUNCT_CVT_D = 33,
|
||||
R4300i_COP1_FUNCT_CVT_W = 36, R4300i_COP1_FUNCT_CVT_L = 37, R4300i_COP1_FUNCT_C_F = 48,
|
||||
R4300i_COP1_FUNCT_C_UN = 49, R4300i_COP1_FUNCT_C_EQ = 50, R4300i_COP1_FUNCT_C_UEQ = 51,
|
||||
R4300i_COP1_FUNCT_C_OLT = 52, R4300i_COP1_FUNCT_C_ULT = 53, R4300i_COP1_FUNCT_C_OLE = 54,
|
||||
R4300i_COP1_FUNCT_C_ULE = 55, R4300i_COP1_FUNCT_C_SF = 56, R4300i_COP1_FUNCT_C_NGLE = 57,
|
||||
R4300i_COP1_FUNCT_C_SEQ = 58, R4300i_COP1_FUNCT_C_NGL = 59, R4300i_COP1_FUNCT_C_LT = 60,
|
||||
R4300i_COP1_FUNCT_C_NGE = 61, R4300i_COP1_FUNCT_C_LE = 62, R4300i_COP1_FUNCT_C_NGT = 63,
|
||||
};
|
||||
|
|
|
@ -397,7 +397,7 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin
|
|||
PermLoop = false;
|
||||
|
||||
OPCODE Command;
|
||||
if (!g_MMU->LW_VAddr(PC, Command.Hex))
|
||||
if (!g_MMU->LW_VAddr(PC, (DWORD &)Command.Hex))
|
||||
{
|
||||
g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||
return false;
|
||||
|
|
|
@ -17,7 +17,7 @@ bool DelaySlotEffectsCompare(DWORD PC, DWORD Reg1, DWORD Reg2);
|
|||
static bool DelaySlotEffectsJump(DWORD JumpPC) {
|
||||
OPCODE Command;
|
||||
|
||||
if (!g_MMU->LW_VAddr(JumpPC, Command.Hex))
|
||||
if (!g_MMU->LW_VAddr(JumpPC, (DWORD &)Command.Hex))
|
||||
return true;
|
||||
|
||||
switch (Command.op) {
|
||||
|
@ -58,7 +58,7 @@ static bool DelaySlotEffectsJump(DWORD JumpPC) {
|
|||
bool EffectDelaySlot = false;
|
||||
OPCODE NewCommand;
|
||||
|
||||
if (!g_MMU->LW_VAddr(JumpPC + 4, NewCommand.Hex)) {
|
||||
if (!g_MMU->LW_VAddr(JumpPC + 4, (DWORD &)NewCommand.Hex)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -932,7 +932,7 @@ bool CCodeSection::GenerateX86Code ( DWORD Test )
|
|||
|
||||
do {
|
||||
__try {
|
||||
if (!g_MMU->LW_VAddr(m_CompilePC,m_Opcode.Hex))
|
||||
if (!g_MMU->LW_VAddr(m_CompilePC,(DWORD &)m_Opcode.Hex))
|
||||
{
|
||||
g_Notify->DisplayError(GS(MSG_FAIL_LOAD_WORD));
|
||||
ExitThread(0);
|
||||
|
|
|
@ -167,7 +167,7 @@ bool LoopAnalysis::CheckLoopRegisterUsage( CCodeSection * Section)
|
|||
CPU_Message("ContinueSectionPC = %08X",ContinueSectionPC);
|
||||
|
||||
do {
|
||||
if (!g_MMU->LW_VAddr(m_PC, m_Command.Hex))
|
||||
if (!g_MMU->LW_VAddr(m_PC, (DWORD &)m_Command.Hex))
|
||||
{
|
||||
g_Notify->BreakPoint(__FILEW__,__LINE__);
|
||||
return false;
|
||||
|
|
|
@ -61,7 +61,7 @@ void CRecompilerOps::Compile_Branch (CRecompilerOps::BranchFunction CompareFunc,
|
|||
{
|
||||
OPCODE Command;
|
||||
|
||||
if (!g_MMU->LW_VAddr(m_CompilePC + 4, Command.Hex)) {
|
||||
if (!g_MMU->LW_VAddr(m_CompilePC + 4, (DWORD &)Command.Hex)) {
|
||||
g_Notify->DisplayError(GS(MSG_FAIL_LOAD_WORD));
|
||||
ExitThread(0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue