[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107991":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":28,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":15,"starSnapshotCount":15,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},107991,"ampr-emu-ng","quer3q\u002Fampr-emu-ng","quer3q","Hard fork of ampr-emu designed to achieve maximum performance and stability","",null,"Rust",332,18,4,0,7,43,272,33,87.84,"GNU General Public License v3.0",false,"main",true,[26,27],"homebrew","ps5","2026-11-23 19:31:21","2026-11-23 14:55:13","# ampr-emu-ng\n\nA hard fork of [drakmor\u002Fampr_emu](https:\u002F\u002Fgithub.com\u002Fdrakmor\u002Fampr_emu) that is designed for maximum performance and stability running zstd, LZ4 or plain games.\n\nThe runtime reads both pack formats and picks one at load: zstd packs\n(`AMPRZPK1` index, `AMPRZDT1` volumes) when `\u002Fapp0\u002Fampr_zstd.index` exists,\notherwise LZ4 packs (`AMPRPAK4`). This repo only reads packs; see\n[Make packs](#make-packs). The zstd format is described in\n[docs\u002Fzstd-format.md](docs\u002Fzstd-format.md).\n\n## Performance\n\nMeasured on one game and one level, several runs per runtime, from launch\nuntil the level is loaded, read from the debug build's `\u002Fmetrics`.\n\"Original\" is the C++ ampr_emu.\n\n| Speed | Original C++ | ampr-emu-ng LZ4 | ampr-emu-ng zstd |\n| --- | --- | --- | --- |\n| Start of load (~1.2 GB read): game wait per read | 19.76 ms | 0.79 ms (-96%) | 0.89 ms (-95%) |\n| Start of load: pack job | 2.22 ms | 1.27 ms (-43%) | 1.25 ms (-44%) |\n| Start of load: disk read | 2.01 ms | 0.79 ms (-61%) | 0.59 ms (-71%) |\n| Level loaded (~8.8 GB read): game wait per read | 10.26 ms | 1.30 ms (-87%) | 1.27 ms (-88%) |\n| Level loaded: pack job | 3.35 ms | 1.73 ms (-48%) | 1.40 ms (-58%) |\n| Level loaded: disk read | 3.38 ms | 1.23 ms (-64%) | 0.68 ms (-80%) |\n| Level loaded: disk bytes read | 4.98 GB | 4.97 GB | 3.48 GB (-30%) |\n\n| Memory and size | Original C++ | ampr-emu-ng LZ4 | ampr-emu-ng zstd |\n| --- | --- | --- | --- |\n| Pool size \u002F peak (ampr-emu-ng: highest measured peak) | 384 \u002F 267.9 MiB | 128 \u002F 113.6 MiB (-67% \u002F -58%) | 128 \u002F 95.6 MiB (-67% \u002F -64%) |\n| Runtime memory (release, PRX segments) | 397.2 MiB | 136.7 MiB (-66%) | 136.7 MiB (-66%) |\n| Pack on disk | 32.43 GiB (LZ4) | 32.43 GiB (LZ4) | 23.61 GiB (zstd level 5, -27%) |\n\n## How to\n\n### Use\n\nCopy `libSceAmpr.sprx` into the game's `fakelib\u002F`, mount the game with\nShadowMountPlus and turn off fakelib updates in its settings. At launch the\nconsole shows `ampr-emu-ng: vx.x.x (zstd) running`. The mode in that line is\n`zstd` for zstd packs, `lz4` for LZ4 packs, or `plain` when the game has no\npacks and only loose files. A plain game gets the v0.2.0 hook set: the\nvirtual-fd, libc and mmap hooks install only when the game ships\npacks.\n\n### Make packs\n\n[ps5-dump-forge](https:\u002F\u002Fgithub.com\u002Fquer3q\u002Fps5-dump-forge) builds both zstd\nand LZ4 packs.\n\n### Build\n\nThe build needs Docker. The first run builds the toolchain image\n`ampr-emu-ng-ps5:latest` from `ps5\u002FDockerfile` (Rust 1.99.0, LLVM 19,\nps5-payload-sdk v0.43). Set `AMPR_PS5_IMAGE` to use a different image.\n\n```sh\n.\u002Fps5\u002Fbuild-docker.sh            # make dist\n```\n\n`dist` builds and verifies the PRX (`tools\u002Fverify_payload_prx.py`), then\ncopies two files to the project root:\n\n- `libSceAmpr.sprx`, the release build;\n- `libSceAmpr-debug.sprx`, the same runtime plus the metrics endpoint\n  described below, with a 256 MiB pool instead of 128 MiB, so its pool\n  peak shows the memory at the default cache sizes (release shrinks its\n  caches when its pool is short).\n\n### Debug build metrics\n\n`libSceAmpr-debug.sprx` serves plain text on TCP port 9090, one client at a\ntime. `\u002Fmetrics` starts with a `build` line that names the git revision and\nflavor of the running PRX, for example\n`build ampr-emu-ng x.x.x f3494d4-dirty debug`.\n\n- `curl http:\u002F\u002F\u003Cps5-ip>:9090\u002Fmetrics` returns pool usage and the\n  `rt\u002Fstats.rs` counters since load: disk reads, pack jobs, decodes, cache\n  hits and misses, read-ahead and errors. The `*_max` values reset on each\n  scrape.\n- `curl http:\u002F\u002F\u003Cps5-ip>:9090\u002Fbench` measures the raw read speed of pack\n  volume 0. Run it while the game is idle.\n- `curl 'http:\u002F\u002F\u003Cps5-ip>:9090\u002Fset?k=v'` changes `rt\u002Ftune.rs` knobs; without\n  arguments it lists them. The values are saved to `\u002Fdata\u002Fampr_emu_tune.txt`,\n  and startup knobs apply on the next launch. Release builds ignore this\n  file. The file stores every knob, defaults included, so a file saved by an\n  older build keeps that build's values (for example `decoded_mib=0`, which\n  keeps the decoded cache off); delete it to get the current defaults.\n  Older debug builds hung titles with packs on their loading screen while\n  this file existed; `real_physical_close` in `rt\u002Fsys.rs` fixes that.\n- `curl http:\u002F\u002F\u003Cps5-ip>:9090\u002Ffsfail` lists every distinct failed call since\n  load, with its result and count. It covers path hooks, the runtime's own\n  opens of loose files, APR path resolves, failed APR jobs, module loads, and\n  gather\u002Fscatter retries that re-resolved to another file or offset. Misses\n  that the index answers by itself and `\u002Fdownload0` probes are left out. The\n  debug build also logs when a packed file (zstd or LZ4) or a virtual fd\n  reaches an API the runtime does not serve (op letters `I D W T F C N`,\n  plus `O A a l` with how `p`\u002F`d` when an `AMPR_ZSTD_LIBC_HOOKS` bit is\n  cleared). It logs\n  `X`\u002F`Y` when an mmap of a packed file fails, with how `k` for the disk\n  cache, `f` for decode on access, `F` for a failed decode-on-access fill\n  and `v` for any other failure. See `AMPR_ZSTD_MMAP` in the `Makefile`.\n- `curl http:\u002F\u002F\u003Cps5-ip>:9090\u002Fmodules` lists the modules the game loaded, with\n  name, segment size and fingerprint. To find a module that failed to load,\n  run the same build on two installs and diff the two lists.\n\n## Thanks\n\n- [drakmor\u002Fampr_emu](https:\u002F\u002Fgithub.com\u002Fdrakmor\u002Fampr_emu), the original C++\n  AMPR emulator that this project ports.\n- [ps5-payload-sdk](https:\u002F\u002Fgithub.com\u002Fps5-payload-dev\u002Fsdk), the PS5\n  toolchain and libraries the PRX is built with.\n- [AnyPS5](https:\u002F\u002Fgithub.com\u002Fboykopovar\u002FAnyPS5), for its libSceAmpr\n  implementation and its notes on the libc exports that retail libSceAmpr\n  carries.\n\n## License\n\nGPL-3.0-or-later, the same as upstream (`LICENSE`).\n","ampr-emu-ng 是一个面向 PlayStation 5 平台的高性能游戏资源包（AMPR）解包运行时模拟器，为原 ampr-emu 的 Rust 重构硬分叉版本。核心功能是高效加载并透明解压 zstd\u002FLZ4 压缩的游戏资源包（AMPRZPK1\u002FAMPRPAK4），显著降低磁盘 I\u002FO 延迟与内存占用（峰值内存减少超 60%，zstd 包体积压缩约 27%）。采用零拷贝设计与定制化内存池，在 PS5 Homebrew 环境下通过 fakelib 注入方式运行，不依赖完整系统级虚拟化。适用于 PS5 非官方游戏分发、本地资源调试、打包格式验证及轻量级运行时替换等场景。",2,"2026-11-24 04:33:14","CREATED_QUERY"]