AJM: decoding codec 23 is not implemented (Broken Sword - Shadow of the Templars: Reforged, PPSA21480) #6671

Closed
opened 2026-10-16 03:38:15 +00:00 by xXPBSXx · 3 comments
xXPBSXx commented 2026-10-16 03:38:15 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-16T03:38:15Z.


Broken Sword - Shadow of the Templars: Reforged (PPSA21480) now stops at the AJM decoder: on main 31cbb55d7 + #6236 (the PlayGo setting does not matter for this title), Windows 10, RTX 4080 SUPER, 300 s run without input, PPSA21480_rZ1/run_233643.err lines 5-9:

[SAVEDATA:native] mount3 user=268435456 dir=BS1RSaves mode=0x21 blocks=100 -> 0x00000000 point=/savedata0 status=1
[libc] unhandled exception 'St13runtime_error' thrown from 00007ffc6734935a
terminate called after throwing an instance of 'std::runtime_error'
  what():  AJM: decoding codec 23 is not implemented
FATAL: abort() (SIGABRT) on thread 34340

The earlier stop of this title, sceCoredumpWriteUserString not implemented, is gone since #5834 was merged, so this is the next stop. I did not find an open issue or pull request for codec 23 (a search for AJM finds #6040, #6051 and #6299, which deal with Opus gapless resets, decoder handles across ID wrap and exported firmware batch interfaces). I do not know which codec the id 23 is or what the title decodes; I have no source for that, and I do not propose an implementation. Not tested: other GPUs, Linux, a run with the picture checked.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5877893635 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6671). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-16T03:38:15Z. --- Broken Sword - Shadow of the Templars: Reforged (PPSA21480) now stops at the AJM decoder: on `main` `31cbb55d7` + #6236 (the PlayGo setting does not matter for this title), Windows 10, RTX 4080 SUPER, 300 s run without input, `PPSA21480_rZ1/run_233643.err` lines 5-9: ``` [SAVEDATA:native] mount3 user=268435456 dir=BS1RSaves mode=0x21 blocks=100 -> 0x00000000 point=/savedata0 status=1 [libc] unhandled exception 'St13runtime_error' thrown from 00007ffc6734935a terminate called after throwing an instance of 'std::runtime_error' what(): AJM: decoding codec 23 is not implemented FATAL: abort() (SIGABRT) on thread 34340 ``` The earlier stop of this title, `sceCoredumpWriteUserString` not implemented, is gone since #5834 was merged, so this is the next stop. I did not find an open issue or pull request for `codec 23` (a search for AJM finds #6040, #6051 and #6299, which deal with Opus gapless resets, decoder handles across ID wrap and exported firmware batch interfaces). I do not know which codec the id 23 is or what the title decodes; I have no source for that, and I do not propose an implementation. Not tested: other GPUs, Linux, a run with the picture checked. AI-assisted (Claude Code).
MarcZX10 commented 2026-10-16 03:43:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T03:43:10Z.


I checked the current AJM dispatch: sceAjmInstanceCreate logs the numeric codec when APS5_TRACE_AJM=1, and the run path explicitly supports codecs 0, 1, 2 and 24; codec 23 currently reaches the unsupported-codec throw. Before implementing it, could you capture a rerun with APS5_TRACE_AJM=1 and share the instance-create/run lines (including flags and initialization/config bytes) immediately before the abort, plus any evidence identifying the stream format? That should help distinguish a genuinely unsupported codec from an unexpected ID or setup path. I have not inferred codec 23's format from its number.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6207582195 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6671#issuecomment-6207582195). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T03:43:10Z. --- I checked the current AJM dispatch: `sceAjmInstanceCreate` logs the numeric codec when `APS5_TRACE_AJM=1`, and the run path explicitly supports codecs 0, 1, 2 and 24; codec 23 currently reaches the unsupported-codec throw. Before implementing it, could you capture a rerun with `APS5_TRACE_AJM=1` and share the instance-create/run lines (including flags and initialization/config bytes) immediately before the abort, plus any evidence identifying the stream format? That should help distinguish a genuinely unsupported codec from an unexpected ID or setup path. I have not inferred codec 23's format from its number.
MarcZX10 commented 2026-10-16 04:53:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T04:53:42Z.


One public reference may help interpret the trace: shadPS4’s PS4 AJM header declares AjmCodecType::Max = 23 rather than a decoder at ID 23 (see ajm.h, and its instance switch has no case 23). This is only a PS4 reference; AnyPS5 already supports PS5 codec 24, which that PS4 implementation does not list, so it does not establish that codec 23 is invalid on PS5. The runtime APS5_TRACE_AJM=1 instance/run arguments and stream identification are still needed before choosing an implementation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6208370924 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6671#issuecomment-6208370924). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T04:53:42Z. --- One public reference may help interpret the trace: shadPS4’s PS4 AJM header declares `AjmCodecType::Max = 23` rather than a decoder at ID 23 (see [`ajm.h`](https://github.com/shadps4-emu/shadPS4/blob/5aa7ffa3f4f21bba827d7865ed8f69f98f993542/src/core/libraries/ajm/ajm.h#L19-L25), and its instance switch has no case 23). This is only a PS4 reference; AnyPS5 already supports PS5 codec 24, which that PS4 implementation does not list, so it does not establish that codec 23 is invalid on PS5. The runtime `APS5_TRACE_AJM=1` instance/run arguments and stream identification are still needed before choosing an implementation.
MarcZX10 commented 2026-10-16 09:37:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T09:37:30Z.


I checked #6721 as a potentially related AJM change. It adds ATRAC9 vibration channel configurations (indices 6/7) under the existing ATRAC9 codec path; it does not add or identify codec ID 23. The APS5_TRACE_AJM=1 instance/run details and stream identification requested above are still needed before choosing a codec-23 implementation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6212618682 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6671#issuecomment-6212618682). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T09:37:30Z. --- I checked #6721 as a potentially related AJM change. It adds ATRAC9 vibration channel configurations (indices 6/7) under the existing ATRAC9 codec path; it does not add or identify codec ID 23. The `APS5_TRACE_AJM=1` instance/run details and stream identification requested above are still needed before choosing a codec-23 implementation.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#6671
No description provided.