diff --git a/Source/Project64/N64 System.h b/Source/Project64/N64 System.h index 613213a57..017ff868c 100644 --- a/Source/Project64/N64 System.h +++ b/Source/Project64/N64 System.h @@ -16,7 +16,6 @@ #include #include "User Interface.h" -#include "N64 System/Types.h" class CNotification; #include "N64 System/Profiling Class.h" diff --git a/Source/Project64/N64 System/Debugger/Debugger - Memory Search.cpp b/Source/Project64/N64 System/Debugger/Debugger - Memory Search.cpp index 4fdc325ec..0672dfb9f 100644 --- a/Source/Project64/N64 System/Debugger/Debugger - Memory Search.cpp +++ b/Source/Project64/N64 System/Debugger/Debugger - Memory Search.cpp @@ -306,7 +306,7 @@ void CDebugMemorySearch::SearchForValue(void) int ItemId = m_SearchResults.GetItemData(i); SearchResultItem & Result = m_SearchResult[ItemId]; - DWORD NewValue = 0; + uint32_t NewValue = 0; bool valid = false; switch (Size) @@ -326,7 +326,7 @@ void CDebugMemorySearch::SearchForValue(void) } break; case _32Bit: - valid = g_MMU->LW_PAddr(Result.PAddr, (uint32_t &)NewValue); + valid = g_MMU->LW_PAddr(Result.PAddr, NewValue); break; default: g_Notify->BreakPoint(__FILEW__, __LINE__); @@ -441,7 +441,7 @@ void CDebugMemorySearch::SearchForUnknown() SearchResultItem & Result = m_SearchResult[ItemId]; bool UpdateResult = false; - DWORD NewValue = 0; + uint32_t NewValue = 0; bool valid = false; switch (Size) @@ -461,7 +461,7 @@ void CDebugMemorySearch::SearchForUnknown() } break; case _32Bit: - valid = g_MMU->LW_PAddr(Result.PAddr, (uint32_t &)NewValue); + valid = g_MMU->LW_PAddr(Result.PAddr, NewValue); break; default: g_Notify->BreakPoint(__FILEW__, __LINE__); diff --git a/Source/Project64/N64 System/N64 Types.h b/Source/Project64/N64 System/N64 Types.h index 91e1fbe8f..c6f3d8238 100644 --- a/Source/Project64/N64 System/N64 Types.h +++ b/Source/Project64/N64 System/N64 Types.h @@ -94,3 +94,29 @@ enum STEP_TYPE PERMLOOP_DELAY_DONE = 11, }; +union MIPS_WORD +{ + long W; + unsigned long UW; + short HW[2]; + unsigned short UHW[2]; + char B[4]; + unsigned char UB[4]; + + float F; +}; + +union MIPS_DWORD +{ + __int64 DW; + unsigned __int64 UDW; + long W[2]; + unsigned long UW[2]; + short HW[4]; + unsigned short UHW[4]; + char B[8]; + unsigned char UB[8]; + + double D; + float F[2]; +}; diff --git a/Source/Project64/N64 System/Types.h b/Source/Project64/N64 System/Types.h deleted file mode 100644 index 4627d6b2f..000000000 --- a/Source/Project64/N64 System/Types.h +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -* * -* Project 64 - A Nintendo 64 emulator. * -* http://www.pj64-emu.com/ * -* Copyright (C) 2012 Project64. All rights reserved. * -* * -* License: * -* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * -* * -****************************************************************************/ -#pragma once - -#include - -/* - * To do: Use fixed-size types for MIPS union members, not WINAPI types. - * On Win32 x86, `unsigned long DWORD` versus `int32_t` is the only conflict. - */ -typedef unsigned char BYTE; -typedef unsigned short WORD; -typedef unsigned long DWORD; -typedef unsigned __int64 QWORD; -typedef void * HANDLE; -typedef int BOOL; - -union MIPS_WORD { - long W; - unsigned long UW; - short HW[2]; - unsigned short UHW[2]; - char B[4]; - unsigned char UB[4]; - - float F; -}; - -union MIPS_DWORD { - __int64 DW; - unsigned __int64 UDW; - long W[2]; - unsigned long UW[2]; - short HW[4]; - unsigned short UHW[4]; - char B[8]; - unsigned char UB[8]; - - double D; - float F[2]; -};