From ea934759e15c94ad2fa67e76e11f5d469ebfccf4 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Wed, 16 Jul 2008 20:50:16 +0000 Subject: [PATCH] Mostly cleanup and some better crash messages. Also enabled partial block linking (see JitCache.cpp), should give a small speedup but may cause problems, please report! git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@12 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Common.vcproj | 10 +- Source/Core/Common/Src/Common.h | 2 + Source/Core/Common/Src/FileUtil.cpp | 11 + Source/Core/Common/Src/FileUtil.h | 12 + Source/Core/Common/Src/MemArena.cpp | 12 +- Source/Core/Core/Core.vcproj | 10 +- Source/Core/Core/Src/CoreTiming.cpp | 1 + Source/Core/Core/Src/MemTools.cpp | 25 +- Source/Core/Core/Src/PowerPC/Jit64/Jit.h | 6 +- .../Core/Src/PowerPC/Jit64/JitBackpatch.cpp | 126 +++++++ .../Core/Src/PowerPC/Jit64/JitBackpatch.h | 10 + .../Core/Core/Src/PowerPC/Jit64/JitCache.cpp | 326 +++++++----------- .../Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp | 20 +- .../Core/Src/PowerPC/Jit64/Jit_Paired.cpp | 5 + Source/Core/Core/Src/PowerPC/PowerPC.cpp | 3 +- Source/Core/Core/Src/PowerPC/PowerPC.h | 2 +- Source/Core/DebuggerWX/DebuggerWX.vcproj | 3 +- Source/Core/DiscIO/DiscIO.vcproj | 12 +- Source/Core/DolphinWX/DolphinWX.vcproj | 6 +- Source/Core/DolphinWX/src/Main.cpp | 1 - Source/Core/DolphinWX/src/PluginManager.cpp | 17 +- Source/Dolphin.sln | 41 +-- Source/Plugins/Plugin_DSP_NULL/Src/resource.h | 4 +- .../Plugins/Plugin_DSP_NULL/Src/resource.rc | 52 +-- .../Plugin_VideoDX9/Plugin_VideoDX9.vcproj | 10 +- .../Plugin_VideoOGL/Plugin_VideoOGL.vcproj | 8 +- .../Plugin_VideoOGL/Src/Windows/resource.rc | 22 +- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 6 +- 28 files changed, 419 insertions(+), 344 deletions(-) create mode 100644 Source/Core/Common/Src/FileUtil.cpp create mode 100644 Source/Core/Common/Src/FileUtil.h create mode 100644 Source/Core/Core/Src/PowerPC/Jit64/JitBackpatch.cpp create mode 100644 Source/Core/Core/Src/PowerPC/Jit64/JitBackpatch.h diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj index 02688ff4fe..7344e39587 100644 --- a/Source/Core/Common/Common.vcproj +++ b/Source/Core/Common/Common.vcproj @@ -1,7 +1,7 @@ + + + + diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index d3f0fa481f..8281703c10 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -69,7 +69,9 @@ typedef signed __int16 s16; typedef signed __int8 s8; #define GC_ALIGNED16(x) __declspec(align(16)) x +#define GC_ALIGNED64(x) __declspec(align(64)) x #define GC_ALIGNED16_DECL(x) __declspec(align(16)) x +#define GC_ALIGNED64_DECL(x) __declspec(align(64)) x #else diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp new file mode 100644 index 0000000000..1eb5540486 --- /dev/null +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -0,0 +1,11 @@ +#include "Common.h" +#include "FileUtil.h" + +bool File::Exists(const std::string &filename) +{ +#ifdef _WIN32 + return GetFileAttributes(filename.c_str()) != INVALID_FILE_ATTRIBUTES; +#else + return true; //TODO +#endif +} \ No newline at end of file diff --git a/Source/Core/Common/Src/FileUtil.h b/Source/Core/Common/Src/FileUtil.h new file mode 100644 index 0000000000..b170d45ba7 --- /dev/null +++ b/Source/Core/Common/Src/FileUtil.h @@ -0,0 +1,12 @@ +#ifndef _FILEUTIL_H +#define _FILEUTIL_H + +#include + +class File +{ +public: + static bool Exists(const std::string &filename); +}; + +#endif diff --git a/Source/Core/Common/Src/MemArena.cpp b/Source/Core/Common/Src/MemArena.cpp index f577373fdd..4455f99004 100644 --- a/Source/Core/Common/Src/MemArena.cpp +++ b/Source/Core/Common/Src/MemArena.cpp @@ -104,11 +104,10 @@ u64 MemArena::Find4GBBase() { #ifdef _M_X64 #ifdef _WIN32 - // The highest thing in any 1GB section of memory space is the locked cache. We only need to fit it. + // 64 bit u8* base = (u8*)VirtualAlloc(0, 0xE1000000, MEM_RESERVE, PAGE_READWRITE); VirtualFree(base, 0, MEM_RELEASE); return((u64)base); - #else // Very precarious - mmap cannot return an error when trying to map already used pages. // This makes the Windows approach above unusable on Linux, so we will simply pray... @@ -116,12 +115,13 @@ u64 MemArena::Find4GBBase() #endif #else - // Only grab a bit less than 1GB + // 32 bit + // The highest thing in any 1GB section of memory space is the locked cache. We only need to fit it. u8* base = (u8*)VirtualAlloc(0, 0x31000000, MEM_RESERVE, PAGE_READWRITE); - VirtualFree(base, 0, MEM_RELEASE); + if (base) { + VirtualFree(base, 0, MEM_RELEASE); + } return((u64)base); #endif } - - diff --git a/Source/Core/Core/Core.vcproj b/Source/Core/Core/Core.vcproj index 1779e0bfd7..cc8922d284 100644 --- a/Source/Core/Core/Core.vcproj +++ b/Source/Core/Core/Core.vcproj @@ -1,7 +1,7 @@ + + + + diff --git a/Source/Core/Core/Src/CoreTiming.cpp b/Source/Core/Core/Src/CoreTiming.cpp index eb31d9d46a..3799db6501 100644 --- a/Source/Core/Core/Src/CoreTiming.cpp +++ b/Source/Core/Core/Src/CoreTiming.cpp @@ -233,6 +233,7 @@ void Advance() if (!first) { LOG(GEKKO, "WARNING - no events in queue. Setting downcount to 10000"); + // PanicAlert? downcount += 10000; } else diff --git a/Source/Core/Core/Src/MemTools.cpp b/Source/Core/Core/Src/MemTools.cpp index e9e091a14e..3bcad01b7b 100644 --- a/Source/Core/Core/Src/MemTools.cpp +++ b/Source/Core/Core/Src/MemTools.cpp @@ -24,12 +24,12 @@ #include #include "Common.h" -#include "x64Analyzer.h" -#include "PowerPC/Jit64/Jit.h" - #include "MemTools.h" +#include "HW/Memmap.h" +#include "PowerPC/Jit64/Jit.h" +#include "PowerPC/Jit64/JitBackpatch.h" +#include "x64Analyzer.h" -//#ifdef ASDFKJLASJDF namespace EMM { /* DESIGN @@ -98,14 +98,11 @@ struct Watch std::vector watches; - - void UpdateProtection(EAddr startAddr, EAddr endAddr) { } - int AddWatchRegion(EAddr startAddr, EAddr endAddr, WR watchFor, WatchType type, WatchCallback callback, u64 userData) { static int watchIDGen = 0; @@ -124,8 +121,6 @@ int AddWatchRegion(EAddr startAddr, EAddr endAddr, WR watchFor, WatchType type, return watch.ID; } - - void Notify(EAddr address, WR action) { for (std::vector::iterator iter = watches.begin(); iter != watches.end(); ++iter) @@ -208,6 +203,9 @@ public: } }; +// ====== +// From here on is the code in this file that actually works and is active. + LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs) { switch (pPtrs->ExceptionRecord->ExceptionCode) @@ -233,6 +231,7 @@ LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs) //Figure out what address was hit DWORD_PTR badAddress = (DWORD_PTR)pPtrs->ExceptionRecord->ExceptionInformation[1]; //TODO: First examine the address, make sure it's within the emulated memory space + u64 memspaceBottom = (u64)Memory::base; if (badAddress < memspaceBottom) { PanicAlert("Exception handler - access below memory space. %08x%08x", badAddress >> 32, badAddress); @@ -240,17 +239,15 @@ LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs) u32 emAddress = (u32)(badAddress - memspaceBottom); //Now we have the emulated address. - //_assert_msg_(DYNA_REC,0,"MT : %08x",emAddress); - //Let's notify everyone who wants to be notified //Notify(emAddress, accessType == 0 ? Read : Write); CONTEXT *ctx = pPtrs->ContextRecord; - //opportunity to change the debug regs! + //opportunity to play with the context - we can change the debug regs! //We could emulate the memory accesses here, but then they would still be around to take up - //execution resources. Instead, we backpatch and retry. - Jit64::BackPatch(codePtr, accessType); + //execution resources. Instead, we backpatch into a generic memory call and retry. + Jit64::BackPatch(codePtr, accessType, emAddress); // We no longer touch Rip, since we return back to the instruction, after overwriting it with a // trampoline jump and some nops diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.h b/Source/Core/Core/Src/PowerPC/Jit64/Jit.h index ce258ffb7b..729fb5a033 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.h +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.h @@ -14,6 +14,11 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ + +// Low hanging fruit: +// all used in zelda +// negx + #ifndef _JIT_H #define _JIT_H @@ -74,7 +79,6 @@ namespace Jit64 void WriteExitDestInEAX(int exit_num); void WriteExceptionExit(u32 exception); void WriteRfiExitDestInEAX(); - void BackPatch(u8 *codePtr, int accessType); void HLEFunction(UGeckoInstruction _inst); diff --git a/Source/Core/Core/Src/PowerPC/Jit64/JitBackpatch.cpp b/Source/Core/Core/Src/PowerPC/Jit64/JitBackpatch.cpp new file mode 100644 index 0000000000..b16d333b31 --- /dev/null +++ b/Source/Core/Core/Src/PowerPC/Jit64/JitBackpatch.cpp @@ -0,0 +1,126 @@ +#include + +#include "Common.h" +#include "disasm.h" +#include "JitBackpatch.h" +#include "../../HW/Memmap.h" + +#include "x64Emitter.h" +#include "x64Analyzer.h" + +#include "StringUtil.h" +#include "Jit.h" + +using namespace Gen; + +namespace Jit64 { + +extern u8 *trampolineCodePtr; + +void BackPatchError(const std::string &text, u8 *codePtr, u32 emAddress) { + u64 code_addr = (u64)codePtr; + disassembler disasm; + char disbuf[256]; + memset(disbuf, 0, 256); +#ifdef _M_IX86 + disasm.disasm32( +#else + disasm.disasm64( +#endif + 0, code_addr, codePtr, disbuf); + PanicAlert("%s\n\n" + "Error encountered accessing emulated address %08x.\n" + "Culprit instruction: \n%s\nat %08x%08x", + text.c_str(), emAddress, disbuf, code_addr>>32, code_addr); + return; +} + +void BackPatch(u8 *codePtr, int accessType, u32 emAddress) +{ + if (!IsInJitCode(codePtr)) + return; // this will become a regular crash real soon after this + + // TODO: also mark and remember the instruction address as known HW memory access, for use in later compiles. + // But to do that we need to be able to reconstruct what instruction wrote this code, and we can't do that yet. + u8 *oldCodePtr = GetWritableCodePtr(); + InstructionInfo info; + if (!DisassembleMov(codePtr, info, accessType)) { + BackPatchError("BackPatch - failed to disassemble MOV instruction", codePtr, emAddress); + } + if (info.operandSize != 4) { + BackPatchError(StringFromFormat("BackPatch - no support for operand size %i", info.operandSize), codePtr, emAddress); + } + u64 code_addr = (u64)codePtr; + X64Reg addrReg = (X64Reg)info.scaledReg; + X64Reg dataReg = (X64Reg)info.regOperandReg; + if (info.otherReg != RBX) + PanicAlert("BackPatch : Base reg not RBX." + "\n\nAttempted to access %08x.", emAddress); + if (accessType == OP_ACCESS_WRITE) + PanicAlert("BackPatch : Currently only supporting reads." + "\n\nAttempted to write to %08x.", emAddress); + //if (info.instructionSize < 5) + // PanicAlert("Instruction at %08x Too Small : %i", (u32)codePtr, info.instructionSize); + // OK, let's write a trampoline, and a jump to it. + // Later, let's share trampolines. + + // In the first iteration, we assume that all accesses are 32-bit. We also only deal with reads. + // Next step - support writes, special case FIFO writes. Also, support 32-bit mode. + u8 *trampoline = trampolineCodePtr; + SetCodePtr(trampolineCodePtr); + // * Save all volatile regs + PUSH(RCX); + PUSH(RDX); + PUSH(RSI); + PUSH(RDI); + PUSH(R8); + PUSH(R9); + PUSH(R10); + PUSH(R11); + //TODO: Also preserve XMM0-3? + SUB(64, R(RSP), Imm8(0x20)); + // * Set up stack frame. + // * Call ReadMemory32 + //LEA(32, ECX, MDisp((X64Reg)addrReg, info.displacement)); + MOV(32, R(ECX), R((X64Reg)addrReg)); + if (info.displacement) { + ADD(32, R(ECX), Imm32(info.displacement)); + } + switch (info.operandSize) { + //case 1: + // CALL((void *)&Memory::Read_U8); + // break; + case 4: + CALL((void *)&Memory::Read_U32); + break; + default: + BackPatchError(StringFromFormat("We don't handle the size %i yet in backpatch", info.operandSize), codePtr, emAddress); + break; + } + // * Tear down stack frame. + ADD(64, R(RSP), Imm8(0x20)); + POP(R11); + POP(R10); + POP(R9); + POP(R8); + POP(RDI); + POP(RSI); + POP(RDX); + POP(RCX); + MOV(32, R(dataReg), R(EAX)); + RET(); + trampolineCodePtr = GetWritableCodePtr(); + + SetCodePtr(codePtr); + int bswapNopCount; + // Check the following BSWAP for REX byte + if ((GetCodePtr()[info.instructionSize] & 0xF0) == 0x40) + bswapNopCount = 3; + else + bswapNopCount = 2; + CALL(trampoline); + NOP((int)info.instructionSize + bswapNopCount - 5); + SetCodePtr(oldCodePtr); +} + +} // namespace diff --git a/Source/Core/Core/Src/PowerPC/Jit64/JitBackpatch.h b/Source/Core/Core/Src/PowerPC/Jit64/JitBackpatch.h new file mode 100644 index 0000000000..1cf07196ab --- /dev/null +++ b/Source/Core/Core/Src/PowerPC/Jit64/JitBackpatch.h @@ -0,0 +1,10 @@ +#ifndef _JITBACKPATCH_H +#define _JITBACKPATCH_H + +#include "Common.h" + +namespace Jit64 { +void BackPatch(u8 *codePtr, int accessType, u32 emAddress); +} + +#endif diff --git a/Source/Core/Core/Src/PowerPC/Jit64/JitCache.cpp b/Source/Core/Core/Src/PowerPC/Jit64/JitCache.cpp index c17e526afc..52040c5da0 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/JitCache.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/JitCache.cpp @@ -26,7 +26,6 @@ #include "../PPCTables.h" #include "../PPCAnalyst.h" - #include "x64Emitter.h" #include "x64Analyzer.h" @@ -34,6 +33,8 @@ #include "JitCache.h" #include "JitAsm.h" +#include "disasm.h" + using namespace Gen; namespace Jit64 @@ -43,6 +44,8 @@ namespace Jit64 u8 *trampolineCache; u8 *trampolineCodePtr; #define INVALID_EXIT 0xFFFFFFFF + void LinkBlockExits(int i); + void LinkBlock(int i); enum { @@ -54,8 +57,7 @@ namespace Jit64 u8 **blockCodePointers; // cut these in half and force below 2GB? - // todo - replace with something faster - std::map unlinked; + std::multimap links_to; JitBlock *blocks; int numBlocks; @@ -72,98 +74,15 @@ namespace Jit64 LOG(DYNA_REC, "======================================"); } - JitBlock *CurBlock() - { - return &blocks[numBlocks]; - } - JitBlock *GetBlock(int no) - { - return &blocks[no]; - } - int GetNumBlocks() - { - return numBlocks; - } - - - bool RangeIntersect(int s1, int e1, int s2, int e2) - { - // check if any endpoint is inside the other range - if ( (s1 >= s2 && s1 <= e2) || - (e1 >= s2 && e1 <= e2) || - (s2 >= s1 && s2 <= e1) || - (e2 >= s1 && e2 <= e1)) - return true; - else - return false; - } - - void LinkBlocksCallback(u64 userdata, int cyclesLate) - { - LinkBlocks(); - } - - u8 *Jit(u32 emaddress) - { - if (GetCodePtr() >= codeCache + CODE_SIZE - 0x10000 || numBlocks>=MAX_NUM_BLOCKS-1) - { - //PanicAlert("Cleared cache"); - LOG(DYNA_REC, "JIT code cache full - clearing cache and restoring memory") - ClearCache(); - } - JitBlock &b = blocks[numBlocks]; - b.originalAddress = emaddress; - b.exitAddress[0] = INVALID_EXIT; - b.exitAddress[1] = INVALID_EXIT; - b.exitPtrs[0] = 0; - b.exitPtrs[1] = 0; - b.linkStatus[0] = false; - b.linkStatus[1] = false; - b.originalFirstOpcode = Memory::ReadFast32(emaddress); - - blockCodePointers[numBlocks] = (u8*)DoJit(emaddress, b); //cast away const, evil - Memory::WriteUnchecked_U32((JIT_OPCODE << 26) | numBlocks, emaddress); - - //Flatten should also compute exits - //Success! - - if (jo.enableBlocklink) { - for (int i = 0; i < 2; i++) { - if (b.exitAddress[0] != INVALID_EXIT) - { - unlinked[b.exitAddress[0]] = numBlocks; - } - } - // Link max once per half billion cycles - //LinkBlocks(); - /*if (!CoreTiming::IsScheduled(&LinkBlocksCallback)) - { - CoreTiming::ScheduleEvent(50000000, &LinkBlocksCallback, "Link JIT blocks", 0); - }*/ - //if ((numBlocks & 1) == 0) - LinkBlocks(); - } - numBlocks++; //commit the current block - return 0; - } - - void unknown_instruction(UGeckoInstruction _inst) - { - // CCPU::Break(); - PanicAlert("unknown_instruction Jit64 - Fix me ;)"); - _dbg_assert_(DYNA_REC, 0); - } - - u8 **GetCodePointers() - { - return blockCodePointers; - } - void InitCache() { jo.optimizeStack = true; - jo.enableBlocklink = false; // Large speed boost but currently causes slowdowns too, due to stupid O(n^2) algo :P + jo.enableBlocklink = true; // Speed boost, but not 100% safe +#ifdef _M_X64 jo.enableFastMem = true; +#else + jo.enableFastMem = false; +#endif jo.noAssumeFPLoadFromMem = false; jo.fpAccurateFlags = true; @@ -183,6 +102,84 @@ namespace Jit64 SetCodePtr(codeCache); } + JitBlock *CurBlock() + { + return &blocks[numBlocks]; + } + + JitBlock *GetBlock(int no) + { + return &blocks[no]; + } + + int GetNumBlocks() + { + return numBlocks; + } + + bool RangeIntersect(int s1, int e1, int s2, int e2) + { + // check if any endpoint is inside the other range + if ( (s1 >= s2 && s1 <= e2) || + (e1 >= s2 && e1 <= e2) || + (s2 >= s1 && s2 <= e1) || + (e2 >= s1 && e2 <= e1)) + return true; + else + return false; + } + + u8 *Jit(u32 emAddress) + { + if (GetCodePtr() >= codeCache + CODE_SIZE - 0x10000 || numBlocks >= MAX_NUM_BLOCKS - 1) + { + // PanicAlert("Cleared cache"); + LOG(DYNA_REC, "JIT code cache full - clearing cache and restoring memory") + ClearCache(); + } + JitBlock &b = blocks[numBlocks]; + b.invalid = false; + b.originalAddress = emAddress; + b.originalFirstOpcode = Memory::ReadFast32(emAddress); + b.exitAddress[0] = INVALID_EXIT; + b.exitAddress[1] = INVALID_EXIT; + b.exitPtrs[0] = 0; + b.exitPtrs[1] = 0; + b.linkStatus[0] = false; + b.linkStatus[1] = false; + + blockCodePointers[numBlocks] = (u8*)DoJit(emAddress, b); //cast away const + Memory::WriteUnchecked_U32((JIT_OPCODE << 26) | numBlocks, emAddress); + + if (jo.enableBlocklink) { + for (int i = 0; i < 2; i++) { + if (b.exitAddress[i] != INVALID_EXIT) { + links_to.insert(std::pair(b.exitAddress[i], numBlocks)); + } + } + + u8 *oldCodePtr = GetWritableCodePtr(); + LinkBlock(numBlocks); + LinkBlockExits(numBlocks); + SetCodePtr(oldCodePtr); + } + numBlocks++; //commit the current block + return 0; + } + + void unknown_instruction(UGeckoInstruction _inst) + { + // CCPU::Break(); + PanicAlert("unknown_instruction Jit64 - Fix me ;)"); + _dbg_assert_(DYNA_REC, 0); + } + + u8 **GetCodePointers() + { + return blockCodePointers; + } + + bool IsInJitCode(u8 *codePtr) { return codePtr >= codeCache && codePtr <= GetCodePtr(); } @@ -271,6 +268,11 @@ namespace Jit64 void LinkBlockExits(int i) { JitBlock &b = blocks[i]; + if (b.invalid) + { + // This block is dead. Don't relink it. + return; + } for (int e = 0; e < 2; e++) { if (b.exitAddress[e] != INVALID_EXIT && !b.linkStatus[e]) @@ -286,37 +288,31 @@ namespace Jit64 } } + /* + if ((b.exitAddress[0] == INVALID_EXIT || b.linkStatus[0]) && + (b.exitAddress[1] == INVALID_EXIT || b.linkStatus[1])) { + unlinked.erase(iter); + if (unlinked.size() > 4000) PanicAlert("Removed from unlinked. Size = %i", unlinked.size()); + } +*/ + using namespace std; void LinkBlock(int i) { LinkBlockExits(i); JitBlock &b = blocks[i]; std::map::iterator iter; - iter = unlinked.find(b.originalAddress); - if (iter != unlinked.end()) - { - LinkBlockExits(iter->second); - // todo - remove stuff from unlinked + pair::iterator, multimap::iterator> ppp; + // equal_range(b) returns pair representing the range + // of element with key b + ppp = links_to.equal_range(b.originalAddress); + if (ppp.first == ppp.second) + return; + for (multimap::iterator iter2 = ppp.first; iter2 != ppp.second; ++iter2) { + // PanicAlert("Linking block %i to block %i", iter2->second, i); + LinkBlockExits(iter2->second); } } - void LinkBlocks() - { - u8 *oldCodePtr = GetWritableCodePtr(); - //for (int i = 0; i < numBlocks; i++) - // LinkBlockExits(i); - - for (std::map::iterator iter = unlinked.begin(); - iter != unlinked.end(); iter++) - { - LinkBlockExits(iter->second); - } - // for (int i = 0; i < 2000; i++) - LinkBlock(numBlocks); - SetCodePtr(oldCodePtr); - } - - - void DestroyBlock(int blocknum, bool invalidate) { u32 codebytes = (JIT_OPCODE << 26) | blocknum; //generate from i @@ -336,6 +332,8 @@ namespace Jit64 //for something else, then it's fine. LOG(MASTER_LOG, "WARNING - ClearCache detected code overwrite @ %08x", blocks[blocknum].originalAddress); } + // TODO: Unlink block. + u8 *prev_code = GetWritableCodePtr(); // Spurious entrances from previously linked blocks can only come through checkedEntry SetCodePtr((u8*)b.checkedEntry); @@ -344,7 +342,7 @@ namespace Jit64 SetCodePtr(blockCodePointers[blocknum]); MOV(32, M(&PC), Imm32(b.originalAddress)); JMP(Asm::dispatcher, true); - SetCodePtr(prev_code); + SetCodePtr(prev_code); // reset code pointer } #define BLR_OP 0x4e800020 @@ -358,7 +356,7 @@ namespace Jit64 for (int i = 0; i < numBlocks; i++) { if (RangeIntersect(blocks[i].originalAddress, blocks[i].originalAddress+blocks[i].originalSize, - address, address+length)) + address, address + length)) { DestroyBlock(i, true); } @@ -368,11 +366,10 @@ namespace Jit64 void ClearCache() { // Is destroying the blocks really necessary? - for (int i = 0; i < numBlocks; i++) - { + for (int i = 0; i < numBlocks; i++) { DestroyBlock(i, false); } - unlinked.clear(); + links_to.clear(); trampolineCodePtr = trampolineCache; numBlocks = 0; numFlushes++; @@ -381,96 +378,5 @@ namespace Jit64 SetCodePtr(codeCache); } - extern u8 *trampolineCodePtr; - void BackPatch(u8 *codePtr, int accessType) - { - if (codePtr < codeCache || codePtr > codeCache + CODE_SIZE) - return; // this will become a regular crash real soon after this - - static int counter = 0; - ++counter; - if (counter == 30) - { - counter++; - counter--; - } - - // TODO: also mark and remember the instruction address as known HW memory access, for use in later compiles. - // But to do that we need to be able to reconstruct what instruction wrote this code, and we can't do that yet. - u8 *oldCodePtr = GetWritableCodePtr(); - InstructionInfo info; - if (!DisassembleMov(codePtr, info, accessType)) - PanicAlert("BackPatch - failed to disassemble MOV instruction"); - - X64Reg addrReg = (X64Reg)info.scaledReg; - X64Reg dataReg = (X64Reg)info.regOperandReg; - if (info.otherReg != RBX) - PanicAlert("BackPatch : Base reg not RBX."); - if (accessType == OP_ACCESS_WRITE) - PanicAlert("BackPatch : Currently only supporting reads."); - //if (info.instructionSize < 5) - // PanicAlert("Instruction at %08x Too Small : %i", (u32)codePtr, info.instructionSize); - // OK, let's write a trampoline, and a jump to it. - // Later, let's share trampolines. - - // In the first iteration, we assume that all accesses are 32-bit. We also only deal with reads. - u8 *trampoline = trampolineCodePtr; - SetCodePtr(trampolineCodePtr); - // * Save all volatile regs - PUSH(RCX); - PUSH(RDX); - PUSH(RSI); - PUSH(RDI); - PUSH(R8); - PUSH(R9); - PUSH(R10); - PUSH(R11); - //TODO: Also preserve XMM0-3? - SUB(64, R(RSP), Imm8(0x20)); - // * Set up stack frame. - // * Call ReadMemory32 - //LEA(32, ECX, MDisp((X64Reg)addrReg, info.displacement)); - MOV(32, R(ECX), R((X64Reg)addrReg)); - if (info.displacement) { - ADD(32, R(ECX), Imm32(info.displacement)); - } - switch (info.operandSize) { - //case 1: - // CALL((void *)&Memory::Read_U8); - // break; - case 4: - CALL((void *)&Memory::Read_U32); - break; - default: - PanicAlert("We don't handle this size %i yet in backpatch", info.operandSize); - break; - } - // * Tear down stack frame. - ADD(64, R(RSP), Imm8(0x20)); - POP(R11); - POP(R10); - POP(R9); - POP(R8); - POP(RDI); - POP(RSI); - POP(RDX); - POP(RCX); - MOV(32, R(dataReg), R(EAX)); - RET(); - trampolineCodePtr = GetWritableCodePtr(); - - SetCodePtr(codePtr); - int bswapNopCount; - // Check the following BSWAP for REX byte - if ((GetCodePtr()[info.instructionSize] & 0xF0) == 0x40) - bswapNopCount = 3; - else - bswapNopCount = 2; - CALL(trampoline); - NOP((int)info.instructionSize + bswapNopCount - 5); - // There is also a BSWAP to kill. - SetCodePtr(oldCodePtr); - } - } diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp index b623e8aa01..8851c3d8eb 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp @@ -44,21 +44,21 @@ namespace Jit64 { #ifdef _M_X64 - void SafeLoadECXtoEAX(int accessSize, int offset) + void SafeLoadECXtoEAX(int accessSize, s32 offset) { if (offset) - ADD(32,R(ECX),Imm32((u32)offset)); - TEST(32,R(ECX),Imm32(0x0C000000)); + ADD(32, R(ECX), Imm32((u32)offset)); + TEST(32, R(ECX), Imm32(0x0C000000)); FixupBranch argh = J_CC(CC_NZ); if (accessSize != 32) XOR(32, R(EAX), R(EAX)); MOV(accessSize, R(EAX), MComplex(RBX, ECX, SCALE_1, 0)); if (accessSize == 32) - BSWAP(32,EAX); + BSWAP(32, EAX); else if (accessSize == 16) { - BSWAP(32,EAX); - SHR(32,R(EAX),Imm8(16)); + BSWAP(32, EAX); + SHR(32, R(EAX), Imm8(16)); } FixupBranch arg2 = J(); SetJumpTarget(argh); @@ -71,7 +71,7 @@ namespace Jit64 SetJumpTarget(arg2); } #elif _M_IX86 - void SafeLoadECXtoEAX(int accessSize, int offset) + void SafeLoadECXtoEAX(int accessSize, s32 offset) { if (offset) ADD(32, R(ECX), Imm32((u32)offset)); @@ -86,7 +86,7 @@ namespace Jit64 BSWAP(32,EAX); else if (accessSize == 16) { - BSWAP(32,EAX); + BSWAP(32, EAX); SHR(32, R(EAX), Imm8(16)); } FixupBranch arg2 = J(); @@ -183,10 +183,10 @@ namespace Jit64 // Safe and boring gpr.Flush(FLUSH_VOLATILE); gpr.Lock(d, a); - MOV(32,R(ECX), gpr.R(a)); + MOV(32, R(ECX), gpr.R(a)); SafeLoadECXtoEAX(accessSize, offset); gpr.LoadToX64(d, false, true); - MOV(32,gpr.R(d), R(EAX)); + MOV(32, gpr.R(d), R(EAX)); gpr.UnlockAll(); return; } diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Paired.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Paired.cpp index aada348f42..52ef314a45 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Paired.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Paired.cpp @@ -23,6 +23,11 @@ #include "JitCache.h" #include "JitRegCache.h" +// TODO +// ps_madds0 +// ps_muls0 +// ps_madds1 + //#define OLD Default(inst); return; #define OLD diff --git a/Source/Core/Core/Src/PowerPC/PowerPC.cpp b/Source/Core/Core/Src/PowerPC/PowerPC.cpp index a8ed96b2c0..74611d6791 100644 --- a/Source/Core/Core/Src/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/Src/PowerPC/PowerPC.cpp @@ -29,7 +29,8 @@ namespace PowerPC { - GC_ALIGNED16_DECL(PowerPCState ppcState); + // align to cache line + GC_ALIGNED64_DECL(PowerPCState ppcState); ICPUCore* m_pCore = NULL; volatile CPUState state = CPU_STEPPING; diff --git a/Source/Core/Core/Src/PowerPC/PowerPC.h b/Source/Core/Core/Src/PowerPC/PowerPC.h index 38dda982fb..077b0b0e0d 100644 --- a/Source/Core/Core/Src/PowerPC/PowerPC.h +++ b/Source/Core/Core/Src/PowerPC/PowerPC.h @@ -36,7 +36,7 @@ namespace PowerPC CORE_INTERPRETER, CORE_DYNAREC, }; - struct GC_ALIGNED16(PowerPCState) + struct GC_ALIGNED64(PowerPCState) { u32 mojs[128]; // sets of registers diff --git a/Source/Core/DebuggerWX/DebuggerWX.vcproj b/Source/Core/DebuggerWX/DebuggerWX.vcproj index 4bf1ba00b5..4502ea779a 100644 --- a/Source/Core/DebuggerWX/DebuggerWX.vcproj +++ b/Source/Core/DebuggerWX/DebuggerWX.vcproj @@ -1,7 +1,7 @@ #include -#include "Globals.h" #include "Common.h" -#include "PluginManager.h" +#include "Globals.h" #include "FileSearch.h" +#include "FileUtil.h" +#include "PluginManager.h" #include "StringUtil.h" CPluginManager CPluginManager::m_Instance; @@ -57,7 +58,7 @@ CPluginManager::ScanForPlugins(wxWindow* _wxWindow) { wxProgressDialog dialog(_T("Scanning for Plugins"), _T("Scanning..."), - rFilenames.size(), // range + (int)rFilenames.size(), // range _wxWindow, // parent wxPD_CAN_ABORT | wxPD_APP_MODAL | @@ -67,8 +68,6 @@ CPluginManager::ScanForPlugins(wxWindow* _wxWindow) wxPD_REMAINING_TIME | wxPD_SMOOTH // - makes indeterminate mode bar on WinXP very small ); - - dialog.CenterOnParent(); for (size_t i = 0; i < rFilenames.size(); i++) @@ -85,7 +84,7 @@ CPluginManager::ScanForPlugins(wxWindow* _wxWindow) wxString msg; msg.Printf("Scanning %s", FileName.c_str()); - bool Cont = dialog.Update(i, msg); + bool Cont = dialog.Update((int)i, msg); if (!Cont) { @@ -154,7 +153,11 @@ CPluginInfo::CPluginInfo(const std::string& _rFileName) } else { - PanicAlert("Failed to load plugin %s\nhello world", _rFileName.c_str()); + if (!File::Exists(_rFileName)) { + PanicAlert("Could not load plugin %s - file does not exist", _rFileName.c_str()); + } else { + PanicAlert("Failed to load plugin %s - unknown error.\n", _rFileName.c_str()); + } } } diff --git a/Source/Dolphin.sln b/Source/Dolphin.sln index f26c19bddb..645079ad29 100644 --- a/Source/Dolphin.sln +++ b/Source/Dolphin.sln @@ -2,18 +2,15 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core\Core\Core.vcproj", "{F0B874CB-4476-4199-9315-8343D05AE684}" ProjectSection(ProjectDependencies) = postProject - {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} - {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} = {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} + {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} + {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_VideoDX9", "Plugins\Plugin_VideoDX9\Plugin_VideoDX9.vcproj", "{636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18}" ProjectSection(ProjectDependencies) = postProject - {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} - {F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684} - {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} - {C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8} = {C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8} {3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63} + {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_PadSimple", "Plugins\Plugin_PadSimple\Plugin_PadSimple.vcproj", "{9A183B48-ECC2-4121-876A-9B3793686073}" @@ -41,19 +38,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Core\Common\Commo EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DolphinWX", "Core\DolphinWX\DolphinWX.vcproj", "{A72606EF-C5C1-4954-90AD-F0F93A8D97D9}" ProjectSection(ProjectDependencies) = postProject - {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} = {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} - {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} - {F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684} - {4D3CD4C5-412B-4B49-9B1B-A68A2A129C77} = {4D3CD4C5-412B-4B49-9B1B-A68A2A129C77} - {0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0} - {3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63} - {9A183B48-ECC2-4121-876A-9B3793686073} = {9A183B48-ECC2-4121-876A-9B3793686073} - {CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160} = {CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160} - {48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F} - {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} - {C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8} = {C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8} - {636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18} = {636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18} {9AC65CBE-7854-4A86-AA10-D73FF9E5D61F} = {9AC65CBE-7854-4A86-AA10-D73FF9E5D61F} + {636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18} = {636FAD5F-02D1-4E9A-BE67-FB8EA99B9A18} + {C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8} = {C60D0E7A-ED05-4C67-9EE7-3A6C0D7801C8} + {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} + {48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F} + {CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160} = {CFDCEE0E-FA45-4F72-9FCC-0B88F5A75160} + {9A183B48-ECC2-4121-876A-9B3793686073} = {9A183B48-ECC2-4121-876A-9B3793686073} + {3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63} + {0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0} + {4D3CD4C5-412B-4B49-9B1B-A68A2A129C77} = {4D3CD4C5-412B-4B49-9B1B-A68A2A129C77} + {F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684} + {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} + {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} = {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxBase28", "..\Externals\wxWidgets\build\msw\wx_base.vcproj", "{48AD7E0A-25B1-4974-A1E3-03F8C438D34F}" @@ -62,11 +59,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxCore28", "..\Externals\wx EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DebuggerWX", "Core\DebuggerWX\DebuggerWX.vcproj", "{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}" ProjectSection(ProjectDependencies) = postProject - {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} - {F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684} - {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} - {0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0} {48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F} + {0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0} + {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510} + {F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684} + {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_NULL", "Plugins\Plugin_DSP_NULL\Plugin_DSP_NULL.vcproj", "{9AC65CBE-7854-4A86-AA10-D73FF9E5D61F}" diff --git a/Source/Plugins/Plugin_DSP_NULL/Src/resource.h b/Source/Plugins/Plugin_DSP_NULL/Src/resource.h index 3c0568c848..9188e4df98 100644 --- a/Source/Plugins/Plugin_DSP_NULL/Src/resource.h +++ b/Source/Plugins/Plugin_DSP_NULL/Src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by Plugin_DSP.rc +// Used by resource.rc // #define IDD_SETTINGS 101 #define IDD_DIALOG2 102 @@ -21,7 +21,7 @@ #define IDC_CHECK3 1010 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 103 diff --git a/Source/Plugins/Plugin_DSP_NULL/Src/resource.rc b/Source/Plugins/Plugin_DSP_NULL/Src/resource.rc index 5fabd32788..95c7440eaf 100644 --- a/Source/Plugins/Plugin_DSP_NULL/Src/resource.rc +++ b/Source/Plugins/Plugin_DSP_NULL/Src/resource.rc @@ -52,49 +52,29 @@ END // Dialog // -IDD_SETTINGS DIALOGEX 0, 0, 241, 206 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "Dolphin DSP-HLE Plugin 0.1 Settings" +IDD_SETTINGS DIALOGEX 0, 0, 241, 135 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dolphin DSP-NULL settings" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "OK",IDOK,129,185,50,14 - PUSHBUTTON "Cancel",IDCANCEL,184,185,50,14 - GROUPBOX "&Sound settings",IDC_STATIC,7,7,227,45 - EDITTEXT IDC_SAMPLEDUMPPATH,13,158,155,13,ES_AUTOHSCROLL | - WS_DISABLED - CONTROL "&Enable HLE Audio",IDC_ENABLE_HLE_AUDIO,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,13,22,84,8 - GROUPBOX "Sample d&umping",IDC_STATIC,7,128,227,51 - CONTROL "Enab&le DTK Music",IDC_ENABLE_DTK_MUSIC,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,13,36,102,8 - CONTROL "&Dump all samples longer than",IDC_DUMPSAMPLES,"Button", - BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,13,142,105,9 - EDITTEXT IDC_SAMPLEMINLENGTH,122,140,47,12,ES_AUTOHSCROLL | - WS_DISABLED - LTEXT "seconds to:",IDC_STATIC,173,142,40,10 - PUSHBUTTON "&Browse...",IDC_BROWSE,173,158,54,14 - GROUPBOX "&Audio quality",IDC_STATIC,7,55,227,70 - LTEXT "Sample &rate:",IDC_STATIC,13,71,67,9 - COMBOBOX IDC_SAMPLERATE,81,69,65,13,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - LTEXT "48000hz recommended, if it doesn't work use 44100, it will slow down some music. Changing this during a game will have no effect.", - IDC_STATIC,81,84,146,32 - CONTROL "&Anti-gap (dangerous!)",IDC_ANTIGAP,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,122,22,96,9 - CONTROL "&Reverb",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,122,36,89,10 + DEFPUSHBUTTON "OK",IDOK,129,114,50,14 + PUSHBUTTON "Cancel",IDCANCEL,184,114,50,14 + GROUPBOX "&Sound settings",IDC_STATIC,7,7,227,26 + CONTROL "Enab&le DTK Music",IDC_ENABLE_DTK_MUSIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,19,102,8 + GROUPBOX "&Audio quality",IDC_STATIC,7,36,227,70 + LTEXT "Sample &rate:",IDC_STATIC,13,52,67,9 + COMBOBOX IDC_SAMPLERATE,81,50,65,13,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + LTEXT "48000hz recommended, if it doesn't work use 44100, it will slow down some music. Changing this during a game will have no effect.",IDC_STATIC,81,65,146,32 END IDD_ABOUT DIALOGEX 0, 0, 184, 65 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | - WS_SYSMENU -CAPTION "About Dolphin DSP-HLE Plugin 0.1" +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Dolphin DSP-NULL plugin" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,127,44,50,14 - LTEXT "Coded by ector and F|RES",IDC_STATIC,51,25,104,14 - LTEXT "Dolphin DSP-HLE plugin",IDC_STATIC,51,7,104,14 + LTEXT "Coded by ector and F|RES",IDC_STATIC,51,21,104,14 + LTEXT "Dolphin DSP-NULL plugin",IDC_STATIC,51,7,104,14 END @@ -114,7 +94,7 @@ BEGIN VERTGUIDE, 122 VERTGUIDE, 168 TOPMARGIN, 7 - BOTTOMMARGIN, 199 + BOTTOMMARGIN, 128 HORZGUIDE, 31 END diff --git a/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj b/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj index 307f5f18a7..3d9f033dbe 100644 --- a/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj +++ b/Source/Plugins/Plugin_VideoDX9/Plugin_VideoDX9.vcproj @@ -1,7 +1,7 @@