diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-11-19 09:49:13 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-11-19 10:03:07 +0100 |
commit | f5d38649c7ad6fedf9db95044e3ad91ce393b8df (patch) | |
tree | 57cd232d34d8f889315331a84f0812e705d2ea88 /src/core | |
parent | Merge pull request #212 from archshift/idea (diff) | |
download | yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.tar yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.tar.gz yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.tar.bz2 yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.tar.lz yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.tar.xz yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.tar.zst yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.zip |
Diffstat (limited to 'src/core')
44 files changed, 111 insertions, 111 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 4b93d3313..3ae528562 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once @@ -63,7 +63,7 @@ public: * Get the current CPSR register * @return Returns the value of the CPSR register */ - virtual u32 GetCPSR() const = 0; + virtual u32 GetCPSR() const = 0; /** * Set the current CPSR register @@ -98,7 +98,7 @@ public: } protected: - + /** * Executes the given number of instructions * @param num_instructions Number of instructions to executes diff --git a/src/core/arm/disassembler/load_symbol_map.cpp b/src/core/arm/disassembler/load_symbol_map.cpp index 0f384ad3e..55278474b 100644 --- a/src/core/arm/disassembler/load_symbol_map.cpp +++ b/src/core/arm/disassembler/load_symbol_map.cpp @@ -22,8 +22,8 @@ void LoadSymbolMap(std::string filename) { while (std::getline(infile, line)) { std::istringstream iss(line); - if (!(iss >> address_str >> size >> function_name)) { - break; // Error parsing + if (!(iss >> address_str >> size >> function_name)) { + break; // Error parsing } u32 address = std::stoul(address_str, nullptr, 16); diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp index a3ed3e31e..6c8ea211e 100644 --- a/src/core/arm/dyncom/arm_dyncom.cpp +++ b/src/core/arm/dyncom/arm_dyncom.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include "core/arm/skyeye_common/armcpu.h" #include "core/arm/skyeye_common/armemu.h" @@ -113,7 +113,7 @@ void ARM_DynCom::ExecuteInstructions(int num_instructions) { state->NumInstrsToExecute = num_instructions; // Dyncom only breaks on instruction dispatch. This only happens on every instruction when - // executing one instruction at a time. Otherwise, if a block is being executed, more + // executing one instruction at a time. Otherwise, if a block is being executed, more // instructions may actually be executed than specified. ticks += InterpreterMainLoop(state.get()); } diff --git a/src/core/arm/dyncom/arm_dyncom.h b/src/core/arm/dyncom/arm_dyncom.h index f3c70b7d3..51eea41ed 100644 --- a/src/core/arm/dyncom/arm_dyncom.h +++ b/src/core/arm/dyncom/arm_dyncom.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.h b/src/core/arm/dyncom/arm_dyncom_interpreter.h index c65eb23f7..3a2462f55 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.h +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once diff --git a/src/core/arm/interpreter/arm_interpreter.cpp b/src/core/arm/interpreter/arm_interpreter.cpp index ed4415082..e2aa5ce92 100644 --- a/src/core/arm/interpreter/arm_interpreter.cpp +++ b/src/core/arm/interpreter/arm_interpreter.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include "core/arm/interpreter/arm_interpreter.h" @@ -24,7 +24,7 @@ ARM_Interpreter::ARM_Interpreter() { state->lateabtSig = LOW; // Reset the core to initial state - ARMul_CoProInit(state); + ARMul_CoProInit(state); ARMul_Reset(state); state->NextInstr = RESUME; // NOTE: This will be overwritten by LoadContext state->Emulate = 3; diff --git a/src/core/arm/interpreter/arm_interpreter.h b/src/core/arm/interpreter/arm_interpreter.h index f1e7198c5..ed53d997c 100644 --- a/src/core/arm/interpreter/arm_interpreter.h +++ b/src/core/arm/interpreter/arm_interpreter.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 0116cb376..d6e9dc849 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -249,7 +249,7 @@ void AddEventToQueue(Event* ne) // This must be run ONLY from within the cpu thread // cyclesIntoFuture may be VERY inaccurate if called from anything else -// than Advance +// than Advance void ScheduleEvent(s64 cyclesIntoFuture, int event_type, u64 userdata) { Event *ne = GetNewEvent(); @@ -469,7 +469,7 @@ void ProcessFifoWaitEvents() { if (first->time <= globalTimer) { - // LOG(TIMER, "[Scheduler] %s (%lld, %lld) ", + // LOG(TIMER, "[Scheduler] %s (%lld, %lld) ", // first->name ? first->name : "?", (u64)globalTimer, (u64)first->time); Event* evt = first; first = first->next; diff --git a/src/core/file_sys/archive.h b/src/core/file_sys/archive.h index dc2d2ced9..1135d8804 100644 --- a/src/core/file_sys/archive.h +++ b/src/core/file_sys/archive.h @@ -222,7 +222,7 @@ public: * @return Size of the archive in bytes */ virtual size_t GetSize() const = 0; - + /** * Set the size of the archive in bytes */ diff --git a/src/core/file_sys/archive_romfs.h b/src/core/file_sys/archive_romfs.h index b0dd421b7..f05327f51 100644 --- a/src/core/file_sys/archive_romfs.h +++ b/src/core/file_sys/archive_romfs.h @@ -74,7 +74,7 @@ public: * @return Size of the archive in bytes */ size_t GetSize() const override; - + /** * Set the size of the archive in bytes */ diff --git a/src/core/hle/config_mem.cpp b/src/core/hle/config_mem.cpp index a45e61427..c7cf5b1d3 100644 --- a/src/core/hle/config_mem.cpp +++ b/src/core/hle/config_mem.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include "common/common_types.h" diff --git a/src/core/hle/coprocessor.cpp b/src/core/hle/coprocessor.cpp index 1eb33eb86..e34229a57 100644 --- a/src/core/hle/coprocessor.cpp +++ b/src/core/hle/coprocessor.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include "core/hle/coprocessor.h" #include "core/hle/hle.h" diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index 55eaf0621..3dbe25037 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -50,7 +50,7 @@ template<s32 func(u32*, u32, u32, u32, u32, u32)> void Wrap(){ template<s32 func(s32*, u32*, s32, bool, s64)> void Wrap() { s32 param_1 = 0; - s32 retval = func(¶m_1, (Handle*)Memory::GetPointer(PARAM(1)), (s32)PARAM(2), + s32 retval = func(¶m_1, (Handle*)Memory::GetPointer(PARAM(1)), (s32)PARAM(2), (PARAM(3) != 0), (((s64)PARAM(4) << 32) | PARAM(0))); Core::g_app_core->SetReg(1, (u32)param_1); FuncReturn(retval); @@ -103,7 +103,7 @@ template<s32 func(void*)> void Wrap() { } template<s32 func(s64*, u32, void*, s32)> void Wrap(){ - FuncReturn(func((s64*)Memory::GetPointer(PARAM(0)), PARAM(1), Memory::GetPointer(PARAM(2)), + FuncReturn(func((s64*)Memory::GetPointer(PARAM(0)), PARAM(1), Memory::GetPointer(PARAM(2)), (s32)PARAM(3))); } diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index b03894ad7..b8ac186f6 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include <vector> @@ -20,7 +20,7 @@ bool g_reschedule = false; ///< If true, immediately reschedules the CPU to a n const FunctionDef* GetSVCInfo(u32 opcode) { u32 func_num = opcode & 0xFFFFFF; // 8 bits if (func_num > 0xFF) { - ERROR_LOG(HLE,"unknown svc=0x%02X", func_num); + ERROR_LOG(HLE,"unknown svc=0x%02X", func_num); return nullptr; } return &g_module_db[0].func_table[func_num]; @@ -58,7 +58,7 @@ void RegisterAllModules() { void Init() { Service::Init(); - + RegisterAllModules(); NOTICE_LOG(HLE, "initialized OK"); diff --git a/src/core/hle/hle.h b/src/core/hle/hle.h index bf4d84575..4ab258c69 100644 --- a/src/core/hle/hle.h +++ b/src/core/hle/hle.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h index a483fe466..6886e479d 100644 --- a/src/core/hle/kernel/address_arbiter.h +++ b/src/core/hle/kernel/address_arbiter.h @@ -11,7 +11,7 @@ // Address arbiters are an underlying kernel synchronization object that can be created/used via // supervisor calls (SVCs). They function as sort of a global lock. Typically, games/other CTR // applications use them as an underlying mechanism to implement thread-safe barriers, events, and -// semphores. +// semphores. //////////////////////////////////////////////////////////////////////////////////////////////////// // Kernel namespace diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp index 8f1c95d0f..d9ee4682a 100644 --- a/src/core/hle/kernel/archive.cpp +++ b/src/core/hle/kernel/archive.cpp @@ -52,14 +52,14 @@ public: FileSys::Archive* backend; ///< Archive backend interface /** - * Synchronize kernel object + * Synchronize kernel object * @param wait Boolean wait set if current thread should wait as a result of sync operation * @return Result of operation, 0 on success, otherwise error code */ Result SyncRequest(bool* wait) override { u32* cmd_buff = Service::GetCommandBuffer(); FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]); - + switch (cmd) { // Read from archive... case FileCommand::Read: @@ -343,7 +343,7 @@ Archive* CreateArchive(Handle& handle, FileSys::Archive* backend, const std::str archive->backend = backend; MountArchive(archive); - + return archive; } diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index 45ed79be8..e0117c0bc 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include <map> #include <algorithm> @@ -95,7 +95,7 @@ Result SignalEvent(const Handle handle) { for (size_t i = 0; i < evt->waiting_threads.size(); ++i) { ResumeThreadFromWait( evt->waiting_threads[i]); - // If any thread is signalled awake by this event, assume the event was "caught" and reset + // If any thread is signalled awake by this event, assume the event was "caught" and reset // the event. This will result in the next thread waiting on the event to block. Otherwise, // the event will not be reset, and the next thread to call WaitSynchronization on it will // not block. Not sure if this is correct behavior, but it seems to work. diff --git a/src/core/hle/kernel/event.h b/src/core/hle/kernel/event.h index c39b33180..6add72897 100644 --- a/src/core/hle/kernel/event.h +++ b/src/core/hle/kernel/event.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 88cbc1af5..018000abd 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project / PPSSPP Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include "common/common.h" @@ -68,7 +68,7 @@ void ObjectPool::List() { for (int i = 0; i < MAX_COUNT; i++) { if (occupied[i]) { if (pool[i]) { - INFO_LOG(KERNEL, "KO %i: %s \"%s\"", i + HANDLE_OFFSET, pool[i]->GetTypeName().c_str(), + INFO_LOG(KERNEL, "KO %i: %s \"%s\"", i + HANDLE_OFFSET, pool[i]->GetTypeName().c_str(), pool[i]->GetName().c_str()); } } @@ -110,7 +110,7 @@ void Shutdown() { */ bool LoadExec(u32 entry_point) { Init(); - + Core::g_app_core->SetPC(entry_point); // 0x30 is the typical main thread priority I've seen used so far diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index dd7c91d4f..e0c94f186 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project / PPSSPP Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once @@ -34,7 +34,7 @@ enum class HandleType : u32 { Archive = 12, Directory = 13, }; - + enum { DEFAULT_STACK_SIZE = 0x4000, }; @@ -52,7 +52,7 @@ public: virtual Kernel::HandleType GetHandleType() const = 0; /** - * Synchronize kernel object + * Synchronize kernel object * @param wait Boolean wait set if current thread should wait as a result of sync operation * @return Result of operation, 0 on success, otherwise error code */ @@ -139,7 +139,7 @@ public: } bool GetIDType(Handle handle, HandleType* type) const { - if ((handle < HANDLE_OFFSET) || (handle >= HANDLE_OFFSET + MAX_COUNT) || + if ((handle < HANDLE_OFFSET) || (handle >= HANDLE_OFFSET + MAX_COUNT) || !occupied[handle - HANDLE_OFFSET]) { ERROR_LOG(KERNEL, "Kernel: Bad object handle %i (%08x)", handle, handle); return false; @@ -155,7 +155,7 @@ public: int GetCount(); private: - + enum { MAX_COUNT = 0x1000, HANDLE_OFFSET = 0x100, diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index fcfd061ac..31129fd86 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include <map> #include <vector> @@ -28,7 +28,7 @@ public: std::string name; ///< Name of mutex (optional) /** - * Synchronize kernel object + * Synchronize kernel object * @param wait Boolean wait set if current thread should wait as a result of sync operation * @return Result of operation, 0 on success, otherwise error code */ diff --git a/src/core/hle/kernel/mutex.h b/src/core/hle/kernel/mutex.h index 7d7b5137e..313ba6fee 100644 --- a/src/core/hle/kernel/mutex.h +++ b/src/core/hle/kernel/mutex.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index f538c6550..7ef3e54cc 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include "common/common.h" @@ -67,7 +67,7 @@ Handle CreateSharedMemory(const std::string& name) { * @param other_permissions Memory block map other permissions (specified by SVC field) * @return Result of operation, 0 on success, otherwise error code */ -Result MapSharedMemory(u32 handle, u32 address, MemoryPermission permissions, +Result MapSharedMemory(u32 handle, u32 address, MemoryPermission permissions, MemoryPermission other_permissions) { if (address < Memory::SHARED_MEMORY_VADDR || address >= Memory::SHARED_MEMORY_VADDR_END) { diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h index 5312b8854..0aec03538 100644 --- a/src/core/hle/kernel/shared_memory.h +++ b/src/core/hle/kernel/shared_memory.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once @@ -34,7 +34,7 @@ Handle CreateSharedMemory(const std::string& name="Unknown"); * @param other_permissions Memory block map other permissions (specified by SVC field) * @return Result of operation, 0 on success, otherwise error code */ -Result MapSharedMemory(u32 handle, u32 address, MemoryPermission permissions, +Result MapSharedMemory(u32 handle, u32 address, MemoryPermission permissions, MemoryPermission other_permissions); /** diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index e15590c49..9e2e15c8e 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project / PPSSPP Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include <algorithm> #include <list> @@ -113,7 +113,7 @@ void ResetThread(Thread* t, u32 arg, s32 lowest_priority) { t->context.pc = t->context.reg_15 = t->entry_point; t->context.sp = t->stack_top; t->context.cpsr = 0x1F; // Usermode - + // TODO(bunnei): This instructs the CPU core to start the execution as if it is "resuming" a // thread. This is somewhat Sky-Eye specific, and should be re-architected in the future to be // agnostic of the CPU core. @@ -148,7 +148,7 @@ inline bool VerifyWait(const Handle& handle, WaitType type, Handle wait_handle) Thread* thread = g_object_pool.GetFast<Thread>(handle); _assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!"); - if (type != thread->wait_type || wait_handle != thread->wait_handle) + if (type != thread->wait_type || wait_handle != thread->wait_handle) return false; return true; @@ -158,7 +158,7 @@ inline bool VerifyWait(const Handle& handle, WaitType type, Handle wait_handle) void StopThread(Handle handle, const char* reason) { Thread* thread = g_object_pool.GetFast<Thread>(handle); _assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!"); - + ChangeReadyState(thread, false); thread->status = THREADSTATUS_DORMANT; for (size_t i = 0; i < thread->waiting_threads.size(); ++i) { @@ -181,7 +181,7 @@ void ChangeThreadState(Thread* t, ThreadStatus new_status) { } ChangeReadyState(t, (new_status & THREADSTATUS_READY) != 0); t->status = new_status; - + if (new_status == THREADSTATUS_WAIT) { if (t->wait_type == WAITTYPE_NONE) { ERROR_LOG(KERNEL, "Waittype none not allowed"); @@ -216,7 +216,7 @@ Handle ArbitrateHighestPriorityThread(u32 arbiter, u32 address) { /// Arbitrate all threads currently waiting void ArbitrateAllThreads(u32 arbiter, u32 address) { - + // Iterate through threads, find highest priority thread that is waiting to be arbitrated... for (const auto& handle : g_thread_queue) { @@ -238,11 +238,11 @@ void CallThread(Thread* t) { /// Switches CPU context to that of the specified thread void SwitchContext(Thread* t) { Thread* cur = GetCurrentThread(); - + // Save context for current thread if (cur) { SaveContext(cur->context); - + if (cur->IsRunning()) { ChangeReadyState(cur, true); } @@ -263,7 +263,7 @@ void SwitchContext(Thread* t) { Thread* NextThread() { Handle next; Thread* cur = GetCurrentThread(); - + if (cur && cur->IsRunning()) { next = g_thread_ready_queue.pop_first_better(cur->current_priority); } else { @@ -319,7 +319,7 @@ void DebugThreadQueue() { Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 priority, s32 processor_id, u32 stack_top, int stack_size) { - _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST), + _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST), "CreateThread priority=%d, outside of allowable range!", priority) Thread* thread = new Thread; @@ -351,7 +351,7 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3 return -1; } if ((u32)stack_size < 0x200) { - ERROR_LOG(KERNEL, "CreateThread(name=%s): invalid stack_size=0x%08X", name, + ERROR_LOG(KERNEL, "CreateThread(name=%s): invalid stack_size=0x%08X", name, stack_size); return -1; } @@ -368,7 +368,7 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3 return -1; } Handle handle; - Thread* thread = CreateThread(handle, name, entry_point, priority, processor_id, stack_top, + Thread* thread = CreateThread(handle, name, entry_point, priority, processor_id, stack_top, stack_size); ResetThread(thread, arg, 0); @@ -423,19 +423,19 @@ Result SetThreadPriority(Handle handle, s32 priority) { /// Sets up the primary application thread Handle SetupMainThread(s32 priority, int stack_size) { Handle handle; - + // Initialize new "main" thread - Thread* thread = CreateThread(handle, "main", Core::g_app_core->GetPC(), priority, + Thread* thread = CreateThread(handle, "main", Core::g_app_core->GetPC(), priority, THREADPROCESSORID_0, Memory::SCRATCHPAD_VADDR_END, stack_size); - + ResetThread(thread, 0, 0); - + // If running another thread already, set it to "ready" state Thread* cur = GetCurrentThread(); if (cur && cur->IsRunning()) { ChangeReadyState(cur, true); } - + // Run new "main" thread SetCurrentThread(thread); thread->status = THREADSTATUS_RUNNING; @@ -452,12 +452,12 @@ void Reschedule() { HLE::g_reschedule = false; if (next > 0) { INFO_LOG(KERNEL, "context switch 0x%08X -> 0x%08X", prev->GetHandle(), next->GetHandle()); - + SwitchContext(next); // Hack - There is no mechanism yet to waken the primary thread if it has been put to sleep // by a simulated VBLANK thread switch. So, we'll just immediately set it to "ready" again. - // This results in the current thread yielding on a VBLANK once, and then it will be + // This results in the current thread yielding on a VBLANK once, and then it will be // immediately placed back in the queue for execution. if (prev->wait_type == WAITTYPE_VBLANK) { ResumeThreadFromWait(prev->GetHandle()); diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 39fa38b75..2a43797ee 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project / PPSSPP Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once diff --git a/src/core/hle/service/ac_u.h b/src/core/hle/service/ac_u.h index 3c5958d27..8509a793e 100644 --- a/src/core/hle/service/ac_u.h +++ b/src/core/hle/service/ac_u.h @@ -9,7 +9,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// // Namespace AC_U -// socket service "ac:u" +// socket service "ac:u" namespace AC_U { diff --git a/src/core/hle/service/apt_u.cpp b/src/core/hle/service/apt_u.cpp index 4f41ec5f4..4bb05ce40 100644 --- a/src/core/hle/service/apt_u.cpp +++ b/src/core/hle/service/apt_u.cpp @@ -27,7 +27,7 @@ enum class SignalType : u32 { void Initialize(Service::Interface* self) { u32* cmd_buff = Service::GetCommandBuffer(); - + cmd_buff[3] = Kernel::CreateEvent(RESETTYPE_ONESHOT, "APT_U:Menu"); // APT menu event handle cmd_buff[4] = Kernel::CreateEvent(RESETTYPE_ONESHOT, "APT_U:Pause"); // APT pause event handle @@ -168,7 +168,7 @@ void AppletUtility(Service::Interface* self) { cmd_buff[1] = 0; // No error WARN_LOG(KERNEL, "(STUBBED) called unk=0x%08X, buffer1_size=0x%08x, buffer2_size=0x%08x, " - "buffer1_addr=0x%08x, buffer2_addr=0x%08x", unk, buffer1_size, buffer2_size, + "buffer1_addr=0x%08x, buffer2_addr=0x%08x", unk, buffer1_size, buffer2_size, buffer1_addr, buffer2_addr); } diff --git a/src/core/hle/service/apt_u.h b/src/core/hle/service/apt_u.h index 5af39e085..306730400 100644 --- a/src/core/hle/service/apt_u.h +++ b/src/core/hle/service/apt_u.h @@ -13,8 +13,8 @@ namespace APT_U { // Application and title launching service. These services handle signaling for home/power button as // well. Only one session for either APT service can be open at a time, normally processes close the -// service handle immediately once finished using the service. The commands for APT:U and APT:S are -// exactly the same, however certain commands are only accessible with APT:S(NS module will call +// service handle immediately once finished using the service. The commands for APT:U and APT:S are +// exactly the same, however certain commands are only accessible with APT:S(NS module will call // svcBreak when the command isn't accessible). See http://3dbrew.org/wiki/NS#APT_Services. /// Interface to "APT:U" service diff --git a/src/core/hle/service/boss_u.cpp b/src/core/hle/service/boss_u.cpp index d398edc68..b2ff4a756 100644 --- a/src/core/hle/service/boss_u.cpp +++ b/src/core/hle/service/boss_u.cpp @@ -21,8 +21,8 @@ namespace BOSS_U { Interface::Interface() { Register(FunctionTable, ARRAY_SIZE(FunctionTable)); } - + Interface::~Interface() { } - + } // namespace diff --git a/src/core/hle/service/err_f.cpp b/src/core/hle/service/err_f.cpp index 917b2f8ca..785c351e9 100644 --- a/src/core/hle/service/err_f.cpp +++ b/src/core/hle/service/err_f.cpp @@ -20,8 +20,8 @@ namespace ERR_F { Interface::Interface() { Register(FunctionTable, ARRAY_SIZE(FunctionTable)); } - + Interface::~Interface() { } - + } // namespace diff --git a/src/core/hle/service/err_f.h b/src/core/hle/service/err_f.h index 5da663267..8b636b96c 100644 --- a/src/core/hle/service/err_f.h +++ b/src/core/hle/service/err_f.h @@ -23,5 +23,5 @@ namespace ERR_F { return "err:f"; } }; - + } // namespace diff --git a/src/core/hle/service/fs_user.cpp b/src/core/hle/service/fs_user.cpp index 06d3f5656..dadc89ef8 100644 --- a/src/core/hle/service/fs_user.cpp +++ b/src/core/hle/service/fs_user.cpp @@ -269,7 +269,7 @@ static void IsSdmcDetected(Service::Interface* self) { cmd_buff[1] = 0; cmd_buff[2] = Settings::values.use_virtual_sd ? 1 : 0; - + DEBUG_LOG(KERNEL, "called"); } diff --git a/src/core/hle/service/hid_user.h b/src/core/hle/service/hid_user.h index 9f6c4d5ed..5ed97085d 100644 --- a/src/core/hle/service/hid_user.h +++ b/src/core/hle/service/hid_user.h @@ -15,7 +15,7 @@ namespace HID_User { -/** +/** * Structure of a Pad controller state. */ struct PadState { diff --git a/src/core/hle/service/mic_u.cpp b/src/core/hle/service/mic_u.cpp index 58051f133..d6f30e9ae 100644 --- a/src/core/hle/service/mic_u.cpp +++ b/src/core/hle/service/mic_u.cpp @@ -27,7 +27,7 @@ const Interface::FunctionInfo FunctionTable[] = { {0x000D0040, nullptr, "SetClamp"}, {0x000E0000, nullptr, "GetClamp"}, {0x000F0040, nullptr, "unknown_input1"}, - {0x00100040, nullptr, "unknown_input2"}, + {0x00100040, nullptr, "unknown_input2"}, }; //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index ba7299170..5906e2060 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -75,7 +75,7 @@ Interface* Manager::FetchFromPortName(const std::string& port_name) { /// Initialize ServiceManager void Init() { g_manager = new Manager; - + g_manager->AddService(new SRV::Interface); g_manager->AddService(new AC_U::Interface); g_manager->AddService(new APT_U::Interface); diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 2f5a866c9..55aa84e83 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -38,7 +38,7 @@ class Manager; class Interface : public Kernel::Object { friend class Manager; public: - + std::string GetName() const override { return GetPortName(); } std::string GetTypeName() const override { return GetPortName(); } @@ -76,7 +76,7 @@ public: } /** - * Synchronize kernel object + * Synchronize kernel object * @param wait Boolean wait set if current thread should wait as a result of sync operation * @return Result of operation, 0 on success, otherwise error code */ @@ -85,23 +85,23 @@ public: auto itr = m_functions.find(cmd_buff[0]); if (itr == m_functions.end()) { - ERROR_LOG(OSHLE, "unknown/unimplemented function: port=%s, command=0x%08X", + ERROR_LOG(OSHLE, "unknown/unimplemented function: port=%s, command=0x%08X", GetPortName().c_str(), cmd_buff[0]); // TODO(bunnei): Hack - ignore error u32* cmd_buff = Service::GetCommandBuffer(); cmd_buff[1] = 0; - return 0; + return 0; } if (itr->second.func == nullptr) { - ERROR_LOG(OSHLE, "unimplemented function: port=%s, name=%s", + ERROR_LOG(OSHLE, "unimplemented function: port=%s, name=%s", GetPortName().c_str(), itr->second.name.c_str()); // TODO(bunnei): Hack - ignore error u32* cmd_buff = Service::GetCommandBuffer(); cmd_buff[1] = 0; - return 0; - } + return 0; + } itr->second.func(this); diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 16a1d99b7..3a06d6765 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #include <map> @@ -30,7 +30,7 @@ enum ControlMemoryOperation { /// Map application or GSP heap memory static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) { - DEBUG_LOG(SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", + DEBUG_LOG(SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", operation, addr0, addr1, size, permissions); switch (operation) { @@ -54,7 +54,7 @@ static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, /// Maps a memory block to specified address static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) { - DEBUG_LOG(SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", + DEBUG_LOG(SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", handle, addr, permissions, other_permissions); Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions); @@ -63,7 +63,7 @@ static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other case Kernel::MemoryPermission::Write: case Kernel::MemoryPermission::ReadWrite: case Kernel::MemoryPermission::DontCare: - Kernel::MapSharedMemory(handle, addr, permissions_type, + Kernel::MapSharedMemory(handle, addr, permissions_type, static_cast<Kernel::MemoryPermission>(other_permissions)); break; default: @@ -115,7 +115,7 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) { Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); - DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(), + DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(), object->GetName().c_str(), nano_seconds); _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!"); @@ -138,7 +138,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, bool unlock_all = true; bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated - DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld", + DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld", handle_count, (wait_all ? "true" : "false"), nano_seconds); // Iterate through each handle, synchronize kernel object @@ -149,7 +149,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, _assert_msg_(KERNEL, (object != nullptr), "called handle=0x%08X, but kernel object " "is nullptr!", handles[i]); - DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(), + DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(), object->GetName().c_str()); Result res = object->WaitSynchronization(&wait); @@ -183,7 +183,7 @@ static Result CreateAddressArbiter(u32* arbiter) { /// Arbitrate address static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) { - return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), address, + return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), address, value); } @@ -195,7 +195,7 @@ static void OutputDebugString(const char* string) { /// Get resource limit static Result GetResourceLimit(Handle* resource_limit, Handle process) { // With regards to proceess values: - // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for + // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for // the current KThread. *resource_limit = 0xDEADBEEF; ERROR_LOG(SVC, "(UNIMPLEMENTED) called process=0x%08X", process); @@ -227,9 +227,9 @@ static Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top Core::g_app_core->SetReg(1, thread); DEBUG_LOG(SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " - "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, + "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, name.c_str(), arg, stack_top, priority, processor_id, thread); - + return 0; } @@ -258,7 +258,7 @@ static Result SetThreadPriority(Handle handle, s32 priority) { /// Create a mutex static Result CreateMutex(Handle* mutex, u32 initial_locked) { *mutex = Kernel::CreateMutex((initial_locked != 0)); - DEBUG_LOG(SVC, "called initial_locked=%s : created handle=0x%08X", + DEBUG_LOG(SVC, "called initial_locked=%s : created handle=0x%08X", initial_locked ? "true" : "false", *mutex); return 0; } @@ -286,7 +286,7 @@ static Result QueryMemory(void* info, void* out, u32 addr) { /// Create an event static Result CreateEvent(Handle* evt, u32 reset_type) { *evt = Kernel::CreateEvent((ResetType)reset_type); - DEBUG_LOG(SVC, "called reset_type=0x%08X : created handle=0x%08X", + DEBUG_LOG(SVC, "called reset_type=0x%08X : created handle=0x%08X", reset_type, *evt); return 0; } @@ -301,7 +301,7 @@ static Result DuplicateHandle(Handle* out, Handle handle) { } _assert_msg_(KERNEL, (handle != Kernel::CurrentProcess), "(UNIMPLEMENTED) process handle duplication!"); - + // TODO(bunnei): FixMe - This is a hack to return the handle that we were asked to duplicate. *out = handle; diff --git a/src/core/hle/svc.h b/src/core/hle/svc.h index 1d125faf6..6be393d0b 100644 --- a/src/core/hle/svc.h +++ b/src/core/hle/svc.h @@ -1,6 +1,6 @@ // Copyright 2014 Citra Emulator Project // Licensed under GPLv2 -// Refer to the license.txt file included. +// Refer to the license.txt file included. #pragma once diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index 33f75c50a..4d0719263 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp @@ -39,7 +39,7 @@ enum { template <typename T> inline void Read(T &var, const u32 addr) { switch (addr & 0xFFFFF000) { - + // TODO(bunnei): What is the virtual address of NDMA? // case VADDR_NDMA: // NDMA::Read(var, addr); @@ -57,9 +57,9 @@ inline void Read(T &var, const u32 addr) { template <typename T> inline void Write(u32 addr, const T data) { switch (addr & 0xFFFFF000) { - + // TODO(bunnei): What is the virtual address of NDMA? - // case VADDR_NDMA + // case VADDR_NDMA // NDMA::Write(addr, data); // break; diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index 389d5a8c9..63d2496ed 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp @@ -273,13 +273,13 @@ bool ElfReader::LoadInto(u32 vaddr) { for (int i = 0; i < header->e_phnum; i++) { Elf32_Phdr *p = segments + i; - INFO_LOG(MASTER_LOG, "Type: %i Vaddr: %08x Filesz: %i Memsz: %i ", p->p_type, p->p_vaddr, + INFO_LOG(MASTER_LOG, "Type: %i Vaddr: %08x Filesz: %i Memsz: %i ", p->p_type, p->p_vaddr, p->p_filesz, p->p_memsz); if (p->p_type == PT_LOAD) { segment_addr[i] = base_addr + p->p_vaddr; memcpy(Memory::GetPointer(segment_addr[i]), GetSegmentPtr(i), p->p_filesz); - INFO_LOG(MASTER_LOG, "Loadable Segment Copied to %08x, size %08x", segment_addr[i], + INFO_LOG(MASTER_LOG, "Loadable Segment Copied to %08x, size %08x", segment_addr[i], p->p_memsz); } } diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index 5b6f88604..343bb7523 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp @@ -118,7 +118,7 @@ AppLoader_NCCH::~AppLoader_NCCH() { * @return ResultStatus result of function */ ResultStatus AppLoader_NCCH::LoadExec() const { - if (!is_loaded) + if (!is_loaded) return ResultStatus::ErrorNotLoaded; std::vector<u8> code; @@ -185,7 +185,7 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& return ResultStatus::Error; } return ResultStatus::ErrorNotUsed; -} +} /** * Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI) @@ -210,7 +210,7 @@ ResultStatus AppLoader_NCCH::Load() { file.Seek(ncch_offset, 0); file.ReadBytes(&ncch_header, sizeof(NCCH_Header)); } - + // Verify we are loading the correct file type... if (0 != memcmp(&ncch_header.magic, "NCCH", 4)) return ResultStatus::ErrorInvalidFormat; diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h index f40a258b7..03116add8 100644 --- a/src/core/loader/ncch.h +++ b/src/core/loader/ncch.h @@ -215,7 +215,7 @@ private: u32 entry_point; u32 ncch_offset; // Offset to NCCH header, can be 0 or after NCSD header u32 exefs_offset; - + NCCH_Header ncch_header; ExeFs_Header exefs_header; ExHeader_Header exheader_header; |