Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/console.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion crates/pf-nx-app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/pf-nx-host/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/pf-nx-platform/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/pf-nx-probe/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/pf-nx-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/pf-nx-vk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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). |

Expand Down
2 changes: 1 addition & 1 deletion docs/tester.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions packaging/release-notes.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
20 changes: 11 additions & 9 deletions scripts/package-nro.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
#!/usr/bin/env bash
# Wraps a built console ELF as an NRO with a NACP and packaging/icon.jpg:
# scripts/package-nro.sh <bin> [title] → dist/<title>.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/.*[#@]//')}

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"