sharpemu/tests/SharpEmu.Libs.Tests
Foued Attar 4b8d45520e
[HLE] Fix AJM/ACM no-op stubs and accept Gen5 AudioOut2 mastering/batch calls (#807)
AjmModuleUnregister/AjmFinalize were pure no-ops (always returned success
without touching state); they now validate the context and actually remove
the codec registration / context entry, returning a real error when the
context is unknown. AjmModuleUnregister traces whether the codec was
actually registered, to help spot a title unregistering something it never
registered.

MaxCodecType was hardcoded to 25 based on known Sony codec ids, incorrectly
rejecting valid Gen5 codec types (e.g. 24). Registration is pure bookkeeping
(HashSet.Add); the only real constraint is that codecType must not overflow
the 32-bit instanceId it gets packed into, i.e. codecType < 2^18. Named the
instanceId bit-packing constants (InstanceIdSlotBits/InstanceIdSlotMask) so
the four call sites that used to hardcode 14/0x3FFF independently can't
drift out of sync, and MaxCodecType's formula is self-evident.

Accept sceAcmBatchInitialize/InitializeLite/Start/StartMultiple/Process as
successful no-ops -- the emulator runs no ACM DSP jobs, but Scream's workers
trap on int 0x41/0x42 asserts whenever a submission call reports failure.

Accept sceAudioOut2MasteringInit/Set3DLatency as no-ops -- the host mixer
has no mastering/object pipeline to tune, but returning failure makes
titles tear down their whole ACM context and abort audio arena bring-up.

Tested on Ghost of Yotei (PPSA26344): sceAudioOut2MasteringInit/Set3DLatency
unresolved-import warnings go from 2 to 0, unblocking 5 audio-related guest
threads that never spawned before (MovieDecoder, snd_stream_parsing_thread,
snd_stream_reader_thread, Psn, NCA::PumpThread), watchdog stall errors from
1 to 0. This alone gets the title past its Scream audio-init stall into
further boot, but it still hits an unrelated infinite retry loop in
sceVideoOutGetFlipStatus shortly after -- fixed by the separate
videoout-agc-hle-misc change; combined, the title renders and presents a
real GPU frame.

Regression-checked on Demon's Souls, Astro Bot, Outer Wilds, Cult of the
Lamb, Ghost of Tsushima, GTA, Minecraft, Quake: 0 calls to any export
touched by this change on any of them, byte-for-byte identical to
upstream/main.
2026-08-09 18:52:15 +03:00
..
Agc AGC: correct GS program registers, stop dropping rect-list draws, add a missing size export (#734) 2026-08-01 17:30:02 +03:00
Ampr Ampr: fix path case on Linux (#750) 2026-08-03 00:36:00 +03:00
Audio [HLE] Fix AJM/ACM no-op stubs and accept Gen5 AudioOut2 mastering/batch calls (#807) 2026-08-09 18:52:15 +03:00
AvPlayer Merge media decoding into one FFmpeg bridge (#706) 2026-07-31 01:31:14 +03:00
Cpu cpu: recover SSE4a EXTRQ/INSERTQ faults on Linux (#482) 2026-07-21 14:18:21 +03:00
Fiber test: add Fiber exports contract tests (13 tests) (#428) 2026-07-19 13:53:33 +03:00
Font [Font] Implement sceFontGetVerticalLayout (#492) 2026-07-21 18:18:16 +03:00
GUI [GUI] Add grid settings to GUI and implement grid snapping (#729) 2026-07-31 13:27:43 +03:00
HLE Prevent invalid SaveData writes from damaging guest memory (#444) 2026-07-19 20:27:17 +03:00
Json [SourceGenerators] Compile-time SysAbi export registry, analyzers, and build-generated aerolib.bin (#204) 2026-07-16 00:00:32 +03:00
Kernel Kernel: correct equeue event delivery and waiter lifetime (#723) 2026-07-31 12:13:15 +03:00
LibcInternal Add libc heap trace contract tests (#409) 2026-07-19 03:25:42 +03:00
Loader test: add Kernel/Loader unit tests (22 tests) (#373) 2026-07-18 20:19:55 +03:00
Logging Reject undefined numeric LogLevel values (#390) 2026-07-18 15:47:19 +03:00
Media Merge media decoding into one FFmpeg bridge (#706) 2026-07-31 01:31:14 +03:00
Memory [Memory/Kernel] Fix Windows allocation-granularity and mutex-resolution bugs (#748) 2026-08-03 00:15:42 +03:00
Network Fix sceNetHtonl/Htons/Ntohl/Ntohs discarding their converted result (#211) 2026-07-16 16:24:34 +03:00
Pad Pad: implement scePadGetTriggerEffectState under its own NID (#712) 2026-07-31 12:09:24 +03:00
PlayGo [PlayGo] Reject authoritative unknown chunk loci (#242) 2026-07-16 19:22:33 +03:00
Pthread Sdl backend (#670) 2026-07-28 03:33:26 +03:00
Random [HLE] Add RandomExports HLE (#413) 2026-07-18 23:44:57 +03:00
Remoteplay fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
Rtc Fix sceRtcConvertLocalTimeToUtc failing on non-UTC hosts (#210) 2026-07-16 00:04:35 +03:00
SaveData Prevent invalid SaveData writes from damaging guest memory (#444) 2026-07-19 20:27:17 +03:00
ShaderCompiler [ShaderCompiler] Fix VReadlane scalar destination field (#344) 2026-07-18 02:41:07 +03:00
SystemService unstub: preserve notice screen skip flag (#559) 2026-07-23 12:32:49 +03:00
Tls [AGC/Vulkan] Extend PS5 runtime and rendering compatibility (#216) 2026-07-16 02:02:34 +03:00
VideoOut Fix Vulkan presenter synchronization and frame handling issues (#747) 2026-08-03 00:36:33 +03:00
AerolibCatalogTests.cs [SourceGenerators] Compile-time SysAbi export registry, analyzers, and build-generated aerolib.bin (#204) 2026-07-16 00:00:32 +03:00
FakeCpuMemory.cs fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
SaveDataStorageTests.cs Sdl backend (#670) 2026-07-28 03:33:26 +03:00
SharpEmu.Libs.Tests.csproj Gui Settings Null list Entries (#430) 2026-07-19 13:53:56 +03:00
Sse4aExtrqBlendPatchTests.cs [Gpu] Metal backend: complete IGuestGpuBackend implementation on AppKit + Metal (#283) 2026-07-18 20:32:00 +03:00
SysAbiRegistryTests.cs [SourceGenerators] Compile-time SysAbi export registry, analyzers, and build-generated aerolib.bin (#204) 2026-07-16 00:00:32 +03:00