From 7ad2e11705c13bf94445cde362d63ae8e11f3a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=97=B1=20PixelyIon?= Date: Wed, 25 Sep 2019 02:24:27 +0530 Subject: [PATCH] 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. --- .idea/codeStyles/Project.xml | 48 +- .idea/inspectionProfiles/Project_Default.xml | 935 ++++++++++++++++++ .idea/misc.xml | 10 +- .idea/scopes/SkylineCPP.xml | 3 + app/CMakeLists.txt | 37 +- app/build.gradle | 12 +- app/src/main/AndroidManifest.xml | 22 +- app/src/main/cpp/lightswitch.cpp | 44 - app/src/main/cpp/main.cpp | 45 + app/src/main/cpp/skyline/common.cpp | 67 ++ app/src/main/cpp/skyline/common.h | 260 +++++ app/src/main/cpp/skyline/kernel/ipc.cpp | 148 +++ app/src/main/cpp/skyline/kernel/ipc.h | 246 +++++ .../skyline/kernel/services/am/appletOE.cpp | 19 + .../cpp/skyline/kernel/services/am/appletOE.h | 32 + .../cpp/skyline/kernel/services/apm/apm.cpp | 30 + .../cpp/skyline/kernel/services/apm/apm.h | 40 + .../skyline/kernel/services/base_service.h | 70 ++ .../skyline/kernel/services/serviceman.cpp | 138 +++ .../cpp/skyline/kernel/services/serviceman.h | 62 ++ .../cpp/skyline/kernel/services/set/sys.cpp | 11 + .../cpp/skyline/kernel/services/set/sys.h | 38 + .../cpp/skyline/kernel/services/sm/sm.cpp | 25 + .../main/cpp/skyline/kernel/services/sm/sm.h | 24 + app/src/main/cpp/skyline/kernel/svc.cpp | 184 ++++ .../main/cpp/{switch => skyline}/kernel/svc.h | 68 +- .../main/cpp/skyline/kernel/types/KObject.h | 31 + .../skyline/kernel/types/KPrivateMemory.cpp | 77 ++ .../cpp/skyline/kernel/types/KPrivateMemory.h | 55 ++ .../cpp/skyline/kernel/types/KProcess.cpp | 97 ++ .../main/cpp/skyline/kernel/types/KProcess.h | 193 ++++ .../main/cpp/skyline/kernel/types/KSession.h | 39 + .../kernel/types/KSharedMemory.cpp | 73 +- .../cpp/skyline/kernel/types/KSharedMemory.h | 69 ++ .../cpp/skyline/kernel/types/KSyncObject.cpp | 21 + .../cpp/skyline/kernel/types/KSyncObject.h | 26 + .../main/cpp/skyline/kernel/types/KThread.cpp | 28 + .../main/cpp/skyline/kernel/types/KThread.h | 55 ++ .../cpp/{switch => skyline}/loader/loader.h | 8 +- app/src/main/cpp/skyline/loader/nro.cpp | 44 + .../main/cpp/{switch => skyline}/loader/nro.h | 16 +- app/src/main/cpp/{switch => skyline}/memory.h | 39 +- app/src/main/cpp/skyline/nce.cpp | 209 ++++ app/src/main/cpp/skyline/nce.h | 161 +++ app/src/main/cpp/skyline/os.cpp | 77 ++ app/src/main/cpp/skyline/os.h | 60 ++ app/src/main/cpp/switch/common.cpp | 75 -- app/src/main/cpp/switch/common.h | 258 ----- app/src/main/cpp/switch/kernel/ipc.cpp | 133 --- app/src/main/cpp/switch/kernel/ipc.h | 225 ----- app/src/main/cpp/switch/kernel/service.cpp | 8 - app/src/main/cpp/switch/kernel/service.h | 9 - .../cpp/switch/kernel/services/BaseService.h | 18 - app/src/main/cpp/switch/kernel/svc.cpp | 174 ---- .../main/cpp/switch/kernel/types/KObject.h | 17 - .../switch/kernel/types/KPrivateMemory.cpp | 76 -- .../cpp/switch/kernel/types/KPrivateMemory.h | 50 - .../main/cpp/switch/kernel/types/KProcess.cpp | 106 -- .../main/cpp/switch/kernel/types/KProcess.h | 152 --- .../cpp/switch/kernel/types/KSharedMemory.h | 67 -- .../main/cpp/switch/kernel/types/KThread.cpp | 26 - .../main/cpp/switch/kernel/types/KThread.h | 53 - app/src/main/cpp/switch/loader/nro.cpp | 44 - app/src/main/cpp/switch/nce.cpp | 180 ---- app/src/main/cpp/switch/nce.h | 156 --- app/src/main/cpp/switch/os.cpp | 91 -- app/src/main/cpp/switch/os.h | 62 -- .../java/emu/lightswitch/LogActivity.java | 217 ---- .../{lightswitch => skyline}/GameAdapter.java | 8 +- .../HeaderAdapter.java | 20 +- .../main/java/emu/skyline/LogActivity.java | 201 ++++ .../{lightswitch => skyline}/LogAdapter.java | 12 +- .../MainActivity.java | 25 +- .../{lightswitch => skyline}/NroLoader.java | 8 +- .../SettingsActivity.java | 5 +- app/src/main/res/drawable/logo_skyline.xml | 57 ++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 - .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 - app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3272 -> 0 bytes .../mipmap-hdpi/ic_launcher_foreground.webp | Bin 3700 -> 0 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 5234 -> 0 bytes app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 1921 -> 0 bytes .../mipmap-mdpi/ic_launcher_foreground.webp | Bin 2216 -> 0 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 3079 -> 0 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 4857 -> 0 bytes .../mipmap-xhdpi/ic_launcher_foreground.webp | Bin 5332 -> 0 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 7824 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 8291 -> 0 bytes .../mipmap-xxhdpi/ic_launcher_foreground.webp | Bin 9524 -> 0 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 13459 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 12288 -> 0 bytes .../ic_launcher_foreground.webp | Bin 14390 -> 0 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 19762 -> 0 bytes app/src/main/res/values/strings.xml | 2 +- app/src/main/res/xml/backup_descriptor.xml | 4 + 95 files changed, 4121 insertions(+), 2424 deletions(-) create mode 100644 .idea/scopes/SkylineCPP.xml delete mode 100644 app/src/main/cpp/lightswitch.cpp create mode 100644 app/src/main/cpp/main.cpp create mode 100644 app/src/main/cpp/skyline/common.cpp create mode 100644 app/src/main/cpp/skyline/common.h create mode 100644 app/src/main/cpp/skyline/kernel/ipc.cpp create mode 100644 app/src/main/cpp/skyline/kernel/ipc.h create mode 100644 app/src/main/cpp/skyline/kernel/services/am/appletOE.cpp create mode 100644 app/src/main/cpp/skyline/kernel/services/am/appletOE.h create mode 100644 app/src/main/cpp/skyline/kernel/services/apm/apm.cpp create mode 100644 app/src/main/cpp/skyline/kernel/services/apm/apm.h create mode 100644 app/src/main/cpp/skyline/kernel/services/base_service.h create mode 100644 app/src/main/cpp/skyline/kernel/services/serviceman.cpp create mode 100644 app/src/main/cpp/skyline/kernel/services/serviceman.h create mode 100644 app/src/main/cpp/skyline/kernel/services/set/sys.cpp create mode 100644 app/src/main/cpp/skyline/kernel/services/set/sys.h create mode 100644 app/src/main/cpp/skyline/kernel/services/sm/sm.cpp create mode 100644 app/src/main/cpp/skyline/kernel/services/sm/sm.h create mode 100644 app/src/main/cpp/skyline/kernel/svc.cpp rename app/src/main/cpp/{switch => skyline}/kernel/svc.h (70%) create mode 100644 app/src/main/cpp/skyline/kernel/types/KObject.h create mode 100644 app/src/main/cpp/skyline/kernel/types/KPrivateMemory.cpp create mode 100644 app/src/main/cpp/skyline/kernel/types/KPrivateMemory.h create mode 100644 app/src/main/cpp/skyline/kernel/types/KProcess.cpp create mode 100644 app/src/main/cpp/skyline/kernel/types/KProcess.h create mode 100644 app/src/main/cpp/skyline/kernel/types/KSession.h rename app/src/main/cpp/{switch => skyline}/kernel/types/KSharedMemory.cpp (59%) create mode 100644 app/src/main/cpp/skyline/kernel/types/KSharedMemory.h create mode 100644 app/src/main/cpp/skyline/kernel/types/KSyncObject.cpp create mode 100644 app/src/main/cpp/skyline/kernel/types/KSyncObject.h create mode 100644 app/src/main/cpp/skyline/kernel/types/KThread.cpp create mode 100644 app/src/main/cpp/skyline/kernel/types/KThread.h rename app/src/main/cpp/{switch => skyline}/loader/loader.h (73%) create mode 100644 app/src/main/cpp/skyline/loader/nro.cpp rename app/src/main/cpp/{switch => skyline}/loader/nro.h (67%) rename app/src/main/cpp/{switch => skyline}/memory.h (67%) create mode 100644 app/src/main/cpp/skyline/nce.cpp create mode 100644 app/src/main/cpp/skyline/nce.h create mode 100644 app/src/main/cpp/skyline/os.cpp create mode 100644 app/src/main/cpp/skyline/os.h delete mode 100644 app/src/main/cpp/switch/common.cpp delete mode 100644 app/src/main/cpp/switch/common.h delete mode 100644 app/src/main/cpp/switch/kernel/ipc.cpp delete mode 100644 app/src/main/cpp/switch/kernel/ipc.h delete mode 100644 app/src/main/cpp/switch/kernel/service.cpp delete mode 100644 app/src/main/cpp/switch/kernel/service.h delete mode 100644 app/src/main/cpp/switch/kernel/services/BaseService.h delete mode 100644 app/src/main/cpp/switch/kernel/svc.cpp delete mode 100644 app/src/main/cpp/switch/kernel/types/KObject.h delete mode 100644 app/src/main/cpp/switch/kernel/types/KPrivateMemory.cpp delete mode 100644 app/src/main/cpp/switch/kernel/types/KPrivateMemory.h delete mode 100644 app/src/main/cpp/switch/kernel/types/KProcess.cpp delete mode 100644 app/src/main/cpp/switch/kernel/types/KProcess.h delete mode 100644 app/src/main/cpp/switch/kernel/types/KSharedMemory.h delete mode 100644 app/src/main/cpp/switch/kernel/types/KThread.cpp delete mode 100644 app/src/main/cpp/switch/kernel/types/KThread.h delete mode 100644 app/src/main/cpp/switch/loader/nro.cpp delete mode 100644 app/src/main/cpp/switch/nce.cpp delete mode 100644 app/src/main/cpp/switch/nce.h delete mode 100644 app/src/main/cpp/switch/os.cpp delete mode 100644 app/src/main/cpp/switch/os.h delete mode 100644 app/src/main/java/emu/lightswitch/LogActivity.java rename app/src/main/java/emu/{lightswitch => skyline}/GameAdapter.java (97%) rename app/src/main/java/emu/{lightswitch => skyline}/HeaderAdapter.java (93%) create mode 100644 app/src/main/java/emu/skyline/LogActivity.java rename app/src/main/java/emu/{lightswitch => skyline}/LogAdapter.java (94%) rename app/src/main/java/emu/{lightswitch => skyline}/MainActivity.java (86%) rename app/src/main/java/emu/{lightswitch => skyline}/NroLoader.java (93%) rename app/src/main/java/emu/{lightswitch => skyline}/SettingsActivity.java (87%) create mode 100644 app/src/main/res/drawable/logo_skyline.xml delete mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml delete mode 100644 app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml delete mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp delete mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp delete mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp delete mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp delete mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp delete mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/xml/backup_descriptor.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index d315ac74..bb3ada16 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -8,9 +8,40 @@ + + + + + + + @@ -34,9 +65,18 @@