Skip to content

Releases: asylumexp/ghostldr

ghostldr v0.6.6 (PS4 diagnostic prerelease)

Choose a tag to compare

@asylumexp asylumexp released this 24 Oct 14:12

Changelog

Prerelease, for PS4 testers. v0.6.3 is the current release; nothing changes on a PS5.

PS4

  • Where did the other 2 GiB go? On a 12.02 PS4, SWRR's memory budget is 2560 MiB: exactly the 4608 MiB a PS4 game should get, less exactly 2048 MiB. SWRR's PS2 compiler process shares that budget. If it holds the missing 2 GiB, freeing it could give SWRR the full 4.5 GiB without changing any system setting.
  • The diagnostic now looks inside the compiler process: its direct and flexible memory, every direct memory allocation it holds, and how much the kernel will hand out there compared with SWRR's main process. It also reads SWRR's memory container and the locked-memory budget sysctls. Details: docs/ps4.md.

PS4 owners: on a freshly started SWRR, run python ghostldr/host/run.py probe --diag --no-build --log build/ghostldr/ps4-diag.log and send the log. The diag: compiler memory: lines are the new part.

How to use

Using the prebuilt release · PS4: docs/ps4.md

ghostldr v0.6.5 (PS4 diagnostic prerelease)

Choose a tag to compare

@asylumexp asylumexp released this 24 Oct 13:12

Changelog

Prerelease, for PS4 testers. v0.6.3 is the current release; nothing changes on a PS5.

PS4

  • Where SWRR's 2.5 GiB limit comes from. v0.6.4 showed that SWRR can't read its own memory budget, and that the PS4 sets a game's direct-memory limit through a kernel setting (a sysctl) that sceKernelSetGameDirectMemoryLimit writes. The PS4's system launcher gives every game the kernel's default budget; for a PS2 Classic it only passes a "PS2 emulator" flag on, so the 2.5 GiB is most likely set after that, through this sysctl. Details: docs/ps4.md, the seventh report.
  • The diagnostic reads that limit and tries once to raise it. On a PS4, run.py probe --diag now finds the sysctl's name, reads its value and writes 4608 MiB to it once. If the kernel takes it, the diagnostic measures what SWRR can then allocate and writes the old value back. It also reads the kernel's default limits for each process type, if a game is allowed to.

PS4 owners: on a freshly started SWRR, run python ghostldr/host/run.py probe --diag --no-build --log build/ghostldr/ps4-diag.log and send the log. The diag: limit: and diag: limits: lines are the new part.

How to use

Using the prebuilt release · PS4: docs/ps4.md

ghostldr v0.6.4 (PS4 diagnostic prerelease)

Choose a tag to compare

@asylumexp asylumexp released this 24 Oct 12:29

Changelog

Prerelease, for PS4 testers. v0.6.3 is the current release; nothing changes on a PS5.

PS4

  • The diagnostic reads SWRR's budget. A 12.02 PS4 gives SWRR a 2.5 GiB direct-memory budget although its memory range is 4.5 GiB, which is why Ghost of Tsushima doesn't fit there. run.py probe --diag on a PS4 now reads that budget from the kernel: its ID, its process type, what it holds, and the resident memory counts. It also dumps the libkernel functions that read and set budgets, including sceKernelSetGameDirectMemoryLimit, so their arguments can be worked out.
  • One try to raise the limit. If the budget shows the 2.5 GiB limit, the diagnostic asks the kernel once to raise it to 4.5 GiB. If the kernel takes it, the diagnostic measures what SWRR can then allocate and puts the budget back at once. A game is very unlikely to be allowed to change its own budget, so a refusal is the expected answer.
  • Safety: the budget calls can only fail cleanly. Their output buffers end at an unmapped page, and the signal that refused system calls can send is ignored while they run.

PS4 owners: please run run.py probe --diag on a freshly started SWRR and send the log. The diag: budget: lines are the new part.

How to use

Using the prebuilt release · PS4: docs/ps4.md · USB drives: docs/usb.md · FTP: docs/ftp.md

ghostldr v0.6.3

Choose a tag to compare

@asylumexp asylumexp released this 24 Oct 11:45

Changelog

PS4

  • Why Ghost shows a black screen on a PS4. v0.6.2 measured the 12.02 PS4's limit: once ghostldr has released the emulator's memory, SWRR may allocate 2480 MiB more. Ghost of Tsushima needs about 3.9 GiB. With what it had, Ghost got further than ever: its splash, its boot flow, its level warp. Then it ran out. Its sound and game packs couldn't be loaded, and it waited for them at a black screen. Details: docs/ps4.md, the fifth report.
  • No more black screen: on a PS4, a title whose memory plan is more than 256 MiB over the console's limit isn't started. The log says by how much it's short.
  • Can the limit be raised? A PS4 boot now measures the limit before and after it releases SWRR's memory. If the release doesn't count against it, SWRR's own memory could go to the title instead, about 1.2 GiB more. PS4 owners: one boot log with v0.6.3 answers that. Look for the hostmem: PS4: line.

