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
7 changes: 2 additions & 5 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -536,17 +536,14 @@ jobs:
set -euo pipefail
sudo apt-get update -qq
sudo apt-get install -y -qq p7zip-full
mkdir -p build/companion
for attempt in 1 2 3 4; do
if gh release download latest --repo ps2max32/neutrino --dir build/companion --pattern '*.7z' --clobber; then
if archive="$(timeout 120s bash scripts/neutrino_release.sh build/companion)"; then
break
fi
test "${attempt}" -lt 4 || { echo "::warning::Could not download the Neutrino release; the full kit is skipped" >&2; exit 1; }
sleep $((attempt * 15))
done
mapfile -t cores < <(find build/companion -maxdepth 1 -name 'neutrino_*.7z' -type f)
test "${#cores[@]}" -eq 1 || { echo "::warning::Expected one neutrino_*.7z, found ${#cores[@]}; the full kit is skipped" >&2; exit 1; }
echo "NEUTRINO_ARCHIVE=${cores[0]}" >> "$GITHUB_ENV"
echo "NEUTRINO_ARCHIVE=$archive" >> "$GITHUB_ENV"

- name: Stage the pinned POPS and EMBER externals
id: kit_externals
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/neutrino-watch.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Neutrino Watch

# Keeps the full kit (LAUNCHSTATION-<build>.zip) level with the upstream Neutrino development build.
# Keeps the full kit (LAUNCHSTATION-<build>.zip) level with the newest published Neutrino build.
#
# Automated-Build already downloads the newest build of the ps2max32/neutrino "latest" pre-release (the
# development build, not the stable v1.x tag) every time it runs, but it only runs on a push to master. This
# Automated-Build selects the newest published upstream archive on each push to master. This
# watch covers the other half: when upstream publishes a newer Neutrino than the one inside the kit on our
# "latest" release, it starts Automated-Build on master so the kit is rebuilt without waiting for a commit.
#
Expand Down Expand Up @@ -32,18 +31,17 @@ jobs:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEUTRINO_REPO: ps2max32/neutrino
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- name: Compare upstream Neutrino against the kit; rebuild if newer
run: |
set -eu
R="$GITHUB_REPOSITORY"
# Upstream: the .7z of Neutrino's "latest" development pre-release.
UP="$(gh api "repos/$NEUTRINO_REPO/releases/tags/latest" \
--jq '[.assets[] | select(.name | test("^neutrino_.*[.]7z$"))][0] | [.name, (.digest // "")] | @tsv' 2>/dev/null || true)"
UP_NAME="$(printf '%s' "$UP" | cut -f1)"
UP_SHA="$(printf '%s' "$UP" | cut -f2)"
UP_SHA="${UP_SHA#sha256:}"
UP="$(timeout 120s bash scripts/neutrino_release.sh || true)"
UP_NAME="$(printf '%s' "$UP" | cut -f2)"
UP_SHA="$(printf '%s' "$UP" | cut -f3)"
echo "upstream Neutrino = [$UP_NAME] [$UP_SHA]"
if [ -z "$UP_NAME" ] || [ -z "$UP_SHA" ]; then
echo "Could not read upstream Neutrino's build and SHA-256 (transient?); nothing to do."
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Storage drivers generally start when needed. **Not checked** means a device has
- Launch **PS1 VCDs through [POPStarter](https://www.psx-place.com/threads/popstarter.19139/)**, or **CUE/BIN/EXE images through [Ember](https://github.com/Gageformer/Ember)** under a save-safe `<Ember directory>/games/<Game>/` layout. The selected file format chooses the PS1 loader.
- Configure or discover external loader paths, independently disable each image loader, and optionally send game IDs to [RetroGem](https://www.pixelfx.co/hdmi-retro-gem) or supported MMCE card-selection paths.

The app packages contain Launchstation; game loaders must be installed separately or supplied by the full kit. Launch support depends on the device and loader. SMB ISO launching uses Neutrino's own SMB backend and needs its complete SMB-capable installation on a local device; the full kit's Neutrino (upstream's latest development build, v1.8.0-61-g7be8de2 of 2026-08-31) predates that backend, so it cannot launch SMB ISOs yet. Direct executable/game launching from PC CARD CF is unsupported. See [Game launching](https://nathanneurotic.github.io/Launchstation/game-launching.html) for each loader's files, layouts and limitations.
The app packages contain Launchstation; game loaders must be installed separately or supplied by the full kit. Launch support depends on the device and loader. SMB and NFS ISO launching use the backends in [Neutrino v1.9.0-beta](https://github.com/ps2max32/neutrino/releases/tag/v1.9.0-beta), selected by the full-kit build. Install the complete Neutrino folder on a local device. Direct executable/game launching from PC CARD CF is unsupported. See [Game launching](https://nathanneurotic.github.io/Launchstation/game-launching.html) for each loader's files, layouts and limitations.

### Files, saves and card images

Expand Down
14 changes: 9 additions & 5 deletions docs-site/content/neutrino.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h2 id="arguments">Launch arguments</h2>
-qb
-cwd=&lt;neutrino install directory&gt;
[-gc=&hellip;] [-gsm=&hellip;] [-dbc] [-logo]</code></pre>
<p><code>-qb</code> is omitted for SMB so Neutrino resets the IOP into its own network stack. For the other supported devices, <code>-qb</code> is Neutrino&rsquo;s quick-boot. The numeric unit suffix of a path, where present, is accepted by Neutrino&rsquo;s backend detection. Argument text is limited, and an over-long path is refused with &ldquo;Neutrino launch arguments are too long&rdquo;.</p>
<p><code>-qb</code> is omitted for SMB and NFS so Neutrino resets the IOP into its own network stack. For the other supported devices, <code>-qb</code> is Neutrino&rsquo;s quick-boot. The numeric unit suffix of a path, where present, is accepted by Neutrino&rsquo;s backend detection. Argument text is limited, and an over-long path is refused with &ldquo;Neutrino launch arguments are too long&rdquo;.</p>

<h2 id="backends">Supported sources</h2>
<table><thead><tr><th>Launchstation source</th><th>Neutrino BSD</th></tr></thead><tbody>
Expand All @@ -49,6 +49,7 @@ <h2 id="backends">Supported sources</h2>
<tr><td>exFAT HDD (<code>ata0:</code>)</td><td><code>ata</code></td></tr>
<tr><td>UDPFS</td><td><code>udpfs</code></td></tr>
<tr><td>SMB / SMB1 browser share</td><td><code>smb</code>; SMB 3.0 on port 445 after an IOP reset (see below)</td></tr>
<tr><td>NFS export</td><td><code>nfs</code>, NFSv4.0 on port 2049 after an IOP reset</td></tr>
<tr><td>APA HDD, memory card, PC CARD CF, disc, host</td><td>Not supported: &ldquo;Neutrino ISO launching is not supported from this device&rdquo;</td></tr>
</tbody></table>

Expand All @@ -65,7 +66,7 @@ <h2 id="game-id">Game ID, RetroGem and MMCE cards</h2>
<p>This conservative policy intentionally differs from upstream R3Z, which initialises MMCE unconditionally.</p>

<h2 id="iop">Keep-IOP hand-off</h2>
<p>Neutrino consumes the already-mounted backing store. ISO launches therefore drain Launchstation&rsquo;s background I/O, release the controller library and jump to Neutrino on a <b>live</b> IOP. They do <b>not</b> obey <b>Reset IOP before launch</b>. For SMB, Neutrino then resets the IOP itself and reconnects with usmb2; the browser session is not reused.</p>
<p>Neutrino consumes the already-mounted backing store. ISO launches therefore drain Launchstation&rsquo;s background I/O, release the controller library and jump to Neutrino on a <b>live</b> IOP. They do <b>not</b> obey <b>Reset IOP before launch</b>. For SMB and NFS, Neutrino then resets the IOP and opens a new connection through its own network driver.</p>

<h2 id="troubleshooting">If a game does not boot</h2>
<ol>
Expand All @@ -79,8 +80,11 @@ <h2 id="troubleshooting">If a game does not boot</h2>
</ol>

<h2 id="smb">SMB games through Neutrino</h2>
<p>Neutrino's <a href="https://github.com/ps2max32/neutrino/pull/236">SMB backend</a>, by <a href="https://github.com/sahlberg">Ronnie Sahlberg</a>, was merged on 2026-10-31. It uses his <a href="https://github.com/sahlberg/usmb2">usmb2</a> client. It needs a <b>whole Neutrino folder built after that merge</b>, including <code>modules/smb_ioman.irx</code>, <code>modules/smb_fhi.irx</code> and the stock <code>config/bsd-smb.toml</code>. Keep that folder on a local device (for example <code>mc0:/neutrino/</code> or USB), and select its ELF in Launching settings. A core stored on SMB or UDPFS is refused for this handoff.</p>
<div class="callout amber"><div class="h">The full kit's Neutrino is older</div>The full kit bundles upstream's latest development build, which is still <b>v1.8.0-61-g7be8de2 from 2026-08-31</b> (checked 2026-11-13). It predates the SMB backend and has no SMB modules, so with the kit as shipped an SMB ISO launch stops with &ldquo;Install the complete latest Neutrino nightly with SMB modules&rdquo;. Use a Neutrino built from upstream's <code>master</code> until upstream publishes a newer build. Neutrino's NFS backend (<a href="https://github.com/ps2max32/neutrino/pull/240">PR #240</a>, merged 2026-11-12) is not used by Launchstation yet: ISOs on <code>nfs:</code> are not handed to Neutrino.</div>
<p>Neutrino's <a href="https://github.com/ps2max32/neutrino/pull/236">SMB backend</a>, by <a href="https://github.com/sahlberg">Ronnie Sahlberg</a>, was merged on 2026-10-31. It uses his <a href="https://github.com/sahlberg/usmb2">usmb2</a> client. It needs a <b>whole Neutrino folder built after that merge</b>, including <code>modules/smb_ioman.irx</code>, <code>modules/smb_fhi.irx</code> and the stock <code>config/bsd-smb.toml</code>. The full-kit build includes both SMB and NFS through <a href="https://github.com/ps2max32/neutrino/releases/tag/v1.9.0-beta">Neutrino v1.9.0-beta</a>. Keep the complete folder on a local device, such as a memory card or USB, and select its ELF in Launching settings.</p>
<p>Add and connect the share in <b>Settings &gt; Network &gt; SMB shares</b> (see <a href="smb.html">Network shares (SMB)</a>), then open a plain ISO from <code>smb:/&lt;NAME&gt;/...</code> or <code>smbold:/...</code>. The server URL must use a dotted IPv4 address and port 445, and the server must offer <b>SMB 3.0</b> without required signing or encryption. The SMB1 browser route can be used only when that same server also offers SMB 3.0: Neutrino always makes a new SMB 3.0 connection. With PS2-Servers, use its <b>SMBv3</b> card on 445, not SMBv1 or the SMBv2 card.</p>
<p>After Run game, Launchstation writes the console's static IPCONFIG address, mask and gateway, and the selected share's server, credentials and share name into the three stock module argument lists. The ISO path is relative to the share; select subfolders in the browser. It preserves the other configuration lines, escapes TOML strings, skips an unchanged file, verifies a changed file, and attempts to restore the original after a failed write. It refuses missing modules, an unrecognised or unwritable config, non-445 ports, DNS server names and overlong values before cleanup. Cancel writes no Neutrino files.</p>
<p>Limits: username/password up to 31 characters each, share name up to 63 bytes, and ISO path within the share up to 127 bytes; all four must be printable ASCII (accented or other non-ASCII characters are refused before launch). If rewriting <code>bsd-smb.toml</code> fails and the original cannot be put back, the launch is refused with a message to copy that file from the nightly again. The backend is read-only; there are no SMB VMCs or compressed/split image support. The password is stored in plain text in <code>bsd-smb.toml</code>. <b>Host checks cover mapping, configuration and refusal behavior; PS2 gameplay, reconnect after game IOP resets and a second launch remain untested on hardware.</b></p>
<p>Limits: username/password up to 31 characters each, share name up to 63 bytes, and ISO path within the share up to 127 bytes; all four must be printable ASCII (accented or other non-ASCII characters are refused before launch). If rewriting <code>bsd-smb.toml</code> fails and the original cannot be put back, the launch is refused with a message to replace that file from the release. The backend is read-only; there are no SMB VMCs or compressed/split image support. The password is stored in plain text in <code>bsd-smb.toml</code>. <b>Host checks cover mapping, configuration and refusal behavior; PS2 gameplay, reconnect after game IOP resets and a second launch remain untested on hardware.</b></p>

<h2 id="nfs">NFS games through Neutrino</h2>
<p>Connect an <a href="nfs.html">NFSv4.0 export</a> on TCP port 2049, then open a plain ISO in Files or place it under <code>CD/</code> or <code>DVD/</code> on the export for the Games tab. Keep the complete Neutrino folder on a local device. This path uses the <a href="https://github.com/ps2max32/neutrino/pull/240">NFS backend by Ronnie Sahlberg</a>, included in v1.9.0-beta.</p>
<p>Launchstation writes the network settings, export path and the share&rsquo;s UID/GID into <code>config/bsd-nfs.toml</code>. Neutrino starts with <code>-bsd=nfs -dvd=nfs:&lt;path within the export&gt;</code> and reconnects after resetting the IOP. The export path and the ISO path within it may each be up to 127 bytes. The backend is read-only, so use a physical memory card for saves. Hardware validation is pending.</p>
2 changes: 1 addition & 1 deletion docs-site/content/nfs.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2 id="use">What you can do</h2>
<li><b>Browse, copy, rename, make and delete folders</b> inside a share. File dates and attributes are not set on the server. Rename works inside one share, and replaces a file of the new name.</li>
<li><b>Nothing can be made in <code>nfs:/</code> itself</b>: it only lists the connected shares.</li>
<li><b>Launch an ELF</b> from a share. Not yet tested.</li>
<li><b>PS2 ISO games through Neutrino</b> are not supported from <code>nfs:</code> yet: Neutrino needs an NFS backing store first.</li>
<li><b>PS2 ISO games through Neutrino:</b> connect the export on port 2049 and open a plain ISO. Use the complete Neutrino v1.9.0-beta or newer folder on a local device. See <a href="neutrino.html#nfs">NFS games through Neutrino</a> for limits and the Games tab layout.</li>
</ul>

<h2 id="stacks">Stack rules</h2>
Expand Down
2 changes: 1 addition & 1 deletion docs-site/content/smb.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h2 id="use">What you can do</h2>
<li><b>Browse, copy, rename, make and delete folders</b> inside a share. A listing that fails part-way is an error, not a partial list. File dates and attributes are not set on the server (the SMB2 driver has no way to).</li>
<li><b>Nothing can be made in <code>smb:/</code> itself</b>: it only lists the connected shares. Rename works inside one share.</li>
<li><b>Launch an ELF</b> from a share, as from <code>udpfs:</code>. Not yet tested.</li>
<li><b>PS2 ISO games through Neutrino:</b> install a complete Neutrino built after its SMB backend was merged (2026-10-31) on a local device, then open the ISO. The full kit's Neutrino is older and has no SMB modules yet (see <a href="neutrino.html#smb">Neutrino SMB</a>). Launchstation maps the selected share and credentials into <code>config/bsd-smb.toml</code> and launches <code>-bsd=smb -dvd=smb:&lt;path within the share&gt;</code>. Neutrino resets the IOP and opens its own session. See <a href="neutrino.html#smb">Neutrino SMB</a>.</li>
<li><b>PS2 ISO games through Neutrino:</b> install Neutrino v1.9.0-beta or later on a local device, then open the ISO. Launchstation maps the selected share and credentials into <code>config/bsd-smb.toml</code> and launches <code>-bsd=smb -dvd=smb:&lt;path within the share&gt;</code>. Neutrino resets the IOP and opens its own session. See <a href="neutrino.html#smb">Neutrino SMB</a>.</li>
<li><b>POPStarter VCDs and Ember images:</b> Launchstation has no SMB handoff for these cores.</li>
</ul>

Expand Down
7 changes: 3 additions & 4 deletions include/neutrino_smb.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
#include <stddef.h>
#include "smb_shares.h"

/* Pure, bounded conversion of a configured browser share into Neutrino's
* SMB 3.0 backend. No network activity and no credentials in errors. */
int neutrinoSmbResolve(const SmbConfig *cfg, const char *path, SmbShare *share,
/* Convert a connected browser share into a path for Neutrino's own backend. */
int neutrinoShareResolve(const SmbConfig *cfg, const char *path, SmbShare *share,
char *dvd, size_t dvd_size, const char **problem);
int neutrinoSmbConfig(const char *original, const SmbShare *share,
int neutrinoShareConfig(const char *original, const SmbShare *share,
const char *ip, const char *mask, const char *gw,
char *output, size_t output_size);
#ifdef SMB
Expand Down
1 change: 1 addition & 0 deletions include/smb_shares.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ typedef struct
char server[SMB_SERVER_LEN];
int port;
char share[SMB_URL_LEN];
unsigned int nfs_uid, nfs_gid; /* AUTH_SYS IDs, zero when omitted */
/* Where it stands; problem says why when INVALID or FAILED. */
int state;
int error;
Expand Down
32 changes: 32 additions & 0 deletions scripts/neutrino_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail

repo=ps2max32/neutrino
# The development build uses a moving `latest` tag. Tagged betas and stable
# releases can be published independently, and moving tags can replace their asset in place.
release=$(gh api --paginate "repos/$repo/releases?per_page=100" | jq -ser '
add
| map(select(.draft == false and .published_at != null))
| [ .[] | .tag_name as $tag | .published_at as $published
| select($tag == "latest" or ($tag | test("^v[0-9]+[.][0-9]+[.][0-9]+(-[A-Za-z0-9.-]+)?$")))
| .assets[]
| select(if $tag == "latest" then (.name | test("^neutrino_v[0-9][A-Za-z0-9.-]*[.]7z$"))
else .name == "neutrino_\($tag).7z" end)
| [([$published, .updated_at] | max), $tag, .name, (.digest // "")] ]
| max_by(.[0]) // error("no published Neutrino archive")
| .[1:]
| @tsv')
IFS=$'\t' read -r tag asset digest <<< "$release"
if [[ ! "$digest" =~ ^sha256:[0-9a-f]{64}$ ]]; then
echo "GitHub did not provide a SHA-256 for $asset" >&2
exit 1
fi

if [[ $# == 0 ]]; then
printf '%s\t%s\t%s\n' "$tag" "$asset" "${digest#sha256:}"
else
mkdir -p "$1"
gh release download "$tag" --repo "$repo" --dir "$1" --pattern "$asset" --clobber >&2
printf '%s %s\n' "${digest#sha256:}" "$1/$asset" | sha256sum --check >&2
printf '%s\n' "$1/$asset"
fi
22 changes: 13 additions & 9 deletions src/dash_games.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,23 @@ static int scanEmber(GameScan *s, const char *root)
static void scanRoot(GameScan *s, const char *root, int shares)
{
char dir[DASH_PATH_MAX], names[GAME_SHARES][MAX_NAME];
int found, n, i, k = 0, more = 0;

snprintf(dir, sizeof(dir), "%sDVD/", root);
found = scanFolder(s, dir);
snprintf(dir, sizeof(dir), "%sCD/", root);
found |= scanFolder(s, dir);
if (!shares) { /* smb:/ itself lists shares: an EMBER share must not stop that */
int nfs = !strncmp(root, "nfs:", 4);
int found = 0, n, i, k = 0, more = 0;

/* NFS puts every game folder under a named export. */
if (!shares || !nfs) {
snprintf(dir, sizeof(dir), "%sDVD/", root);
found = scanFolder(s, dir);
snprintf(dir, sizeof(dir), "%sCD/", root);
found |= scanFolder(s, dir);
}
if (!shares && !nfs) {
found |= scanPops(s, root);
found |= scanEmber(s, root);
}
if (found || !shares)
return;
/* smb:/ lists the shares; each one is an OPL root. */
/* SMB and NFS give each share its own OPL root. */
n = getDirComplete(root, s->files, &more);
for (i = 0; i < n && i < MAX_ENTRY - 2 && k < GAME_SHARES; i++)
if ((s->files[i].stats.AttrFile & sceMcFileAttrSubdir) && s->files[i].name[0] != '.')
Expand All @@ -224,7 +228,7 @@ static void scanRun(void *arg)

for (i = 0; i < s->nroots; i++)
if (isPathDeviceStackLoaded(s->roots[i]))
scanRoot(s, s->roots[i], !strncmp(s->roots[i], "smb", 3));
scanRoot(s, s->roots[i], !strncmp(s->roots[i], "smb", 3) || !strncmp(s->roots[i], "nfs:", 4));
if (s->n > 1)
qsort(s->games, s->n, sizeof(DashApp), titleCmp);
}
Expand Down
Loading
Loading