Skip to content

Releases

b529 pre-release

Choose a tag to compare

@dreikk91 dreikk91 released this 27 Nov 08:58

Source-build preparation utility for Windows x64. Extract P4-PSP-b529-windows-x64.zip, run Prepare P4.exe, choose your Persona 4 USA / supported USA UNDUB ISO and an output folder, then copy the resulting P4 folder to PSP/GAME/. No game EBOOT, game data or artwork is included: everything is built from your ISO.

If you have b524, its Prepare P4.exe offers this update when it opens. b495 and older: download it by hand.

Game changes since b524

  • Crash fix (issue #24): a bus error when a fight started in Yukiko's castle. The port's bone-frame table kept a pointer to a model the game had already freed; when a new model landed at the same address, it read freed memory. Destroyed models are now removed from that table.
  • The other port tables that keep pointers to game objects were checked for the same mistake; two more were tightened (animation state, world drawing entries).
  • Unused experimental code paths removed (no change in what is drawn).

Host validation: docs/build_validation_b529.md. This build has not been played on a PSP yet. If you can, replay the issue #24 fight, and please report problems with p4crash.txt if one is written.

Persona 4 PSP b524 - pre-release with self-updating utility

Choose a tag to compare

@dreikk91 dreikk91 released this 27 Nov 00:44

Source-build preparation utility for Windows x64. Extract P4-PSP-b524-windows-x64.zip, run Prepare P4.exe, choose your Persona 4 USA / supported USA UNDUB ISO and an output folder, then copy the resulting P4 folder to PSP/GAME/. No game EBOOT, game data or artwork is included: everything is built from your ISO.

New in the utility

  • Update check. When it opens, Prepare P4 looks for a newer pre-release here. If there is one, it asks before downloading. The new package is checked against SHA256SUMS.txt, unpacked next to the current folder and opened. Each package brings its own conversion scripts, so tools added later arrive with the update. Your ISO, output and build cache are left alone. b495 and older do not have this, so download b524 by hand once.
  • XMB icon and background are made from your ISO's title screen, or from your own pictures (144x80 / 480x272).
  • 2D images are prescaled offline into p4sprite.bin (about 5 minutes extra on the first build).

Game changes since b495

  • Caches in an 8 MB arena, more game heap and a 2.5 MB reserve for the allocation in issue #23.
  • Skin entries cached on the memory stick.
  • Crash catcher records CPU registers; heap guard on free and on texture copies.
  • Smaller GE call ring; mesh scratch sized to the largest mesh.

Host validation: docs/build_validation_b524.md. This build has not been played on a PSP yet; please report problems with p4crash.txt if one is written.

b495 pre-release

Choose a tag to compare

@dreikk91 dreikk91 released this 25 Nov 09:28

Fixes on top of b494. Not yet run on a PSP in this release session.

  • When the game archives are missing (an "EBOOT only" preparation), the EBOOT now says which files are missing and how to prepare them, then exits, instead of failing later (issue #20).

  • From the persona4-portable fork: the disc archive parts are opened on first read, a truncated or malformed p4files.idx is refused, and a frame with nothing drawn no longer shows a stale buffer, and a log line cut at the buffer size still ends with a newline.

  • The EBOOT has its own XMB icon and background (ICON0, PIC1).

  • Utility: the preparation uses up to 16 workers (the CPU count) instead of 4.

  • Crash catcher (issue #21: hard power-offs with nothing in the log). On a CFW with KUBridge (ARK, PRO, ME) the EBOOT writes a small kernel module, p4crash.prx, next to itself and loads it; it registers the default exception handler. A crash in the game then writes p4crash.txt in the game folder (thread, exception, EPC and ra as p4+offset, BadVAddr, all registers, the code addresses on the stack, and the last 16 KB of the log including the lines the writer had not saved yet) and returns to the XMB instead of hanging and powering off. The log says crash catcher: ... handler 00000000 (on) when it is active. An empty CRASHTEST file next to the EBOOT crashes on purpose at boot to check it. PPSSPP: the module loads, the handler is not available there ((off)), the game runs as before. Not yet run on a PSP.

  • Dialogue portraits no longer hitch when they appear (issue #22). Since b491 every big 8-bit 2D image is resampled once to the PSP's size, and that ran all at once at the first draw: ~0.13-0.3 s of CPU per portrait (PPSSPP clock). It now runs ~2 ms a frame (p4_swz_step_us), the original image drawn until the copy is done (~50 frames); one-index windows are copied without filtering (68% of a portrait), and the nearest-colour search looks only at the 4x4 source texels around each output texel instead of all 256 palette entries. PPSSPP, Margaret route: portrait picture unchanged, 126 ms over ~53 frames instead of one stall. Not yet run on a PSP.

Validation: docs/build_validation_b495.md. Download P4-PSP-b495-windows-x64.zip, check it against SHA256SUMS.txt, run Prepare P4.exe with your own ISO.

Persona 4 PSP b494 - fix for the Junes food court power-off (#19)

Choose a tag to compare

@dreikk91 dreikk91 released this 24 Nov 07:39

Source-build pre-release for Persona 4 PSP b494. Supply your own USA or supported USA UNDUB ISO; no game executable or converted game assets are bundled.

Extract P4-PSP-b494-windows-x64.zip, run Prepare P4.exe, select the ISO and an empty output folder, then copy the generated P4 folder to PSP/GAME/. The compiler and pinned upstream source download on the first build.

Changes since b493:

  • Fix for #19 (hard crash / power-off at the Junes food court): FPU traps are now off on every game thread, not only the PSP main thread. With traps on, a NaN compare on a game thread powered the PSP off with no error message. PPSSPP does not emulate FPU traps, so this needs a PSP to confirm. Reports welcome in #19.
  • Texels and palettes of destroyed textures are freed only after the GE finishes the display list that may still read them (possible one-frame texture garbage before).
  • Utility: the VAG audio encoder now lives in helpers/p4meshopt.dll; the separate audio_vag_encoder.exe that some antivirus software flagged is gone. Output is byte-identical, so existing audio caches stay valid.

See CHANGELOG.md and b494 validation. The frozen utility built EBOOT from a clean cache on the USA ISO; the resulting XMB executable has not yet been run on a PSP.

SHA256 (P4-PSP-b494-windows-x64.zip): d5ccbe99c97d730a41c22ab72a19fd908f0b99f7598ba6cc8c580cac68922a40

Persona 4 PSP b493 - title screen, field and collision speedups

Choose a tag to compare

@dreikk91 dreikk91 released this 23 Nov 13:53

Source-build pre-release for Persona 4 PSP b493. Supply your own USA or supported USA UNDUB ISO; no game executable or converted game assets are bundled.

Extract P4-PSP-b493-windows-x64.zip, run Prepare P4.exe, select the ISO and an empty output folder, then copy the generated P4 folder to PSP/GAME/. The compiler and pinned upstream source download on the first build.

Changes since b450 (PSP figures from profiling builds at 333 MHz):

  • Field scenery drawn from flat arrays instead of RenderWare's walk (p4_world_direct): Heaven 41.0 -> 37.9 ms CPU, Junes West Entrance 52.8 -> 44.4 ms.
  • Field collision skips atomics a query cannot reach (p4_col_cull): Heaven bridge run 62 -> 53 ms CPU.
  • Bone frames written only when read (p4_frame_lazy), direct field entries emitted together (p4_world_defer): about 0.4-0.6 ms each.
  • Title screen: swizzled, prescaled copies of its 2D layers: 10 -> ~30 FPS (b490 measurement).
  • Movie watchdog: a movie that stalls for 4 s is skipped instead of freezing the game.
  • Fixes: battle HP gauges reading empty, a freeze after battles or field changes, blurred menu text.
  • The utility also generates the offline static geometry pack p4static.bin (about 54 MB on the memory card); its runtime consumer is off in this build.

See CHANGELOG.md and b493 validation. The frozen utility built EBOOT from a clean cache on the USA ISO; the resulting XMB executable has not yet been run on a PSP. Movie hangs, heap fragmentation and slower heavy scenes remain open.

SHA256 (P4-PSP-b493-windows-x64.zip): 5e1651fea07bb6da72d36ce29291993e1744325b815974dc3d21454f57a7f8ad

Persona 4 PSP b450 - UNDUB and offline resource packs

Choose a tag to compare

@dreikk91 dreikk91 released this 21 Nov 14:23

Source-build pre-release for Persona 4 PSP b450. Supply your own USA or supported USA UNDUB ISO; no game executable or converted game assets are bundled.

Extract P4-PSP-b450-windows-x64.zip, run Prepare P4.exe, select the ISO and an empty output folder, then copy the generated P4 folder to PSP/GAME/. The compiler and pinned upstream source download on the first build.

  • Supports the tested USA UNDUB executable by full SHA-1, alongside the original USA version.
  • Generates skin/static strips (p4strips.bin) and offline texture palettes (p4clut.bin) from the selected disc; verifies and installs both packs. Skin strips are active; optional static-strip and offline-CLUT consumers remain off.
  • Includes flat/compact static lists, raster-specific cache keys, 2D state caching, animation fixes and PSP Go support through b450. The new direct UI path remains off pending PSP testing.
  • Fork adaptations are credited to MeMeNT0xMoRii/persona4-portable in README, third-party notices and source comments.
  • Dedicated other-game decompilation/research files and absolute host paths in public Markdown are excluded from this snapshot.

Historical PSP FPS results (b390-b400 session, 333 MHz, profiler off):

Scene Before After (b400)
Entrance ~15 ~23
Junes West Entrance ~15 ~23
Heaven, 10th Paradise ~15 30

See CHANGELOG.md for measured improvements and experiments left off, and b450 validation for frozen-package results and test limits.

The b450 XMB executable still needs PSP gameplay validation. Full media conversion and a complete playthrough were not repeated. Movie hangs and some wider host-test fixture failures remain open.

SHA256 (P4-PSP-b450-windows-x64.zip): 5f24b6065ebdca8f91ff0ea6327e23fb625c9852e37c5e6b3169811b14224fa9

Persona 4 PSP b388 - source pre-release

Pre-release

Choose a tag to compare

@dreikk91 dreikk91 released this 18 Nov 09:00

Source-build preparation utility for b388. Not yet validated on a PSP: the XMB EBOOT this utility generates needs a hardware run; diagnostic b366-b386 builds were measured on a PSP at 333 MHz.

Use

Extract P4-PSP-b388-windows-x64.zip completely, run Prepare P4.exe, choose your own Persona 4 USA ISO (SLUS-21782) and an output folder, then copy the resulting P4 folder to PSP/GAME/ on the memory card. The utility downloads the PSP compiler and the pinned upstream sources on the first build. No game data is included.

New in the utility

  • Builds the character triangle-strip pack (p4strips.bin) from your ISO and installs it next to the EBOOT. Earlier packages never made it, so their EBOOT built strips on the PSP: 78.4 ms a frame against 67.6 ms with the pack (b366 PSP audit).
  • Build-cache paths stay under 250 characters: shorter job folder names, and a clear stop message when a deep cache folder would pass the limit.

Port changes b354-b388

  • GE commands written directly instead of through libpspgu: about 4 ms CPU a frame on the PSP.
  • Characters with large bone spheres stay on the GE skin path (per-bone boxes): Velvet Room after a fusion, 24 to 29.7 FPS on the PSP.
  • CLUT8 copies of 32-bit textures (cloud plane: GE 26.1 to 21.1 ms).
  • Back faces fixed: fusion cards show their faces, the limousine floor patch is gone.
  • Measured and left off: double-buffered command lists, lazy bone frames, frame-sync skip, the 12 MB cache arena (it filled up), keeping the previous frame (fusion glow flicker still open).

Full list of what was tried and what it gave: CHANGELOG.md. Hardware audit: docs/hardware_b366.md.

Checksums

SHA256 (P4-PSP-b388-windows-x64.zip): a3e1873905bac17cb52a3abc59d7b786966dffaab2e8ff98893950922a42c64a

Persona 4 PSP b339 - source pre-release

Pre-release

Choose a tag to compare

@dreikk91 dreikk91 released this 16 Nov 22:49

Source pre-release of the experimental Persona 4 PSP port, b249 → b339. No binaries: build it from source as in the README with your own Persona 4 USA ISO. The b249 Windows utility still works for players who don't build from source. A fresh b339 boot on a PSP loaded a save; most other changes were checked only in PPSSPP or in single scenes on hardware. This is not a validated playthrough.

Thanks

Many of these changes come from MeMeNT0xMoRii/persona4-portable, an MIT fork of this repository. We adapted its fixes here, and each of those commits names the fork. Thank you, @MeMeNT0xMoRii. The decompilation is still the work of Raikaru/Persona4-Decompilation and its contributors.

From persona4-portable

  • The game runs from whatever folder it was launched from (CAT_ folders work). Saves, logs, NOSOUND, scenes.txt and the strip pack are all read from that folder.
  • FPS overlay: put an empty file named FPS next to the EBOOT.
  • HOME breaks off a GE list that hasn't finished before exiting, so the game no longer hangs on exit.
  • RenderWare fog drawn the way the retail game draws it (on by default since b339). Static and skinned lists carry the fog state.
  • Town Map atlas, and TMX images wider than 512 texels.
  • TV-world entry rings and silhouette tint.
  • Shuffle Time card faces.
  • Read-only raster locks and the screen-copy filter. PTank colour-only state no longer writes depth.
  • Alpha masks: quads are drawn whole, and bits above the alpha ceiling are skipped.
  • Particle address modes and depth split, the CRI splash at 4:3, fusion indicators.
  • Fixes for a fusion crash and for the Social Stats census, plus the group-1 fixes and other small fixes.

Other changes

Performance and rendering

  • Static and skinned meshes go through cached GE CALL lists. Strip pack, instance batching, far stand-ins and bone LOD. The display list now lives on the heap and is twice as large, and draws are refused near its end instead of overrunning it.
  • The mesh cache gives memory back when the heap runs short or a field loads.
  • Ticks that aren't drawn do less work. Animation runs from per-node key tracks, held animation steps no longer overshoot, and held time is dropped when the animation changes.
  • UI fast paths: glyph and sprite vertices go straight to the GE. p4_ui_font=1 and p4_ui_sprite=1 are now the defaults (PSP: about +0.6 to 1.2 FPS in a dialogue). Font and calendar preparation is skipped in undrawn ticks.
  • Field hero shadows, as on the PS2: Junes and other fields, a fade, an orthographic projection for parallel cameras, and a camera clear that clears its own texture. The smear is gone.
  • Rain from matrix PTanks. Skin LOD is off because it left holes in far faces.

Stability

  • Saves no longer fail to read on the first try ("too many open files").
  • The data image moved to 0x0902DA00 to make room for port code.

Tools

  • On-device GE frame dump and scene launcher (see below).
  • tools/ppsspp_p4.py: a PPSSPP driver over its JSON debugger. tools/gs_frame.py, tools/psp_clut.py, tools/psp_strips.py, tools/psp_lod.py.

GE frame dump (L + R + SQUARE)

Writes one frame as a PPSSPP GE dump (.ppdmp, format v6) on the PSP itself, so a rendering bug seen on hardware can be stepped through in PPSSPP's GE debugger.

  1. In the scene you want, hold L + R + SQUARE once. The next frame is drawn without pipelining, and the one after it is recorded.
  2. The file is written as ge_NNNN.ppdmp in the game folder (for example ms0:/PSP/GAME/P4/ge_0000.ppdmp). Each press makes a new number.
  3. Copy it to the PC and open it in PPSSPP like a game. Debug → GE debugger steps through the draws.

Notes: memory is read when the frame ends, so data the CPU changed during the frame shows its final state. A VRAM texture that the frame drew into earlier is replayed from the replay's own drawing. Checked in PPSSPP (Dojima residence: 2,833 commands, 1.9 MB, 43 ms to write). It hasn't been run on a PSP yet, so reports are welcome.

Related: L + R + SELECT (hold) freezes the frame on screen. HOME logs the GE state if a frame is stuck.

Scene launcher (L + R + START)

For testing only: it jumps to a field, a dungeon floor, an event, a battle or a calendar day without playing up to it. Load a save first. Requests are refused on the title screen.

  1. Copy tools/scenes.txt next to the EBOOT (ms0:/PSP/GAME/P4/scenes.txt) to get its presets.
  2. In a field or on a floor, hold L + R + START. The game pauses under a text menu with these options:
    • Presets from scenes.txt;
    • Numbers: field FIELD ROOM ENTRY, floor STEP ENTRY (ENTRY 65535 = the floor's default), event ID SUB (E_), battle ENCOUNTER, day MONTH DAY SLOT (SLOT 0-5 = AM_A AM_B PM_A PM_B PM_C PM_D; runs that day's story script);
    • Save this place: adds the current field or floor to scenes.txt.
  3. The request waits until the player stands idle (for up to 60 s). It then runs the game's own script command: CALL_FIELD, CALL_DNG_FLOOR, CALL_EVENT, an encounter, or the game's leftover debug date picker. Events and battles return to the field they started from, and knocked-out members are revived to 1 HP.

Story flags are not changed, so a field shows the state of the loaded save. The numbers for any place are in the log: every scene change writes SCENE now sequence S field F room R step N. The last 30 requests and their results are kept in scene_history.txt.

Over PSPLink, the same requests can be sent from the PC:

python tools/psp_scene.py --base 0x08804000 field 6 1
python tools/psp_scene.py --base 0x08804000 floor 110
python tools/psp_scene.py --base 0x08804000 battle 532
python tools/psp_scene.py --base 0x08804000 day 5 3 0
python tools/psp_scene.py --base 0x08804000 preset "Heaven"
python tools/psp_scene.py --list | history | days 5/3

Known limits

Not a validated playthrough. Heavy scenes are still slow. Experimental screen-size culling can make distant characters appear late. The wider UI checks for the new font and sprite paths (choices, menus, battle UI, Shuffle Time) are still open. See docs/perf_status.md and docs/visual_issues.md.

Persona 4 PSP b249 - source-build Windows utility

Choose a tag to compare

@dreikk91 dreikk91 released this 14 Nov 10:42

Source-build Windows utility for the experimental Persona 4 PSP port, updated from b176 to b249.

  • Includes rendering, animation, strip-cache and guard-result work through b246.
  • Includes the b249 audio/video firmware handoff fix. One long-session title-return test passed on a PSP at 333 MHz; the generated XMB EBOOT still needs separate hardware validation.
  • Screen-size culling is enabled experimentally and can make distant characters appear late.
  • Fixes the initial ELF linker layout so a clean source build keeps the data image at its required address.
  • Documentation now uses relative paths or environment variables, with an automated path check.
  • The compiler and pinned upstream sources are downloaded on first build. The ZIP contains no game EBOOT, retail executable, game objects or converted resources. Supply an original Persona 4 USA ISO.

Extract the whole ZIP, run Prepare P4.exe, select ISO and output, then copy the prepared P4 folder to PSP/GAME/. Remove an old NOSOUND file to re-enable sound when testing the handoff fix. Do not combine launch files from different builds.

Host checks and limitations: see b249 publication checks. This remains a pre-release; a complete playthrough and the full host regression suite are not validated.

PSP toolchain: GCC 15.2.0 for Windows x64

Choose a tag to compare

@dreikk91 dreikk91 released this 10 Nov 07:23

Native Windows x64 build of the official pspdev PSP toolchain. The Persona 4 PSP preparation utility downloads it on the first build and checks its SHA256; you do not need to download it yourself.

Component Version
GCC 15.2.0, pspdev/gcc allegrex-v15.2.0 @ 1a3399792491
binutils 2.44, pspdev/binutils-gdb allegrex-v2.44 @ a8b53fe2b582
PSPSDK pspdev/pspsdk @ 09f02b88b9f3
Target libraries unchanged from the official pspdev release v20260901

GCC and binutils are the same commits as the current official pspdev branches, built with MSYS2 UCRT64 (static). GMP, MPFR, MPC, isl and zstd are linked statically into the compiler.

  • pspdev-windows-x64-gcc15.2.zip: the toolchain. Licence texts are in pspdev/licenses/, versions and configure options in pspdev/BUILDINFO.txt.
  • pspdev-windows-x64-gcc15.2-sources.zip: the corresponding source (GCC, binutils, newlib, pthread-embedded, PSPSDK, pspdev build scripts, MSYS2 source packages of GMP/MPFR/MPC/isl/zstd). See its README.txt.

The build was driven by tools/toolchain/build_windows.sh from SandstoneDev/PS2RC (commit 61d5706), credited here; that script is not redistributed.