Changed

  • PS5: unchanged.
  • Dev payloads: unchanged from v0.6.2.

How to use

Using the prebuilt release · USB drives: docs/usb.md · FTP: docs/ftp.md · PS4: docs/ps4.md · in Jak X: docs/jakx.md

ghostldr v0.6.2

Choose a tag to compare

@asylumexp asylumexp released this 24 Oct 11:26

Changelog

PS4

  • Ghost's code now runs on a PS4. With v0.6.1, a 12.02 PS4 passed every compiler check and buffer probe. It placed Ghost and the extension, and ran Ghost's main thread for about 3 seconds. Then the PS4 refused Ghost's texture streaming pool (584 MiB, EAGAIN), although a much larger block was free, and Ghost crashed. A PS4 caps how much direct memory an application may allocate, below its free memory.
  • On a PS4 the memory plan now counts what the kernel hands out. Before planning, ghostldr measures how much direct memory the kernel will grant, then releases it. It sizes Ghost's streaming pool from that instead of the free holes. If even the pool's minimum doesn't fit, the log says how short the plan is. Details: docs/ps4.md, the fourth report.
  • More in the log: a refused allocation logs the kernel's largest free block, and run.py probe --diag logs the PS4's limit.
  • Still experimental: no title has reached its title screen on a PS4. On a PS4, games load from saved data, not from a USB drive. PS4 owners: please send a boot log and a run.py probe --diag log. The budget: PS4: line shows your console's limit.

Changed

  • PS5: boots and memory plans are unchanged.
  • Dev payloads: unchanged from v0.6.1.

How to use

Using the prebuilt release · USB drives: docs/usb.md · FTP: docs/ftp.md · PS4: docs/ps4.md · in Jak X: docs/jakx.md

ghostldr v0.6.1

Choose a tag to compare

@asylumexp asylumexp released this 24 Oct 10:59

Changelog

PS4

  • Compiler system calls on a PS4 now go through each number's own libkernel stub. A PS4 runs a system call only from its own number's stub. Until now ghostldr sent every number through getpid's stub, so on a 12.02 PS4 the diagnostic and the boot both stopped at the compiler's first clock_gettime (PS4 check 2/4), when the compiler process was killed. ghostldr.lua now passes the compiler's stub for each system call the loader makes there. A number without a stub is refused with a log line, not sent through another number's stub. Details: docs/ps4.md, the third report.
  • Still experimental: no PS4 has booted a title yet. PS4 owners: please run run.py probe --diag again and send the log. Its first lines now list the stubs.

Changed

  • Extension check: the runtime extension is checked against the first 24 bytes of its SHA-256, which run.py passes in, as well as its CRC-32.
  • USB drives are the recommended way in the README, the guides and the desktop app (no install, faster loads). Installing into SWRR's saved data is still there for setups without a drive.
  • Tests build and run on Linux (clang and GCC) as well as macOS.
  • PS5: boots are unchanged.
  • Dev payloads: unchanged from v0.6.0.

How to use

Using the prebuilt release · USB drives: docs/usb.md · FTP: docs/ftp.md · PS4: docs/ps4.md · in Jak X: docs/jakx.md

ghostldr v0.6.0

Choose a tag to compare

@asylumexp asylumexp released this 24 Oct 06:23

Changelog

USB drives

  • Games boot from a USB drive, with no install. Copy a game's folder to an exFAT drive, plug it into the PS5 and boot with run.py boot --app-root usb:/ghostldr. On a stock 13.60 PS5, Ghost of Tsushima and Bloodborne reach gameplay from a drive, started directly and through the game selector. They load faster than installed copies: Ghost's menu after 35 s instead of 80, Bloodborne's title screen after 30 s instead of 37.
  • No jailbreak needed: the PS5's own USB storage service mounts the drive into SWRR. The game's progress still goes to SWRR's saved data.
  • Putting games on a drive: gfs_pack.py --usb DRIVE copies a dump to a drive mounted on the computer, or to one in the PS5 over FTP. usb_drive.py lists, checks and removes them. A copy can be stopped and run again: it carries on from what's already there.
  • The drive is read-write: a game that writes to its own folder writes to the drive.

FTP server

  • While a game runs, the PS5 serves FTP on port 1212 (run.py boot --ftp-port; 0 turns it off). Any FTP client in passive mode, with any user name and password. Clients start on the USB drive.
  • Games onto a drive that's already in the PS5: gfs_pack.py --usb ftp://PS5:1212/ghostldr_usb, with no jailbreak. Uploads reached 52 MiB/s over 8 connections on a home network, with Ghost running.
  • No password and no encryption: use it on a network you trust.

