Commit Graph

28 Commits

Author SHA1 Message Date
◱ PixelyIon c76ef3730b Move to MPL-2.0
We earlier moved to LGPLv3.0 or Later. This was a mistake as what we wanted was being able to link to proprietary libraries but LGPL is the opposite and it allows linking proprietary libraries to libskyline instead. After further consideration, we've moved to MPL-2.0, it allows linking to proprietary libraries and is a standardized license as compared to adding an exception to GPL.
2020-04-23 22:26:27 +05:30
◱ PixelyIon a0b9a635ca Fix Killing Guest Processes in `KThread::Kill` and fix TID/PID naming
This commit mainly fixes the problem with process leakage before where the guest process wouldn't be killed. In addition, it clears up the problem with naming differences with PID/TID where purely PID was used before but that term is generally used to refer to the PGID. So, `KProcess` has a `pid` member but `KThread` has a `tid` member.
2020-04-23 22:26:27 +05:30
◱ PixelyIon c37f350c02 Move from GPLv3 to LGPLv3 or later
Skyline has been licensed with GPLv3 but as we want to look into optional ads in the future, and that would require linking AdMob SDKs which are proprietary. So, we decided to move to LGPLv3 so we could keep that option open as a revenue stream. 

We've gathered consent from all contributors for the license change:
* PixelyIon - https://github.com/PixelyIon (Commit Author)
* Zephyren25 - https://github.com/zephyren25
* ByLaws - https://github.com/bylaws
* IvarWithoutBones - https://github.com/IvarWithoutBones
* Cyuubi - https://github.com/Cyuubi
* greggamesplayer - https://github.com/greggameplayer
2020-04-23 22:26:27 +05:30
◱ PixelyIon 773ee25e5a Refactor Common
This refactored common by:
* Moving out as many constants to class/function local scopes from being declared in `common`
* Spacing out common and any function to which a constant was moved out to
* Fixing comments here and there
In addition, some naming inconsistencies were fixed as well.
2020-04-23 22:26:27 +05:30
◱ PixelyIon bbdd41a86c Refactor NCE
This commit mainly just refactors NCE by adding spacing and fixing other minor errors. In addition, it adds comments to `nce/guest.h` and `nce/instructions.h`.
2020-04-23 22:26:27 +05:30
◱ PixelyIon 5f072da2b8 Fix GitHub Actions Build + Move Stack to Shared Memory
This commit mainly fixes GitHub Actions builds which were broken due to an outdated version of Android NDK. In addition, it moves all stack to shared memory.
2020-04-23 22:26:27 +05:30
Billy Laws 704a5bdcb1 Refactor base service implementation
Remove looping support - it is slow and no services use it.
Store service name in in base service class - removes the
need for having sub-services in the service name map.
General code clean up - remove {} from single if statements etc.
2020-04-23 22:26:27 +05:30
◱ PixelyIon 08bbc66b09 Fix CR issues and Game Duplication + Move to Vector for Memory Map
This commit fixed the issues outlined in the CR (Mainly correlated to formatting), moves to a sorted vector from a sorted list for the memory map in addition to using binary search for sorting through rather than iteratively and fixes item duplication in the game list when directory is changed in Settings.
2020-02-15 10:25:14 +00:00
◱ PixelyIon 66d20a9429 Fix GroupMutex and Clock Rescaling
This commit mainly fixes GroupMutex and clock rescaling. In addition, clock rescaling is no longer performed if the CNTFRQ_EL0 of the host device is same as that of the Switch (19.2MHz) which is fairly common on higher end devices.
2020-02-15 10:25:14 +00:00
◱ PixelyIon 003e9c5a01 Fix issues with not being able to run ROMs concurrently
This commit fixes GroupMutex and by extension issues with trying to run ROMs without quitting the application in between.
2020-02-15 10:25:14 +00:00
◱ PixelyIon d02267c34f Add support for threads and mutexes
This commit adds support for threading and mutexes. However, there is also a basis of conditional variables but these don't work due to the lack of a shared memory model between the guest and host. So, conditional variables will be deferred to after the shared memory model is in place.
2020-02-15 10:25:14 +00:00
◱ PixelyIon 00cdc1fd6f Refactor the memory implementation and add Regions
This commit does a major refactor of the memory implementation, it forms a memory map which is far cleaner than trying to access it through a handle table lookup. In addition, it creates a common interface for all memory kernel objects: KMemory from which all other kernel memory objects inherit. This allows doing resizing, permission change, etc without casting to the base memory type.
2020-02-15 10:25:14 +00:00
◱ PixelyIon b13002f0e1 Fix some minor inaccuracies in SVCs and Services
This commit fixes some minor inaccuracies in SVCs and some Service functions.
2020-02-15 10:25:14 +00:00
◱ PixelyIon 65018aedbc Complete making the kernel thread-safe #2 + Fix Shared Memory Implementation
This commit makes the kernel completely thread-safe and fixes an issue that caused libNX games to not work due to an error with KSharedMemory. In addition, implement GroupMutex to allow the kernel threads to run in parallel but still allow them to not overlap with the JNI thread.
2020-02-15 10:25:14 +00:00
◱ PixelyIon de6d8d8f48 Work on making the kernel thread-safe #1 + add asynchronous ROM scanning
This commit makes the kernel thread safe in some instances (but not fully) and showcases the significantly improved performance over the ptrace method used prior. In addition, scanning for ROMs is now done asynchronously.
2020-02-15 10:25:14 +00:00
◱ PixelyIon 970dde8c27 Move from ptrace to junction branching and make kernel multithreaded
This commit is a huge step in the direction of better performance, as we move from ptrace to junction branching and have kernel call overhead similar to that of a native kernel call! In addition, this sets the base for the kernel to go fully multi-threaded. However, the kernel is currently not thread-safe and therefore this commit currently causes a crash.
2020-02-15 10:25:14 +00:00
◱ PixelyIon b84859d352 Remove support for multiple guest processes
This commit removes support for more than one guest processes as it requires a fair bit of extra code to support in addition the HLE service implementations don't support it anyway.
2020-02-15 10:25:14 +00:00
◱ PixelyIon 48d47a2b25 Move from dependency on JNI and Implement AtomicMutex
This commit is the start of moving towards a lockless and faster kernel which can run multiple independent threads with fast userspace synchronization.
2020-02-15 10:25:14 +00:00
◱ PixelyIon 3e9bfaec0e Introduce Basic Junction Patching
This commit introduces basic junction patching or patching code to jump to a junction then execute intermediate functions and jump back.
2020-02-15 10:25:14 +00:00
◱ PixelyIon c5dce22a8c Fix JNI Race Condition, Fix Release Builds and Fix Searching
This commit fixes JNI race conditions by usage of a mutex, fixes a bug in release builds due to ProGuard member obfuscation and fix searching by fixing the HeaderAdapter filter.
2019-12-11 17:31:12 +00:00
◱ PixelyIon b3e811d488 Adapt C++ backend to changes
This commit adapts the C++ backend to the Kotlin frontend by moving to usage of file descriptors and, provides an interface to access frontend code via JNI which is used to check the state of the activity and catch events such as surface destruction. In addition, this commit fixes some minor linting errors and changes the CMake version to 3.10.2+.
2019-12-11 17:31:12 +00:00
◱ PixelyIon 423540328a Fix svcWaitSynchronization
svcWaitSynchronization would return the handle of the object instead of the index of it's handle earlier, this is now fixed.
2019-11-15 19:30:04 +00:00
◱ PixelyIon c005d7df74 Framebuffer and NativeActivity
What was added:
* Framebuffer
* NativeActivity
* NV Services
* IOCTL Handler
* NV Devices:
* * /dev/nvmap - 0xC0080101, 0xC0080103, 0xC0200104, 0xC0180105, 0xC00C0109, 0xC008010E
* * /dev/nvhost-as-gpu
* * /dev/nvhost-channel - 0x40044801, 0xC0104809, 0xC010480B, 0xC018480C, 0x4004480D, 0xC020481A, 0x40084714
* * /dev/nvhost-ctrl
* * /dev/nvhost-ctrl-gpu - 0x80044701, 0x80284702, 0xC0184706, 0xC0B04705, 0x80084714
* SVCs:
* * SetMemoryAttribute
* * CreateTransferMemory
* * ResetSignal
* * GetSystemTick
* Addition of Compact Logger
What was fixed:
* SVCs:
* * SetHeapSize
* * SetMemoryAttribute
* * QueryMemory
* A release build would not set CMAKE_BUILD_TYPE to "RELEASE"
* The logger code was simplified
2019-11-15 19:30:04 +00:00
◱ PixelyIon 19eae34315 libNX FS Initalization (v0.3)
What was added:
* libNX FS initalization
What was fixed:
* Release builds
2019-10-18 16:22:38 +05:30
◱ PixelyIon 2476c5d48a libNX HID initialization
What was added:
* HID Service
* Support for Mutexes and Conditional Variables
What was improved:
* Service API now creates one instance per Session rather than a single instance for all Sessions
* Changed std::map objects into std::unordered_map in KProcess
* Comments on enumeration values
2019-10-16 18:11:30 +05:30
◱ PixelyIon ec71735ece Fixes and Additions for HID support
The following things were fixed:
* KSharedMemory
* KSyncObject (and how waiting on them works)
* Inclusion of Headers
What was added:
* Transfer Memory
* svcSleepThread
2019-10-13 13:34:47 +05:30
◱ PixelyIon da74d8d78c Some minor fixes
This fixes some files so release now works and removes the dependancy of "<cutils/ashmem.h>" as it isn't present on all NDK includes.
2019-09-25 15:02:17 +05:30
◱ PixelyIon 7ad2e11705 Milestone 3 - Services API
This commit adds the Services API and implements some services. It also changes the name of the application to Skyline and replaces the icon.
2019-09-25 02:28:25 +05:30