summaryrefslogtreecommitdiffstats
path: root/src/core/hle (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-07-01Service/boss:P: Add some functions to FunctionTablemailwl1-0/+3
2017-06-29Kernel/SVC: Pass the current thread as a parameter to ClientSession::SendSyncRequest.Subv3-4/+7
2017-06-26UDS: Use the ToDS and FromDS fields to properly calculate the AAD used during encryption.Subv1-15/+32
2017-06-26UDS: Move the UDS keyslot used to generate the CCMP key to the AES::KeySlotID enum.Subv1-4/+1
2017-06-26UDS: Run clang-format.Subv3-51/+55
2017-06-26UDS: Added functions to encrypt and decrypt the data frames.Subv3-12/+156
The responsibility of encryption and encapsulation into an 802.11 MAC frame will fall into the callers of GenerateDataPayload.
2017-06-26Kernel/Sessions: Clean up the list of pending request threads of a session when the client endpoint is closed.Subv1-0/+5
2017-06-26Kernel/SVC: Partially implemented svcReplyAndReceive.Subv2-11/+121
It behaves mostly as WaitSynchronizationN with wait_all = false, except for IPC buffer translation. The target thread of an IPC response will now wake up when responding. IPC buffer translation is currently not implemented. Error passing back to svcSendSyncRequest is currently not implemented.
2017-06-26apt: load shared font from system archivewwylele3-20/+258
2017-06-25apt/shared_font: don't relocate zero offsetwwylele1-2/+4
2017-06-25Kernel/ServerSession: Keep track of which threads have issued sync requests.Subv3-9/+29
2017-06-23Kernel: Implement AcceptSession SVCYuri Kunde Schlesner4-3/+38
2017-06-23Kernel: Fix SVC wrapper for CreatePortYuri Kunde Schlesner1-3/+2
The return parameters were flipped.
2017-06-23Kernel: Implement CreateSessionToPort SVCYuri Kunde Schlesner1-1/+12
2017-06-22Kernel: Implement CreateSession SVCYuri Kunde Schlesner2-3/+26
2017-06-21Kernel/IPC: Support translation of null handlesYuri Kunde Schlesner1-7/+12
Missed this in my first implementation. Thanks to @wwylele for pointing out that this was missing.
2017-06-19ResultVal: Remove MoveFrom()Yuri Kunde Schlesner24-57/+53
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in case you already have an rvalue.
2017-06-19ResultVal: Add an rvalue overload of Unwrap()Yuri Kunde Schlesner1-1/+6
2017-06-19Kernel: Add comment about the extended linear heap areaYuri Kunde Schlesner1-0/+2
2017-06-19Kernel/IPC: Make HLERequestContext usable from outside kernelYuri Kunde Schlesner3-5/+10
2017-06-15UDS: Clarify comment about the first 4 bytes of the SecureData header.Subv2-1/+5
It is likely that these 4 bytes are actually a different header, part of some protocol that encapsulates the SecureData protocol.
2017-06-15UDS: Return the correct error messages in SendTo when not connected to a network or trying to send to itself.Subv1-6/+13
2017-06-15UDS: Stub SendTo to generate the unencrypted data frame with the right headers.Subv3-1/+259
2017-06-15UDS: Added a hook for updating the connection status when a client connects to the network.Subv1-0/+36
2017-06-13Services/UDS: Set the proper bit in the ConnectionStatus structure when creating a network. (#2738)Sebastian Valle3-5/+15
* Services/UDS: Set the proper bit in the ConnectionStatus structure when creating a network. This lets the application know that the host was successfully added to the session. * Services/UDS: Reset the connection status when destroying the network * Services/UDS: Reset the connection status's bitmask of changed nodes after reporting it to the game.
2017-06-12Kernel/IPC: Use boost::small_vector for HLE context objectsYuri Kunde Schlesner1-1/+3
2017-06-11Kernel: Allow clearing request_objects to re-use buffer spaceYuri Kunde Schlesner3-0/+14
Reduces the necessary allocation to max(in_handles, out_handles) rather than (in_handles + out_handles).
2017-06-11Kernel: Basic support for IPC translation for HLE servicesYuri Kunde Schlesner3-18/+130
2017-06-11Service/sm: Convert srv: to use IPC helpersYuri Kunde Schlesner1-49/+56
2017-06-11IPC: Add Pop/PushObjects methods to RequestParser/BuilderYuri Kunde Schlesner1-10/+103
These use the context functions to create and look-up handles for the user.
2017-06-11IPC: Add basic HLERequestContext support to RequestParser/BuilderYuri Kunde Schlesner1-1/+32
2017-06-11Kernel: Add methods in HLERequestContext abstracting handle creationYuri Kunde Schlesner2-0/+12
2017-06-11ServiceFramework: Use separate copy of command bufferYuri Kunde Schlesner3-9/+29
Copy the IPC command buffer to/from the request context before/after the handler is invoked. This is part of a move away from using global data for handling IPC requests.
2017-06-09Service/sm: Convert 'srv:' to ServiceFrameworkYuri Kunde Schlesner5-51/+75
2017-06-08Session: Remove/add some forward declarationsYuri Kunde Schlesner2-1/+2
2017-06-08Kernel: Ensure objects are kept alive during ClientSession disconnectionYuri Kunde Schlesner1-7/+13
Fixes #2760
2017-06-08Service: Remove a few redundant namespace qualifiersYuri Kunde Schlesner1-5/+5
2017-06-08Service: Add new ServiceFramework framework for writing HLE servicesYuri Kunde Schlesner4-3/+268
The old "Interface" class had a few problems such as using free functions (Which didn't allow you to write the service handler as if it were a regular class.) which weren't very extensible. (Only received one parameter with a pointer to the Interface object.) The new ServiceFramework aims to solve these problems by working with member functions and passing a generic context struct as parameter. This struct can be extended in the future without having to update all existing service implementations.
2017-06-06Kernel: Remove some unnecessary namespace qualificationsYuri Kunde Schlesner1-4/+6
2017-06-06Services/UDS: Implement DecryptBeaconData.Subv1-1/+97
This function decrypts the encrypted data tags contained in the 802.11 beacon frames.
2017-06-06Service: Remove unnecessary includes from service.hYuri Kunde Schlesner31-12/+79
This has a huge fallout in terms of needing to fix other files because all service implementations included that file.
2017-06-06Service: Make service registration part of the sm implementationYuri Kunde Schlesner5-24/+145
Also enhances the GetServiceHandle implementation to be more accurate.
2017-06-06Service/sm: Use an actual semaphore for the notification semaphoreYuri Kunde Schlesner1-8/+9
An Event was used way back then when we didn't have proper working semaphores. Our Semaphore implementation is good enough now.
2017-06-06Service: Move SRV interface to a new sm/ subdirectoryYuri Kunde Schlesner3-7/+8
This will contain the implementation of the sm (Service Manager) system module.
2017-06-06Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSessionYuri Kunde Schlesner11-62/+73
This allows attaching a HLE handle to a ServerPort at any point after it is created, allowing port/session creation to be generic between HLE and regular services.
2017-06-06ResultVal: Add more convenience utils for creating and cascading resultsYuri Kunde Schlesner1-0/+19
2017-06-06HLE: Move SessionRequestHandler from Service:: to Kernel::Yuri Kunde Schlesner13-73/+98
Most of the code that works with this is or will be in the kernel, so it's a more appropriate place for it to be.
2017-06-03Addressed Bunnei's review comments, and made some other tweaks:TheKoopaKingdom1-1/+2
- Deleted GetStatus() because it wasn't used anywhere outside of Core::System. - Fixed design flaw where the message bar status could be set despite the game being stopped.
2017-06-03Switched to the ERROR_NOT_FOUND constant from errors.h.TheKoopaKingdom1-2/+1
2017-06-03Moved whitelist checks from FS_User to the Archive_NCCH handler.TheKoopaKingdom1-52/+2
2017-06-03Created a whitelist of system archives to prevent false positives creating dialogs.TheKoopaKingdom2-7/+53
2017-06-03Made some changes from review comments:TheKoopaKingdom2-9/+6
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review). - Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore. - Made dialog messages more clear. - Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic. - Cleaned up some other stuff.
2017-06-03Added system for handling core errors in citra-qt.TheKoopaKingdom3-2/+12
2017-05-30Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner17-203/+240
2017-05-30Kernel: Move WaitObject to a separate fileYuri Kunde Schlesner12-132/+174
Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header.
2017-05-30Kernel: Removed HandleTable::GetWaitObjectYuri Kunde Schlesner2-11/+2
This isn't necessary anymore since plain Get works correctly for WaitObjects.
2017-05-29Kernel: Extract dynamic Object pointer cast into its own functionYuri Kunde Schlesner1-11/+24
2017-05-28Remove some unnecessary inclusions of video_core.hYuri Kunde Schlesner2-2/+0
2017-05-28Core: Fix some out-of-style includesYuri Kunde Schlesner1-1/+1
2017-05-27fixup!cam: use IPCHelperwwylele2-30/+43
2017-05-25FS: Remove unused result definitionYuri Kunde Schlesner1-5/+0
2017-05-25Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner22-132/+177
2017-05-25GSP_GPU: Move error codes from result.h to local fileYuri Kunde Schlesner2-17/+23
2017-05-25FileSys: Move all result description to errors.hYuri Kunde Schlesner5-44/+19
2017-05-25result: Make error description a generic integerYuri Kunde Schlesner3-6/+18
It is now known that result code description vary depending on the module, and so they're best defined on a per-module basis. To support this, allow passing in an arbitrary integer instead of limiting to the ones in the ErrorDescription enum. These will be gradually migrated to their individual users, but a few will be kept as "common" codes shared by all modules.
2017-05-25Make BitField and ResultCode constexpr-initializableYuri Kunde Schlesner1-18/+15
2017-05-24cam: move u32->u8 trancation to IPCHelperwwylele1-34/+33
2017-05-24cam: use IPCHelperwwylele1-278/+238
2017-05-22Kernel/Sessions: Remove the ClientSession::Create function.Subv3-16/+3
It is not meant to be used by anything other than CreateSessionPair.
2017-05-19use IPCHelper for PTM servicesemmaus3-31/+45
2017-05-15Services/UDS: Use the new IPC helper functions.Subv1-21/+10
2017-05-15Services/UDS: Implement RecvBeaconBroadcastData.Subv1-19/+69
This allows the applications to retrieve 802.11 beacon frames from nearby UDS networks. Note that the networks are still not announced anywhere.
2017-05-15Services/UDS: Generate the UDS beacons when the beacon callback fires.Subv4-7/+535
2017-05-15Kernel: Remove a now unused enum and variable regarding a session's status.Subv2-8/+0
2017-05-15Kernel: Use a Session object to keep track of the status of a Client/Server session pair.Subv7-32/+85
Reduce the associated port's connection count when a ServerSession is destroyed.
2017-05-10Kernel: Map special regions according to ExHeaderYuri Kunde Schlesner4-50/+102
This replaces the hardcoded VRAM/DSP mappings with ones made based on the ExHeader ARM11 Kernel caps list. While this has no visible effect for most applications (since they use a standard set of mappings) it does improve support for system modules and n3DS exclusives.
2017-05-10DSP: Create backing memory for entire DSP RAMYuri Kunde Schlesner1-1/+6
Also move address space mapping out of video_core.
2017-05-08Remove ability to load symbol mapsYuri Kunde Schlesner1-8/+2
This was now mostly unused except by thread creation, which used a symbol of the entrypoint, if available, to name the thread.
2017-05-07fixup!ir: implement new 3ds HID via ir:rstwwylele1-31/+32
2017-05-06Create a random console_unique_id (#2668)B3n302-5/+71
* Create a random console_id when config save_file is created Added button in system config to refresh the console unique id * Moved the connect for the button from .ui file to constructor of ConfigureSystem * Added warning and info dialog Fixup: Make use of qt5 style connects, renamed the refresh button, removed some duplicate code, changed random device and moved all to the generate function * Changed the random generator to reflect what a real 3DS stores as console unique id Fixup: Changed the warning message * Fixup: Set and Create * Fixup: Added console id label, therfore removed second message box * Fixup: fixed the endianess * Fixup: more endianness fixes * Fixup: Endianness the 3rd
2017-05-04ir: implement new 3ds HID via ir:rstwwylele8-23/+206
2017-05-03ir: implement circle pad prowwylele4-44/+757
2017-04-17ldr_ro: use IPC helperwwylele1-193/+138
2017-04-12dsp_dsp: Messages are modified by service before being sent to DSPMerryMage1-0/+18
2017-04-03error conversion fixes for soc_unoah the goodra1-39/+32
2017-04-01Fix OutputDebugString syscallMichael Theall2-4/+4
2017-03-27Services/UDS: Fixed a style mistake in GetChannel.Sebastian Valle1-2/+1
2017-03-26Services/UDS: Use consistent spelling for WiFi and simplify the GetChannel function.Subv1-4/+4
2017-03-26Services/UDS: Signal the connection event when closing down the network.Subv1-0/+1
2017-03-26Services/UDS: Do not allow trying to start up a network that only the host can connect to.Subv1-0/+3
2017-03-26Service/UDS: Schedule an event to broadcast the beacon frames every 102.4ms.Subv2-2/+58
2017-03-26Services/UDS: Store the entire NetworkInfo structure that was used to create the network.Subv1-13/+5
It will be needed when generating the beacon frames.
2017-03-26Services/UDS: Initial support for hosting local-wlan networks.Subv2-44/+336
Currently it will let games create a network as hosts, but will not broadcast it anywhere and will not allow clients to connect.
2017-03-25ptm: create SharedExtSave file before openning itwwylele1-1/+1
2017-03-21shared_page: stub battery statewwylele2-1/+16
2017-03-20hopefully fix clang-format issues with old versionLectem1-3/+2
2017-03-19address more commentsLectem1-20/+20
2017-03-18Cast size_t to u32 for PushStaticBuffer usagesLectem1-2/+2
2017-03-18IPCHelper Skip method + address comments for aptLectem3-38/+46
2017-03-18apt: fix RequestBuilder parameters for Unwrapwwylele1-1/+1
2017-03-18fix #2560 and other commentsLectem3-22/+22
2017-03-18move push out of class body and add u8 u16 bool specializationsLectem4-55/+114
2017-03-18refactor APT service to use the new IPC helpersLectem4-195/+258
2017-03-12cfg: implement GenHashConsoleUniquewwylele1-7/+24
2017-03-09Refined thread launch on syscore error messagesFernando Sahmkow1-5/+15
2017-03-01Input: remove unused stuff & clean upwwylele1-34/+0
1. removed zl, zr and c-stick from HID::PadState. They are handled by IR, not HID 2. removed button handling in EmuWindow 3. removed key_map 4. cleanup #include
2017-03-01HID: use AnalogDevicewwylele1-2/+9
2017-03-01HID: use ButtonDevicewwylele2-1/+47
2017-02-27Timer: restore missing signaled=true from #2421wwylele1-0/+2
2017-02-27Fix log entry in timer::signal (#2600)B3n301-1/+1
2017-02-27Doxygen: Amend minor issues (#2593)Mat M5-9/+10
Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
2017-02-27Core: Make PerfStats internally lockedYuri Kunde Schlesner1-2/+1
More ergonomic to use and will be required for upcoming changes.
2017-02-27Add performance statistics to status barYuri Kunde Schlesner1-0/+3
2017-02-27Core: Remove unnecessary include in thread.hYuri Kunde Schlesner3-1/+2
2017-02-26IR: separate functions of each port to their own fileswwylele6-147/+159
2017-02-22Timers: Return an error when calling SetTimer with negative timeouts.Subv1-0/+5
2017-02-22Timers: Immediately signal the timer if it was started with an initial value of 0.Subv2-16/+31
2017-02-21APT: implement Wrap and Unwrapwwylele5-6/+149
2017-02-17HID: move enable_accelerometer/gyroscope_count initialization into Init() (#2574)Weiyi Wang1-2/+5
Fixes #2556
2017-02-14HLE/IPC: Fix uninitialized variables in helpers (#2568)Yuri Kunde Schlesner1-3/+3
Fixes #2567
2017-02-14NWM changed to NIMnoah the goodra1-1/+1
2017-02-14turned clang format back onnoah the goodra1-1/+1
2017-02-13loader: use self NCCH archivewwylele1-1/+1
2017-02-13file_sys: add Self NCCH archivewwylele1-0/+4
2017-02-11hid: remove the touch field from PadState (#2557)Weiyi Wang1-4/+0
2017-02-05fix wwylele's comment and use typename in templatesLectem1-4/+4
2017-02-03GSP_GPU::StoreDataCache stubbed (#2428)mailwl1-1/+28
2017-01-31HLE/Applets: Stub Mint (eShop) Applet (#2463)mailwl3-0/+106
This allows Phoenix Wright - Dual Destinies to boot.
2017-01-30Core: update Kernel Config Memory to latest version (11.2)mailwl1-5/+8
2017-01-29core: fix err_f.cpp warning about unhandled enumeration value on OSXKloen1-0/+2
2017-01-23core: fix mic_u warnings on MSVCKloen1-4/+4
2017-01-20HID: reset acceleroeter and gyroscope index in Initwwylele1-0/+2
2017-01-19CFG: override language setting on bootwwylele1-36/+38
2017-01-16CoreTiming: use named constant for ARM11 clock ratewwylele1-3/+3
2017-01-16HID: manages updating itself using correct tickswwylele2-58/+93
2017-01-14Service/NFC: stub some functionsmailwl4-20/+249
Tested on: Mini-Mario & Friends - amiibo Challenge
2017-01-14GSP::WriteHWRegsWithMask: fix register maskmailwl1-1/+1
2017-01-11Threads: Check the process' resource limit for the max allowed priority when creating a thread and remove the priority clamping code.Subv2-13/+9
2017-01-11Thread: Added priority range checking to svcSetThreadPriority and removed priority clamping code from Thread::SetPriority.Subv3-18/+18
2017-01-11Y2R: Use the proper error code when GetStandardCoefficient receives an invalid value.Subv1-1/+3
2017-01-11CAM: implement basic camera functions with a blank camerawwylele3-172/+1242
2017-01-06Kernel: Fix SharedMemory objects always returning error when addr = 0 (#2404)Hyper1-1/+5
Closes #2400
2017-01-06Kernel: Don't attempt to yield execution in SleepThread(0) if there are no available threads to run.Subv3-0/+14
With this we avoid an useless temporary deschedule of the current thread.
2017-01-05Kernel: Remove some unused functions.Subv2-32/+0
2017-01-05Kernel: Removed the priority boost code for starved threads.Subv1-27/+0
After hwtesting and reverse engineering the kernel, it was found that the CTROS scheduler performs no priority boosting for threads like this, although some other forms of scheduling priority-starved threads might take place. For example, it was found that hardware interrupts might cause low-priority threads to run if the CPU is preempted in the middle of an SVC handler that deschedules the current (high priority) thread before scheduling it again.
2017-01-05Kernel: Implemented Pulse event and timers.Subv5-13/+20
Closes #1904
2017-01-05Kernel/Semaphore: Fixed a regression in semaphore waits.Subv1-1/+2
The regression was caused by a missing check in #2260. The new behavior is consistent with the real kernel.
2017-01-05Kernel: Add some asserts to enforce the invariants in the scheduler.Subv2-2/+13
2017-01-05Kernel: Remove a thread from all of its waiting objects' waiting_threads list when it is awoken.Subv1-18/+4
This fixes a potential bug where threads would not get removed from said list if they awoke after waiting with WaitSynchronizationN with wait_all = false
2017-01-05Kernel: Remove Thread::wait_objects_index and use wait_objects to hold all the objects that a thread is waiting on.Subv4-21/+22
2017-01-04Kernel: Use different thread statuses when a thread calls WaitSynchronization1 and WaitSynchronizationN with wait_all = true.Subv3-16/+20
This commit removes the overly general THREADSTATUS_WAIT_SYNCH and replaces it with two more granular statuses: THREADSTATUS_WAIT_SYNCH_ANY when a thread waits on objects via WaitSynchronization1 or WaitSynchronizationN with wait_all = false. THREADSTATUS_WAIT_SYNCH_ALL when a thread waits on objects via WaitSynchronizationN with wait_all = true.
2017-01-04Kernel/Mutex: Propagate thread priority changes to other threads inheriting the priority via mutexesSubv5-42/+60
2017-01-04Kernel/Mutex: Update a mutex priority when a thread stops waiting on it.Subv5-24/+42
2017-01-04Kernel/Mutex: Implemented priority inheritance.Subv5-31/+51
The implementation is based on reverse engineering of the 3DS's kernel. A mutex holder's priority will be temporarily boosted to the best priority among any threads that want to acquire any of its held mutexes. When the holder releases the mutex, it's priority will be boosted to the best priority among the threads that want to acquire any of its remaining held mutexes.
2017-01-04Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv17-68/+56
This will be useful when implementing mutex priority inheritance.
2017-01-04Kernel/Synch: Do not attempt a reschedule on every syscall.Subv2-2/+18
Not all syscalls should cause reschedules, this commit attempts to remedy that, however, it still does not cover all cases.
2017-01-04Fix some warnings (#2399)Jonathan Hao4-8/+6
2016-12-30fix comments alignmentLectem1-22/+22
2016-12-30Service/NFC: stub GetTagInRangeEventmailwl5-0/+42
Fix Fatal Error in Mini-Mario & Friends - amiibo Challenge
2016-12-30Service/AC: add ac:i servicemailwl8-295/+418
2016-12-27Core: remove unused hle.cppwwylele1-58/+0
2016-12-26move Pop methods out of class bodyLectem1-72/+88
2016-12-26IPC helpers exampleLectem3-35/+40
2016-12-26IPC helpersLectem2-48/+322
2016-12-23core: Move emu_window and key_map into coreMerryMage1-1/+1
* Removes circular dependences (common should not depend on core)
2016-12-22Service/NWM: add nwm servicesmailwl17-8/+301
2016-12-22ThreadContext: Move from "core" to "arm_interface".bunnei2-4/+5
2016-12-22core: Replace "AppCore" nomenclature with just "CPU".bunnei4-44/+43
2016-12-22Address clang-format issues.bunnei2-11/+12
2016-12-22core: Remove HLE module, consolidate code & various cleanups.bunnei12-82/+53
2016-12-22core: Consolidate core and system state, remove system module & cleanups.bunnei5-45/+45
2016-12-17Thread: remove the thread from the thread list when exitingwwylele3-3/+15
2016-12-16Kernel: remove object's waiting thread if it is deadwwylele1-1/+2
2016-12-15FS: fix debug build from #2249wwylele1-11/+9
2016-12-15hid: Get rid of a double -> float truncation warningLioncash1-1/+2
float literals need to have the 'f' prefix.
2016-12-15core: Add missing #pragma once directives where applicableLioncash2-0/+4
2016-12-15act: Fix docstring typoLioncash1-1/+1
These aren't the AM services.
2016-12-15Service/CECD: Add cecd:ndm servicemailwl7-13/+79
2016-12-14Fixed the codestyle to match our clang-format rules.Subv16-68/+108
2016-12-14Fixed the codestyle to match our clang-format rules.Subv3-27/+39
2016-12-14Service/ACT: move ACT services to foldermailwl7-6/+38
2016-12-13Minor amendment of GSP_GPU::ImportDisplayCaptureInfo codeJamePeng1-3/+5
2016-12-12csnd:SND reformat source codemailwl2-49/+92
2016-12-11APT::GetStartupArgument: force clear startup argumentmailwl2-5/+11
2016-12-11Add all services to the Service namespaceLioncash42-473/+378
Previously there was a split where some of the services were in the Service namespace and others were not.
2016-12-10Properly remove a thread from its wait_objects' waitlist when it is awoken by a timeout.Subv3-2/+11
2016-12-09Moved the HLE command buffer translation task to ServerSession instead of the HLE handler superclass.Subv6-47/+38
2016-12-09Kernel/IPC: Small codestyle cleanupSubv2-3/+1
2016-12-09WaitSynch: Removed unused variables and reduced SharedPtr copies.Subv4-73/+56
Define a variable with the value of the sync timeout error code. Use a boost::flat_map instead of an unordered_map to hold the equivalence of objects and wait indices in a WaitSynchN call.
2016-12-09service: Add cfg:nor serviceLioncash3-0/+47
2016-12-09ptm: Use boolean instead of integral valueLioncash1-1/+1
The third parameter of Write is actually a bool type, not an int.
2016-12-09service: Drop '_Interface' from cfg service namesLioncash7-12/+12
2016-12-08Added a framework for partially handling Session disconnections.Subv8-9/+67
Further implementation will happen in a future commit. Fixes a regression.
2016-12-08Use std::move where appropriate.Subv11-177/+186
2016-12-08service: Add the ptm:s serviceLioncash3-0/+14
3dbrew documents this as being the exact same as ptm:sysm
2016-12-08service: Add common ptm:u commands to other ptm servicesLioncash4-0/+54
3dbrew indicates that all services have access to these commands except for ptm:sets.
2016-12-08service: Drop '_Interface' in ptm service class namesLioncash7-14/+14
Inheriting from Service::Interface makes this obvious.
2016-12-08service: Add ptm::gets and ptm::sets servicesLioncash5-0/+86
2016-12-08service: Add mvd and qtm servicesLioncash13-0/+259
Adds the two New3DS-only modules. 3dbrew was used for command information.
2016-12-08service: Add nfc servicesLioncash7-30/+193
3dbrew was used for the command information.
2016-12-08ssl_c: Update function tableLioncash1-0/+3
Updated based off information from 3dbrew
2016-12-08ptm: Update ptm_sysm function tableLioncash3-6/+7
Updated based off information from 3dbrew.
2016-12-08pm_app: Update function tableLioncash1-6/+9
Updated based off information from 3dbrew.
2016-12-08nwm_uds: Update function tableLioncash1-5/+7
Updated based off information from 3dbrew.
2016-12-08nim: Update function tablesLioncash2-0/+2
Updated based off information from 3dbrew.
2016-12-08http_c: Update function tableLioncash1-0/+4
Updated based off information from 3dbrew.
2016-12-08gsp_lcd: Update function tableLioncash1-0/+4
Updated based off information from 3dbrew.
2016-12-08fs_user: Update function tableLioncash1-0/+2
Updated based off information from 3dbrew.
2016-12-08dlp_srvr: Update function tableLioncash1-0/+7
2016-12-08cfg: Update function tablesLioncash3-0/+3
Updated based off information from 3dbrew
2016-12-08cecd_u: Update function tableLioncash1-1/+13
Updated based off information from 3dbrew.
2016-12-08boss_p: Update function tableLioncash1-3/+68
2016-12-08act: Update function tablesLioncash2-0/+10
Updated based off information from 3dbrew.
2016-12-08apt: Update apt function tablesLioncash2-7/+73
Updated based off information from 3dbrew.
2016-12-08Update AM service function tablesLioncash6-113/+246
Updated based off information from 3dbrew.
2016-12-07applet: Move common IsRunning underlying variable to the Applet classLioncash8-28/+19
Gets rid of basic duplication.
2016-12-07applet: Make virtual destructor defaultedLioncash1-1/+1
2016-12-07applet: Make constructor protectedLioncash1-1/+2
Considering the class is abstract, there's no need to make the constructor public.
2016-12-07Config: auto-select region and languagewwylele2-2/+62
2016-12-07Use boost remove_erase_if instead of the erase-remove idiomSubv1-2/+3
2016-12-07Improved the algorithm for GetHighestPriorityReadyThread.Subv1-14/+13
2016-12-05Return an error code when connecting to a saturated port.Subv5-7/+20
The error code was taken from the 3DS kernel.
2016-12-05HLE: Use a member variable instead of a virtual function to retrieve the max number of sessions that can be connected to an HLE service at the same time.Subv5-8/+18
2016-12-05Split SessionRequestHandler::HandleSyncRequest into HandleSyncRequest, TranslateRequest and HandleSyncRequestImpl.Subv6-22/+59
HandleSyncRequest now takes care of calling the command buffer translate function before actually invoking the command handler for HLE services.
2016-12-05Kernel: Remove the Redirection handle type.Subv1-2/+0
2016-12-05KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it.Subv12-69/+86
2016-12-04Threading: Added some utility functions and const correctness.Subv3-15/+35
2016-12-04GSP: Downgrade log severity of SetAxiConfigQoSModeYuri Kunde Schlesner1-1/+1
This function doesn't need to do anything for HLE and some games call it quite often, spamming up the logs.
2016-12-04Threading: Reworked the way our scheduler works.Subv7-189/+179
Threads will now be awakened when the objects they're waiting on are signaled, instead of repeating the WaitSynchronization call every now and then. The scheduler is now called once after every SVC call, and once after a thread is awakened from sleep by its timeout callback. This new implementation is based off reverse-engineering of the real kernel. See https://gist.github.com/Subv/02f29bd9f1e5deb7aceea1e8f019c8f4 for a more detailed description of how the real kernel handles rescheduling.
2016-12-03Declare empty ServerSession and ClientSession constructors as default.Subv2-4/+4
2016-12-01Threads do not wait for the server endpoint to call AcceptSession before returning from a ConnectToPort or GetServiceHandle call.Subv2-3/+5
2016-12-01Fixed the rebase mistakes.Subv10-82/+76
2016-12-01A bit of a redesign.Subv13-263/+266
Sessions and Ports are now detached from each other. HLE services are handled by means of a SessionRequestHandler class, Interface now inherits from this class. The File and Directory classes are no longer kernel objects, but SessionRequestHandlers instead, bound to a ServerSession when requested. File::OpenLinkFile now creates a new session pair and binds the File instance to it.
2016-12-01IPC/HLE: Associate the ClientSessions with their parent port's HLE interface if it exists.Subv6-26/+21
Pass the triggering ServerSession to the HLE command handler to differentiate which session caused the request.
2016-12-01Kernel/HLE: Service::Interface no longer inherits from any Kernel object, and is now its own standalone class.Subv4-24/+52
Interface is now used by aggregation in ClientPort, to forward service commands to their HLE implementation if needed.
2016-12-01fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv4-5/+6
2016-12-01 Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv15-86/+310
All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions. Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed. HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately.
2016-11-30Set client SDK version to Service APIsmailwl7-13/+86
2016-11-29FileSys: Implement OtherSaveDatawwylele3-0/+12
2016-11-29FS: add missing MediaTypewwylele1-1/+1
2016-11-29FileSys: abstract SD save data archive sourcewwylele1-1/+2
2016-11-25Output parameters to logmailwl1-4/+6
2016-11-25MIC_U: Stub service funcionsmailwl2-16/+305
2016-11-24Bravely Default/Second stuck #1822 (#2188)pippo29314-2/+22
* Bravely Default/Second stuck #1822 CancelLibraryApplet stub * Log parameter. * Taking care of comments * Sync with 3DBrew * White space ? * lower case
2016-11-20Kernel/Loader: Grab the system mode from the NCCH ExHeader.Subv2-6/+4
3dsx and elf files default to system mode 2 (96MB allocated to the application). This allows Home Menu to boot without modifications. Closes #1849
2016-11-19Kernel/Events: Log an error when trying to create Pulse events and timers.Subv2-0/+10
Related to #1904
2016-11-19APT/Applets: Renamed the members of the SignalType enum.Subv5-16/+27
Names now make sense and match 3dbrew.
2016-11-19FileSys: rename SaveDataCheck archive to NCCH archivewwylele2-6/+5
According to the observation from game and 3dbrew "Used for accessing general NCCH data"
2016-11-19PTM & CFG: use the correct path and error code according to the new FileSys policywwylele2-5/+6
2016-11-19FileSys: add SDMCWriteOnlyArchivewwylele2-0/+9
2016-11-19FileSys: add ExtSaveDataArchivewwylele1-0/+1
ExtSaveData is more similar to SaveData, so let it be a subclass of SaveData
2016-11-19FileSys: add SaveDataArchivewwylele1-0/+7
The error checking of SaveDataArchive is completely different from DiskArchive, so it has to be a new class instead of a subclass of DiskArchive.
2016-11-17cfg: add config block 0x00090000wwylele1-2/+8
2016-11-02Style fixmailwl1-2/+2
2016-11-02Rename AcConfig, change types u8 to u32mailwl1-21/+25
2016-11-02AC_U: Stub functions, used if EULA agreedmailwl2-14/+190
2016-11-01FileSys: make Archive interfaces return error codewwylele1-32/+9
and make the mode parameter a reference since it is a BitField union
2016-10-28core: some errno values are uncommon on UnixJan Beich1-0/+8
src/core/hle/service/soc_u.cpp:107:6: error: 'ENODATA' was not declared in this scope {ENODATA, 43}, ^ src/core/hle/service/soc_u.cpp:117:6: error: 'ENOSR' was not declared in this scope {ENOSR, 53}, ^ src/core/hle/service/soc_u.cpp:118:6: error: 'ENOSTR' was not declared in this scope {ENOSTR, 54}, ^ src/core/hle/service/soc_u.cpp:139:6: error: 'ETIME' was not declared in this scope {ETIME, 75}, ^
2016-10-25FRD: fix GetMyFriendKeymailwl1-1/+1
2016-10-20Fix typosRicardo de Almeida Gonzaga3-3/+3
2016-10-12NWM: stub Initialize with an errorwwylele1-0/+11
2016-10-06Rework the code of err:f serviceJamePeng1-118/+198
2016-10-02Update the stub code of BOSSJamePeng3-4/+1808
2016-10-02fs: clean up log formatwwylele1-22/+24
2016-10-02fs: implement DeleteDirectoryRecursivelywwylele3-1/+51
2016-09-22move ResetType to kernel.hwwylele3-7/+6
2016-09-22name objectswwylele1-0/+4
2016-09-22implement wait tree widgetwwylele4-0/+16
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner72-72/+72
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot82-210/+71
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner71-362/+383
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot132-3462/+4009
2016-09-15arm: ResetContext shouldn't be part of ARM_Interface.bunnei1-1/+17
2016-08-27LDR: Implement CROwwylele8-97/+3007
2016-08-27Auto-detect original shared_font.bin memory baseYuri Kunde Schlesner3-30/+68
This allows a file dumped from either an o3DS or a n3DS (and potentially even an original unrebased file) to be used.
2016-08-02fix #1942 and adds a few IPC functions for descriptorsLectem5-22/+110
2016-07-28Instead of segfaulting, log an error to remind the user to dump the shared font fileHenrik Rydgard1-0/+7
2016-07-23HLE: implement system timewwylele2-2/+60
2016-07-15Correct APT::0x00550040 and APT::0x00560000 functionJamePeng5-22/+31
2016-07-04Fix the errorcode of archive handleJamePeng2-10/+15
2016-07-04HLE/Applets: Implement ErrEula appletmailwl4-0/+116
2016-07-03HLE/FS: Document some command parameters and implemented command 0x08560240 (CreateLegacySystemSaveData)Subv1-11/+42
2016-07-03Service::CFG/FS: add and refactor out utilities for front-endwwylele4-15/+146
2016-07-03Service::CFG: move known block ID to an enumwwylele1-11/+25
2016-07-03Service::CFG: add SetConfigInfoBlk4wwylele4-8/+73
2016-07-02Service::CFG: add missing languagewwylele1-1/+2
2016-07-02Service::CFG: name sound output modeswwylele2-2/+7
2016-06-30Result: fix and update ErrorModulewwylele1-6/+19
2016-06-11Kernel/SVC: Implemented svcCreatePort.Subv6-3/+41
2016-06-11hid: add missing headerwwylele1-0/+2
2016-06-05Kernel: Added ClientPort and ServerPort classes.Subv5-2/+135
This is part of an ongoing effort to implement support for multiple processes.
2016-06-05service: Add other DLP servicesLioncash9-21/+142
Specifically, dlp::CLNT and dlp::FKCL Moves them to their own folder like with other services.
2016-06-04Thread: update timeout when rerunning WaitSynchwwylele1-0/+49
2016-06-01gsp::gpu: Reset g_thread_id in UnregisterInterruptRelayQueuemailwl2-15/+22
2016-05-31Fix parameter name in EnableNotificationmailwl2-2/+6
2016-05-31Fix mistakes, add output header codesmailwl1-8/+24
2016-05-31remove ugly functionmailwl1-35/+3
2016-05-31srv: Update according 3dbrewmailwl1-15/+137
2016-05-30Switch context on the same thread if necessarywwylele1-2/+6
2016-05-28Memory: Handle RasterizerCachedMemory and RasterizerCachedSpecial page types in the memory block manipulation functions.Subv1-1/+0
2016-05-28Memory: Make ReadBlock and WriteBlock accept void pointers.Subv2-13/+11
2016-05-28SOC_U: Remove usage of GetPointerSubv1-27/+73
2016-05-28SSL_C: Remove use of Memory::GetPointerMerryMage1-4/+3
2016-05-28GSP_GPU: Remove use of Memory::GetPointerMerryMage1-33/+50
2016-05-28DSP_DSP: Remove use of Memory::GetPointerMerryMage1-7/+10
2016-05-28FS/Archive: Remove use of Memory::GetPointerMerryMage1-7/+14
2016-05-26Memory: Added necessary headers and removed unnecessary headerMerryMage1-0/+1
2016-05-24New3DS: Minor style cleanup to #1520.bunnei1-2/+2
2016-05-21CFG: Remove use of Memory::GetPointerMerryMage1-6/+10
2016-05-21APT: Remove use of Memory::GetPointerMerryMage5-35/+36
2016-05-21Kernel/Thread: Remove use of Memory::GetPointerMerryMage1-1/+1
2016-05-21Applets/swkdb: Remove use of Memory::GetPointerMerryMage1-1/+1
2016-05-21SVC::WaitSynchronizationN: Reschedule at the endwwylele1-2/+3
2016-05-18Update ACT:U and create ACT:A (#1809)András Domonkos4-0/+54
* Update ACT_U * Create act_a.h * Create act_a.cpp * Add service ACT:A * Add ACT:A source and header * Fix wrong header
2016-05-17Set fpscr for new threadsJannik Vogel2-0/+5
2016-05-16DSP_DSP: Remove GetHeadphoneStatus logspam (#1799)Maribel1-2/+2
2016-05-15fixup! fixup! Refactor input systemwwylele1-1/+1
2016-05-15Refactor input subsystemwwylele2-35/+36
2016-05-14Memory: Fixed a regression caused by #1695 and #1689.Subv1-0/+3
Reserve enough space in the vector that holds the linear heap memory to prevent relocations of the backing memory when growing too much. Closes #1790
2016-05-13HLE/Applets: Give each applet its own block of heap memory, and use that when creating the framebuffer shared memory block.Subv5-5/+44
2016-05-13Kernel: Account for automatically-allocated shared memories in the amount of used linear heap memory.Subv1-0/+5
2016-05-13APT: Move the shared font loading and relocation functions to their own subdirectory services/apt/bcfnt.Subv3-66/+165
2016-05-13Kernel/SharedMemory: Log an error when Map fails.Subv1-1/+10
2016-05-13Kernel: Implemented shared memory permissions.Subv4-9/+50
2016-05-13APT: Implement relocating the shared font to its true address.Subv1-9/+74
2016-05-13Kernel/Memory: Remove the Shared Memory region from the legacy memory map.Subv1-1/+0
2016-05-13Kernel/SharedMemory: Properly implemented shared memory support.Subv10-118/+147
Applications can request the kernel to allocate a piece of the linear heap for them when creating a shared memory object. Shared memory areas are now properly mapped into the target processes when calling svcMapMemoryBlock. Removed the APT Shared Font hack as it is no longer needed.
2016-05-13Kernel/SVC: Fixed the register order for svcCreateMemoryBlock.Subv2-2/+3
R0 is used as the last parameter instead of R4.
2016-05-07fixup simple type conversions where possibleAlexander Laties1-2/+2
2016-05-07Kernel/Threading: Warn when a thread can be scheduled in the Syscore (Core 1).Subv2-0/+7
We do not currently implement any cores other than the AppCore (Core 0).
2016-05-07Kernel/Threads: Dynamically allocate the TLS region for threads in the BASE region of the linear heap.Subv4-22/+74
Each thread gets a 0x200-byte area from the 0x1000-sized page, when all 8 thread slots in a single page are used up, the kernel allocates a new page to hold another 8 entries. This is consistent with what the real kernel does.
2016-05-07HLE/Applets: Use the correct size for the framebuffer SharedMemory in the swkbd and MiiSelector applets.Subv5-23/+44
2016-05-06HLE: Rename RescheduleIsPending to IsReschedulePending.bunnei2-2/+2
2016-05-05Layout Mii parameters input/output, and return success as result of applet workmailwl2-0/+49
2016-05-03clean up config blockwwylele1-29/+13
2016-05-01remove duplicated function declarationwwylele1-13/+0
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot2-1/+1
2016-04-29add config block 0x00170000wwylele1-0/+4
2016-04-29Common: Remove section measurement from profiler (#1731)Yuri Kunde Schlesner2-5/+0
This has been entirely superseded by MicroProfile. The rest of the code can go when a simpler frametime/FPS meter is added to the GUI.
2016-04-27DSP_DSP: Fix log format strings and argumentsMerryMage1-12/+20
2016-04-27DSP_DSP: Add return IPC headersMerryMage2-4/+27
2016-04-27DSP_DSP: Updated interrupt implementationMerryMage2-42/+106
2016-04-27y2r_u: Cleanup some formatting.bunnei1-52/+89
2016-04-24am: title_id is long long uintSam Spilsbury1-1/+1
2016-04-24DSP_DSP: Remove unused variableMerryMage1-2/+0
2016-04-23return checks if event and memory createdmailwl1-1/+8
2016-04-23fs: Fix what appears to be a typo (filename_size / file_size)Sam Spilsbury1-1/+1
2016-04-22gsp::Gpu: implement AcquireRight, ReleaseRight functionsmailwl1-8/+37
2016-04-21HWRasterizer: Texture forwardingtfarley3-24/+18
2016-04-21ac:u: stub CloseAsync; check memory size aling in svc:GetProcessInfo(type=2)mailwl2-1/+29
2016-04-20Update the stub code of NDM service!JamePeng3-27/+420
2016-04-20Update the code of service y2r!JamePeng2-32/+357
2016-04-20Implement CheckNew3DS and CheckNew3DSAppJamePeng8-10/+135
Append an item[is_new3ds] to config file[System] group Implement APT::SetNSStateField,it will update the unknown NS_state_field
2016-04-16core: Clean out some unnecessary header includesLioncash2-9/+0
2016-04-11Set Kernel config "Unknown Value" to 0x1mailwl2-2/+7
2016-04-08update the code of AM service! (#1623)JamePeng6-51/+289
2016-04-08cecd:u: stub GetCecStateAbbreviated (#1648)mailwl3-0/+28
2016-04-06append SetAppCpuTimeLimit and GetAppCpuTimeLimit to APT:AJamePeng3-13/+16
2016-04-05Common: Remove Common::make_unique, use std::make_uniqueMerryMage2-8/+8
2016-04-04implement APT::GetStartupArgumentJamePeng5-2/+37
2016-04-04Append the missing function name"GetAppletInfo" to APT:AJamePeng1-1/+2
2016-04-02Dummy implementation dlp:SRVR Service.exhalatio3-0/+61
2016-04-02Rework sockopt translation to match the error translation code already in placeRyan Loebs1-22/+30
2016-03-31cecd:u: stub GetCecInfoEventHandle, GetChangeStateEventHandlemailwl3-3/+54
2016-03-31Add gsp functions: SetAxiConfigQoSMode, UnregisterInterruptRelayQueuemailwl1-6/+41
2016-03-31GSP: Return proper error codes for register writespurpasmart963-80/+97
2016-03-30Code styleRyan Loebs1-2/+2
2016-03-30Added GetSockOptNameRyan Loebs1-15/+58
Filter out and translate invalid sockopt names.
2016-03-29Derp: win32: typedef int socklen_t;Ryan Loebs1-4/+0
2016-03-29But of course, Windows uses 'int' while Linux uses 'socklen_t'Ryan Loebs1-0/+4
2016-03-29Compiling on Windows nowRyan Loebs1-3/+3
2016-03-29Formatting...Ryan Loebs1-1/+1
2016-03-29Addressing PR commentsRyan Loebs1-4/+4
2016-03-29SOC UpdatesRyan Loebs1-3/+46
-Implement GetSockOpt / SetSockOpt -Fix bug in RecvFrom where sending from localhost does not fill in src_addr/src_addr_len on Linux
2016-03-29Add common methods to all cfg:* portsRyan Loebs3-0/+21
2016-03-27frd:u: Initial stub some functionsmailwl4-55/+234
2016-03-26use reference instead of pointerwwylele1-9/+9
2016-03-25implement GyroscopeCalibrateParamwwylele2-9/+20
2016-03-22implement accel and gyro backendwwylele4-23/+176
2016-03-21session: Make helper functions constexprLioncash1-6/+6
2016-03-21hle: Get rid of global access to g_rescheduleLioncash3-7/+20
This shouldn't be directly exposed if there's already a partial API that operates on it. We can just provide the rest of that API.
2016-03-21soc_u: Get rid of explicit delete and newLioncash1-8/+5
2016-03-20HLE/FS: Change the error code returned when an ExtSaveData archive is not found.Subv1-4/+8
This allows Fire Emblem to boot again.
2016-03-20HLE/FS: Corrected some style concerns.Subv4-6/+4
2016-03-20HLE/FS: Fixed creating the config savefile when it doesn't exist.Subv1-1/+1
This fixes a regression.
2016-03-20HLE/FS: Implemented GetFormatInfoSubv6-48/+127
Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive.
2016-03-20HLE/FS: Don't return an error when deleting the ExtSaveData if it does not exist.Subv1-1/+1
2016-03-20HLE/FS: Return the proper error codes when opening files.Subv1-3/+4
2016-03-20HLE/FS: Fixed the OpenDirectory error codeSubv1-1/+1
2016-03-20HLE/FS: Return the proper error codes on file Read/Write operations.Subv2-2/+16
These operations are limited by the open flags specified while opening the file.
2016-03-20HLE/FS: Corrected the error codes for DeleteFileSubv1-4/+1
2016-03-20HLE/FS: Corrected the error codes for CreateFileSubv1-1/+3
2016-03-20HLE/FS: FS::CreateFile takes an u64 for the file size.Subv3-5/+5
2016-03-14Reorganize the ndm service path for dummy implement functionJamePeng5-24/+118
SuspendDaemons , ResumeDaemons , OverrideDefaultDaemons The NDM file move to /core/hle/service/ndm/ now!
2016-03-13hid: fix pad updatewwylele1-1/+1
2016-03-13svc: Move ResetType enum to the kernel event headerLioncash10-16/+17
2016-03-12svc: Remove unused ArbitrationType enumLioncash1-9/+0
An equivalent enum already exists within address_arbiter.h
2016-03-12svc: Make ResetType an enum classLioncash11-24/+23
2016-03-12Fix headerpippo29311-1/+1
2016-03-12GetArchiveResource stubpippo29311-1/+25
2016-03-12HLE/Applets: Implemented a dummy Mii Selector applet.Subv6-2/+154
This prevents some games (like Super Mario 3D Land) from freezing when trying to launch it, however, it's not complete and won't let you go past Mii selection as the parameter structure hasn't been reverse engineered yet.
2016-03-12gsp_gpu: Change 0 literal to nullptrLioncash1-1/+1
2016-03-12hle: Update service function tablesLioncash4-1/+16
2016-03-09renderer_base: Don't directly expose the rasterizer unique_ptrLioncash2-5/+5
There's no reason to allow direct access to the unique_ptr instance. Only its contained pointer.
2016-03-06DSP: Implement Pipe 2MerryMage1-43/+151
Pipe 2 is a DSP pipe that is used to initialize both the DSP hardware (the application signals to the DSP to initialize) and the application (the DSP provides the memory location of structures in the shared memory region).
2016-03-06Memory: Do correct Phys->Virt address translation for non-APP linheapYuri Kunde Schlesner2-2/+5
2016-03-06DSP: Print hash of firmware to consoleMerryMage1-8/+21
2016-03-05core: Use unrestricted union to hold storage of ResultVal valueYuri Kunde Schlesner1-42/+16
2016-03-04ac:u: Stub IsConnectedmailwl1-2/+17
2016-03-01ThreadProcessorId_All on SVC::CreateThreadKloen1-0/+1
2016-03-01Service/CFG: Fix potential endianess issueYuri Kunde Schlesner1-2/+3
2016-03-01Service/CFG: Add block 0x000A0000 (username) to default config fileYuri Kunde Schlesner1-1/+14
2016-03-01Service/CAM: Add doxycomments to all service functionsYuri Kunde Schlesner1-0/+217
2016-02-26Initial implementation ir:usermailwl3-18/+142
2016-02-21AudioCore: Skeleton ImplementationMerryMage3-58/+94
This commit: * Adds a new subproject, audio_core. * Defines structures that exist in DSP shared memory. * Hooks up various other parts of the emulator into audio core. This sets the foundation for a later HLE DSP implementation.
2016-02-13Service/CAM: Dummy implementation of some functionsYuri Kunde Schlesner3-20/+346
Thanks to @mailwl for the initial version of the stubs.
2016-02-12BitField: Make trivially copyable and remove assignment operatorMerryMage7-20/+20
2016-02-02services: Get rid of unnecessary includesLioncash69-132/+32
2016-02-02services: Update function tablesLioncash2-5/+11
2016-01-30Memory: Implement MMIOMerryMage2-4/+8
2016-01-14HLE/SVC: Implement UnmapMemoryBlock.Subv5-5/+60
This implementation will need to be (almost completely) changed when we implement multiprocess support.
2015-12-30services: Update some function tablesLioncash25-113/+369
2015-12-30HLE/Timers: Reset OneShot timers when they are acquired instead of when they're triggered.Subv1-3/+3
Closes #1139
2015-12-28SVC: Fixed ArbitrateAddress to behave as it does on hardware.Subv2-9/+18
This was verified with hwtests that i plan to upload later on.
2015-12-25svc: Remove superfluous printf argumentLioncash1-1/+1
2015-12-24HLE/Sockets: Fixed the buffer offset in recvfrom.Subv1-3/+13
Closes #1277
2015-12-13svc: Fix compilation with LOG_TRACE enabledLioncash1-1/+1
2015-12-08VideoCore: Unify interface to OpenGL and SW rasterizersYuri Kunde Schlesner2-5/+5
This removes explicit checks sprinkled all over the codebase to instead just have the SW rasterizer expose an implementation with no-ops for most operations.
2015-12-07VideoCore: Rename HWRasterizer methods to be less confusingYuri Kunde Schlesner2-5/+5
2015-12-01Kernel: Implement svcGetSystemInfoYuri Kunde Schlesner7-1/+95
This makes smealum/ctrulib@b96dd51d3349961189d4ab1bc2a5c45deff21c09 work with Citra.
2015-11-23Services/Cam: Added new log type and camera enums from 3dbrew.Subv1-0/+156
Followup to #1102 Original author @mailwl
2015-11-22Add stub functions for Initialize and GenerateRandomData in ssl:Cpolaris-1-2/+51
2015-11-22Add Initialize and GenerateRandomData stubspolaris-1-0/+2
2015-10-28csnd_snd: Get rid of type punningLioncash1-12/+13
2015-10-28Added CSND stub.Matthias Ernst2-4/+66
2015-10-28Implement FS_User::GetFreeBytesarchshift3-1/+42
2015-10-24Fix copy pasteFiliph Sandström1-1/+1
2015-10-23Fix wrong branchFiliph Sandström1-0/+12
2015-10-23Add GetTotalStepCount StubFiliph Sandström1-1/+1
2015-10-23Update ptm.hFiliph Sandström1-0/+8
2015-10-07Silence -Wsign-compare warnings.Rohit Nirmal1-1/+1
2015-09-30Service/CFG: Use a constexpr function for country initializationEmmanuel Gil Peyrot1-4/+3
This fixes a TODO left over from when we supported MSVC 2013.
2015-09-29fix some xcode 7.0 warningsMartin Lindhe1-1/+1
2015-09-16general: Silence some warnings when using clangLioncash5-10/+12
2015-09-14Service/CFG: Add default entry for block 0x000A0001 (birthday)Yuri Kunde Schlesner1-0/+6
2015-09-14Service/CFG: Correct flags in 2 default blocksYuri Kunde Schlesner1-2/+2
Verified against a 9.2.0-20 config save
2015-09-14Service/CFG: Add additional blocks to default save dataYuri Kunde Schlesner1-0/+34
These blocks are required by various games to boot.
2015-09-14Fix narrowing conversion warningYuri Kunde Schlesner1-1/+1
2015-09-14Service/CFG: Move several private types from the header to the cppYuri Kunde Schlesner2-63/+49
2015-09-14Service/CFG: Clean up default block creationYuri Kunde Schlesner2-27/+17
2015-09-14GSP: Implement command 0x05, used for flushing cachesYuri Kunde Schlesner2-13/+34
May fix additional texture caching issues. (Though mostly in homebrew, I haven't seen any commercial software use this to flush anything but command lists.)
2015-09-11General: Replace NULL and '0' usages with nullptr where applicableLioncash1-1/+1
2015-09-10General: Fix up doxygen commentsLioncash4-7/+4
2015-09-03Add cam:u service function names to its function tablearchshift1-3/+60
2015-08-30SVC: Advance time when calling GetSystemTick to escape busy-wait loopsYuri Kunde Schlesner1-1/+4
Cubic Ninja waited for the frame to end by spinning on a loop calling GetSystemTick while doing nothing else. Since GetSystemTick doesn't cause a reschedule (which advances time), this meant that very little emulated time would pass inside that loop, causing the game to spend most of the frame burning away CPU.
2015-08-28Kernel: Fix wrong linear heap base on titles using newer kernelsYuri Kunde Schlesner1-1/+1
Typo which sneaked in through review on #1025
2015-08-27Kernel: Fix assertion failure when ControlMemory is called with size=0Yuri Kunde Schlesner1-0/+8
2015-08-27Core: Improve APT Shared Font hackYuri Kunde Schlesner3-4/+29
Should fix invalid read loops in some games
2015-08-25Integrate the MicroProfile profiling libraryYuri Kunde Schlesner2-0/+9
This brings goodies such as a configurable user interface and multi-threaded timeline view.
2015-08-16GPU: Implement TextureCopy-mode display transfersYuri Kunde Schlesner2-11/+25
Fixes glitchy garbage in Fire Emblem 3D scenes.
2015-08-16Kernel: Remove unused legacy heap MapBlock_* functionsYuri Kunde Schlesner2-77/+0
2015-08-16APT: Adjust shared font hack so it works with the new linear heap codeYuri Kunde Schlesner1-10/+11
2015-08-16Kernel: Implement svcGetProcessInfo in a basic wayYuri Kunde Schlesner5-2/+70
This also adds some basic memory usage accounting. These two types are used by Super Smash Bros. during startup.
2015-08-16Kernel: Add more infrastructure to support different memory layoutsYuri Kunde Schlesner8-27/+139
This adds some structures necessary to support multiple memory regions in the future. It also adds support for different system memory types and the new linear heap mapping at 0x30000000.
2015-08-16HLE: Remove empty ConfigMem and SharedPage Shutdown functionsYuri Kunde Schlesner5-10/+0
2015-08-16Move core/mem_map.{cpp,h} => core/hle/kernel/memory.{cpp,h}Yuri Kunde Schlesner4-2/+161
2015-08-16Memory: Move address type conversion routines to memory.cpp/hYuri Kunde Schlesner3-3/+0
These helpers aren't really part of the kernel, and mem_map.cpp/h is going to be moved there next.
2015-08-16Process: Store kernel compatibility version during loadingYuri Kunde Schlesner2-3/+7
2015-08-16Kernel: Properly implement ControlMemory FREE and COMMITYuri Kunde Schlesner5-36/+338
2015-08-16VMManager: Introduce names for used ResultCodesYuri Kunde Schlesner2-6/+11
2015-08-16VMManager: Make LogLayout log level configurable as a parameterYuri Kunde Schlesner3-5/+15
2015-08-16VMManager: Change block offsets to size_tYuri Kunde Schlesner2-3/+3
2015-07-29core: Eliminate some unused variable warningsLioncash2-3/+5
2015-07-29core: Fix missing prototype warningsLioncash1-0/+1
2015-07-29am_net: Add missing function to the function tableLioncash1-0/+1
2015-07-29am_net: Add correct function name to the function tableLioncash1-1/+1
2015-07-28Move input values into an arrayJames Rowe2-1/+14
2015-07-26dyncom: Rename armdefs.h to armstate.hLioncash1-1/+1
2015-07-24Service/APT: Fixed a regression, PreloadLibraryApplet should also start an applet when called.Subv6-5/+36
2015-07-24Service/APT: Return proper parameters in GetLockHandle.Subv4-14/+49
Documented some APT functions This allows applets to boot.
2015-07-24GSP: Don't try to write memory fill registers if start address is 0Yuri Kunde Schlesner1-13/+18
Verified to be what GSP does via REing. Fixes invalid virt->phys translation error spam in some games.
2015-07-23Qt/GPU Breakpoints: Added three more breakpoint types:Subv1-0/+7
* IncomingDisplayTransfer: Triggered just before a display transfer is performed. * GSPCommandProcessed: Triggered right after a GSP command is processed. * BufferSwapped: Triggered when the frames flip
2015-07-21Services/Logging: Log more useful information when some operations fail.Subv1-4/+8
Namely OpenFileDirectly, OpenDirectory and OpenArchive
2015-07-21dyncom: Pass SVC immediates directly.Lioncash2-5/+4
Previously it would just re-read the already decoded instruction and extract the immediate value.
2015-07-21Services/AM: Stubbed am:app::GetNumContentInfos to return 0 results.Subv3-3/+33
Named the service functions in am:app as per 3dbrew. This fixes an illegal read loop in Steel Diver
2015-07-21Services/CFG: Added some missing functions to cfg:sSubv1-1/+3
2015-07-21Kernel/Scheduling: Clean up a thread's wait_objects when its scheduled.Subv1-0/+8
They'll be reset if needed during the next svcWaitSynchronization call (if there's any pending)
2015-07-20SOC:U : Update deprecated function gethostbyname() to getaddrinfo()zawata1-2/+8
2015-07-19Change trace/unimplemented service call logs to use hexarchshift1-1/+1
Changes the log to use hex in the parameter list instead of decimal.
2015-07-19Add more frd:u unknown service commands from 3dbrewarchshift1-1/+12
2015-07-17Kernel/SVC: Implemented svcQueryProcessMemorySubv2-6/+28
2015-07-17Kernel/SVC: Implemented svcQueryMemory.Subv2-4/+24
2015-07-17Core\HLE : Fix Warningzawata2-3/+3
"signed/unsigned mismatch"
2015-07-17Ensure all kernel objects are released during shutdownYuri Kunde Schlesner12-8/+45
This commit fixes several kernel object leaks. The most severe of them was threads not being removed from the private handle table used for CoreTiming events. This resulted in Threads never being released, which in turn held references to Process, causing CodeSets to never be freed when loading other applications.
2015-07-14Archive: Correct a few incorrect types in function signaturesYuri Kunde Schlesner1-1/+1
Buffer lengths should be size_t, and file offsets should be u64.
2015-07-13Add CiTrace recording support.Tony Wasserka1-1/+1
This is exposed in the GUI as a new "CiTrace Recording" widget. Playback is implemented by a standalone 3DS homebrew application (which only runs reliably within Citra currently; on an actual 3DS it will often crash still).
2015-07-12Kernel: Add CodeSet case to Object::IsWaitableYuri Kunde Schlesner1-0/+1
2015-07-12Core: Fix applet includes using iwyu.Emmanuel Gil Peyrot7-7/+32
2015-07-12Applets: Reworked how the Applet update event is handled.Subv7-35/+61
Applets are now cleaned up in AppletUpdateEvent after calling their respective Update method.
2015-07-12Core: Properly configure address space when loading a binaryYuri Kunde Schlesner5-14/+88
The code now properly configures the process image to match the loaded binary segments (code, rodata, data) instead of just blindly allocating a large chunk of dummy memory.
2015-07-12Kernel: Remove unused member from EventYuri Kunde Schlesner2-2/+1
2015-07-12Applets: Add infrastructure to allow custom drawing and input handling in Applets.Subv7-39/+162
2015-07-12HLE/APT: Initial HLE support for applets.Subv8-50/+406
Currently only the SWKBD is emulated, and there's currently no way to ask the user for input, so it always returns "Subv" as the text.
2015-06-28Core: Cleanup hw includes.Emmanuel Gil Peyrot3-0/+7
2015-06-28Core: Cleanup soc:U includes.Emmanuel Gil Peyrot2-26/+36
2015-06-28Core: Cleanup file_sys includes.Emmanuel Gil Peyrot4-8/+20
2015-06-28Core: Cleanup core includes.Emmanuel Gil Peyrot4-7/+5
2015-06-28CitraQt: Cleanup includes.Emmanuel Gil Peyrot3-1/+5
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot8-16/+20
2015-06-27Services: Use the standard _WIN32 define in soc:U instead of our own EMU_PLATFORM.Emmanuel Gil Peyrot1-8/+7
2015-06-25Services/SOC: Added command headers to some of the soc commands.Subv1-5/+13
2015-06-23Add helpers to create IPC command buffer headers and descriptorsYuri Kunde Schlesner3-7/+43
2015-06-22Y2R: Rework conversion process, enabling support for all formatsYuri Kunde Schlesner2-163/+309
2015-06-21Y2R: Re-organize how params are stored. Support SetConversionParamsYuri Kunde Schlesner1-72/+100
2015-06-17kernel: Fix svcWaitSynch to always acquire requested wait objects.bunnei9-113/+68
2015-06-12Services: Continue separation of services into their own folderspurpasmart9672-607/+1134
2015-06-02ExtSavedata: Save the icon passed to CreateExtSaveData to the correct folder.Subv3-11/+32
Organize the ExtSaveData folders as they are stored in the console.
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot22-65/+65
2015-05-27hid: Get rid of undefined behaviorLioncash1-2/+2
Modifying a variable twice across a sequence point.
2015-05-27Kernel: Add VMManager to manage process address spacesYuri Kunde Schlesner2-0/+445
This enables more dynamic management of the process address space, compared to just directly configuring the page table for major areas. This will serve as the foundation upon which the rest of the Kernel memory management functions will be built.
2015-05-26Service/GSP: Implemented ImportDisplayCaptureInfo.Subv1-1/+47
2015-05-25Core/SVC: Map the shared memory created in CreateMemoryBlock to the specified address.Subv1-0/+2
This SharedMemory can be passed to service functions (Which should map the memory into their own address space).
2015-05-23y2r_u: Remove unused variable in StartConversionLioncash1-1/+0
2015-05-23HID: Stub DisableAccelerometer and DisableGyroscopeLowpurpasmart964-9/+47
2015-05-23Flush for y2r (moflex)tfarley1-0/+11
2015-05-23OpenGL renderertfarley1-0/+9
2015-05-22Service::Y2R: Support for grayscale decoding of specific formatsYuri Kunde Schlesner1-35/+265
Implements unrotated planar YUV 4:2:0 -> RGB24 conversions in Y2R. Currently only the Y (luma) channel is used, so the results don't contain color. This will be added in a later PR at some point. This is enough to get all currently know Moflex videos to decode. (Some don't display on-screen due to seemingly unrelated reasons.) Thanks to @archshift for doing the initial implementation which I cleaned up and then fixed the 8x8 block mode.
2015-05-21Kernel: Fix a warning introduced with ResourceLimit, and remove the fallback code to prevent it from happening again.Emmanuel Gil Peyrot1-2/+1
2015-05-21y2r_u: Stub StartConversion to prevent moflex games from hanging.bunnei1-1/+17
2015-05-21Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.bunnei7-20/+22
2015-05-17Implement svcBreakarchshift2-1/+17
2015-05-16Delete unused hle/coprocessor.cpparchshift1-33/+0
2015-05-16CFG: Update the cfg service to be like other integrated servicespurpasmart965-337/+304
2015-05-16APT/FS: Remove asserts that were causing false positivespurpasmart962-5/+5
2015-05-15Core/ResourceLimits: Implemented the basic structure of ResourceLimits.Subv8-14/+326
Implemented svcs GetResourceLimit, GetResourceLimitCurrentValues and GetResourceLimitLimitValues. Note that the resource limits do not currently keep track of used objects, since we have no way to distinguish between an object created by the application, and an object created by some HLE module once we're inside Kernel::T::Create.
2015-05-15Memory: Read SharedPage directly from Memory::ReadYuri Kunde Schlesner2-58/+35
2015-05-15Memory: Read ConfigMem directly from Memory::ReadYuri Kunde Schlesner2-49/+36
2015-05-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner11-12/+12
memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory.
2015-05-14process: Get rid of warningsLioncash1-3/+3
Sign mismatches and "forcing value to bool" warnings.
2015-05-14thread: Fix a conditional check in RescheduleLioncash1-1/+1
2015-05-12Thread: Remove the idle threadYuri Kunde Schlesner2-44/+19
Instead just use nullptr to represent no thread is active.
2015-05-12Core/Memory: Add TLS support for creating up to 300 threadsSubv3-7/+19
2015-05-12Core/Scheduling: Prepare the new priority in the thread queue when svcSetPriority is calledSubv1-0/+2
2015-05-12PTM: Changed the way the ptm services are handled to be like thepurpasmart965-125/+112
IR, HID, and APT services.
2015-05-12fixup!Subv3-16/+12
2015-05-12NWM_UDS: Fix a typo in the nwm service port namepurpasmart961-1/+1
2015-05-11Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThreadSubv6-4/+50
2015-05-11Thread: Correctly set main thread initial stack positionYuri Kunde Schlesner3-5/+4
2015-05-11fixup! Set the TLS address in the schedulerSubv2-2/+7
2015-05-11Core/Memory: Give every emulated thread it's own TLS area.Subv3-4/+22
The TLS area for thread T with id Ti is located at TLS_AREA_VADDR + (Ti - 1) * 0x200. This allows some games like Mario Kart 7 to continue further.
2015-05-11fixup! GSP: Small tweaks to shared memory initializationYuri Kunde Schlesner1-1/+1
2015-05-11GSP: Small tweaks to shared memory initializationYuri Kunde Schlesner1-9/+11
2015-05-11Kernel: Zero-fill shared memory blocks when mappingYuri Kunde Schlesner1-0/+8
This works around crashes related to GSP/HID/etc. shared memory blocks having garbage values. The proper fix requires proper management of mapped memory blocks in the process.
2015-05-11Kernel: Capture SharedMemory attributes at creation, not when mappingYuri Kunde Schlesner7-28/+51
2015-05-09Common: Remove the BIT macroYuri Kunde Schlesner1-2/+2
When the macro was introduced in 326ec51261299e48de97592631c02523da9c8118 it wasn't noticed that it conflicted in name with a heavily used macro inside of dyncom. This causes some compiler warnings. Since it's only lightly used, it was opted to simply remove the new macro.
2015-05-09Memory: Re-organize and rename memory area address constantsYuri Kunde Schlesner3-4/+5
2015-05-09Kernel: Remove unused g_main_thread variableYuri Kunde Schlesner3-5/+1
2015-05-09Process: Rename StaticAddressMapping => AddressMappingYuri Kunde Schlesner2-5/+5
2015-05-09Process: Add more documentation to the class membersYuri Kunde Schlesner1-2/+16
2015-05-09Process: Use BitField to store process flagsYuri Kunde Schlesner2-16/+24
2015-05-09Process: Support parsing of exheader kernel capsYuri Kunde Schlesner2-4/+72
2015-05-09Kernel: Remove g_program_idYuri Kunde Schlesner2-8/+0
This has been obsoleted by the field in Process.
2015-05-09Kernel: Introduce skeleton Process class to hold process dataYuri Kunde Schlesner4-19/+101
2015-05-07Fix printf format warningYuri Kunde Schlesner1-1/+1
2015-05-07Common: Remove common.hYuri Kunde Schlesner32-18/+48
2015-05-07Clean-up includesYuri Kunde Schlesner2-2/+7
2015-05-07FileSys: De-inline Path membersYuri Kunde Schlesner1-0/+2
2015-05-07FileSys: Clean-up includes, de-inline destructorsYuri Kunde Schlesner4-13/+21
2015-05-07Move typedefs from kernel.h to more appropriate placesYuri Kunde Schlesner2-10/+8
2015-05-06HLE: Clean up SVC dispatch mechanismYuri Kunde Schlesner4-77/+38
2015-05-02HLE: Properly initialize and shutdown remaining modules.bunnei5-3/+20
2015-05-02Kernel: Properly initialize and shutdown all modules.bunnei4-9/+20
2015-05-02Services: Initialize all state variables at bootup.bunnei8-22/+38
2015-04-29ConfigMem: Remove duplicate retail bitpurpasmart961-1/+0
2015-04-28Services/Loader: Use more sensible log formats for certain functionspurpasmart962-8/+22
along with more info being logged.
2015-04-25ptm_sysm: Add static specifier to IsLegacyPowerOffLioncash1-1/+1
2015-04-14Kernel: Use the correct format string for u64 hex.Emmanuel Gil Peyrot1-1/+1
2015-04-14De-inline functions from Interface, removing them from service.hYuri Kunde Schlesner3-50/+49
This reduces the time for a full recompile from 65.43s to 59.53s (~9%)
2015-04-10SVC: Assert on unsupported CreateThread processor ID.bunnei1-3/+9
2015-04-10SVC: Update various SVCs to cause a reschedule.bunnei2-6/+22
- CreateMutex/ReleaseMutex/ReleaseSemaphore/SetTimer/CancelTimer/ArbitrateAddress
2015-04-10Kernel: Implemented priority inheritance for mutexes.bunnei3-4/+22
2015-04-10Thread: Implement priority boost for starved threads.bunnei4-28/+74
SVC: Return correct error code on invalid CreateThread processor ID. SVC: Assert when creating a thread with an invalid userland priority.
2015-04-10SVC: Reschedule on svcCreateThread.bunnei1-0/+2
2015-04-10APT: (Subv) Fix bug where start event was being incorrectly signaled.bunnei1-6/+7
2015-04-10Kernel: Fixed default thread priority.bunnei2-5/+4
2015-04-09Initialize base address to 0x0Gareth Higgins1-0/+1
2015-04-06Clean-up mem_map constants and fix framebuffer translation errorsYuri Kunde Schlesner1-4/+6
2015-04-04IR: Move The IR services to their own folder and implement "GetHandles"purpasmart9610-55/+180
2015-04-03Services: Stubs and minor changespurpasmart9616-67/+402
2015-03-24ConfigMem: Set the app memory to be 96MB instead of the default 64MBpurpasmart961-2/+2
2015-03-19Service/FS: Document and log some unknown values.Subv1-1/+26
In CreateExtSaveData, DeleteExtSaveData and CreateSystemSaveData
2015-03-17HID: Proper Signal Interrupts for EnableAccelerometer & EnableGyroscopeLow alongpurpasmart964-12/+72
with a stub for GetSoundVolume
2015-03-16arm_interface: Get rid of GetTicks.Lioncash2-5/+6
Removes a TODO.
2015-03-14Services/FS: Implemented DeleteExtSaveData, CreateSystemSaveData and DeleteSystemSaveDataSubv3-24/+164
Also fixed a bug with CreateExtSaveData that made it unable to create ExtSaveData archives in the SDMC directory.
2015-03-11hid_user: Removed unnecessary includes.bunnei1-2/+0
2015-03-11HID: Removed unnecessary global variables.bunnei2-58/+42
2015-03-11HID: Added additional variable comments and some code cleanups.bunnei2-20/+29
2015-03-11HID: Complete refactor of pad/touch input to fix threading issues.bunnei2-111/+28
2015-03-10HID: Cleanup how `next_touch_index` is calculated for Pad and touch.bunnei1-2/+2
2015-03-10HID: Changed TouchDataEntry `valid` to a BitField and added some doc strings.bunnei2-4/+4
2015-03-10HID: Added static asserts to check register position in shared memory.bunnei1-2/+16
2015-03-10HID: Added functions to emulate the touchpad.bunnei2-0/+61
2015-03-10HID: Moved some docstrings to the header.bunnei2-24/+16
2015-03-10HID: Refactored shared memory decoding for touchpad support.bunnei2-33/+64
2015-03-09Added LCD registers, and implementation for color filling in OGL code.archshift1-17/+15
2015-03-06Implement SetLcdForceBlack, move register enum to hw.harchshift1-5/+39
2015-03-04Services: Moved the PTM and APT services to their own folderSubv39-1098/+1186
This coincidentally fixes an issue about the PTM service failing to create its SharedExtSaveData archive due to the FS service not being initialized by the time the creating code runs. Ideally I'd like to move each process to its own folder, and have a single file per process that registers the service classes, which would be in their own files inside that folder. Then each service class would just call functions from the process to complete the commands.
2015-03-02Services/AM: Stubbed TitleIDListGetTotal and GetTitleIDList.Subv1-8/+45
They will always return 0 titles for every media type for now. This is needed to boot Home Menu further
2015-03-02Add profiling infrastructure and widgetYuri Kunde Schlesner1-0/+6
2015-03-01Services/FS: Stubbed CardSlotIsInserted to always return falseSubv1-1/+25
We won't be emulating this for the foreseeable future and it is needed for Home Menu to boot further
2015-03-01Services/PTM: Stubbed PTM_Sysm::IsLegacyPowerOff.Subv1-1/+13
This allows the Home Menu to boot further
2015-02-28result: Make comparison operators take referencesLioncash1-2/+2
It's unnecessary to make copies for simple comparisons like this.
2015-02-26Archives: Properly implemented the SystemSaveData archive.Subv2-26/+42
Ported to the new factory pattern we have for archives.
2015-02-24Services: Implemented Y2R_U::GetTransferEndEventSubv1-1/+18
Aero Porter was throwing an "Invalid Handle" fatal error without this.
2015-02-22Added information reporting from ThrowFatalErrorarchshift1-1/+164
This was RE'd from the errdisp applet.
2015-02-22Frontends, HID: Add New 3DS specific pad buttons, and stub the touch one.Emmanuel Gil Peyrot1-0/+19
2015-02-21Fix error message for bad config block request.Kevin Hartman1-5/+10
2015-02-20Misc cleanup of common and related functionsarchshift1-2/+3
2015-02-19Convert a few C stdlib asserts to Citra's own assertsarchshift1-6/+4
2015-02-18GPU: Properly implement memory fills.Tony Wasserka2-17/+21
2015-02-17ConfigMem: Clean up the Config memory to be more like the shared page and movedpurpasmart964-50/+58
the helper macro for padding to common_funcs.h
2015-02-16Services: Fixed "Tried to connect to named port err:f".Subv1-1/+1
err:f is a named port, not a service
2015-02-13core: Apply static to local functionsLioncash5-17/+18
2015-02-12Build: Fixed some warningsSubv6-40/+56
2015-02-11Implemented WriteHWRegsWithMask for GSP.Kevin Hartman1-6/+91
2015-02-11Asserts: break/crash program, fit to style guide; log.h->assert.harchshift54-72/+27
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
2015-02-11GSP: Fixed typo in SignalInterruptbunnei1-1/+1
2015-02-11GSP: Call SetBufferSwap for each screen on corresponding signal interrupt.bunnei1-4/+3
2015-02-10PTM: Fixed a problem with the gamecoin PTM file.Subv1-21/+13
2015-02-10Archives: Made the Format function more generic.Subv3-9/+10
2015-02-10Archives: Expose the File and Directory classes to HLESubv3-58/+62
2015-02-10ResultVal: Fixed compilation when reassigning a ResultVal.Subv1-3/+3
2015-02-10FS: Allow multiple instances of the same archive type to be open at onceYuri Kunde Schlesner3-29/+35
2015-02-10FS: Get rid of completely useless Archive classYuri Kunde Schlesner1-36/+26
2015-02-10Scheduler refactor Pt. 1Kevin Hartman4-228/+267
* Simplifies scheduling logic, specifically regarding thread status. It should be much clearer which statuses are valid for a thread at any given point in the system. * Removes dead code from thread.cpp. * Moves the implementation of resetting a ThreadContext to the corresponding core's implementation. Other changes: * Fixed comments in arm interfaces. * Updated comments in thread.cpp * Removed confusing, useless, functions like MakeReady() and ChangeStatus() from thread.cpp. * Removed stack_size from Thread. In the CTR kernel, the thread's stack would be allocated before thread creation.
2015-02-10Mutex: Locks should be recursive.bunnei2-16/+20
2015-02-10WaitSynch: Always reschedule (verified behavior on hw).bunnei1-4/+4
2015-02-08Services: Stub some functionspurpasmart963-8/+188
2015-02-03core: Fix some warnings on OSXLioncash1-1/+0
2015-02-02Kernel: Stop creating useless Handles during object creationYuri Kunde Schlesner18-57/+41
They're finally unnecessary, and will stop cluttering the application's handle table.
2015-02-02Kernel: Make WaitObjects share ownership of Threads waiting on themYuri Kunde Schlesner6-12/+17
During normal operation, a thread waiting on an WaitObject and the object hold mutual references to each other for the duration of the wait. If a process is forcefully terminated (The CTR kernel has a SVC to do this, TerminateProcess, though no equivalent exists for threads.) its threads would also be stopped and destroyed, leaving dangling pointers in the WaitObjects. The solution is to simply have the Thread remove itself from WaitObjects when it is stopped. The vector of Threads in WaitObject has also been changed to hold SharedPtrs, just in case. (Better to have a reference cycle than a crash.)
2015-02-02Explicitly instantiate constructors/destructors for Kernel objectsYuri Kunde Schlesner16-8/+50
This should speed up compile times a bit, as well as enable more liberal use of forward declarations. (Due to SharedPtr not trying to emit the destructor anymore.)
2015-02-02Mutex: Replace g_mutex_held_locks with a set inside ThreadYuri Kunde Schlesner3-23/+18
2015-02-02HID: Fix crash when pressing a key when the emulator is stoppedYuri Kunde Schlesner1-0/+2
2015-02-02SVC: Enable CloseHandle, clean up DuplicateHandleYuri Kunde Schlesner1-9/+5
2015-02-02Kernel: Fix bug in HandleTable::CloseYuri Kunde Schlesner1-1/+1
2015-02-02Kernel: Remove Object::GetHandle (it's not used anymore :D)Yuri Kunde Schlesner2-9/+1
2015-02-02Kernel: Introduce unique Object ids for debuggingYuri Kunde Schlesner4-8/+16
2015-02-02Kernel: Use separate Handle tables for CoreTiming userdataYuri Kunde Schlesner4-18/+25
This is to support the removal of GetHandle soon
2015-02-02Kernel: Remove previous scheduled event when a Timer is re-SetYuri Kunde Schlesner1-0/+3
2015-02-02FS: Remove use of GetHandleYuri Kunde Schlesner1-1/+1
2015-02-02Thread: Modernize two functions that slipped through previous rebasesYuri Kunde Schlesner4-18/+16
2015-02-02Service: Store function names as const char* instead of std::stringYuri Kunde Schlesner1-6/+6
Uses less memory (strings and function table is stored in constant data) and speeds up start up (no need to allocate and copy strings).
2015-02-02Service: Clean-up InterfaceYuri Kunde Schlesner46-67/+54
2015-02-02Make Port/Service registration and querying more HW-accurateYuri Kunde Schlesner4-106/+80
2015-02-02Filesys: Move creation of Handles for File/Directory to service handlersYuri Kunde Schlesner3-32/+33
2015-02-01arm: Clean up ARMul_StateLioncash1-1/+1
Remove unnecessary/unused struct variables.
2015-01-30shared_memory: Fix assignments in SharedMemory::MapLioncash2-4/+4
2015-01-30archive: Fix initializer list order for the File class.Lioncash1-1/+1
2015-01-30apt_u: Fix missing printf specifiersLioncash1-2/+2
2015-01-30Kernel: Mark all appropriate kernel objects as "final"Yuri Kunde Schlesner7-8/+7
2015-01-30SVC: Use CASCADE_RESULT in SVC handlersYuri Kunde Schlesner2-77/+32
2015-01-30Remove result.h InvalidHandleYuri Kunde Schlesner4-30/+32
It was only being used in two places, where it was replaced by a local constant.
2015-01-30SVC: Change return type of handlers to ResultCodeYuri Kunde Schlesner2-132/+127
2015-01-30Kernel: Convert Event to not use HandlesYuri Kunde Schlesner10-152/+151
2015-01-30Kernel: Convert Timer to (mostly) not use HandlesYuri Kunde Schlesner3-111/+112
2015-01-30Kernel: Convert Mutex to not use HandlesYuri Kunde Schlesner5-114/+110
2015-01-30Kernel: Convert AddressArbiter to not use HandlesYuri Kunde Schlesner3-38/+55
2015-01-30Kernel: Convert Semaphore to not use HandlesYuri Kunde Schlesner3-67/+88
2015-01-30Kernel: Convert SharedMemory to not use HandlesYuri Kunde Schlesner8-102/+107
2015-01-30Additions to ResultVal to make it more convenient to use.Yuri Kunde Schlesner1-1/+25
2015-01-30Move VAddr/PAddr typedefs to kernel.hYuri Kunde Schlesner1-0/+5
2015-01-30Kernel: Remove useless/duplicated comments; mark functions staticYuri Kunde Schlesner6-32/+8
2015-01-27SVC: Update the SVC function tablepurpasmart961-7/+7
2015-01-24Services/HID: Removed some files due to a rebase errorSubv3-267/+0
2015-01-24Services: Stubbed more services.Subv21-1/+660
Implemented FSUser::CreateExtSaveData
2015-01-23APT_U: Stub some functions & misc changespurpasmart961-91/+276
2015-01-22cam_u.h: fix indentationarchshift1-2/+2
Withholding my profanity towards Xcode.
2015-01-22WaitSynchronization: Added a result code for invalid result, fixed bug.bunnei1-3/+9
2015-01-22Thread: Fix WaitSynchronization1 to not set register 1 on thread wakeup.bunnei3-25/+45
2015-01-22Thread: Use std::find in CheckWait_WaitObject.bunnei1-4/+5
2015-01-22Mutex: Cleanup and remove redundant code.bunnei3-47/+29
2015-01-22Kernel: Renamed some functions for clarity.bunnei7-10/+10
- ReleaseNextThread->WakeupNextThread - ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
2015-01-22Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.bunnei9-71/+42
2015-01-22WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.bunnei9-23/+22
2015-01-22Event: Fix implementation of "non-sticky" events.bunnei1-0/+4
2015-01-22Session: Change to a WaitObject.bunnei3-2/+9
2015-01-22Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs.bunnei2-1/+2
2015-01-22Mutex: Fix a bug where the thread should not wait if it already has the mutex.bunnei1-1/+4
2015-01-22Kernel: Moved Wait and Acquire to WaitObject, added way to retrieve a WaitObject safely.bunnei4-20/+59
2015-01-22SVC: Removed a Sleep that made no sensebunnei1-6/+1
- Would deadlock the calling thread - Code would never get hit anyways
2015-01-22AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that made no sense.bunnei5-38/+45
2015-01-22Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.bunnei9-122/+63
2015-01-22WaitSynchronizationN: Improved commentsbunnei1-7/+12
2015-01-22WaitSynchronizationN: Refactor to fix several bugsbunnei8-79/+76
- Separate wait checking from waiting the current thread - Resume thread when wait_all=true only if all objects are available at once - Set output to correct wait object index when there are duplicate handles
2015-01-22Kernel: Separate WaitSynchronization into Wait and Acquire methods.bunnei8-18/+59
2015-01-22WaitSynchronizationN: Handle case where handles=nullptr.bunnei1-0/+4
2015-01-22WaitSynchronizationN: Handle case where handle_count is invalid.bunnei1-3/+7
2015-01-22WaitSynchronizationN: Handle case where handle_count=0.bunnei1-19/+29
2015-01-22WaitSynchronizationN: Implement return valuesbunnei10-83/+189
2015-01-22Event: Fixed some bugs and cleanup (Subv)bunnei4-57/+16
2015-01-22Thread: Keep track of multiple wait objects.bunnei3-16/+30
2015-01-22Event: Get rid of permanent_lock hack.bunnei2-36/+8
2015-01-22WaitObject: Added RemoveWaitingThread, fixed a bug, and cleanup.bunnei2-4/+17
2015-01-22Kernel: Added WaitObject and changed "waitable" objects inherit from it.bunnei8-71/+73
2015-01-21Added HID_SPVR service and split HID_U implementation into service/hid/hid.xxxarchshift9-217/+327
2015-01-21Stubbed cam:u servicearchshift3-0/+49
2015-01-21Stubbed ptm:play servicearchshift3-0/+53
2015-01-20core: Fix a few docstringsLioncash4-4/+4
2015-01-19Expose GetSharedFont and NotifyToWait to APT:A and APT:S respectivelyarchshift2-1/+4
2015-01-16Add some support for the shared page (currently 3d slider is implemented)Zhuowei Zhang3-0/+109
2015-01-16APT: Fix typo in setting return code for NotifyToWaitbunnei1-1/+1
2015-01-16DSP: Removed useless spam log for SignalInterruptbunnei1-5/+2
2015-01-14APT: Fixed the comment style in some variablesSebastian Valle1-2/+2
2015-01-14GSP: Fix appending of interrupts to the shared memory bufferYuri Kunde Schlesner2-17/+12
The code was previously appending the interrupt to after the end of the buffer, instead of at the end.
2015-01-14GSP: Update framebuffer info on all interruptsYuri Kunde Schlesner1-12/+13
Hardware testing determined that the GSP processes shared memory framebuffer update info even when no memory transfer or filling GX commands are used. They are now updated on every interrupt, which isn't confirmed correct but matches hardware behaviour more closely. This also reverts the hack introduced in #404. It made a few games behave better, but I believe it's incorrect and also breaks other games.
2015-01-14GPU: Fire GPU interrupts at the correct places.Yuri Kunde Schlesner1-6/+0
PDC0 and PDC1 are both VBlank interrupts. PDC0 was being treated as a HBlank interrupt and fired many more times than it should. They now both fire together at 60 Hz. This puzzlingly *improves* apparent framerate on many applications. A few other interrupts were being fired inside the GSP command processing instead of on the actual GPU register writes, so they were moved there, which should cover direct writes tho those registers not going through the GX command queue.
2015-01-14APTU: Stubbed NotifyToWait, taken from 3dmoo.Subv1-7/+21
Also renamed some handles in the APT:U service to be more descriptive. Fixed a typo in InquireNotification
2015-01-13AddrArbiter: Implement arbitration types 3 and 4.Subv3-4/+21
2015-01-13Services: Added some missing services.Subv8-1/+358
cfg:s, ptm:sysm, apt:s. apt:s is almost exactly the same as apt:u as per 3dbrew
2015-01-12Fix building on MinGWdarkf1-0/+13
2015-01-11Thread: Prevent waking a thread multiple times.Subv1-0/+3
If a thread was woken up by something, cancel the wakeup timeout.
2015-01-11SVC: Wake up the thread after the delay in WaitSync1Subv1-3/+2
2015-01-11Stubbed y2r:u IsBusyConversionarchshift1-1/+16
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.
2015-01-10Added Archive ID to fs:USER debug logs involving opening the archive.archshift1-3/+3
2015-01-10Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance.archshift9-33/+22
2015-01-09Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner12-90/+95
2015-01-09Kernel: Don't re-assign object's handle when duplicating oneYuri Kunde Schlesner2-2/+3
2015-01-09Thread: Fix nullptr access in a logging functionYuri Kunde Schlesner1-1/+2
2015-01-09Thread: Rename thread_queue => thread_listYuri Kunde Schlesner1-6/+6
2015-01-09Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner10-301/+221
2015-01-09Kernel: Move Thread's definition to the header fileYuri Kunde Schlesner3-53/+67
2015-01-09Move ThreadContext to core/core.h and deal with the falloutYuri Kunde Schlesner8-19/+13
2015-01-09SVC: Implemented the Timer service calls.Subv7-5/+232
2015-01-09SVC: Fixed SleepThread.Subv3-8/+43
It will now properly wait the specified number of nanoseconds and then wake up the thread.
2015-01-08Threads: Use a dummy idle thread when no other are ready.Subv3-1/+35
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.
2015-01-08GSP: Toggle active framebuffer each framebunnei1-1/+4
2015-01-07Warn if a new thread is intended to be run on the system CPU core until we implement correct scheduling for such a thread.Kevin Hartman1-0/+5
2015-01-07Common: Clean up ThreadQueueListYuri Kunde Schlesner1-1/+1
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.
2015-01-07Fix double-free in Service manager during shutdownYuri Kunde Schlesner2-25/+4
Fixes #423.
2015-01-06Archives: Changed the unimplemented archives comment.Subv1-1/+1
It now refers to me as the PoC
2015-01-06Archives: Addressed some commentsSubv1-2/+2
2015-01-06Services: Clean up a few things and add a few function namespurpasmart967-33/+36
2015-01-05DSP: Signal (faked) interrupt on every frame.bunnei2-4/+21
- Hack to work around games checking that the DSP event has been signaled by a real DSP interrupt.
2015-01-04Mutex: Add the calling thread to the waiting list when neededSubv1-2/+2
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.
2015-01-04Archives: Make SYSTEM_ID and SDCARD_ID stringsSubv2-4/+4
2015-01-04Archives: Changed the way paths are built for the archives.Subv4-15/+20
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
2015-01-03Stub the y2r:u servicearchshift3-0/+70
2015-01-03AddressArbiter: Ported arbitration type 2 from 3dmoo.Subv1-0/+11
(Thanks 3dmoo!)
2015-01-03Archives: Change the folder layout of some archives.Subv2-2/+2
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
2015-01-03Archives: Reduced duplicate code in RomFS and SaveCheck.Subv2-4/+5
Fixed a few warnings and cleaned up the code
2015-01-03SaveDataCheck: Preliminary work in this archive.Subv2-3/+35
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)
2015-01-03archive: Fix initializer list orderLioncash1-3/+3
2015-01-03soc_u: Fix a missing formatting argumentLioncash1-1/+1
2015-01-01Silence some -Wsign-compare warnings.Rohit Nirmal1-4/+4
2014-12-31SOC_U: Preliminary implementation of sockets.Subv4-22/+721
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
2014-12-30APT:A: Some style changesSubv1-12/+12
2014-12-30Archives: Implemented ExtSaveData and SharedExtSaveDataSubv5-45/+94
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.
2014-12-28Kernel: New handle managerYuri Kunde Schlesner13-168/+209
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.
2014-12-28Kernel: Replace GetStaticHandleType by HANDLE_TYPE constantsYuri Kunde Schlesner8-15/+15
2014-12-28Rename ObjectPool to HandleTableYuri Kunde Schlesner12-54/+54
2014-12-26ARM: Add a mechanism for faking CPU time elapsed during HLE.bunnei1-0/+8
- Also a few cleanups.
2014-12-26More services & small clean upspurpasmart9660-305/+355
2014-12-24Stubbed IsSdmcWriteable to always return writeable.archshift1-1/+18
2014-12-22CFG: Fixed some warnings and errors in ClangSubv2-4/+4
2014-12-22CFG: More style changesSubv1-5/+5
2014-12-21CFGU: IndentationSubv1-4/+3
2014-12-21CFG: Some indentationSubv1-11/+13
2014-12-21CFG: Changed the CreateConfigInfoBlk search loopSubv1-7/+4
2014-12-21CFG: Corrected the licenses in cfg_i.cpp and cfg_u.cppSubv2-2/+2
2014-12-21CFG: Create a new subfolder cfg inside service to handle cfgSubv9-485/+610
Moved most of the shared CFG code there, implemented a few CFG:I functions
2014-12-21CFGU: Some changesSubv1-12/+33
2014-12-21CFGU: Addressed some issues.Subv1-43/+55
2014-12-21CFGU: Addressed some comments.Subv1-11/+13
2014-12-21Style: Addressed some commentsSubv1-4/+5
2014-12-21CFG_U: Use Common::make_unique instead of the std versionSubv1-1/+2
2014-12-21CFG:U: Implemented some more blocksSubv1-4/+30
2014-12-21CFG: Implemented block 0x00070001 in the config savefileSubv1-0/+5
2014-12-21CFGU: Use an absolute offset in the config savefile blocksSubv1-1/+3
2014-12-21CFG: Load the Config savedata file if it already exists.Subv1-3/+4
2014-12-21CFGU: Added block 0x000A0002 to the default savegame fileSubv1-0/+18
That's the language id block, we're using LANGUAGE_EN for now. This block allows some games to boot further
2014-12-21CFG: Refactored how the config file works.Subv1-55/+126
It is now kept in memory as per 3dbrew, all updates happen on memory, then they can be saved using UpdateConfigNANDSavegame.
2014-12-21CFG:U: Add some data to the 0x00050005 config block.Subv1-6/+11
Seems to allow some games to boot further, thanks @Normmatt for sharing this information
2014-12-21CFG: Implemented the GetConfigInfoBlk2 function.Subv2-12/+188
Added a "config" file to the CFG process service (CFG:U), and added a few default blocks to it. Implemented GetSystemModel and GetModelNintendo2DS
2014-12-21More warning cleanupsChin1-2/+2
2014-12-21Added CreateFile to the FS_USER servicearchshift3-1/+47
Tested with hwtests.
2014-12-21License changepurpasmart9682-84/+84
2014-12-21Thread: Wait current thread on svc_SleepThreadbunnei3-22/+35
- Removed unused VBLANK sleep mode - Added error log for bad context switch - Renamed VerifyWait to CheckWaitType to be more clear
2014-12-20Clean up some warningsChin2-5/+5
2014-12-20Common: Add a clone of std::make_uniqueYuri Kunde Schlesner1-6/+7
2014-12-20Kernel: Implement support for current thread pseudo-handleYuri Kunde Schlesner3-2/+16
This boots a few (mostly Nintendo 1st party) games further.
2014-12-20FS_U: Added the command to the docs of SaveData functionsSubv1-0/+2
2014-12-19GSP_GPU: Shut up FlushDataCachepurpasmart961-1/+25
2014-12-19SystemSaveData: Fixed a typo that was segfaultingSubv1-1/+1
2014-12-18SaveData: Added some documentation to FormatSaveDataSubv1-2/+29
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
2014-12-18SaveData: Implemented the SystemSaveData archive.Subv1-0/+9
It will be stored in the /syssavedata folder. This archive is user by various Services and possibly games via the FS:U service.
2014-12-18Filesystem/Archives: Implemented the SaveData archiveSubv6-13/+95
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
2014-12-16Comment out empty arrays causing compile errors in MSVCYuri Kunde Schlesner2-6/+8
2014-12-16Work around libstdc++'s lack of support for std::hash on enumsYuri Kunde Schlesner1-0/+15
2014-12-16FS.Archive: Clean up treatment of archives and their handlesYuri Kunde Schlesner3-196/+175
- Refactor FS::Archive internals to make Archive creation and lifetime management clearer. - Remove the "Archive as a File" hack. - Implement 64-bit Archive handles.
2014-12-16Service.FS: Rename FileSys::File to FileBackendYuri Kunde Schlesner1-1/+1
2014-12-16Service.FS: Rename FileSys::Directory to DirectoryBackendYuri Kunde Schlesner1-2/+2
2014-12-16Service.FS: Rename FileSys::Archive to ArchiveBackendYuri Kunde Schlesner2-5/+5
2014-12-16Service.FS: Do archive registration using IdCode instead of nameYuri Kunde Schlesner3-16/+27
2014-12-16HLE: Rename namespaces to match move & fix initialization orderYuri Kunde Schlesner7-36/+36
2014-12-16HLE: Move kernel/archive.* to service/fs/Yuri Kunde Schlesner6-6/+5
2014-12-16Added stub for nim:aoc service...archshift3-0/+60
2014-12-16Added stub for cecd:u service...archshift3-0/+52
I couldn't find any information about this service...
2014-12-16Added stub for ldr:ro service...archshift3-0/+57
2014-12-16Added am:app service stub.archshift3-0/+52
Apparently nothing at all is known about this service...
2014-12-15Remove SyncRequest from K::Object and create a new K::Session typeYuri Kunde Schlesner14-104/+128
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.)
2014-12-13Kernel/Semaphores: Fixed buildSubv1-2/+2
2014-12-13Kernel/Semaphore: Small style changeSubv1-1/+1
2014-12-13Kernel/Semaphores: Invert the available count checking.Subv1-11/+9
Same semantics, idea by @yuriks
2014-12-13Kernel/Semaphores: Addressed some issues.Subv2-32/+18
2014-12-13Semaphore: Removed an unneeded functionSubv1-5/+0
2014-12-13Semaphores: Addressed some style issuesSubv1-6/+5
2014-12-13Semaphore: Implemented the initial_count parameter.Subv2-5/+7
2014-12-13SVC: Implemented ReleaseSemaphore.Subv4-19/+81
This behavior was tested on hardware, however i'm still not sure what use the "initial_count" parameter has
2014-12-13SVC: Implemented svcCreateSemaphoreSubv4-1/+115
ToDo: Implement svcReleaseSemaphore * Some testing against hardware needed
2014-12-13kernel: Remove unused log argumentsLioncash1-3/+3
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner20-191/+138
2014-12-13New logging systemYuri Kunde Schlesner1-0/+1
2014-12-13APT_U: Added GetSharedFont service function.bunnei1-34/+100
2014-12-12DSP: Added stub for ReadPipeIfPossible.bunnei1-1/+45
2014-12-12MemMap: Renamed "GSP" heap to "linear", as this is not specific to GSP.bunnei1-1/+1
- 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).
2014-12-10CFG:U: Store country codes as u16 instead of char pointers, and return the correct error in GetCountryCodeID.Emmanuel Gil Peyrot1-44/+48
2014-12-10GSP: Trigger GPU interrupts at more accurate locations.bunnei1-7/+6
2014-12-10GSP: Updated TriggerCmdReqQueue to return success code.bunnei1-0/+3
2014-12-10GSP: Updated RegisterInterruptRelayQueue to return expected magic number.bunnei1-1/+4
2014-12-10GPU: Fixed bug in command list size decoding.bunnei1-1/+1
2014-12-09Thread: Fixed to wait on address when in arbitration.bunnei3-11/+31
2014-12-07Make OpenDirectory fail if the directory doesn't existarchshift1-0/+5
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 .
2014-12-07Mutex: Remove some forward declarationsSubv1-16/+15
Moved Mutex::WaitSynchronization to the end of the file.
2014-12-07Mutex: Release all held mutexes when a thread exits.Subv3-22/+56
2014-12-06Mutex: Properly lock the mutex when a thread enters itSubv1-12/+9
Also resume only the next immediate thread waiting for the mutex when it is released, instead of resuming them all.
2014-12-04Threads: Remove a redundant function.Subv1-9/+1
Use the next_thread_id variable directly.
2014-12-04Threads: Implemented a sequential thread idSubv2-4/+19
2014-12-04Updated archive.cpp functions for proper error handlingarchshift3-70/+41
2014-12-04SVC: Implemented GetThreadId.Subv3-4/+24
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.
2014-12-04Add stub for ConvertProcessFromDspDramarchshift1-25/+44
Should theoretically push retail stuff further along
2014-12-04kernel: Shorten GetCountLioncash1-6/+3
2014-12-04kernel: Make some functions constLioncash2-4/+4
2014-12-04hid_user: Pass by reference with PadButtonPress/PadButtonReleaseLioncash2-4/+4
2014-12-04PTM_U: Added a stub for GetBatteryLevel & GetBatteryChargeState & GetAdapterStatepurpasmart961-3/+72
2014-12-03AC_U: Added a stub for GetWifiStatuspurpasmart961-1/+19
2014-12-01DSP: Added stubs for several commonly used DSP service functions.bunnei1-25/+106
2014-12-01DSP: Fixed typo in port name.bunnei1-1/+1
2014-12-01PTM_U: Implemented the GetShellState function.Subv1-1/+18
2014-11-30CFG:U: Implemented the GetCountryCodeID and GetCountryCodeString.Subv1-2/+86
2014-11-27Fixed formatting and switch statement warningsvaguilar1-3/+3
2014-11-26Thread: Check that thread is actually in "wait state" when verifying wait.bunnei1-1/+1
2014-11-26SVC: Add debug log to ArbitrateAddress.bunnei1-0/+2
2014-11-26SVC: SleepThread should yield to the next ready thread.bunnei1-0/+3
2014-11-26Mutex: Changed behavior to always release mutex for all threads.bunnei1-8/+7
2014-11-25Log the cmd_buff arguments when citra comes across an unimplemented functionarchshift1-12/+12
2014-11-25Implemented RenameDirectory in FS:USERarchshift3-1/+78
2014-11-25Implemented RenameFile in FS:USERarchshift3-1/+78
2014-11-24Use pointers instead of passing handles around in some functions.Yuri Kunde Schlesner1-19/+15
2014-11-24Remove duplicated docs/update them for changed parameters.Yuri Kunde Schlesner10-88/+0
2014-11-24HLE: Revamp error handling throrough the HLE codeYuri Kunde Schlesner21-294/+670
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.
2014-11-23Added DeleteFile and DeleteDirectory functions to FS:USER and the archives.archshift3-26/+114
2014-11-21Add more services and some fixes, along with more "override"purpasmart9625-17/+452
in the service's headers
2014-11-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot30-86/+86
2014-11-19Add static to some variablesLioncash2-23/+23
2014-11-19Kernel:Add missing permissions in shared memory & svcpurpasmart962-5/+13
2014-11-18Remove extraneous semicolonsLioncash1-1/+1
2014-11-18core: Mark some hle functions as staticLioncash5-46/+46
These functions are not referred to by their linkage name outside of the translation unit, so they can be marked as static.
2014-11-18Archive: Fixed to not destroy archive handle on close.bunnei1-3/+3
2014-11-18Archive: Fixed close archive before freeing.bunnei1-1/+1
2014-11-18FS_User: Support FileSye::Path in a more generic way.bunnei2-42/+76
added a todo to kernel archive
2014-11-18FileSys: Updated backend code to use FileSys::Path instead of string for paths.bunnei3-14/+14
2014-11-17Add missing boss:U service, needed according to Nintendo Zone logs.archshift3-0/+57
2014-11-14Fix two format strings.Lioncash1-1/+1
2014-11-13Use std::u16string for conversion between UTF-8 and UTF-16, FS:USER functionsarchshift2-138/+40
2014-11-12APT_U: Added stub for function AppletUtility.bunnei1-1/+29
2014-11-12APT_U: Set a valid parameter buffer size in GlanceParameter.bunnei1-17/+39
- Also Clarified GlanceParameter/ReceiveParameter documentation.
2014-11-12APT_U: Release service lock on initialization.bunnei1-0/+4
2014-11-12APT_U: Fixes for GetLockHandle to boot system titles.bunnei1-1/+18
- Also added comment to GetLockHandle function.
2014-11-11Add FRD:U service and functionsarchshift3-0/+64
2014-11-10Add support for UTF-16 strings for LowPaths in FS:USERarchshift2-86/+182
2014-11-02Added CreateDirectory function to service/fs.cpp, and in Archive.archshift3-4/+63
2014-11-02Added ReceiveNotification, PublishToSubscriber unimplemented functions to SRVarchshift1-0/+2
2014-11-02Added stub err:f service.archshift3-0/+56
2014-11-01Added a bunch of servicespurpasmart9617-0/+581
2014-10-30FS:USER - Implemented IsSdmcDetectedarchshift1-1/+17
2014-10-30Fix some warningsSean2-6/+6
2014-10-29Renamed souce files of services to match port namesGareth Poole11-10/+10
2014-10-26Add `override` keyword through the code.Yuri Kunde Schlesner13-46/+46
This was automated using `clang-modernize`.
2014-10-25ARM: Integrate SkyEye faster "dyncom" interpreter.bunnei1-20/+0
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.
2014-10-25Don’t fail on empty filename in OpenFileDirectly, return the archive handle insteadEmmanuel Gil Peyrot1-8/+7
2014-10-14hid.cpp: Fixed crash when updating pad data while nullarchshift1-0/+4
Fixes #137
2014-10-08APT: Added a stub for the "GlanceParameter" function.purpasmart961-1/+31
2014-10-06FileSys: split the constructor into an Open method, in order to notify the opener something went wrong.Emmanuel Gil Peyrot1-0/+3
Kernel: Return an invalid handle to OpenFile when it failed to open.
2014-10-06FileSys/Kernel: Implement SetSize service call for File objects.Emmanuel Gil Peyrot1-0/+8
2014-10-05Added some more names to the function tablepurpasmart961-0/+2
Added "SetApplicationCpuTimeLimit" and "GetApplicationCpuTimeLimit" to apt.cpp
2014-09-30added "StoreDataCache" to the function tablepurpasmart961-0/+1
seems simple enough
2014-09-21Use the citra user path for the sdmc directoryarchshift1-2/+1
2014-09-17Kernel: Implement the Close command for Archive, File and Directory.Emmanuel Gil Peyrot2-0/+43
2014-09-17FS: Implement OpenArchive, OpenDirectory, OpenFile and OpenFileDirectly calls.Emmanuel Gil Peyrot1-20/+177
2014-09-17Kernel: Add a Directory object and a getter for it from an Archive object.Emmanuel Gil Peyrot3-0/+91
2014-09-17Kernel: Add a File object and a getter for it from an Archive object.Emmanuel Gil Peyrot2-0/+118
2014-09-15Core: Get rid of unnecessary switch statement in KernelLioncash1-41/+2
2014-09-12Added support for multiple input device types for KeyMap and connected Qt.Kevin Hartman2-113/+127
2014-09-12Initial HID PAD work, with GLFW only.Kevin Hartman2-24/+197
2014-09-12Created structure for PAD.Kevin Hartman2-0/+28
2014-09-09core: Prune redundant includesarchshift12-23/+0
2014-09-09Added string_util to common, small changes in loader.cpparchshift1-1/+1
2014-09-06core: Pass string by reference in FetchFromPortName and DeleteServiceLioncash2-4/+4
2014-08-31Threading: Fix thread starting to execute first instruction correctly.bunnei1-0/+5
2014-08-31srv::Initialize: Return "success" status code.bunnei1-0/+4
2014-08-28Threading: Fix thread starting to execute first instruction correctly.bunnei1-0/+5
2014-08-28srv::Initialize: Return "success" status code.bunnei1-0/+4
2014-08-25Pica/citra-qt: Replace command list view and command list debugging code with something more sophisticated.Tony Wasserka1-5/+0
2014-08-25GSP: Update framebuffer information when necessary.Tony Wasserka2-2/+41
2014-08-25GSP: Implement SetBufferSwap.Tony Wasserka2-1/+47
2014-08-25GSP: Add a helper function for convenience.Tony Wasserka1-17/+22
2014-08-23Added FS functions to Archive and Archive_RomFSarchshift1-3/+31
2014-08-19Core: Use std::array for managing kernel object spaceLioncash2-5/+5
These avoid relying on memset for clearing the arrays.
2014-08-19SVC: Added support for svc_GetSystemTick.bunnei2-19/+48
Changed HLE function return methods to be static inline functions.
2014-08-18Core: Alter the kernel string functions to use std::string instead of const char*.Lioncash16-41/+38
Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
2014-08-17Core: Fix a formatting error in svc.cppLioncash1-3/+2
entry_point would not be added to the string. Also used StringFromFormat so that the buffer is unnecessary.
2014-08-13HID: Added new function entries from 3dbrew to FunctionTable.bunnei1-0/+5
HID: Fix typo with DisableGyroscopeLow command.
2014-08-12Pica/GPU: Change hardware registers to use physical addresses rather than virtual ones.Tony Wasserka1-9/+9
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.
2014-08-12GSP: Fix a major regression introduced in ffda035c, due to which no display transfers were triggered at all anymore.Tony Wasserka1-4/+13
2014-08-12Remove the fancy RegisterSet class introduced in 4c2bff61e.Tony Wasserka1-18/+18
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.
2014-08-08HID: Implemented HID_User::GetIPCHandles service function.bunnei1-5/+39
2014-08-08SVC: Fixed typo with MapMemoryBlock DEBUG_LOG call.bunnei1-1/+1
2014-08-07Thread: Added more descriptive comment to WaitCurrentThread.bunnei2-2/+10
2014-08-07GSP: Cleaned up command buffer decoding.bunnei2-61/+69
GSP: Cleaned up code and added additional comments. GSP: Removed unnecessary TODO comment. GSP: Changed u32 iterators in TriggerCmdReqQueue to unsigned.
2014-08-06GSP: Added reinitialization of other state objects.bunnei1-0/+3
2014-08-06GSP: Removed dumb GX prefixes to functions/structs in GSP namespace.bunnei2-77/+78
- Various other cleanups.
2014-08-06GSP: Removed unnecessary GX_FinishCommand function.bunnei1-13/+5
2014-08-06GSP: Implements preliminary command synchronization via GPU interrupts.bunnei2-18/+109
Core: Added a comment to explain the logic for the RunLoop iterations.
2014-08-06AddressArbiter: Removed unnecessary HLE::Reschedule.bunnei1-1/+0
2014-08-06AddressArbiter: Fixed bug with break statements missing from case statements.bunnei1-0/+2
2014-08-06SRV: Updated GetProcSemaphore to create an event instead of a mutex.bunnei1-8/+10
2014-08-06SVC: Removed ArbitrateAddress log message that spams to much.bunnei1-2/+0
2014-08-06Kernel: Updated Event and Mutex to specify handle that they are blocking for.bunnei2-2/+2
2014-08-06FS: Fix port name (old port name was based on an unaligned memory read).bunnei1-1/+1
2014-07-23Fix a few warnings.Tony Wasserka1-3/+3
Templates shouldn't be marked as inline if they aren't defined in the header.
2014-07-23GSP: Add a few comments.Tony Wasserka2-1/+15
2014-07-23GSP: Clean up GX command processing a lot and treat command id as a u8 rather than a u32.Tony Wasserka2-37/+79
Anonymous structs are not standard C++, hence don't use them.
2014-07-23GPU: Make use of RegisterSet.Tony Wasserka1-21/+28
2014-07-23GPU: Emulate memory fills.Tony Wasserka2-1/+9
2014-07-23GSP: HLE GXCommandId::SET_DISPLAY_TRANSFER and GXCommandId::SET_TEXTURE_COPY.Tony Wasserka1-2/+9
2014-07-23GSP: Implement ReadHWRegs and WriteHWRegs properly.Tony Wasserka1-27/+46
2014-07-09Kernel: Added preliminary support for address arbiters.bunnei4-9/+134
AddressArbiter: Added documentation comment, fixed whitespace issue. AddressArbiter: Fixed incorrect comment, reordered if-statement to be more clear. SVC: Removed trailing whitespace.
2014-07-09Thread: Added functions to resume threads from address arbitration.bunnei2-0/+44
Thread: Cleaned up arbitrate address functions. Thread: Cleaned up ArbitrateAllThreads function.
2014-07-08function_wrappers: Fixed incorrect wrapper, added another.bunnei1-2/+9
2014-07-05SharedMemory: Updated MapSharedMemory to use an enum for permissions.bunnei3-16/+36
- Also added some safety checks to MapSharedMemory.
2014-07-05GSP: Fixed to use real shared memory object, various cleanups.bunnei2-30/+40
- 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.
2014-07-05Kernel: Added support for shared memory objects.bunnei2-0/+132
SharedMemory: Added optional name field for tracking known objects.
2014-07-05Archive: Added Init/Shutdown methods to reset kernel archive state.bunnei3-0/+19
2014-07-05FileSys: Added preliminary support for applications reading the RomFS archive.bunnei3-13/+135
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.
2014-07-04APT: Added stubbed ReceiveParameter and various cleanups.bunnei1-71/+93
APT: More cleanups. APT: Changed SignalType to be type u32.
2014-06-27FS: Added stubbed code to intercept and decode file system service functions.bunnei3-0/+154
FS: Added to CMakeLists.txt
2014-06-27Kernel: Added stubbed code to support creation of kernel Archive objects.bunnei3-0/+85
2014-06-13Kernel: Removed unnecessary "#pragma once".bunnei1-2/+0
2014-06-13Kernel: Added freeing of kernel objects on emulator shutdown.bunnei2-0/+10
2014-06-13Event: Updated several log messages to be assertions.bunnei1-16/+8
2014-06-13HLE: Moved "PARAM" and "RETURN" macros to function_wrappers.h (this is only module where they are needed).bunnei2-5/+6
2014-06-13SVC: Renamed all function wrapper templates to Wrap, moved to HLE namespace.bunnei2-157/+145
2014-06-13Thread: Renamed occurrences of "t" to "thread" to improve readability.bunnei1-48/+45
2014-06-13Thread: Cleaned up VerifyWait, fixed issue where nullptr msg could unnecessarily be logged.bunnei1-9/+7
2014-06-13HLE: Removed usnused EatCycles function.bunnei3-15/+0
2014-06-13SVC: Cleaned up function wrappers to pass in correct argument types.bunnei2-870/+201
2014-06-13Thread: Moved position of * in arguments.bunnei1-2/+2
2014-06-13Thread: Updated VerifyWait to be more readable (but functionally the same).bunnei1-4/+3
2014-06-13SVC: Moved declaration of "wait" variable in SendSyncRequest for improved readability.bunnei1-1/+1
2014-06-13HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)bunnei12-235/+235
2014-06-13Kernel: Updated various kernel function "name" arguments to be const references.bunnei4-6/+6
2014-06-13HLE: Updated various handle debug assertions to be more clear.bunnei4-10/+10
2014-06-13Mutex: Moved ReleaseMutex iterator declaration to be inside while loop.bunnei1-2/+1
2014-06-13Kernel: Updated several member functions to be constbunnei5-13/+13
2014-06-13Thread: Fixed bug with ResetThread where cpu_registers[15] was being incorrectly setbunnei1-1/+1
2014-06-13Kernel: Made SyncRequest not pure virtual, with a default implementation of error (as this is not required for all kernel objects)bunnei3-23/+4
2014-06-13Kernel: Added real support for thread and event blockingbunnei6-76/+196
- 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.
2014-06-12GPU debugger: Add functionality to inspect command lists.Tony Wasserka1-0/+4
2014-06-12GPU: Cleanup register definitions.Tony Wasserka1-3/+3
2014-06-12Rename LCD to GPU.Tony Wasserka1-8/+8
2014-06-12Add initial graphics debugger interface.Tony Wasserka1-0/+6
2014-06-12GSP: Define more GX commands.Tony Wasserka2-14/+54
2014-06-05hle: added a hokey way to force a thread reschedule during CPU single step mode (as used by the debugger)bunnei2-0/+5
2014-06-05kernel: changed current default thread priority back to 0x30 - I think this is more correctbunnei1-1/+1
2014-06-05arm: fixed bug in how thread context switch occurs with SkyEyebunnei1-0/+4
2014-06-05service: added a error log messages for unimplemented WaitSynchronizationbunnei1-0/+1
2014-06-03svc: added optional name field to Event and Mutex (used for debugging)bunnei6-12/+25
2014-06-03kernel: moved position of * for GetTypeName and GetNamebunnei1-2/+2
2014-06-03coprocessor: reenabled debug logbunnei1-1/+1
2014-06-02svc: updated WaitSynchronizationN to properly use first pointer argumentbunnei2-4/+6
2014-06-02svc: changed DuplicateHandle log message from "error" to "debug"bunnei1-1/+1
2014-06-02svc: added GetThreadPriority and SetThreadPriority, added (incomplete) DuplicateHandle supportbunnei3-3/+77
2014-06-02kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedulebunnei6-9/+17
2014-06-02svc: cleaned up function_wrappers, updated various SVCs to make use of pointer argumentsbunnei2-31/+40
2014-06-01svc: added missing function wrapper for SleepThreadbunnei1-0/+4
2014-06-01gsp: always pass through synchronization barrier for commandsbunnei1-1/+16
2014-06-01svc: updated waitSychronization to not overwrite handle on return, added stub for SleepThread (does nothing)bunnei1-2/+21
2014-06-01thread: updated Reschedule to sit at a synchronization barrier when no other threads are ready for executionbunnei1-0/+18
2014-06-01event: added a hackish ability to set an event as "locked" to its current state, cleaned up some commentsbunnei2-4/+32
2014-05-30hle: added stubbed service for ndm_ubunnei2-0/+65
2014-05-30service: cleaned up log messagesbunnei1-2/+2
2014-05-30service: removed PT_A from, as this was just an alias for APT_Ubunnei1-2/+0
2014-05-30srv: fix to log unimplemented service (instead of crash)bunnei1-6/+2
2014-05-30mutex: fixed typo in ReleaseMutexbunnei1-1/+3
2014-05-30hle: cleaned up log messagesbunnei7-42/+47
2014-05-30svc: updated OutputDebugString to use OS_LOGbunnei1-1/+1
2014-05-30svc: changed unimplemented SVC log messages from "debug" messages to "error" messagesbunnei1-8/+8
2014-05-30svc: added svcClearEvent, stubbed function for svcArbitrateAddress, and various fixesbunnei2-22/+38
- force kernel reschedule after svcWaitSynchronization - fixed some bugs with passing in pointer arguments - cleaned up some comments and log messages
2014-05-30event: added support for ClearEvent, fixed a bug with CreateEvent, fixed some commentsbunnei2-9/+14
2014-05-30service: added additional hack to return success on unimplemented service callsbunnei1-2/+10
2014-05-30srv: changed a NOTICE_LOG to DEBUG_LOGbunnei1-1/+1
2014-05-30svc: added ArbitrationType enumerationbunnei1-0/+9
2014-05-29apt: added stubbed function for InquireNotificationbunnei1-78/+86
2014-05-29hle: properly cast 64-bit function wrapper parameters to (u64)bunnei1-2/+2
2014-05-29hle: removed PARAM64 macro (this was incorrect), made several bug fixes accordingly for decoding U64 function parametersbunnei2-3/+2
2014-05-29service: changed interface to return 0 (no error) when a service method is unimplemented - hack to make apps boot furtherbunnei1-2/+2
2014-05-28APT_U: added stubbed function for APT_U::Enable, fixed some log messages to be more consistentbunnei1-3/+10
2014-05-28mutex: added preliminary SyncRequest/WaitSynchronization, added some comments/assertionsbunnei1-0/+6
2014-05-28svc: implemented WaitSynchronization1, WaitSynchronizationN, and CreateEventbunnei1-14/+54
2014-05-28APT_U: added event creation to Initialize methodbunnei1-1/+11
2014-05-28event: fixed typos and updated CMakeListsbunnei1-1/+1
2014-05-28event: added SetEventLocked method to change status an events lockbunnei2-0/+18
2014-05-28kernel: added event module to support creation of CTR "Event" objectsbunnei2-0/+119
2014-05-27mutex: removed docstring comment that is no longer relevantbunnei1-1/+0
2014-05-27mutex: added additional docstringsbunnei1-0/+2
2014-05-27kernel: added WaitSynchronization method to Kernel::Objectbunnei4-0/+39
2014-05-27kernel: updated SyncRequest to take boolean thread wait result as a parameterbunnei5-10/+33
2014-05-27svc: added some assertionsbunnei1-6/+4
2014-05-27service: Renamed Sync to SyncRequestbunnei1-1/+1
2014-05-27kernel: added enum for known CurrentThread and CurrentProcess handlesbunnei1-0/+5
2014-05-27srv: added a real mutex for GetProcSemaphore (instead of stubbed)bunnei1-3/+10
2014-05-27svc: changed SendSyncRequest to use Kernel::Object SyncRequest (instead of just service Interface class)bunnei1-2/+2
2014-05-27kernel: add a SyncRequest method to KernelObject for use with svcSendSyncRequestbunnei4-6/+11
2014-05-27svc: added stub for DuplicateHandle SVC callbunnei1-1/+8
2014-05-23service: fixed typo that MSVC did not catch as an errorbunnei1-1/+1
2014-05-23svc: added a check to ensure that a service was implemented before attempting to connect to its portbunnei1-1/+5
2014-05-23thread: renamed "WaitCurThread" to "WaitCurrentThread", removed unused "reason" argumentbunnei3-6/+6
2014-05-23thread: removed unused SwitchContext/Reschedule reason field, added missing arg parameter to SVC CreateThreadbunnei3-12/+9
2014-05-23kernel: refactored function naming to remove "__" prefixbunnei5-62/+72
2014-05-23thread: moved ThreadStatus/WaitType to header, added support for arg on CreateThread, added correct CPSR resetbunnei2-35/+40
2014-05-23APT_U: added a debug log on calling GetLockHandlebunnei1-0/+1
2014-05-22thread: fixed bug where result of __NextThread was not being properly checked when NULLbunnei1-1/+1
2014-05-22svc: added Kernel::Reschedule to svc WaitSynchronization1, updated log messages to include newly created handlesbunnei1-4/+7
2014-05-21svc: enabled use of newly created kernel thread handlebunnei1-5/+5
2014-05-21mutex: refactored the interface to code to return a Mutex* handlebunnei4-5/+16
2014-05-21mutex: initial commit of HLE modulebunnei4-10/+157
2014-05-21svc: added some commentsbunnei1-0/+7
2014-05-21kernel: fixed include, in general include "common.h" not "common_types.h"bunnei1-1/+1
2014-05-21service: removed redundant include of common_types.hbunnei1-1/+0
2014-05-21thread: added correct lowest thread priority, added a thread priority check, and added some commentsbunnei2-6/+10
2014-05-21thread: exposed ResumeThreadFromWait function for use in other kernel modulesbunnei2-8/+11
2014-05-21thread: moved threading calls to the Kernel namespacebunnei4-103/+117
2014-05-21ARM_Interface: added SaveContext and LoadContext functions for HLE thread switchingbunnei1-36/+2
2014-05-21renamed "syscall" module to "svc" (more accurate naming)bunnei6-17/+19
2014-05-21thread: whitespace change - fixed * and & placementbunnei2-27/+27
2014-05-21- created a Kernel namespacebunnei6-75/+87
- cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues) - added handle types for all different CTROS handles
2014-05-20apt: changed stubbed handle to be something other than 0xDEADBEEF (used as a magic value in other places) so that I can track how it propagates through the app codebunnei1-1/+1
2014-05-20thread: added declaration for __KernelReschedule to be used by syscall modulebunnei1-0/+3
2014-05-19renamed "session" to "handle"bunnei1-3/+3
2014-05-19- renamed NewHandle to CreateHandlebunnei2-8/+8
- updated CreateHandle/DeleteHandle to use KernelObject's
2014-05-19fix warningbunnei1-1/+1
2014-05-19- updated service(s) to be KernelObject'sbunnei7-59/+31
- various cleanups
2014-05-19renamed "UID" to "Handle" where appropriatebunnei4-24/+22
2014-05-19- moved Handle/Result definitions to kernel.hbunnei6-14/+19
- added ResetType enum
2014-05-18- added stub for CreateEventbunnei1-8/+22
- changed some stubbed SVCs to return unique handle names for debugging purposes
2014-05-18added stubbed function for WaitSynchronizationNbunnei2-4/+19
2014-05-17changed a commentbunnei2-2/+2
2014-05-17cleanups to SVC CreateThreadbunnei1-8/+15
2014-05-17- added enum ThreadProcessorIdbunnei2-53/+107
- reorganized some kernel thread functions - added placeholder __KernelWaitThread_Synchronization function
2014-05-17- replaced KERNELOBJECT_MAX_NAME_LENGTH with KERNEL_MAX_NAME_LENGTHbunnei3-8/+12
- added KERNEL_DEFAULT_STACK_SIZE definition (0x4000)
2014-05-17added stubbed GetProcSemaphore - does nothing but avoids an exceptionbunnei1-1/+7
2014-05-17updated APT_U::GetLockHandle to return a valid handlebunnei1-1/+5
2014-05-17- reenabled MCR and MRC functions now that VFP is attachedbunnei2-21/+2
- removed HLE::CallMCR function (was pointless)
2014-05-16- added SVC stubs for QueryMemory and GetThreadIdbunnei3-2/+30
- added SVC structs MemoryInfo and PageInfo
2014-05-16completely gutted/refactored threading code to be simplerbunnei2-658/+230
2014-05-16changed "UID" to "Handle" to be a little more consistent with CTR namingbunnei2-18/+21
2014-05-16- added ThreadContext structbunnei2-8/+26
- cleaned up CreateThread svc
2014-05-15- added helper function for __KernelCreateThreadbunnei2-4/+76
- added __KernelSwitchToThread for enabling a thread - added __KernelRotateThreadReadyQueue
2014-05-15changed primary thread priority to 0x30 - this is typical, not 0x31bunnei1-1/+2
2014-05-15added function stubs for EatCycles and ReSchedulebunnei2-0/+15
2014-05-14fixed thread reset to not set stack addressbunnei1-1/+1
2014-05-14various cleanups / remove unused codebunnei2-65/+29
2014-05-14added a bunch of threading code, recycled from PPSSPP, with lots of hacks in for 3DS... doesn't really do much yet. Just a jumping off pointbunnei2-70/+543
2014-05-14added CreateThread, CreateMutex, and ReleaseMutex SVC stubs (just parameter decoding for now)bunnei2-7/+38
2014-05-14- added __KernelLoadExec functionbunnei2-13/+35
- fixed some logging
2014-05-10added initial kernel/thread modulesbunnei4-0/+527
2014-05-08removed unknown fields from GX_CmdBufferHeaderbunnei1-5/+0
2014-05-08removed unnecessary log messagebunnei1-1/+1
2014-05-08- removed HLE mem "hack" and replaced with kernel mem regionbunnei7-105/+89
- 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)
2014-05-07- added debug logging to syscall.cppbunnei2-135/+173
- added stubbed HLE syscall functions for svc_GetResourceLimit and svc_GetResourceLimitCurrentValues
2014-05-07added config_mem module for HLE of firmware configuration memory settingsbunnei2-0/+91
2014-05-02- added CallMCR function to coprocessor HLE modulebunnei2-7/+20
- moved instruction decoding to coprocessor HLE module
2014-05-02fixed include in coprocessor.cppbunnei1-1/+1
2014-05-02renamed hle "mrc" module to "coprocessor"bunnei2-0/+0
2014-05-02- added some function wrappers for HLEbunnei2-10/+29
- added stub for SVC CreateAddressArbiter - added OutputDebugString SVC
2014-04-28Problematic template functionsarchshift1-15/+0
2014-04-28removed DISALLOW_COPY_AND_ASSIGN in favor of NonCopyable classbunnei3-9/+0
2014-04-28fixed weird spacingbunnei1-1/+1
2014-04-27hackish but working way to set the framebuffer location to VRAM (used in ARM11 demos tested thus far, e.g. yeti3DS)bunnei1-3/+9
2014-04-26added simple GSP GPU ReadHWRegs function to support returning the framebuffer addressbunnei1-1/+37
2014-04-26added preliminary DataSynchronizationBarrier support with simple DMA copybunnei1-7/+39
2014-04-25moved HLE::MRC to its own module, added support for catching data synchronization barrier commandbunnei4-10/+52
2014-04-25fixed bug where svc_ControlMemory was not properly getting passed in parametersbunnei1-2/+2
2014-04-25- added preliminary support for svc_MapMemoryBlockbunnei1-4/+34
- added shared memory region - moarrrr cleanups to memory_map
2014-04-25added GSP::RegisterInterruptRelayQueue functionbunnei1-31/+40
2014-04-25- refactored how service functions are calledbunnei5-19/+39
- added option to create/delete service handles
2014-04-18renamed hw_lcd module to just lcdbunnei1-2/+0
2014-04-18added GSP heap memory allocationbunnei1-1/+25
2014-04-17added a new function wrapperbunnei1-0/+5
2014-04-17fixed bug with printing std::string in log messagesbunnei1-2/+2
2014-04-17added class stub for HID:User servicebunnei3-0/+72
2014-04-17updated service commentsbunnei6-5/+17
2014-04-17- fixed tabs in function_wrappers.hbunnei4-395/+413
- fixed log message wording in hle.cpp - added syscall stubs for CloseHandle and WaitSynchronization1
2014-04-16- added stubbed out GSP::Gpu service interfacebunnei7-7/+103
- various cleanups/refactors to HLE services
2014-04-16removed no longer used function headerbunnei1-2/+0
2014-04-16restructured hle:services completely to use function lookup tablesbunnei5-137/+215
2014-04-16fixed naming for APT_Ubunnei3-9/+9
2014-04-16- extracted srv: calls from service.cpp and put in its own modulebunnei4-106/+105
- added function tables for service calls - lots of refactoring
2014-04-14added a stub for GetLockHandlebunnei3-9/+44
2014-04-13added framework for APT service (application and title launching service)bunnei5-5/+118
2014-04-13renamed class Interface_SRV to SRVbunnei1-6/+6
2014-04-13added some very initial command parsing for SRV Syncbunnei1-5/+31
2014-04-13added a GetPointer function for reading from HLE command bufferbunnei2-0/+14
2014-04-13added OS memory read/write for thread command bufferbunnei2-3/+55
2014-04-13cleanups to service HLEbunnei2-8/+8
2014-04-13- added HLE to connect to "srv:" servicebunnei5-130/+328
- added a manager for keeping track of services/ports - added a memory mapped region for memory accessed by HLE - added HLE for GetThreadCommandBuffer function
2014-04-12- renamed hle_syscall to just syscallbunnei5-101/+145
- added service.h as an initial service interface
2014-04-12replace tabs with spacesbunnei1-6/+6
2014-04-12moved hle.cpp into hle folder (due to mistake earlier)bunnei1-0/+57
2014-04-11added remaining known syscall functions to Syscall_Tablebunnei1-0/+80
2014-04-11base code to call a syscall from ARM11 appcorebunnei3-7/+56
2014-04-11changed some naming/misc cleanupsbunnei3-18/+17
2014-04-11- removed syscall classes (will just use HLEFunction)bunnei3-15/+17
- added hle.cpp and module registration - removed unused code
2014-04-11added initial modules for setting up SysCall HLEbunnei4-0/+825