Desktop app

  • Two paths to choose from: at the top of Home, Saved data (install into SWRR's saved data, as before) or USB drive.
  • The USB drive step: pick a drive plugged into the computer (its format and free space are checked), or copy to the drive in the PS5 through its FTP server, with live progress. Play then boots from the drive.
  • Library: the drive's games, with Play and Remove.

Changed

  • gfs_pack.py --usb takes --progress SECONDS.
  • Firewall: nothing new on the computer. The FTP server runs on the PS5.
  • Dev payloads: unchanged from v0.5.1.

How to use

Using the prebuilt release · USB drives: docs/usb.md · FTP: docs/ftp.md · in Jak X: docs/jakx.md

ghostldr v0.5.1

Choose a tag to compare

@asylumexp asylumexp released this 23 Oct 12:58

Changelog

Faster installs

  • Titles install at about 23 MB/s instead of 14. The receiver on the PS5 used to take each 4 MiB chunk off the network and only then write it into the save container. A small native pump (ghostldr/native/pump, 691 bytes) now receives the next chunks while a second thread writes, so the two overlap. On a 13.60 PS5, Bloodborne (29.3 GiB) went in in about 23 minutes. Ghost takes about 40 minutes instead of about 65.
  • The PS5's save writes are now the limit, at about 25 MB/s. Larger writes, more writer threads or several containers at once don't raise it, so a faster network won't make installs faster. A link slower than that (busy Wi-Fi) still sets the pace.
  • The installer works with the receiver as before, so resuming and the desktop app's progress work the same way. gfs_install.py --no-pump keeps the old path. Under UltraC0re (Jak X) installs keep the old path for now.

How to use

Using the prebuilt release · in Jak X: docs/jakx.md

ghostldr v0.5.0

Choose a tag to compare

@asylumexp asylumexp released this 23 Oct 09:31

Changelog

New

  • Jak X as a host (experimental): ghostldr also runs in Jak X: Combat Racing (Europe, CUSA07992, update 1.04) with UltraC0re, matem6's Jak X port of Luac0re. docs/jakx.md has what it needs and how it differs from SWRR.
    • Ghost of Tsushima plays there in its PS4 Pro mode, at 4K: New Game and Continue from a save, checked on a 13.60 PS5.
    • Installs are per host: Jak X needs its own install of the title, and keeps its own saves.
    • Jak X runs as a PS4 Pro app, so a title needs a Pro memory plan in its profile to display correctly there. Only Ghost has one so far.
    • ghostldr/tools/ultrac0re_patch.py patches UltraC0re 1.0.2's bootstrap for consoles where Jak X loads at 0x400000. Without it the exploit hangs on a black screen.
    • The dev payload zip adds launch_cusa07992.elf and kill_cusa07992.elf.
  • Host tools find the loader by its port: Luac0re's on 9026, UltraC0re's on 8888. --loader-port picks one, and UltraC0re's on-screen errors are copied to the log.
  • Pro-mode memory plans: a profile can name the title's PS4 Pro memory mode (memory.plan.neo), with that mode's fixed demand, overcommit and heap sizes.

Fixed

  • Memory: the free-memory scan and the memory census no longer stop at the first failed query, which counted everything after it as one free hole. SWRR never hit it: Ghost's plan there is unchanged.

How to use

Using the prebuilt release · in Jak X: docs/jakx.md

ghostldr v0.4.0

Choose a tag to compare

@asylumexp asylumexp released this 22 Oct 08:26

Changelog

New

  • Desktop app for macOS, Windows and Linux: find the console, check the setup, prepare and install a game, play with the live log, plus a library of installed titles, the save manager and troubleshooting.
    • Installers: macOS universal .dmg, Windows setup.exe, .deb, and AppImages for x86_64 and aarch64. All include Python except the .deb.
    • The release zip also has the app in app/, which needs Python 3.11+.
  • Modules outside sce_module/ load. Unity titles keep their runtime in Media/Modules, and those modules are now found anywhere in the title. With the pad fix below, the Unity homebrew PS4-Xplorer 1.34 reaches its file browser.
  • Host tooling, from x0trouble's PR #1:
    • run.py doctor checks the computer and the console;
    • the boot preflight checks imports before sending;
    • tools/stub_report.py ranks the stubs a game called;
    • plain-language [hint] lines after extension failures.
  • Docs: a streamlined README, and docs/architecture.md for the layout and internals.

Fixed

  • Pad: the buffered scePadRead now returns the current state, so titles that only read the pad that way (Unity) get input.
  • Memory: a no-access anonymous mmap up to 64 MiB is now backed by real memory, so a later mprotect can open it. Reserve-then-commit allocators, such as Unity's Mono, need this.
  • Preflight: functions the extension implements by NID now count as resolved; Ghost and Bloodborne no longer ask before booting. It also checks the dump of the title being booted.
  • stub_report.py: it now counts the lines run.py writes to run.log.
  • PS4 (still untested on a PS4): the compiler checks can no longer hang, the compiler is checked on known-good memory first, and every step is logged.

How to use

Using the prebuilt release