diff --git a/docs/PORTMASTER.md b/docs/PORTMASTER.md index e7e3e09..e8c24f6 100644 --- a/docs/PORTMASTER.md +++ b/docs/PORTMASTER.md @@ -28,18 +28,21 @@ directory. The templates in `scripts/portmaster/` are authoritative. - `port.json` uses schema version 4, names `netfishing.zip`, and marks the self-contained package ready to run. -- `NETfishing.sh` starts with `# PORTMASTER: netfishing.zip, NETfishing.sh`. +- `NETfishing.sh` does not contain a `# PORTMASTER:` signature in the source or + distributable archive. HarbourMaster adds that installation marker when it + installs the port. - The executable is `netfishing/NETfishing.aarch64`. - The package declares AArch64, two analog sticks, GLIBC 2.28, and `weston_pkg_0.2.squashfs`. - The launcher starts GPTOKEYB with the explicit `netfishing.gptk` no-op map. - Every keyboard and mouse binding is disabled, leaving only PortMaster's + Every keyboard and mouse binding is disabled, leaving only GPTOKEYB's device-specific force-quit chord while Godot and NETfishing's controller - mapping manager handle gameplay input. + mapping manager handle gameplay input. The explicit map also avoids the + anomalous controller behavior observed on ROCKNIX without a passthrough map. - The launcher calls `pm_platform_helper` for the game executable after starting GPTOKEYB and calls `pm_finish` after the game exits. -- New installations automatically create player data under - `ports/saves/netfishing/` and do not present the in-game folder picker. +- NETfishing automatically creates player data for new installations under + `ports/saves/netfishing/` and does not present the in-game folder picker. - Existing installations with a selected data root keep that location when upgraded. Device-local data, configuration, and cache remain under `netfishing/conf/data`, `netfishing/conf/config`, and @@ -103,15 +106,15 @@ Before upgrading an existing installation, preserve device. After installation: 1. Confirm the installed executable and PCK hashes match the staged release. -2. Confirm the installed launcher contains the canonical PortMaster header, - starts GPTOKEYB with `netfishing.gptk`, and calls - `pm_platform_helper` for the game executable. +2. Confirm HarbourMaster added its `# PORTMASTER:` installation signature to + the installed launcher, then confirm the launcher starts GPTOKEYB with + `netfishing.gptk` and calls `pm_platform_helper` for the game executable. 3. Confirm `conf/` and the external save directory were not replaced or removed. 4. Launch the installed port through the normal muOS menu. 5. Verify the displayed game version and controller face-button mapping. -6. Verify PortMaster's force-quit chord exits the game. This is Start+Select on - most devices. +6. Verify GPTOKEYB's device-specific force-quit chord exits the game. This is + Start+Select on most devices. Installing the public PortMaster catalog entry can still install an older catalog build until the upstream `netfishing.zip` is updated. A local release @@ -173,12 +176,12 @@ the game process. This applies the mapping at the same point as the working reconstruction. Do not move the mapping back to either side of `westonwrap.sh`. -Legacy GPTOKEYB builds can load their compiled default keyboard map when no -`-c` file is supplied. That map translates face buttons, D-pad directions, and -sticks into keyboard or mouse events on top of Godot's native controller input. Always pass `netfishing.gptk`, which explicitly unassigns every direct and -hotkey binding with GPTOKEYB's `\"` value. Do not add gameplay mappings to this -file. The Start+Select kill chord remains independent of the no-op bindings. +hotkey binding with GPTOKEYB's `\"` value. This keeps GPTOKEYB from injecting +keyboard or mouse events on top of Godot's native controller input and retains +the device-specific kill chord. Supplying the explicit passthrough map also +avoids the anomalous controller behavior observed on ROCKNIX when no map is +provided. Do not add gameplay mappings to this file. Do not call `Input.add_joy_mapping(..., true)` for a recognized connected muOS controller. Updating this virtual controller after connection can stop Godot diff --git a/scripts/build_portmaster.sh b/scripts/build_portmaster.sh index b5ad5ae..833305b 100755 --- a/scripts/build_portmaster.sh +++ b/scripts/build_portmaster.sh @@ -223,7 +223,7 @@ music while omitting rain and shoreline ambience in both profiles. See ## Controls -NETfishing reads the handheld controller directly. PortMaster's system +NETfishing reads the handheld controller directly. GPTOKEYB's device-specific force-quit chord remains available; this is Start+Select on most devices. EOF @@ -249,8 +249,11 @@ if unzip -Z1 "${ARCHIVE}" | grep -qx 'port.json'; then echo "port.json must be inside netfishing/, not at the archive root." >&2 exit 1 fi -grep -q '^# PORTMASTER: netfishing.zip, NETfishing.sh$' \ - "${STAGE_ROOT}/NETfishing.sh" +if grep -Eq '^[[:space:]]*#[[:space:]]*PORTMASTER:' \ + "${STAGE_ROOT}/NETfishing.sh"; then + echo "The distributable launcher contains an installed PortMaster signature." >&2 + exit 1 +fi grep -Fq 'PROFILE_PATH="$CONFDIR/performance_profile"' \ "${STAGE_ROOT}/NETfishing.sh" grep -Fq 'NETFISHING_PERFORMANCE_PROFILE=light' \ diff --git a/scripts/portmaster/NETfishing.sh b/scripts/portmaster/NETfishing.sh index fe6d778..8e118da 100755 --- a/scripts/portmaster/NETfishing.sh +++ b/scripts/portmaster/NETfishing.sh @@ -1,5 +1,4 @@ #!/bin/bash -# PORTMASTER: netfishing.zip, NETfishing.sh XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} @@ -13,19 +12,11 @@ else controlfolder="/roms/ports/PortMaster" fi -if [ ! -f "$controlfolder/control.txt" ]; then - echo "PortMaster control.txt was not found at $controlfolder" >&2 - exit 1 -fi - source "$controlfolder/control.txt" [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" get_controls GAMEDIR="/${directory}/ports/netfishing" -if [ ! -d "$GAMEDIR" ] && [ -d "/mnt/mmc/ports/netfishing" ]; then - GAMEDIR="/mnt/mmc/ports/netfishing" -fi CONFDIR="$GAMEDIR/conf" PORTS_ROOT="${GAMEDIR%/netfishing}" @@ -38,16 +29,13 @@ CONTROLLER_MAPPING_FILE="$CONFDIR/cache/controller_mapping.txt" WESTON_DIR="/tmp/netfishing-weston" WESTON_RUNTIME="weston_pkg_0.2" HARBOURMASTER="$controlfolder/harbourmaster" -if [ ! -x "$HARBOURMASTER" ] && [ -x "/mnt/mmc/MUOS/PortMaster/harbourmaster" ]; then - HARBOURMASTER="/mnt/mmc/MUOS/PortMaster/harbourmaster" -fi mkdir -p "$CONFDIR/data" "$CONFDIR/config" "$CONFDIR/cache" "$WESTON_DIR" chmod +x "$GAME_EXECUTABLE" -# New PortMaster installs use a predictable save directory beside the port -# instead of presenting a folder picker on a small screen. Preserve an -# established data-root choice when upgrading an existing installation. +# NETfishing uses a predictable save directory beside the port instead of +# presenting a folder picker on a small screen. Preserve an established +# data-root choice when upgrading an existing installation. NETFISHING_DATA_ENVIRONMENT=() if [ -f "$SAVEDIR/netfishing_data.json" ] || { [ ! -f "$DATA_BOOTSTRAP_DIR/data_root_bootstrap.json" ] && @@ -139,10 +127,9 @@ case "$PERFORMANCE_PROFILE" in ;; esac -# Keep NETfishing's native controller input separate from PortMaster's exit -# handling. Legacy GPTOKEYB builds can load their default keyboard map when no -# config is supplied, so the explicit no-op map preserves only the -# device-specific force-quit chord. +# NETfishing reads gameplay input natively. The explicit no-op map prevents +# GPTOKEYB from injecting duplicate keyboard or mouse input while retaining +# its device-specific force-quit chord, including on ROCKNIX. $GPTOKEYB "NETfishing.aarch64" -c "$GPTOKEYB_CONFIG" & pm_platform_helper "$GAME_EXECUTABLE" diff --git a/scripts/portmaster/netfishing.gptk b/scripts/portmaster/netfishing.gptk index ac03270..ff1ad36 100644 --- a/scripts/portmaster/netfishing.gptk +++ b/scripts/portmaster/netfishing.gptk @@ -1,5 +1,6 @@ -# NETfishing reads the controller directly. GPTOKEYB is retained only for the -# PortMaster force-quit chord, so every keyboard and mouse binding is disabled. +# NETfishing reads the controller directly. GPTOKEYB is retained only for its +# device-specific force-quit chord, so every keyboard and mouse binding is +# disabled to prevent duplicate input. back = \" guide = \"