diff --git a/.github/workflows/console.yml b/.github/workflows/console.yml index fdc1269..13ea2d0 100644 --- a/.github/workflows/console.yml +++ b/.github/workflows/console.yml @@ -122,7 +122,7 @@ jobs: - name: Title env: PKG_VERSION: ${{ inputs.version }} - run: scripts/docker.sh bash -c 'scripts/cargo-nx.sh build -p pf-nx && scripts/package-nro.sh pf-nx punktfunk' + run: scripts/docker.sh bash -c 'scripts/cargo-nx.sh build -p pf-nx && scripts/package-nro.sh pf-nx punktfunk Punktfunk' # Check 6 reads these from the SD card next to the NRO. - name: NVDEC streams run: sudo apt-get update && sudo apt-get install -y ffmpeg && scripts/nvdec-streams.sh diff --git a/Cargo.lock b/Cargo.lock index 928ee17..f4f6832 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1158,7 +1158,7 @@ source = "git+https://git.unom.io/unom/punktfunk?rev=b58dc3cfe152c48c584c8e2f77d [[package]] name = "pf-nx" -version = "1.0.0" +version = "1.1.0" dependencies = [ "anyhow", "pf-nx-app", @@ -1170,7 +1170,7 @@ dependencies = [ [[package]] name = "pf-nx-app" -version = "1.0.0" +version = "1.1.0" dependencies = [ "anyhow", "image", @@ -1192,7 +1192,7 @@ dependencies = [ [[package]] name = "pf-nx-host" -version = "1.0.0" +version = "1.1.0" dependencies = [ "anyhow", "ash", @@ -1206,7 +1206,7 @@ dependencies = [ [[package]] name = "pf-nx-platform" -version = "1.0.0" +version = "1.1.0" dependencies = [ "anyhow", "pf-nx-app", @@ -1219,7 +1219,7 @@ dependencies = [ [[package]] name = "pf-nx-probe" -version = "1.0.0" +version = "1.1.0" dependencies = [ "ash", "libc", @@ -1231,7 +1231,7 @@ dependencies = [ [[package]] name = "pf-nx-sys" -version = "1.0.0" +version = "1.1.0" dependencies = [ "anyhow", "ash", @@ -1242,7 +1242,7 @@ dependencies = [ [[package]] name = "pf-nx-vk" -version = "1.0.0" +version = "1.1.0" dependencies = [ "anyhow", "ash", diff --git a/Cargo.toml b/Cargo.toml index dafb18a..1ca64c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pf-nx" description = "Nintendo Switch homebrew client for punktfunk: the title binary." -version = "1.0.0" +version = "1.1.0" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/README.md b/README.md index 38cf57c..1780fdf 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Menu (no applet mode), uses the Switch's own video decoder, and works handheld o 1. Download **`punktfunk.nro`** from the [latest release](https://github.com/punktfunk/client-switch/releases/latest). 2. Copy it to **`/switch/punktfunk/`** on your SD card. -3. **Hold R while opening any game**, then pick punktfunk in the Homebrew Menu. Run from Sphaira is recommended. Applet mode does not work. +3. **Hold R while opening any game**, then pick Punktfunk in the Homebrew Menu. Run from Sphaira is recommended. Applet mode does not work. > **Don't open it from the Album.** The Album gives homebrew too little memory, and punktfunk > crashes there. diff --git a/Taskfile.yml b/Taskfile.yml index a34684f..8d27e2c 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -35,4 +35,4 @@ tasks: desc: The title's NRO in dist/ (punktfunk.nro), built in the image deps: [docker:build] cmds: - - bash scripts/docker.sh bash -c 'scripts/cargo-nx.sh build -p pf-nx && scripts/package-nro.sh pf-nx punktfunk' + - bash scripts/docker.sh bash -c 'scripts/cargo-nx.sh build -p pf-nx && scripts/package-nro.sh pf-nx punktfunk Punktfunk' diff --git a/crates/pf-nx-app/Cargo.toml b/crates/pf-nx-app/Cargo.toml index fb1086e..dabdc73 100644 --- a/crates/pf-nx-app/Cargo.toml +++ b/crates/pf-nx-app/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pf-nx-app" description = "The Switch client's application: session, console UI hosting, services and the run loop, over platform seams." -version = "1.0.0" +version = "1.1.0" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/crates/pf-nx-host/Cargo.toml b/crates/pf-nx-host/Cargo.toml index 18ab573..91aac1b 100644 --- a/crates/pf-nx-host/Cargo.toml +++ b/crates/pf-nx-host/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pf-nx-host" description = "The Switch client's seams on a developer box: Vulkan offscreen through the system loader (Linux) or CPU raster, a WAV audio sink, scripted pads, a data dir of its own." -version = "1.0.0" +version = "1.1.0" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/crates/pf-nx-platform/Cargo.toml b/crates/pf-nx-platform/Cargo.toml index dd400ac..c441f67 100644 --- a/crates/pf-nx-platform/Cargo.toml +++ b/crates/pf-nx-platform/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pf-nx-platform" description = "The console's implementations of the Switch client's seams: the NVK and framebuffer displays, NVDEC through libavcodec, audout, hid pads, the applet lifecycle, sdmc: storage and the nxlink log." -version = "1.0.0" +version = "1.1.0" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/crates/pf-nx-probe/Cargo.toml b/crates/pf-nx-probe/Cargo.toml index 4eadaee..40ba76d 100644 --- a/crates/pf-nx-probe/Cargo.toml +++ b/crates/pf-nx-probe/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pf-nx-probe" description = "WP0's probe: numbered checks of what std, the sockets, punktfunk-core's QUIC plane, NVK and NVDEC need from the console." -version = "1.0.0" +version = "1.1.0" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/crates/pf-nx-sys/Cargo.toml b/crates/pf-nx-sys/Cargo.toml index 66b9104..fa5a3da 100644 --- a/crates/pf-nx-sys/Cargo.toml +++ b/crates/pf-nx-sys/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pf-nx-sys" description = "Hand-written FFI to libnx, libavcodec's nvtegra hwaccel and the statically linked NVK, with the layout tests that pin it." -version = "1.0.0" +version = "1.1.0" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/crates/pf-nx-vk/Cargo.toml b/crates/pf-nx-vk/Cargo.toml index 9d03260..9fcb295 100644 --- a/crates/pf-nx-vk/Cargo.toml +++ b/crates/pf-nx-vk/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pf-nx-vk" description = "The Switch client's Vulkan plane: one device for the title's life, the presenter (stream picture + UI layer → swapchain), the NV12 upload, the PyroWave lane and read-back." -version = "1.0.0" +version = "1.1.0" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/docs/plan.md b/docs/plan.md index fd1a61b..6b61b48 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -54,7 +54,7 @@ answer for anyone who will not install a CFW. | D15 | **Dev loop without the console**: `pf-nx-host` runs the app on a Linux box through the real presenter on lavapipe and on the Mac on CPU raster, as `pf-ps5-host` does; **Ryujinx (Ryubing) on the Mac runs the real NRO on the framebuffer `Display`** — libnx, sockets, the nvservices the hwaccel talks to are emulated, so everything but the GPU path is proven here. Stock emulators do not run NVK builds (`bevy-horizon`'s finding). Timing from the emulator is never cited. `nxlink -s` is the deploy and the stdout on the device. | | D16 | **CI**: GitHub Actions like `client-ps5`: a host lane (test, clippy, the host client on lavapipe) and a console lane in a Docker image from `devkitpro/devkita64` plus the nightly, rust-src, and two archives built once per pin (`task nvk`, `task skia`). The NRO is a CI artifact per PR; releases are tags. | | D17 | **Logs**: `sdmc:/switch/punktfunk/punktfunk.log` (truncated per launch) and `nxlink` stdout; the console UI's log ring on top. Test-run bundles (log, `environment.json`, a presenter read-back) zipped on the SD card for the tester to fetch, the PS5's `task fetch-bundle` shape. | -| D18 | **Packaging**: `punktfunk.nro` with NACP (name punktfunk, version = the repo's), a 256×256 icon, `romfs` for fonts; installed at `/switch/punktfunk/punktfunk.nro`; GitHub Releases. A Homebrew App Store listing is after v1. | +| D18 | **Packaging**: `punktfunk.nro` with NACP (title Punktfunk, version = the repo's), a 256×256 icon, `romfs` for fonts; installed at `/switch/punktfunk/punktfunk.nro`; GitHub Releases. A Homebrew App Store listing is after v1. | | D19 | **The source is MIT OR Apache-2.0; the NRO is GPL-3.0-or-later.** The linked libavcodec carries `nvtegra`, which is GPL-2.0-or-later, and the Apache-2.0 pieces combine with GPL version 3 only. Whoever receives an NRO gets the corresponding source: this repository at the tag, plus FFmpeg 7.1 with devkitPro's patches at the pinned recipe commit. Mesa MIT, libnx ISC, Skia BSD, the vendored crate legs under their own licences. `THIRD-PARTY-NOTICES.txt` generated by the app crate's build script as the PS5 does. | | D20 | **The app layer is lifted from `pf-ps5-app`, not shared.** The project's rule: shell logic stays per platform; the PS5 app was itself lifted from webOS. The `Platform` seams (§2.2) are copied verbatim so the two titles stay structurally identical; consolidating them into one shared crate is a decision for after both consoles are stable (§11). | diff --git a/docs/tester.md b/docs/tester.md index 4935564..7fb2bd8 100644 --- a/docs/tester.md +++ b/docs/tester.md @@ -20,7 +20,7 @@ To update, replace the file. Your hosts, pairing and settings are kept. ## Launch it the right way -**Hold R while you open any installed game**, then pick punktfunk in the Homebrew Menu. That +**Hold R while you open any installed game**, then pick Punktfunk in the Homebrew Menu. That runs it with the console's full memory. **Do not open it from the Album.** The Album runs homebrew with a small slice of memory, and diff --git a/packaging/release-notes.md b/packaging/release-notes.md index 280cf9f..a66c1b8 100644 --- a/packaging/release-notes.md +++ b/packaging/release-notes.md @@ -1,5 +1,14 @@ -First release of punktfunk for the Nintendo Switch: stream games from your PC to a Switch 1 -running Atmosphère. +punktfunk for the Nintendo Switch: stream games from your PC to a Switch 1 running Atmosphère. + +## What's new in 1.1.0 + +- **Lower latency handheld.** Decoded pictures reach the screen without the extra copies. In a + console test at the same bitrate, the median stream delay fell from about 36 ms to 25 ms. +- **More headroom docked.** The hardware decoder holds its top clock while docked, and the + stream skips the overlay when nothing is on it. +- **Clearer messages when a host refuses you.** The technical cause stays in the log. +- **The Homebrew Menu now shows Punktfunk.** The file and its folder keep their names, so to + update, replace `punktfunk.nro`. ## Install diff --git a/scripts/package-nro.sh b/scripts/package-nro.sh index 9f730ed..f60a7e4 100755 --- a/scripts/package-nro.sh +++ b/scripts/package-nro.sh @@ -1,12 +1,14 @@ #!/usr/bin/env bash # Wraps a built console ELF as an NRO with a NACP and packaging/icon.jpg: -# scripts/package-nro.sh [title] → dist/.nro (the title defaults to <bin>) -# The version is PKG_VERSION, else the package's own. Runs in the toolchain image. +# scripts/package-nro.sh <bin> [name] [title] → dist/<name>.nro +# The name (default <bin>) names the files; the title (default the name) is what the Homebrew Menu +# shows. The version is PKG_VERSION, else the package's own. Runs in the toolchain image. set -euo pipefail root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) -bin=${1:?usage: scripts/package-nro.sh <bin> [title]} -title=${2:-$bin} +bin=${1:?usage: scripts/package-nro.sh <bin> [name] [title]} +name=${2:-$bin} +title=${3:-$name} elf=$root/target/aarch64-nintendo-horizon/release/$bin [[ -f $elf ]] || { echo "no $elf: build it with scripts/cargo-nx.sh build -p <package>" >&2; exit 2; } version=${PKG_VERSION:-$(cd "$root" && cargo pkgid -p "$bin" | sed 's/.*[#@]//')} @@ -14,11 +16,11 @@ version=${PKG_VERSION:-$(cd "$root" && cargo pkgid -p "$bin" | sed 's/.*[#@]//') mkdir -p "$root/dist" # Without --nacp and --icon the NRO has no asset section, which hbmenu forwarders refuse. # The icon is icon_large.png scaled to the 256x256 JPEG the NACP takes; no larger art exists. -nacptool --create "$title" broslife "$version" "$root/dist/$title.nacp" -elf2nro "$elf" "$root/dist/$title.nro" --nacp="$root/dist/$title.nacp" --icon="$root/packaging/icon.jpg" +nacptool --create "$title" broslife "$version" "$root/dist/$name.nacp" +elf2nro "$elf" "$root/dist/$name.nro" --nacp="$root/dist/$name.nacp" --icon="$root/packaging/icon.jpg" # The ELF keeps the symbols and line tables the NRO drops: a crash report's offsets resolve -# against it (`aarch64-none-elf-addr2line -fipe dist/<title>.elf <offset>`). -cp "$elf" "$root/dist/$title.elf" +# against it (`aarch64-none-elf-addr2line -fipe dist/<name>.elf <offset>`). +cp "$elf" "$root/dist/$name.elf" # The notices pf-nx-app's build wrote for this link; the NRO's licence (GPL) travels with it. if [[ -f $root/THIRD-PARTY-NOTICES.txt ]]; then cp "$root/THIRD-PARTY-NOTICES.txt" "$root/dist/"; fi -ls -la "$root/dist/$title.nro" "$root/dist/$title.elf" +ls -la "$root/dist/$name.nro" "$root/dist/$name.elf"