summaryrefslogtreecommitdiffstats
path: root/src/core/hle (unfollow)
Commit message (Collapse)AuthorFilesLines
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