diff options
| author | hrydgard <hrydgard@gmail.com> | 2009-04-06 18:47:21 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2009-04-06 18:47:21 +0000 |
| commit | 0fd2edbf98a07d6838a4fdc415e53e2bc63b4a0e (patch) | |
| tree | cef0aca7fe6dbe570396fbc163a63a0cea3ba94c /Source/Core | |
| parent | 13ac45db1abccd29c47a953887f05e650c699922 (diff) | |
DSP: Remove all mentions of the mysterious DROM. Write protect the ROMs and IRAM as much as possible while loaded (to make sure they don't get corrupted by some memory overwrite or whatever). Make instruction reads stricter - iram and irom don't wrap anymore (not 100% sure about this one). Misc cleanup + changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2904 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/Src/MemoryUtil.h | 6 | ||||
| -rw-r--r-- | Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/Source/Core/Common/Src/MemoryUtil.h b/Source/Core/Common/Src/MemoryUtil.h index 29bd911c9d..7f568d3701 100644 --- a/Source/Core/Common/Src/MemoryUtil.h +++ b/Source/Core/Common/Src/MemoryUtil.h @@ -22,10 +22,8 @@ void* AllocateExecutableMemory(size_t size, bool low = true); void* AllocateMemoryPages(size_t size); void FreeMemoryPages(void* ptr, size_t size); void WriteProtectMemory(void* ptr, size_t size, bool executable = false); -void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute); - - -inline int GetPageSize() {return 4096;} +void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute = false); +inline int GetPageSize() { return 4096; } #endif diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h index a50ce13e98..0842e14fb2 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h @@ -54,11 +54,18 @@ public: virtual bool Open(u32 _CommandAddress, u32 _Mode) { - ERROR_LOG(WII_IPC_SD, "STM: Open"); + ERROR_LOG(WII_IPC_SD, "STM immediate: Open"); Memory::Write_U32(GetDeviceID(), _CommandAddress+4); return true; } + virtual bool Close(u32 _CommandAddress) + { + ERROR_LOG(WII_IPC_SD, "STM immediate: Close"); + Memory::Write_U32(0, _CommandAddress+4); + return true; + } + virtual bool IOCtl(u32 _CommandAddress) { u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C); @@ -141,6 +148,13 @@ public: return true; } + virtual bool Close(u32 _CommandAddress) + { + INFO_LOG(WII_IPC_SD, "STM eventhook: Close"); + Memory::Write_U32(0, _CommandAddress+4); + return true; + } + virtual bool IOCtl(u32 _CommandAddress) { u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C); |
