Merge pull request #2343 from bunnei/core-cleanup
Core: Top-level consolidate & misc cleanup
This commit is contained in:
commit
aa47af7fb6
45 changed files with 439 additions and 595 deletions
|
@ -23,7 +23,6 @@
|
|||
#include "core/file_sys/archive_systemsavedata.h"
|
||||
#include "core/file_sys/directory_backend.h"
|
||||
#include "core/file_sys/file_backend.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/kernel/client_session.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/fs/archive.h"
|
||||
|
@ -46,9 +45,7 @@ struct hash<Service::FS::ArchiveIdCode> {
|
|||
};
|
||||
}
|
||||
|
||||
/// TODO(Subv): Confirm length of these strings
|
||||
const std::string SYSTEM_ID = "00000000000000000000000000000000";
|
||||
const std::string SDCARD_ID = "00000000000000000000000000000000";
|
||||
static constexpr Kernel::Handle INVALID_HANDLE{};
|
||||
|
||||
namespace Service {
|
||||
namespace FS {
|
||||
|
|
|
@ -17,9 +17,9 @@ class FileBackend;
|
|||
}
|
||||
|
||||
/// The unique system identifier hash, also known as ID0
|
||||
extern const std::string SYSTEM_ID;
|
||||
static constexpr char SYSTEM_ID[]{"00000000000000000000000000000000"};
|
||||
/// The scrambled SD card CID, also known as ID1
|
||||
extern const std::string SDCARD_ID;
|
||||
static constexpr char SDCARD_ID[]{"00000000000000000000000000000000"};
|
||||
|
||||
namespace Service {
|
||||
namespace FS {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/shared_memory.h"
|
||||
#include "core/hle/service/ir/ir.h"
|
||||
#include "core/hle/service/ir/ir_rst.h"
|
||||
|
@ -36,7 +37,7 @@ void InitializeIrNopShared(Interface* self) {
|
|||
u32 send_buff_size = cmd_buff[4];
|
||||
u32 unk2 = cmd_buff[5];
|
||||
u8 baud_rate = cmd_buff[6] & 0xFF;
|
||||
Handle handle = cmd_buff[8];
|
||||
Kernel::Handle handle = cmd_buff[8];
|
||||
|
||||
if (Kernel::g_handle_table.IsValid(handle)) {
|
||||
transfer_shared_memory = Kernel::g_handle_table.Get<Kernel::SharedMemory>(handle);
|
||||
|
|
|
@ -457,7 +457,7 @@ static void LoadCRO(Interface* self, bool link_on_load_bug_fix) {
|
|||
}
|
||||
}
|
||||
|
||||
Core::g_app_core->ClearInstructionCache();
|
||||
Core::CPU().ClearInstructionCache();
|
||||
|
||||
LOG_INFO(Service_LDR, "CRO \"%s\" loaded at 0x%08X, fixed_end=0x%08X", cro.ModuleName().data(),
|
||||
cro_address, cro_address + fix_size);
|
||||
|
@ -562,7 +562,7 @@ static void UnloadCRO(Interface* self) {
|
|||
memory_synchronizer.RemoveMemoryBlock(cro_address, cro_buffer_ptr);
|
||||
}
|
||||
|
||||
Core::g_app_core->ClearInstructionCache();
|
||||
Core::CPU().ClearInstructionCache();
|
||||
|
||||
cmd_buff[1] = result.raw;
|
||||
}
|
||||
|
@ -624,7 +624,7 @@ static void LinkCRO(Interface* self) {
|
|||
}
|
||||
|
||||
memory_synchronizer.SynchronizeOriginalMemory();
|
||||
Core::g_app_core->ClearInstructionCache();
|
||||
Core::CPU().ClearInstructionCache();
|
||||
|
||||
cmd_buff[1] = result.raw;
|
||||
}
|
||||
|
@ -686,7 +686,7 @@ static void UnlinkCRO(Interface* self) {
|
|||
}
|
||||
|
||||
memory_synchronizer.SynchronizeOriginalMemory();
|
||||
Core::g_app_core->ClearInstructionCache();
|
||||
Core::CPU().ClearInstructionCache();
|
||||
|
||||
cmd_buff[1] = result.raw;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/shared_memory.h"
|
||||
#include "core/hle/service/mic_u.h"
|
||||
|
||||
|
@ -50,7 +51,7 @@ static bool audio_buffer_loop;
|
|||
static void MapSharedMem(Interface* self) {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
u32 size = cmd_buff[1];
|
||||
Handle mem_handle = cmd_buff[3];
|
||||
Kernel::Handle mem_handle = cmd_buff[3];
|
||||
shared_memory = Kernel::g_handle_table.Get<Kernel::SharedMemory>(mem_handle);
|
||||
if (shared_memory) {
|
||||
shared_memory->name = "MIC_U:shared_memory";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue