diff --git a/.gitignore b/.gitignore index b521d33ec..e7b443e8a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,10 @@ *.user Thumbs.db /Bin/Debug +/Bin/Debug64 /Bin/Package /Bin/Release +/Bin/Release64 /build /Config/Project64.cache3 /Config/Project64.cfg diff --git a/Project64.vs2013.sln b/Project64.vs2013.sln index 32b6005d2..445a5fe47 100644 --- a/Project64.vs2013.sln +++ b/Project64.vs2013.sln @@ -49,76 +49,117 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Debug|Win32.ActiveCfg = Debug|Win32 {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Debug|Win32.Build.0 = Debug|Win32 + {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Debug|x64.ActiveCfg = Debug|x64 + {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Debug|x64.Build.0 = Debug|x64 {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Release|Win32.ActiveCfg = Release|Win32 {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Release|Win32.Build.0 = Release|Win32 + {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}.Release|x64.ActiveCfg = Release|Win32 {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Debug|Win32.ActiveCfg = Debug|Win32 {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Debug|Win32.Build.0 = Debug|Win32 + {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Debug|x64.ActiveCfg = Debug|x64 + {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Debug|x64.Build.0 = Debug|x64 {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Release|Win32.ActiveCfg = Release|Win32 {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Release|Win32.Build.0 = Release|Win32 + {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Release|x64.ActiveCfg = Release|x64 + {7E534C8E-1ACE-4A88-8807-39A11ED4DA18}.Release|x64.Build.0 = Release|x64 {A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Debug|Win32.ActiveCfg = Debug|Win32 {A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Debug|Win32.Build.0 = Debug|Win32 + {A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Debug|x64.ActiveCfg = Debug|Win32 {A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Release|Win32.ActiveCfg = Release|Win32 {A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Release|Win32.Build.0 = Release|Win32 + {A7ED562C-63F3-4B7E-B6B3-2CF7848752E1}.Release|x64.ActiveCfg = Release|Win32 {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Debug|Win32.ActiveCfg = Debug|Win32 {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Debug|Win32.Build.0 = Debug|Win32 + {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Debug|x64.ActiveCfg = Debug|Win32 {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Release|Win32.ActiveCfg = Release|Win32 {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Release|Win32.Build.0 = Release|Win32 + {8B9961B1-88D9-4EA3-A752-507A00DD9F3D}.Release|x64.ActiveCfg = Release|Win32 {3326E128-33AF-422C-BB7C-67CC6B915610}.Debug|Win32.ActiveCfg = Debug|Win32 {3326E128-33AF-422C-BB7C-67CC6B915610}.Debug|Win32.Build.0 = Debug|Win32 + {3326E128-33AF-422C-BB7C-67CC6B915610}.Debug|x64.ActiveCfg = Debug|x64 + {3326E128-33AF-422C-BB7C-67CC6B915610}.Debug|x64.Build.0 = Debug|x64 {3326E128-33AF-422C-BB7C-67CC6B915610}.Release|Win32.ActiveCfg = Release|Win32 {3326E128-33AF-422C-BB7C-67CC6B915610}.Release|Win32.Build.0 = Release|Win32 + {3326E128-33AF-422C-BB7C-67CC6B915610}.Release|x64.ActiveCfg = Release|Win32 {4BC6906B-213E-40D7-9FC7-1A93E228393D}.Debug|Win32.ActiveCfg = Debug|Win32 {4BC6906B-213E-40D7-9FC7-1A93E228393D}.Debug|Win32.Build.0 = Debug|Win32 + {4BC6906B-213E-40D7-9FC7-1A93E228393D}.Debug|x64.ActiveCfg = Debug|Win32 {4BC6906B-213E-40D7-9FC7-1A93E228393D}.Release|Win32.ActiveCfg = Release|Win32 {4BC6906B-213E-40D7-9FC7-1A93E228393D}.Release|Win32.Build.0 = Release|Win32 + {4BC6906B-213E-40D7-9FC7-1A93E228393D}.Release|x64.ActiveCfg = Release|Win32 {731BD205-2826-4631-B7AF-117658E88DBC}.Debug|Win32.ActiveCfg = Debug|Win32 {731BD205-2826-4631-B7AF-117658E88DBC}.Debug|Win32.Build.0 = Debug|Win32 + {731BD205-2826-4631-B7AF-117658E88DBC}.Debug|x64.ActiveCfg = Debug|x64 + {731BD205-2826-4631-B7AF-117658E88DBC}.Debug|x64.Build.0 = Debug|x64 {731BD205-2826-4631-B7AF-117658E88DBC}.Release|Win32.ActiveCfg = Release|Win32 {731BD205-2826-4631-B7AF-117658E88DBC}.Release|Win32.Build.0 = Release|Win32 + {731BD205-2826-4631-B7AF-117658E88DBC}.Release|x64.ActiveCfg = Release|Win32 {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|Win32.ActiveCfg = Debug|Win32 + {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|x64.ActiveCfg = Debug|Win32 {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.ActiveCfg = Release|Win32 {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.Build.0 = Release|Win32 + {360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|x64.ActiveCfg = Release|Win32 {A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.ActiveCfg = Debug|Win32 {A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.Build.0 = Debug|Win32 + {A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|x64.ActiveCfg = Debug|Win32 {A4D13408-A794-4199-8FC7-4A9A32505005}.Release|Win32.ActiveCfg = Release|Win32 {A4D13408-A794-4199-8FC7-4A9A32505005}.Release|Win32.Build.0 = Release|Win32 + {A4D13408-A794-4199-8FC7-4A9A32505005}.Release|x64.ActiveCfg = Release|Win32 {93447136-FACD-4740-8F35-FC46FB4A9E82}.Debug|Win32.ActiveCfg = Debug|Win32 {93447136-FACD-4740-8F35-FC46FB4A9E82}.Debug|Win32.Build.0 = Debug|Win32 + {93447136-FACD-4740-8F35-FC46FB4A9E82}.Debug|x64.ActiveCfg = Debug|Win32 {93447136-FACD-4740-8F35-FC46FB4A9E82}.Release|Win32.ActiveCfg = Release|Win32 {93447136-FACD-4740-8F35-FC46FB4A9E82}.Release|Win32.Build.0 = Release|Win32 + {93447136-FACD-4740-8F35-FC46FB4A9E82}.Release|x64.ActiveCfg = Release|Win32 {427F1DCD-3BED-4010-9322-077A4C06D871}.Debug|Win32.ActiveCfg = Debug|Win32 {427F1DCD-3BED-4010-9322-077A4C06D871}.Debug|Win32.Build.0 = Debug|Win32 + {427F1DCD-3BED-4010-9322-077A4C06D871}.Debug|x64.ActiveCfg = Debug|Win32 {427F1DCD-3BED-4010-9322-077A4C06D871}.Release|Win32.ActiveCfg = Release|Win32 {427F1DCD-3BED-4010-9322-077A4C06D871}.Release|Win32.Build.0 = Release|Win32 + {427F1DCD-3BED-4010-9322-077A4C06D871}.Release|x64.ActiveCfg = Release|Win32 {93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Debug|Win32.ActiveCfg = Debug|Win32 {93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Debug|Win32.Build.0 = Debug|Win32 + {93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Debug|x64.ActiveCfg = Debug|Win32 {93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Release|Win32.ActiveCfg = Release|Win32 {93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Release|Win32.Build.0 = Release|Win32 + {93CFEDF3-9A75-4484-B169-D9D8074F5AC2}.Release|x64.ActiveCfg = Release|Win32 {05B9CB11-12D1-47CD-8E4A-88E12162119B}.Debug|Win32.ActiveCfg = Debug|Win32 {05B9CB11-12D1-47CD-8E4A-88E12162119B}.Debug|Win32.Build.0 = Debug|Win32 + {05B9CB11-12D1-47CD-8E4A-88E12162119B}.Debug|x64.ActiveCfg = Debug|Win32 {05B9CB11-12D1-47CD-8E4A-88E12162119B}.Release|Win32.ActiveCfg = Release|Win32 {05B9CB11-12D1-47CD-8E4A-88E12162119B}.Release|Win32.Build.0 = Release|Win32 + {05B9CB11-12D1-47CD-8E4A-88E12162119B}.Release|x64.ActiveCfg = Release|Win32 {25A25249-C284-4C5A-8DC2-26FC3EB13703}.Debug|Win32.ActiveCfg = Debug|Win32 {25A25249-C284-4C5A-8DC2-26FC3EB13703}.Debug|Win32.Build.0 = Debug|Win32 + {25A25249-C284-4C5A-8DC2-26FC3EB13703}.Debug|x64.ActiveCfg = Debug|Win32 {25A25249-C284-4C5A-8DC2-26FC3EB13703}.Release|Win32.ActiveCfg = Release|Win32 {25A25249-C284-4C5A-8DC2-26FC3EB13703}.Release|Win32.Build.0 = Release|Win32 + {25A25249-C284-4C5A-8DC2-26FC3EB13703}.Release|x64.ActiveCfg = Release|Win32 {462C2608-182F-452C-944F-AF201E19300B}.Debug|Win32.ActiveCfg = Debug|Win32 {462C2608-182F-452C-944F-AF201E19300B}.Debug|Win32.Build.0 = Debug|Win32 + {462C2608-182F-452C-944F-AF201E19300B}.Debug|x64.ActiveCfg = Debug|Win32 {462C2608-182F-452C-944F-AF201E19300B}.Release|Win32.ActiveCfg = Release|Win32 {462C2608-182F-452C-944F-AF201E19300B}.Release|Win32.Build.0 = Release|Win32 + {462C2608-182F-452C-944F-AF201E19300B}.Release|x64.ActiveCfg = Release|Win32 {2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Debug|Win32.ActiveCfg = Debug|Win32 {2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Debug|Win32.Build.0 = Debug|Win32 + {2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Debug|x64.ActiveCfg = Debug|Win32 {2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Release|Win32.ActiveCfg = Release|Win32 {2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Release|Win32.Build.0 = Release|Win32 + {2DADDAA5-0F57-46ED-A974-747908DDC7F3}.Release|x64.ActiveCfg = Release|Win32 {FD617E80-9E40-4138-85DA-B94633972E6A}.Debug|Win32.ActiveCfg = Debug|Win32 {FD617E80-9E40-4138-85DA-B94633972E6A}.Debug|Win32.Build.0 = Debug|Win32 + {FD617E80-9E40-4138-85DA-B94633972E6A}.Debug|x64.ActiveCfg = Debug|Win32 {FD617E80-9E40-4138-85DA-B94633972E6A}.Release|Win32.ActiveCfg = Release|Win32 {FD617E80-9E40-4138-85DA-B94633972E6A}.Release|Win32.Build.0 = Release|Win32 + {FD617E80-9E40-4138-85DA-B94633972E6A}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PropertySheets/Win32.props b/PropertySheets/Win32.props index 100abca47..b4c206b87 100644 --- a/PropertySheets/Win32.props +++ b/PropertySheets/Win32.props @@ -2,7 +2,9 @@ $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)bin\$(Configuration)64\ $(SolutionDir)build\$(Configuration)\$(ProjectName)\ + $(SolutionDir)build\$(Configuration)64\$(ProjectName)\ *.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath);$(ExtensionsToDeleteOnClean) false false @@ -11,13 +13,16 @@ $(SolutionDir)bin\$(Configuration)\lib\ + $(SolutionDir)bin\$(Configuration)64\lib\ WIN32;_WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) - MachineX86 + Windows + MachineX86 + MachineX64 @@ -56,7 +61,7 @@ Default false true - NoExtensions + NoExtensions Precise false false diff --git a/Source/3rd Party/7zip/7zip.vcxproj b/Source/3rd Party/7zip/7zip.vcxproj index 4823c4f07..18c959071 100644 --- a/Source/3rd Party/7zip/7zip.vcxproj +++ b/Source/3rd Party/7zip/7zip.vcxproj @@ -5,11 +5,44 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + + + {3326E128-33AF-422C-BB7C-67CC6B915610} + 7zip + + + + StaticLibrary + v120_xp + + + + + + + + + + <_ProjectFileVersion>12.0.21005.1 + + + + + 4127;%(DisableSpecificWarnings) + + @@ -81,31 +114,6 @@ - - {3326E128-33AF-422C-BB7C-67CC6B915610} - 7zip - - - - StaticLibrary - v120_xp - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - - - 4127;%(DisableSpecificWarnings) - - diff --git a/Source/3rd Party/zlib/zlib.vcxproj b/Source/3rd Party/zlib/zlib.vcxproj index 8e5a6ef46..6163a13c1 100644 --- a/Source/3rd Party/zlib/zlib.vcxproj +++ b/Source/3rd Party/zlib/zlib.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {731BD205-2826-4631-B7AF-117658E88DBC} @@ -24,7 +32,7 @@ - + <_ProjectFileVersion>12.0.21005.1 @@ -33,7 +41,7 @@ Level4 - 4100;4127;4131;4189;4244;4701;4703;4996 + 4100;4127;4131;4189;4244;4701;4703;4996 diff --git a/Source/Common/Common.vcxproj b/Source/Common/Common.vcxproj index 62faa2e3b..51829e4b0 100644 --- a/Source/Common/Common.vcxproj +++ b/Source/Common/Common.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {B4A4B994-9111-42B1-93C2-6F1CA8BC4421} @@ -24,7 +32,7 @@ - + <_ProjectFileVersion>12.0.21005.1 diff --git a/Source/Project64/Multilanguage/Language Class.cpp b/Source/Project64/Multilanguage/Language Class.cpp index 9ac358c98..85df4fc3f 100644 --- a/Source/Project64/Multilanguage/Language Class.cpp +++ b/Source/Project64/Multilanguage/Language Class.cpp @@ -796,10 +796,12 @@ LRESULT CALLBACK LangSelectProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { lResult = HTCAPTION; } +#ifdef _M_IX86 SetWindowLong(hDlg, DWL_MSGRESULT, lResult); - +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif return TRUE; - } break; case WM_CTLCOLORSTATIC: diff --git a/Source/Project64/N64 System/Interpreter/Interpreter Ops.cpp b/Source/Project64/N64 System/Interpreter/Interpreter Ops.cpp index 09f85cb63..1a5e31e8a 100644 --- a/Source/Project64/N64 System/Interpreter/Interpreter Ops.cpp +++ b/Source/Project64/N64 System/Interpreter/Interpreter Ops.cpp @@ -2355,6 +2355,7 @@ void R4300iOp::COP1_BCTL() /************************** COP1: S functions ************************/ __inline void Float_RoundToInteger32( int * Dest, float * Source ) { +#ifdef _M_IX86 _asm { mov esi, [Source] @@ -2362,10 +2363,14 @@ __inline void Float_RoundToInteger32( int * Dest, float * Source ) fld dword ptr [esi] fistp dword ptr [edi] } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif } __inline void Float_RoundToInteger64( __int64 * Dest, float * Source ) { +#ifdef _M_IX86 _asm { mov esi, [Source] @@ -2373,6 +2378,9 @@ __inline void Float_RoundToInteger64( __int64 * Dest, float * Source ) fld dword ptr [esi] fistp qword ptr [edi] } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif } void R4300iOp::COP1_S_ADD() @@ -2408,6 +2416,7 @@ void R4300iOp::COP1_S_SQRT() TEST_COP1_USABLE_EXCEPTION _controlfp(*_RoundingModel,_MCW_RC); +#ifdef _M_IX86 float * Dest = (float *)_FPR_S[m_Opcode.fd]; float * Source = (float *)_FPR_S[m_Opcode.fs]; _asm @@ -2420,6 +2429,9 @@ void R4300iOp::COP1_S_SQRT() fstp dword ptr [esi] pop esi } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif } void R4300iOp::COP1_S_ABS() @@ -2565,6 +2577,7 @@ void R4300iOp::COP1_S_CMP() /************************** COP1: D functions ************************/ __inline void Double_RoundToInteger32( DWORD * Dest, double * Source ) { +#ifdef _M_IX86 _asm { mov esi, [Source] @@ -2572,10 +2585,14 @@ __inline void Double_RoundToInteger32( DWORD * Dest, double * Source ) fld qword ptr [esi] fistp dword ptr [edi] } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif } __inline void Double_RoundToInteger64( unsigned __int64 * Dest, double * Source ) { +#ifdef _M_IX86 _asm { mov esi, [Source] @@ -2583,6 +2600,9 @@ __inline void Double_RoundToInteger64( unsigned __int64 * Dest, double * Source fld qword ptr [esi] fistp qword ptr [edi] } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif } void R4300iOp::COP1_D_ADD() diff --git a/Source/Project64/N64 System/Mips/FlashRam.cpp b/Source/Project64/N64 System/Mips/FlashRam.cpp index b77156ca9..da270396b 100644 --- a/Source/Project64/N64 System/Mips/FlashRam.cpp +++ b/Source/Project64/N64 System/Mips/FlashRam.cpp @@ -69,6 +69,8 @@ void CFlashram::DmaFromFlashram ( BYTE * dest, int StartOffset, int len) { FlipBuffer[count] = 0xFF; } + +#ifdef _M_IX86 _asm { mov edi, dest @@ -84,6 +86,9 @@ void CFlashram::DmaFromFlashram ( BYTE * dest, int StartOffset, int len) cmp edx, ebx jb memcpyloop } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif break; case FLASHRAM_MODE_STATUS: if (StartOffset != 0 && len != 8) @@ -193,10 +198,11 @@ void CFlashram::WriteToFlashCommand(DWORD FlashRAM_Command) } { BYTE FlipBuffer[128]; + memset(FlipBuffer,0,sizeof(FlipBuffer)); + +#ifdef _M_IX86 DWORD dwWritten; BYTE * FlashRamPointer = m_FlashRamPointer; - - memset(FlipBuffer,0,sizeof(FlipBuffer)); _asm { lea edi, [FlipBuffer] @@ -211,6 +217,9 @@ void CFlashram::WriteToFlashCommand(DWORD FlashRAM_Command) cmp edx, 128 jb memcpyloop } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif SetFilePointer(m_hFile,m_FlashRAM_Offset,NULL,FILE_BEGIN); WriteFile(m_hFile,FlipBuffer,128,&dwWritten,NULL); diff --git a/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp b/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp index ea4043e6a..b0c7c6eaf 100644 --- a/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp +++ b/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp @@ -1934,6 +1934,7 @@ void CMipsMemoryVM::ResetMemoryStack() int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer ) { +#ifdef _M_IX86 if (dwExptCode != EXCEPTION_ACCESS_VIOLATION) { if (bHaveDebugger()) @@ -2304,6 +2305,9 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer ) { g_Notify->BreakPoint(__FILEW__,__LINE__); } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif return EXCEPTION_EXECUTE_HANDLER; } @@ -2619,6 +2623,7 @@ bool CMipsMemoryVM::LW_NonMemory(DWORD PAddr, DWORD* Value) } else if (PAddr < 0x1FC00800) { +#ifdef _M_IX86 BYTE * PIF_Ram = g_MMU->PifRam(); DWORD ToSwap = *(DWORD *)(&PIF_Ram[PAddr - 0x1FC007C0]); _asm @@ -2628,6 +2633,9 @@ bool CMipsMemoryVM::LW_NonMemory(DWORD PAddr, DWORD* Value) mov ToSwap,eax } *Value = ToSwap; +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif return true; } else @@ -3313,12 +3321,16 @@ bool CMipsMemoryVM::SW_NonMemory(DWORD PAddr, DWORD Value) } else if (PAddr < 0x1FC00800) { +#ifdef _M_IX86 _asm { mov eax,Value bswap eax mov Value,eax } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif *(DWORD *)(&m_PifRam[PAddr - 0x1FC007C0]) = Value; if (PAddr == 0x1FC007FC) { diff --git a/Source/Project64/N64 System/Mips/Pif Ram.cpp b/Source/Project64/N64 System/Mips/Pif Ram.cpp index d04f2c0bf..436e269d7 100644 --- a/Source/Project64/N64 System/Mips/Pif Ram.cpp +++ b/Source/Project64/N64 System/Mips/Pif Ram.cpp @@ -302,6 +302,7 @@ void CPifRam::SI_DMA_READ() } else { +#ifdef _M_IX86 _asm { mov edi, dword ptr [SI_DRAM_ADDR_REG] @@ -326,6 +327,9 @@ void CPifRam::SI_DMA_READ() cmp edx, 64 jb memcpyloop } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif } if (LogOptions.LogPRDMAMemStores) @@ -409,6 +413,7 @@ void CPifRam::SI_DMA_WRITE() } else { +#ifdef _M_IX86 _asm { mov ecx, dword ptr [SI_DRAM_ADDR_REG] @@ -433,6 +438,9 @@ void CPifRam::SI_DMA_WRITE() cmp edx, 64 jb memcpyloop } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif } if (LogOptions.LogPRDMAMemLoads) diff --git a/Source/Project64/N64 System/Profiling Class.cpp b/Source/Project64/N64 System/Profiling Class.cpp index 0aa1cc5ca..b8b7def8e 100644 --- a/Source/Project64/N64 System/Profiling Class.cpp +++ b/Source/Project64/N64 System/Profiling Class.cpp @@ -25,6 +25,7 @@ SPECIAL_TIMERS CProfiling::StartTimer(SPECIAL_TIMERS Address) SPECIAL_TIMERS OldTimerAddr = StopTimer(); m_CurrentTimerAddr = Address; +#ifdef _M_IX86 DWORD HiValue, LoValue; _asm { pushad @@ -35,6 +36,9 @@ SPECIAL_TIMERS CProfiling::StartTimer(SPECIAL_TIMERS Address) } m_StartTimeHi = HiValue; m_StartTimeLo = LoValue; +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif return OldTimerAddr; } @@ -43,6 +47,7 @@ SPECIAL_TIMERS CProfiling::StopTimer() { if (m_CurrentTimerAddr == Timer_None) { return m_CurrentTimerAddr; } +#ifdef _M_IX86 _asm { pushad rdtsc @@ -50,6 +55,9 @@ SPECIAL_TIMERS CProfiling::StopTimer() { mov LoValue, eax popad } +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif __int64 StopTime = ((unsigned __int64)HiValue << 32) + (unsigned __int64)LoValue; __int64 StartTime = ((unsigned __int64)m_StartTimeHi << 32) + (unsigned __int64)m_StartTimeLo; diff --git a/Source/Project64/Project64.vcxproj b/Source/Project64/Project64.vcxproj index 77c20811f..6f22febea 100644 --- a/Source/Project64/Project64.vcxproj +++ b/Source/Project64/Project64.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {7E534C8E-1ACE-4A88-8807-39A11ED4DA18} @@ -24,29 +32,11 @@ - + <_ProjectFileVersion>12.0.21005.1 - - - false - false - - Windows - - - - - - - - - - - - @@ -179,7 +169,9 @@ User Interface;%(AdditionalIncludeDirectories) + User Interface;%(AdditionalIncludeDirectories) User Interface;%(AdditionalIncludeDirectories) + User Interface;%(AdditionalIncludeDirectories) @@ -306,7 +298,7 @@ - + {3326e128-33af-422c-bb7c-67cc6b915610} diff --git a/Source/Project64/User Interface/Gui Class.cpp b/Source/Project64/User Interface/Gui Class.cpp index 752b93305..03c1e7710 100644 --- a/Source/Project64/User Interface/Gui Class.cpp +++ b/Source/Project64/User Interface/Gui Class.cpp @@ -19,7 +19,7 @@ void EnterLogOptions(HWND hwndOwner); #pragma comment(lib, "Comctl32.lib") DWORD CALLBACK AboutBoxProc (HWND WndHandle, DWORD uMsg, DWORD wParam, DWORD lParam); -DWORD CALLBACK MainGui_Proc (HWND WndHandle, DWORD uMsg, DWORD wParam, DWORD lParam); +LRESULT CALLBACK MainGui_Proc (HWND WndHandle, DWORD uMsg, DWORD wParam, DWORD lParam); extern BOOL set_about_field( HWND hDlg, @@ -342,12 +342,14 @@ void CMainGui::Create (const char * WindowTitle) m_Created = m_hMainWindow != NULL; } -void CMainGui::CreateStatusBar (void) { +void CMainGui::CreateStatusBar (void) +{ m_hStatusWnd = (HWND)CreateStatusWindow( WS_CHILD | WS_VISIBLE, "", m_hMainWindow, StatusBarID ); SendMessage( (HWND)m_hStatusWnd, SB_SETTEXT, 0, (LPARAM)"" ); } -int CMainGui::ProcessAllMessages (void) { +WPARAM CMainGui::ProcessAllMessages (void) +{ MSG msg; while (GetMessage(&msg,NULL,0,0)) @@ -524,8 +526,10 @@ void CMainGui::SaveWindowLoc ( void ) } } -DWORD CALLBACK CMainGui::MainGui_Proc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam) { - switch (uMsg) { +LRESULT CALLBACK CMainGui::MainGui_Proc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam) +{ + switch (uMsg) + { case WM_CREATE: { //record class for future usage @@ -1135,7 +1139,11 @@ DWORD CALLBACK AboutBoxProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam) { lResult = HTCAPTION; } +#ifdef _M_IX86 SetWindowLong(hWnd, DWL_MSGRESULT, lResult); +#else + g_Notify->BreakPoint(__FILEW__,__LINE__); +#endif return TRUE; diff --git a/Source/Project64/User Interface/Gui Class.h b/Source/Project64/User Interface/Gui Class.h index d8fb7ae2c..30dcca993 100644 --- a/Source/Project64/User Interface/Gui Class.h +++ b/Source/Project64/User Interface/Gui Class.h @@ -45,7 +45,7 @@ public: ~CMainGui ( void ); //Message Processing - int ProcessAllMessages ( void ); + WPARAM ProcessAllMessages ( void ); bool ProcessGuiMessages ( void ); //debugging functions @@ -99,7 +99,7 @@ private: friend DWORD CALLBACK AboutBoxProc ( HWND, DWORD, DWORD, DWORD ); friend DWORD CALLBACK AboutIniBoxProc ( HWND, DWORD, DWORD, DWORD ); - static DWORD CALLBACK MainGui_Proc ( HWND, DWORD, DWORD, DWORD ); + static LRESULT CALLBACK MainGui_Proc ( HWND, DWORD, DWORD, DWORD ); friend void RomBowserEnabledChanged (CMainGui * Gui); friend void RomBowserColoumnsChanged (CMainGui * Gui); diff --git a/Source/Project64/User Interface/Settings/Settings Page - Keyboard Shortcuts.cpp b/Source/Project64/User Interface/Settings/Settings Page - Keyboard Shortcuts.cpp index 0f794a7b9..97514eace 100644 --- a/Source/Project64/User Interface/Settings/Settings Page - Keyboard Shortcuts.cpp +++ b/Source/Project64/User Interface/Settings/Settings Page - Keyboard Shortcuts.cpp @@ -305,7 +305,7 @@ BOOL CALLBACK KeyPromptDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lP void COptionsShortCutsPage::InputGetKeys (void) { - HWND hKeyDlg = CreateDialogParam(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_Key_Prompt),m_hWnd,KeyPromptDlgProc,(LPARAM)::GetDlgItem(m_hWnd,IDC_VIRTUALKEY)); + HWND hKeyDlg = CreateDialogParam(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_Key_Prompt),m_hWnd,(DLGPROC)KeyPromptDlgProc,(LPARAM)::GetDlgItem(m_hWnd,IDC_VIRTUALKEY)); ::EnableWindow(GetParent(),false); MSG msg; diff --git a/Source/Project64/User Interface/Settings/Settings Page.h b/Source/Project64/User Interface/Settings/Settings Page.h index f9a3581d0..2e043c66e 100644 --- a/Source/Project64/User Interface/Settings/Settings Page.h +++ b/Source/Project64/User Interface/Settings/Settings Page.h @@ -558,7 +558,7 @@ public: LPCWSTR GetPageTitle ( void ) const { return m_PageTitle.c_str(); } void AddPage ( CSettingsPage * Page ); - int GetPageCount ( void ) const { return m_Pages.size(); } + size_t GetPageCount ( void ) const { return m_Pages.size(); } CSettingsPage * GetPage ( int PageNo ); }; diff --git a/Source/Project64/User Interface/UI Resources.rc b/Source/Project64/User Interface/UI Resources.rc index 5e49cceb3..1c5069ef4 100644 --- a/Source/Project64/User Interface/UI Resources.rc +++ b/Source/Project64/User Interface/UI Resources.rc @@ -19,7 +19,9 @@ ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources +#ifdef _M_IX86 CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "..\Project64.exe.manifest" +#endif #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 diff --git a/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListEdit.h b/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListEdit.h index d07dd9d41..aefcd3aca 100644 --- a/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListEdit.h +++ b/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListEdit.h @@ -144,27 +144,29 @@ public: (nCharValue >= 'A' && nCharValue <= 'F' || nCharValue >= 'a' && nCharValue <= 'f')) { if ( nDigitIndex < 0 ) - nDigitIndex = nCharIndex; + { + nDigitIndex = (int)nCharIndex; + } break; } switch ( nCharValue ) { - case _T( '-' ): nNegativeIndex = nCharIndex; + case _T( '-' ): nNegativeIndex = (int)nCharIndex; break; case _T( '>' ): if ( !( m_nFlags & ITEM_FLAGS_EDIT_OPERATOR ) ) return FALSE; - nGreaterIndex = nCharIndex; + nGreaterIndex = (int)nCharIndex; nGreaterThan++; break; case _T( '<' ): if ( !( m_nFlags & ITEM_FLAGS_EDIT_OPERATOR ) ) return FALSE; - nLessIndex = nCharIndex; + nLessIndex = (int)nCharIndex; nLessThan++; break; case _T( '=' ): if ( !( m_nFlags & ITEM_FLAGS_EDIT_OPERATOR ) ) return FALSE; - nEqualIndex = nCharIndex; + nEqualIndex = (int)nCharIndex; nEquals++; break; case _T( '.' ): if ( !( m_nFlags & ITEM_FLAGS_EDIT_FLOAT ) ) diff --git a/Source/Project64/User Interface/WTL Controls/ClistCtrl/TitleTip.h b/Source/Project64/User Interface/WTL Controls/ClistCtrl/TitleTip.h index e4ad5bed4..e3c815a11 100644 --- a/Source/Project64/User Interface/WTL Controls/ClistCtrl/TitleTip.h +++ b/Source/Project64/User Interface/WTL Controls/ClistCtrl/TitleTip.h @@ -75,7 +75,7 @@ public: CRect rcTextExtent( rcRect ); // calculate item text extent... - dcClient.DrawText( strItemText.c_str(), strItemText.length(), rcTextExtent, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_CALCRECT ); + dcClient.DrawText( strItemText.c_str(), (int)strItemText.length(), rcTextExtent, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_CALCRECT ); dcClient.SelectFont( hOldFont ); @@ -216,7 +216,7 @@ public: CRect rcItemText( rcClient ); rcItemText.OffsetRect( 4, 0 ); - dcPaint.DrawText( strItemText.c_str(), strItemText.length(), rcItemText, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER ); + dcPaint.DrawText( strItemText.c_str(), (int)strItemText.length(), rcItemText, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER ); dcPaint.RestoreDC( nContextState ); } diff --git a/Source/Project64/User Interface/WTL Controls/numberctrl.h b/Source/Project64/User Interface/WTL Controls/numberctrl.h index dcb63a75c..1cedcb634 100644 --- a/Source/Project64/User Interface/WTL Controls/numberctrl.h +++ b/Source/Project64/User Interface/WTL Controls/numberctrl.h @@ -45,7 +45,7 @@ protected: GetWindowText(WindowText,sizeof(WindowText)); bool bPaste=true; - unsigned int Len = strlen(WindowText); + size_t Len = strlen(WindowText); char head = Len > 0 ? WindowText[0] : 0; char second = Len > 1 ? WindowText[1] : 0; @@ -180,7 +180,7 @@ protected: //CString text; char WindowText[200]; GetWindowText(WindowText,sizeof(WindowText)); - int Len = strlen(WindowText); + size_t Len = strlen(WindowText); char head = Len > 0 ? WindowText[0] : 0; char second = Len > 1 ? WindowText[1] : 0; @@ -294,14 +294,14 @@ public: return atoi(text); } - int Finish = strlen(text); + size_t Finish = strlen(text); char second = Finish > 1 ? text[1] : 0; int Start = (second == 'x' || second == 'X') ? 2 : 0; if (Finish > (8 + Start)) { Finish = (8 + Start); } DWORD Value = 0; - for (int i = Start; i < Finish; i++) + for (size_t i = Start; i < Finish; i++) { Value = (Value << 4); switch( text[i] ) {