From 9833bfddf3d2ab84a4a1a5abbcd7bf9ea0a70ec1 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 12 Jul 2020 23:28:18 +1000 Subject: [PATCH 1/4] Android: Add Vulkan renderer to options --- android/app/src/main/res/values/arrays.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/res/values/arrays.xml b/android/app/src/main/res/values/arrays.xml index 50881a898..b888126b3 100644 --- a/android/app/src/main/res/values/arrays.xml +++ b/android/app/src/main/res/values/arrays.xml @@ -23,10 +23,12 @@ Hardware (OpenGL) + Hardware (Vulkan) Software OpenGL + Vulkan Software @@ -65,4 +67,4 @@ 15 16 - \ No newline at end of file + From 35093818c67f5dc2cd96e5934dee90836da9a93d Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 12 Jul 2020 23:30:21 +1000 Subject: [PATCH 2/4] libretro: Add resolutions up to 16x --- .../libretro_host_interface.cpp | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/duckstation-libretro/libretro_host_interface.cpp b/src/duckstation-libretro/libretro_host_interface.cpp index 299386241..64af34bb9 100644 --- a/src/duckstation-libretro/libretro_host_interface.cpp +++ b/src/duckstation-libretro/libretro_host_interface.cpp @@ -369,17 +369,25 @@ static std::array s_option_definitions = {{ #endif }, {"GPU.ResolutionScale", - "Rendering Resolution Scale", - "Scales internal rendering resolution by the specified multiplier. Larger values are slower. Some games require " - "1x rendering resolution or they will have rendering issues.", - {{"1", "1x (1024x512)"}, - {"2", "2x (2048x1024)"}, - {"3", "3x (3072x1536)"}, - {"4", "4x (4096x2048)"}, - {"5", "5x (5120x2160)"}, - {"6", "6x (6144x3072)"}, - {"7", "7x (7168x3584)"}, - {"8", "8x (8192x4096)"}}, + "Internal Resolution Scale", + "Scales internal VRAM resolution by the specified multiplier. Larger values are slower. Some games require " + "1x VRAM resolution or they will have rendering issues.", + {{"1", "1x (1024x512 VRAM)"}, + {"2", "2x (2048x1024 VRAM)"}, + {"3", "3x (3072x1536 VRAM)"}, + {"4", "4x (4096x2048 VRAM)"}, + {"5", "5x (5120x2160 VRAM)"}, + {"6", "6x (6144x3072 VRAM)"}, + {"7", "7x (7168x3584 VRAM)"}, + {"8", "8x (8192x4096 VRAM)"}, + {"9", "9x (9216x4608 VRAM)"}, + {"10", "10x (10240x5120 VRAM)"}, + {"11", "11x (11264x5632 VRAM)"}, + {"12", "12x (12288x6144 VRAM)"}, + {"13", "13x (13312x6656 VRAM)"}, + {"14", "14x (14336x7168 VRAM)"}, + {"15", "15x (15360x7680 VRAM)"}, + {"16", "16x (16384x8192 VRAM)"}}, "1"}, {"GPU.TrueColor", "True Color Rendering", From d2cf9c44c160fc29cf27b3b549f7e038e4c01ca2 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 13 Jul 2020 02:18:01 +1000 Subject: [PATCH 3/4] CI: Sign Android APKs --- .github/workflows/rolling-release.yml | 22 ++++++++++++++++++---- README.md | 12 +++++++++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rolling-release.yml b/.github/workflows/rolling-release.yml index bff8408ea..214ba694c 100644 --- a/.github/workflows/rolling-release.yml +++ b/.github/workflows/rolling-release.yml @@ -170,13 +170,27 @@ jobs: run: | cd android ./gradlew assembleRelease - mv app/build/outputs/apk/release/app-release-unsigned.apk ../duckstation-release-unsigned.apk - + + - name: Sign APK + uses: r0adkll/sign-android-release@v1 + with: + releaseDirectory: android/app/build/outputs/apk/release + signingKeyBase64: ${{ secrets.APK_SIGNING_KEY }} + alias: ${{ secrets.APK_KEY_ALIAS }} + keyStorePassword: ${{ secrets.APK_KEY_STORE_PASSWORD }} + keyPassword: ${{ secrets.APK_KEY_PASSWORD }} + + - name: Rename APK + shell: bash + run: | + cd android + mv app/build/outputs/apk/release/app-release-unsigned-signed.apk ../duckstation-android-aarch64.apk + - name: Upload APK uses: actions/upload-artifact@v1 with: name: "android" - path: "duckstation-release-unsigned.apk" + path: "duckstation-android-aarch64.apk" create-release: @@ -239,5 +253,5 @@ jobs: linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync linux-libretro/duckstation_libretro.so.zip linux-libretro/duckstation_libretro_android_aarch64.so.zip - android/duckstation-release-unsigned.apk + android/duckstation-android-aarch64.apk diff --git a/README.md b/README.md index 8e636a218..e0ee7f745 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Other features include: - SDL-compatible game controller (e.g. XB360/XBOne) ## Downloading and running -Binaries of DuckStation for 64-bit Windows and 64-bit Linux (in AppImage format) are available via GitHub Releases and are automatically built with every commit/push. Binaries or packages distributed through other sources may be out of date and are not supported by the developer. +Binaries of DuckStation for Windows 64-bit, x86_64 Linux x86_64 (in AppImage format), and Android ARMv8/AArch64 are available via GitHub Releases and are automatically built with every commit/push. Binaries or packages distributed through other sources may be out of date and are not supported by the developer. ### Windows @@ -83,14 +83,20 @@ To download: A prebuilt APK is now available for Android. However, please keep in mind that the Android version is not yet feature complete, it is more of a preview of things to come. You will need a device running a 64-bit AArch64 userland (anything made in the last few years). -Download link: https://github.com/stenzek/duckstation/releases/download/latest/duckstation-release-unsigned.apk +Download link: https://github.com/stenzek/duckstation/releases/download/latest/duckstation-android-aarch64.apk The main limitations are: - No controller support, only on-screen controls. - - User directory is currently hardcoded to /sdcard/duckstation. So BIOS files go in /sdcard/duckstation/bios. + - User directory is currently hardcoded to `/sdcard/duckstation`. So BIOS files go in `/sdcard/duckstation/bios`. - Lack of options in menu when emulator is running. - Performance is currently lower than the desktop x86_64 counterpart. +To use: + - Install and run the app for the first time. + - This will create `/sdcard/duckstation`. Drop your BIOS files in `/sdcard/duckstation/bios`. + - Add game directories by hitting the `+` icon and selecting a directory. Due to a bug you may need to restart the app for it to scan the directory. + - Tap a game to start. + ### Title Information From dbce58e07d7867b9ac0d263422aed03101cce53b Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 13 Jul 2020 02:23:56 +1000 Subject: [PATCH 4/4] CDROM: Display paused position in debug window --- src/core/cdrom.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index 56f790294..3cb025446 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -2337,14 +2337,15 @@ void CDROM::DrawDebugWindow() if (m_reader.HasMedia()) { const CDImage* media = m_reader.GetMedia(); - const auto [disc_minute, disc_second, disc_frame] = media->GetMSFPositionOnDisc(); - const auto [track_minute, track_second, track_frame] = media->GetMSFPositionInTrack(); + const CDImage::Position disc_position = CDImage::Position::FromLBA(m_current_lba); + const CDImage::Position track_position = CDImage::Position::FromLBA( + m_current_lba - media->GetTrackStartPosition(static_cast(media->GetTrackNumber()))); ImGui::Text("Filename: %s", media->GetFileName().c_str()); - ImGui::Text("Disc Position: MSF[%02u:%02u:%02u] LBA[%u]", disc_minute, disc_second, disc_frame, - media->GetPositionOnDisc()); - ImGui::Text("Track Position: Number[%u] MSF[%02u:%02u:%02u] LBA[%u]", media->GetTrackNumber(), track_minute, - track_second, track_frame, media->GetPositionInTrack()); + ImGui::Text("Disc Position: MSF[%02u:%02u:%02u] LBA[%u]", disc_position.minute, disc_position.second, + disc_position.frame, disc_position.ToLBA()); + ImGui::Text("Track Position: Number[%u] MSF[%02u:%02u:%02u] LBA[%u]", media->GetTrackNumber(), + track_position.minute, track_position.second, track_position.frame, track_position.ToLBA()); ImGui::Text("Last Sector: %02X:%02X:%02X (Mode %u)", m_last_sector_header.minute, m_last_sector_header.second, m_last_sector_header.frame, m_last_sector_header.sector_mode); }