| Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
If a thread was woken up by something, cancel the wakeup timeout.
|
|
|
|
There is no documentation available on this function, but we set the result to false as a stub.
This allows Super Little Acorns to move all the way in game with pp3c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARM_Disasm only has static methods, so there's no need to have an instance of it.
|
|
|
|
|
|
This will keep track of idle ticks for us, and fixes some tickcount-related issues
|
|
It will now properly wait the specified number of nanoseconds and then wake up the thread.
|
|
These need to be done as a 64-bit operation.
|
|
This thread will not actually execute instructions, it will only advance the timing/events and try to yield immediately to the next ready thread, if there aren't any ready threads then it will be rescheduled and start its job again.
|
|
|
|
|
|
Wasn't doing proper sign-extension
|
|
Replace all the C-style complicated buffer management with a std::deque.
In addition to making the code easier to understand it also adds support
for non-POD IdTypes.
Also clean the rest of the code to follow our code style.
|
|
Implemented the required calls to make it work.
CoreTiming: Added a new logging class Core_Timing.
|
|
Fixes #423.
|
|
|
|
|
|
|
|
It now refers to me as the PoC
|
|
|
|
|
|
|
|
|
|
Just in case some game studio let the intern write inline assembly or something.
|
|
Easy skyeye todo fix.
|
|
|
|
- Hack to work around games checking that the DSP event has been signaled by a real DSP interrupt.
|
|
|
|
|
|
This will happen when the mutex is already owned by another thread. Should fix some issues with games being stuck due to waiting threads not being awoken.
|
|
citra already has its own typedefs like this.
|
|
|
|
Each archive now takes a mount point of either NAND or SDMC, and builds its own directory structure there, trying to simulate an HLE-friendly hardware layout
|
|
under /nand/title/high/low/content/00000000.app.romfs
|
|
|
|
|
|
|
|
(Thanks 3dmoo!)
|
|
|
|
|
|
Also joins the REV ops into one common place.
|
|
|
|
|
|
This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW
|
|
|
|
|
|
|
|
|
|
Fixed a few warnings and cleaned up the code
|
|
This allows Steel Diver to boot further, some files are needed.
This is still not ready and needs a big cleanup, this will possibly be delayed until the way we handle archives is fixed (with factory classes instead of ahead-of-time creation of archives)
|
|
|
|
|
|
|
|
Technically eliminates two memory leaks as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stubbed CreateMemoryBlock
Using Berkeley sockets, and Winsock2.2 on Windows.
So far ftpony creates the socket and accepts incoming connections
SOC_U: Renamed functions to maintain consistency
Also prevents possible scope errors / conflicts with the actual Berkeley socket functions
SOCU: Close all the opened sockets when cleaning up SOCU
|
|
It's not really known how this actually works. Some testing has shown that this probably performs no filtering, and common usage in games suggests it's not actually resizing the image at all.
However, this patch does seem to fix some homebrew showing quasi-duplicated images while still keeping other applications in a working state.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
They will be stored in /extsavedata/SDMC and /extsavedata/NAND respectively.
Also redirect some APT_A functions to their APT_U equivalents.
Implemented the gamecoin.dat file in SharedExtSaveData in the PTM module.
Implemented formatting the savegame.
Retake a previous savegame if it exists instead of reporting them as not formatted every time a game is loaded.
|
|
|
|
|
|
They were erroneously labeled as SMLAL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This handle manager more closely mirrors the behaviour of the CTR-OS
one. In addition object ref-counts and support for DuplicateHandle have
been added.
Note that support for DuplicateHandle is still experimental, since parts
of the kernel still use Handles internally, which will likely cause
troubles if two different handles to the same object are used to e.g.
wait on a synchronization primitive.
|
|
|
|
|
|
Initially reported by xdec.
|
|
|
|
|
|
|
|
|
|
|
|
- Also a few cleanups.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
They were setting the old S flag.
|
|
|
|
|
|
Needs to use the updated state of the CPSR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Moved most of the shared CFG code there, implemented a few CFG:I functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
That's the language id block, we're using LANGUAGE_EN for now. This block allows some games to boot further
|
|
It is now kept in memory as per 3dbrew, all updates happen on memory, then they can be saved using UpdateConfigNANDSavegame.
|
|
Seems to allow some games to boot further, thanks @Normmatt for sharing this information
|
|
Added a "config" file to the CFG process service (CFG:U), and added a few default blocks to it.
Implemented GetSystemModel and GetModelNintendo2DS
|
|
|
|
Tested with hwtests.
|
|
|
|
- Removed unused VBLANK sleep mode
- Added error log for bad context switch
- Renamed VerifyWait to CheckWaitType to be more clear
|
|
|
|
|
|
|
|
|
|
This boots a few (mostly Nintendo 1st party) games further.
|
|
|
|
|
|
|
|
|
|
|
|
The lower-bound would never be negative like it should
|
|
|
|
|
|
|
|
Maybe sometime when we actually implement that
|
|
|
|
We still don't know what the other parameters do, but they appear to be very similar to those of FormatThisUserSaveData.
Most likely FormatThisUserSaveData is just an alias for FormatSaveData with LowPathType Empty
|
|
|
|
|
|
|
|
It will be stored in the /syssavedata folder. This archive is user by various Services and possibly games via the FS:U service.
|
|
|
|
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information
Got rid of the code duplication in File and Directory
Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive.
FS_U: Use the correct error code when a file wasn't found
|
|
Reference manual states these must be set to zero if this case is true.
|
|
Broken from the same reason SADD16 was.
The lo part of the result should only be constructed from the lo halfwords of rm and rn.
The hi part of the result should only be constructed from the hi halfwords of rm and rn.
|
|
|
|
There's no reason to have these in the outer-most scope.
|
|
The lo and hi parts of the result were being constructed as a result of hi and lo halfword intermixing from the rm and rn regs. However the lo part of the result should be constructed only from the lo halfwords of rm and rn, and the hi part of the result should only be constructed from the hi halfwords of rm and rn.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Wrong values were being multiplied together.
|
|
|
|
|
|
The only difference between these ops is one adds and one subtracts. Everything is literally the same.
|
|
|
|
|
|
- Refactor FS::Archive internals to make Archive creation and lifetime
management clearer.
- Remove the "Archive as a File" hack.
- Implement 64-bit Archive handles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I couldn't find any information about this service...
|
|
|
|
Apparently nothing at all is known about this service...
|
|
This is a first step at fixing the conceptual insanity that is our
handling of service and IPC calls. For now, interfaces still directly
derived from Session because we don't have the infrastructure to do it
properly. (That is, Processes and scheduling them.)
|
|
Rotation bits are 10 and 11, not 9 and 10.
|
|
|
|
|
|
Got rid of I/O address's since the I/O addresses range's overlap with other
address's types such as vram, these I/O addresses need to be done in an different
way.
|
|
|
|
|
|
Same semantics, idea by @yuriks
|
|
|
|
|
|
|
|
|
|
This behavior was tested on hardware, however i'm still not sure what use the "initial_count" parameter has
|
|
ToDo: Implement svcReleaseSemaphore
* Some testing against hardware needed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Linear simply indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA (such as the GPU).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The 3DS allows the user to read from files opened with the Write access modifier, even if he did not specify the Read access modifier.
Open the files in binary mode so that we can prevent CR/LF problems in Windows, where a line-end is replaced by these two bytes instead of just 0xA, this was causing problems with the GetSize test
|
|
|
|
|
|
|
|
|
|
This is in line with what the hardware itself does.
It does this by splitting the initial directory opening into Directory.Open(), which will return false if a stat fails.
Then, Archive::OpenDirectory will return nullptr, and archive.cpp will return an error code .
|
|
Moved Mutex::WaitSynchronization to the end of the file.
|
|
|
|
Also resume only the next immediate thread waiting for the mutex when it is released, instead of resuming them all.
|
|
Use the next_thread_id variable directly.
|
|
|
|
|
|
For now threads are using their Handle value as their Id, it should not really cause any problems because Handle values are unique in Citra, but it should be changed. I left a ToDo there because this is not correct behavior as per hardware.
|
|
|
|
Should theoretically push retail stuff further along
|
|
|
|
|
|
|
|
|
|
|
|
- More readable, a little less error prone.
Conflicts:
src/core/mem_map.h
src/core/mem_map_funcs.cpp
|
|
|
|
|
|
|
|
|
|
|
|
Seems (probably just placebo/wishful thinking) to make it slightly
faster. Also reduces memory usage and makes shutdown when debugging from
MSVC fast.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All service calls in the CTR OS return result codes indicating the
success or failure of the call. Previous to this commit, Citra's HLE
emulation of services and the kernel universally either ignored errors
or returned dummy -1 error codes.
This commit makes an initial effort to provide an infrastructure for
error reporting and propagation which can be use going forward to make
HLE calls accurately return errors as the original system. A few parts
of the code have been updated to use the new system where applicable.
One part of this effort is the definition of the `ResultCode` type,
which provides facilities for constructing and parsing error codes in
the structured format used by the CTR.
The `ResultVal` type builds on `ResultCode` by providing a container for
values returned by function that can report errors. It enforces that
correct error checking will be done on function returns by preventing
the use of the return value if the function returned an error code.
Currently this change is mostly internal since errors are still
suppressed on the ARM<->HLE border, as a temporary compatibility hack.
As functionality is implemented and tested this hack can be eventually
removed.
|
|
This prevents them from interfering with other constants defined in
different namespaces.
|
|
|
|
in the service's headers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These functions are not referred to by their linkage name outside of the translation unit, so they can be marked as static.
|
|
|
|
|
|
added a todo to kernel archive
|
|
|
|
|
|
|
|
|
|
Fixes some warnings on OSX.
|
|
|
|
|
|
|
|
- Also Clarified GlanceParameter/ReceiveParameter documentation.
|
|
|
|
- Also added comment to GetLockHandle function.
|
|
- Fixes single stepping in debugger.
|
|
|
|
|
|
- Fixed NZCVT flags to properly save state when function returns.
- Fixed counter to keep track of the actual number of instructions executed.
- Fixed single-step mode to only execute one instruction at a time.
- DefaultIni: Removed comment that no longer applied to dyncom.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This was automated using `clang-modernize`.
|
|
Added license header back in. I originally removed this because I mostly rewrote the file, but meh
|
|
|
|
|
|
Fixed typo (make protected member public)
Added license header back in. I originally removed this because I mostly rewrote the file, but meh
ARM: Fixed a type error in dyncom interpreter.
ARM: Updated dyncom to use unique_ptr for internal ARM state.
|
|
Removed s_ prefix
|
|
|
|
Before, it used to use whether the directory actually existed. As a result, .citra-emu/sdmc was never auto-created (something quite confusing to me until I read through the logs).
|
|
Fixes #137
|
|
This name better represents what the enum does, and is less overloaded
in the context. (The whole register the enum is part of is also called
'format'.)
|
|
|
|
|
|
Uses QSettings on citra-qt, and inih on citra-cli.
|
|
Core: Fix the SDMC Directory implementation to make blargSnes work.
|
|
|
|
Kernel: Return an invalid handle to OpenFile when it failed to open.
|
|
|
|
|
|
Added "SetApplicationCpuTimeLimit" and "GetApplicationCpuTimeLimit" to apt.cpp
|
|
seems simple enough
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Instead of forcibly taking the last 4 characters, it now finds the last extension separator (the period) and takes a substr of its location.
|
|
|
|
|
|
|
|
In C++ you can simply just declare it as is.
|
|
|
|
|
|
|
|
|
|
Several cleanups to the buildsystem:
- Do better factoring of common libs between platforms.
- Add support to building on Windows.
- Remove Qt4 support.
- Re-sort file lists and add missing headers.
|
|
|
|
Core: Cleaned up comment to be more readable.
Citra: Changed loop to be more readable.
|
|
- Useful for debugging homebrew
Qt: Updated GUI to support loading .bin files.
|
|
|
|
|
|
|
|
- Useful for debugging homebrew
Qt: Updated GUI to support loading .bin files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These avoid relying on memset for clearing the arrays.
|
|
Changed HLE function return methods to be static inline functions.
|
|
Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
|
|
entry_point would not be added to the string. Also used StringFromFormat
so that the buffer is unnecessary.
|
|
|
|
HID: Fix typo with DisableGyroscopeLow command.
|
|
|
|
This cleans up the mess that address reading/writing had become and makes the code a *lot* more sensible.
This adds a physical<->virtual address converter to mem_map.h. For further accuracy, we will want to properly extend this to support a wider range of address regions. For now, this makes simply homebrew applications work in a good manner though.
|
|
|
|
While it was some nice and fancy template usage, it ultimately had many practical issues regarding length of involved expressions under regular usage as well as common code completion tools not being able to handle the structures.
Instead, we now use a more conventional approach which is a lot more clean to use.
|
|
|
|
|
|
|
|
|
|
|
|
GSP: Cleaned up code and added additional comments.
GSP: Removed unnecessary TODO comment.
GSP: Changed u32 iterators in TriggerCmdReqQueue to unsigned.
|
|
|
|
- Various other cleanups.
|
|
|
|
Core: Added a comment to explain the logic for the RunLoop iterations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Unused code
- Was not correct for unaligned memory reads
|
|
|
|
MemMap: Cleaned up Read32 unaligned memory access.
|
|
|
|
|
|
Templates shouldn't be marked as inline if they aren't defined in the header.
|
|
Also makes the illogical component order more obvious.
|
|
|
|
|
|
Anonymous structs are not standard C++, hence don't use them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AddressArbiter: Added documentation comment, fixed whitespace issue.
AddressArbiter: Fixed incorrect comment, reordered if-statement to be more clear.
SVC: Removed trailing whitespace.
|
|
Thread: Cleaned up arbitrate address functions.
Thread: Cleaned up ArbitrateAllThreads function.
|
|
|
|
- Also added some safety checks to MapSharedMemory.
|
|
|
|
- Previously, used a hard-coded shared memory handle of 0x10002000 (as used by libctru homebrew)
GSP: Added name for shared memory.
GSP: Cleaned up assertion message.
|
|
SharedMemory: Added optional name field for tracking known objects.
|
|
|
|
|
|
|
|
|
|
|
|
- Required "file" handle to be made local and explicitly opened/closed as needed
|
|
Archive: Fixed brace ugliness for neobrain :)
FS: Commented out unused local variables to prevent warnings.
...But keeping them here for future use.
archive_romfs: Removed unused #include.
|
|
APT: More cleanups.
APT: Changed SignalType to be type u32.
|
|
NCCH: Removed extra qualification ‘Loader::AppLoader_NCCH::’.
|
|
FS: Added to CMakeLists.txt
|
|
|
|
Core: Updated CMakeLists.txt to remove directory_file_system and meta_file_system modules.
|
|
NCCH: Updated LoadExec to use Memory::WriteBlock function to load binary code.
|
|
|
|
|
|
|
|
|
|
Loader: Added ErrorNotUsed ReturnStatus type to specify when something is not used.
|
|
- Various cleanups/refactorings to Loader, ELF, and NCCH modules.
- Added AppLoader interface to ELF and NCCH.
- Updated Qt/GLFW frontends to check AppLoader ResultStatus.
NCCH: Removed extra qualification typos.
Loader: Removed unnecessary #include's.
NCCH: Improved readability of memcmp statements.
NCCH: Added missing space.
Elf: Removed unnecessary usage of unique_ptr.
Loader: Removed unnecessary usage of unique_ptr.
|
|
|
|
|
|
|
|
|
|
NCCH: Fixed typo in printing NCCH filename.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- SVC: Added ExitThread support
- SVC: Added SignalEvent support
- Thread: Added WAITTYPE_EVENT for waiting threads for event signals
- Thread: Added support for blocking on other threads to finish (e.g. Thread::Join)
- Thread: Added debug function for printing current threads ready for execution
- Thread: Removed hack/broken thread ready state code from Kernel::Reschedule
- Mutex: Moved WaitCurrentThread from SVC to Mutex::WaitSynchronization
- Event: Added support for blocking threads on event signalling
Kernel: Added missing algorithm #include for use of std::find on non-Windows platforms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- force kernel reschedule after svcWaitSynchronization
- fixed some bugs with passing in pointer arguments
- cleaned up some comments and log messages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues)
- added handle types for all different CTROS handles
|
|
|
|
|
|
|
|
Changes for clarity of comments, removed redundant compiler flags.
|
|
|
|
- updated CreateHandle/DeleteHandle to use KernelObject's
|
|
|
|
- various cleanups
|
|
|
|
- added ResetType enum
|
|
- changed some stubbed SVCs to return unique handle names for debugging purposes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- reorganized some kernel thread functions
- added placeholder __KernelWaitThread_Synchronization function
|
|
- added KERNEL_DEFAULT_STACK_SIZE definition (0x4000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- removed HLE::CallMCR function (was pointless)
|
|
- fixed some compiler issues with xscale_copro when porting code to Windows
- fixed some #include's
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- added initial VFP code from skyeye
|
|
- added SVC structs MemoryInfo and PageInfo
|
|
|
|
|
|
|
|
|
|
- cleaned up CreateThread svc
|
|
- added __KernelSwitchToThread for enabling a thread
- added __KernelRotateThreadReadyQueue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- fixed some logging
|
|
|
|
|
|
|
|
|
|
- added a helper function for getting command buffer for services
- fixed bug where GSP DMA was incorrectly being done in DataSynchronizationBarrier (instead of gsp_TriggerCmdReqQueue)
|
|
|
|
- added stubbed HLE syscall functions for svc_GetResourceLimit and svc_GetResourceLimitCurrentValues
|
|
|
|
|
|
- handle RD in STREX/STREXB
|
|
|
|
- moved instruction decoding to coprocessor HLE module
|
|
|
|
|
|
- added stub for SVC CreateAddressArbiter
- added OutputDebugString SVC
|
|
- updated load launcher.dat function to use ARM11 format hack
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- added hooks to catch LCD IO read/writes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- added shared memory region
- moarrrr cleanups to memory_map
|
|
|
|
|
|
- added option to create/delete service handles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- fixed log message wording in hle.cpp
- added syscall stubs for CloseHandle and WaitSynchronization1
|
|
- various cleanups/refactors to HLE services
|
|
|
|
|
|
|
|
- added function tables for service calls
- lots of refactoring
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- added a manager for keeping track of services/ports
- added a memory mapped region for memory accessed by HLE
- added HLE for GetThreadCommandBuffer function
|
|
|
|
|
|
|
|
|
|
- added service.h as an initial service interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- added hle.cpp and module registration
- removed unused code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- cleaned up core.cpp a bit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-moved scratchpad memory out of MemArena
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|