Commit Graph

1810 Commits

Author SHA1 Message Date
Chad 0cb5ca7203 fix(libs): take the AMM submit checks from ampr_emu
The AMM submit forms now return EINVAL for a priority above 2 and EPERM
for a null command buffer, in that order, as ampr_emu's
amm_validate_submit_args does, instead of EINVAL for a null buffer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:41:49 -05:00
Chad c16e59bfd5 feat(libs): implement the AMM map, map direct and unmap commands and the APR map region
libSceAmpr gains the AMM command buffer (constructor, destructor, map,
map direct and unmap, with their GPU mask forms and measures),
sceAmprAmmGiveDirectMemory, sceAmprAmmGetVirtualAddressRanges, the three
submit forms and sceAmprAmmWaitCommandBufferCompletion. The APR
MapBegin, MapDirectBegin and MapEnd commands and their measures record
the same map commands.

The libkernel executor now maps: a plain map takes pages from the direct
memory given to the mapper with usage 1, a direct map uses the given
offset, and an unmap returns the pages to that pool and leaves the range
reserved. The AMM ranges are reserved in the guest arena on first use.
Commands are walked by the buffer's byte offset so an AMM submission can
run raw command memory.

Signatures, the protection mask and the APR map rules follow ampr_emu;
the mapper model follows PS5PCEM. While an APR map region is open, a
second begin and every completion write return EPERM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:29:33 -05:00
Chad 4b336335a8 feat(libs): implement the APR gather and scatter reads
sceAmprAprCommandBufferReadFileGather, ReadFileScatter,
ReadFileGatherScatter and ResetGatherScatterState, with their measure
functions. Signatures, argument checks and the read cursor follow
ampr_emu: each read leaves the file, the next offset and the next
destination; a gather reads at a new offset into the next destination, a
scatter continues in the file into a new destination, and a
gather-scatter takes both. Recording one needs a file read since the last
reset, tracked in the command buffer object next to its type.

sceAmprAprCommandBufferReadFile now applies the same length, offset and
destination checks and rejects a null command buffer instead of
dereferencing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:12:34 -05:00
Chad 636fb5edae feat(libs): implement the AMPR 04_00 counter commands and the construct helpers
sceAmprCommandBufferWaitOnCounter_04_00 and WriteCounter_04_00 take the
counter access size and offset, the wait mask and the write operation,
with their measure functions; ConstructNop records a nop with an optional
leading word and a payload of up to 60 bytes, and ConstructMarker records
the set, push and pop markers by type. Signatures and checks follow
ampr_emu.

The executor now reads and writes counters by access: the 8-byte access
of counter n spans n and n + 1, the 2- and 1-byte accesses a half or a
byte of the counter. Waits compare at the access width, so the signed and
wrapped compares see the field's own sign bit, and the atomic writes wrap
within the field. The legacy counter commands record a 4-byte access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:02:30 -05:00
Chad c3ab220e45 Merge remote-tracking branch 'upstream/main' into feat/ampr-nop-04-writes
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-05 14:46:31 -05:00
Dean 681f83e51e
Merge pull request #713 from adriadam10/feat/savedata-ps4-transfer
feat(savedata): implement the PS4 transfer mount and directory search
2026-10-06 08:14:26 +13:00
Dean a2da600645
Merge pull request #712 from adriadam10/feat/share-capture-screenshot-extended
feat(libSceShare): sceShareCaptureScreenshotExtended
2026-10-06 08:13:44 +13:00
Dean 7d6afbc4d9
Merge pull request #711 from adriadam10/feat/playgodialog-getstatus
feat(libs): implement scePlayGoDialogGetStatus
2026-10-06 08:13:01 +13:00
Dean d66925cd5f
Merge pull request #708 from adriadam10/feat/http-inflate-gzip
feat(http): name sceHttpSetInflateGZIPEnabled and sceHttpSetRequestStatusCallback
2026-10-06 08:12:50 +13:00
Dean 949de6665b
Merge pull request #707 from adriadam10/feat/ulobjmgr-register
feat(ulobjmgr): register and unregister object
2026-10-06 08:12:08 +13:00
Dean 74dda5d30a
Merge pull request #703 from adriadam10/feat/nptrophy2-unregister-unlock-callback
feat(libs): implement sceNpTrophy2UnregisterUnlockCallback
2026-10-06 08:11:26 +13:00
Dean 369605bf70
Merge pull request #681 from Raghav314/fix/ajm-batch-wait-release
fix(ajm): release a batch when sceAjmBatchWait returns
2026-10-06 08:10:44 +13:00
Dean 1c2ccd838c
Merge pull request #655 from NumberGuan/codex/fix-rtc-rfc3339-offsets
fix(rtc): reject invalid RFC 3339 formatting offsets
2026-10-06 08:10:00 +13:00
Dean 170ef4a28f
Merge pull request #649 from Celegans12/feat/audioout2-3d-latency
feat(audioout): implement sceAudioOut2Set3DLatency and accept sceAudioOut2MasteringInit(0)
2026-10-06 08:09:17 +13:00
Dean d99194f6e9
Merge pull request #645 from Celegans12/feat/voiceqos-exports
feat(voiceqos): declare the missing libSceVoiceQoS exports
2026-10-06 08:08:34 +13:00
Dean fa9b2ed0ba
Merge pull request #643 from Celegans12/feat/msgdialog-native-close
feat(msgdialog): implement sceMsgDialogClose in libSceMsgDialog.native
2026-10-06 08:07:51 +13:00
Dean 4b0c38f0e4
Merge pull request #642 from Celegans12/feat/http-parse-status-line
feat(http): implement sceHttpParseStatusLine
2026-10-06 08:07:07 +13:00
Dean 20be619dce
Merge pull request #640 from Celegans12/feat/systemservice-param-get-string
feat(systemservice): implement sceSystemServiceParamGetString
2026-10-06 08:06:55 +13:00
Dean 0bc7ea5cfe
Merge pull request #635 from Celegans12/feat/np-session-signaling-offline-prepare
feat(npsessionsignaling): implement offline RequestPrepare and GetLocalNetInfo
2026-10-06 08:06:43 +13:00
Dean de82e335a3
Merge pull request #634 from Celegans12/feat/np-commerce-icon-layout
feat(npcommerce): implement sceNpCommerceSetPsStoreIconLayout
2026-10-06 08:06:01 +13:00
Dean 3e5558dd43
Merge pull request #632 from Celegans12/feat/razorcpu-markers
feat(razor): implement sceRazorCpuPushMarkerStatic and sceRazorCpuPopMarker
2026-10-06 08:05:19 +13:00
Dean 974c3fa1b5
Merge pull request #652 from Celegans12/fix/guest-arena-app-map-area
fix(libc): reach the application map area end with the guest arena
2026-10-06 08:04:36 +13:00
Dean 25c4a9460d
Merge pull request #650 from Celegans12/fix/windows-direct-memory-commit
fix(libkernel): state the size of a direct memory backing Windows cannot create
2026-10-06 08:03:53 +13:00
Dean 78c17a1d47
Merge pull request #661 from NumberGuan/codex/fix-metadata-download-size
fix(libkernel): preserve 64-bit metadata download sizes
2026-10-06 08:03:11 +13:00
Dean e8893dfc64
Merge pull request #633 from Celegans12/feat/kernel-sync-on-address-wait-sized
feat(libkernel): implement sceKernelSyncOnAddressWait32 and sceKernelSyncOnAddressWait64
2026-10-06 08:02:29 +13:00
Dean 66db1930c7
Merge pull request #729 from adriadam10/feat/libc-fdtest-finf-fnan
feat(libc): implement _FDtest, _FInf and _FNan
2026-10-06 08:02:17 +13:00
Dean 17da563b25
Merge pull request #720 from adriadam10/feat/libkernel-unimplemented-names
fix(libkernel): name three Unimplemented stubs from their NIDs
2026-10-06 08:01:33 +13:00
Dean 6a0159cc80
Merge pull request #719 from adriadam10/feat/libkernel-coredump-names
fix(libkernel): name five sceCoredump stubs from their NIDs
2026-10-06 08:00:51 +13:00
Dean 7c0528a8f3
Merge pull request #718 from adriadam10/feat/libc-div
feat(libc): implement div
2026-10-06 08:00:09 +13:00
Dean 4520e2b664
Merge pull request #715 from adriadam10/feat/libc-cyber-unknown-names
feat(libc): implement std::_Xrange_error and the range_error type
2026-10-06 07:59:26 +13:00
Dean 823e01e3c1
Merge pull request #706 from adriadam10/feat/libc-strtoimax-logbf
feat(libc): strtoimax and logbf
2026-10-06 07:58:43 +13:00
Dean af96cadf77
Merge pull request #701 from adriadam10/tools/progress-function-try
fix(tools): count function-try-block exports in progress.py
2026-10-06 07:58:01 +13:00
Dean 7580b9e44c
Merge pull request #679 from Celegans12/fix/relinker-windows-low-entropy-stacks
fix(relinker): keep Windows startup stacks below the guest arena
2026-10-06 07:57:17 +13:00
Dean cd79926080
Merge pull request #671 from NahuelGenchi/docs/fma-legacy-fused-assumption
docs: record the fused assumption of v_fma_legacy_f32 in TechnicalDebt
2026-10-06 07:56:35 +13:00
Dean cd8b6f3fcb
Merge pull request #662 from NumberGuan/codex/fix-autorun-exit-status
fix(relinker): decode autorun exit status for the host
2026-10-06 07:56:24 +13:00
Dean 69619c4a66
Merge pull request #657 from NumberGuan/codex/fix-strdup-allocation-failure
fix(libc): return null when strdup allocation fails
2026-10-06 07:55:41 +13:00
Dean 7058a4ce6c
Merge pull request #656 from NumberGuan/codex/fix-relinker-alignment
fix(relinker): reject invalid and overflowing alignment
2026-10-06 07:54:58 +13:00
Dean eabf1418de
Merge pull request #647 from Celegans12/feat/videoout-strict-colorimetry
feat(videoout): accept the STRICT_COLORIMETRY buffer option
2026-10-06 07:54:15 +13:00
Dean 3c681d5199
Merge pull request #670 from NahuelGenchi/feat/global-atomic-csub
feat(shader): implement global_atomic_csub
2026-10-06 07:54:05 +13:00
Dean d5b7fbc127
Merge pull request #660 from Celegans12/feat/agc-dpp16-row-share
feat(shader): implement the DPP16 row_share controls
2026-10-06 07:53:22 +13:00
Dean 7df0923570
Merge pull request #659 from Celegans12/feat/agc-image-atomics-32bit-formats
feat(agc): implement image atomics on 32_SINT and 32_FLOAT surfaces
2026-10-06 07:52:39 +13:00
Dean bbc6f42881
Merge pull request #667 from adriadam10/test/image-atomics-bitwise
test(shader): cover the bitwise and unsigned image atomics
2026-10-06 07:51:54 +13:00
Dean a509d519a1
Merge pull request #689 from adriadam10/test/flat-global-loads-ci-time
test(shader): split the flat and global loads test to keep it within CI's time limit
2026-10-06 07:51:41 +13:00
Dean 7b1d7cc78a
Merge pull request #688 from adriadam10/test/global-atomics-ci-time
test(shader): split the global atomics test to keep it within CI's time limit
2026-10-06 07:50:59 +13:00
Dean 18f1548703
Merge pull request #678 from Celegans12/feat/agc-clip-cntl-dx-linear-attr
feat(agc): accept linear attribute clipping in PA_CL_CLIP_CNTL
2026-10-06 07:50:16 +13:00
Dean 0a081cbe8c
Merge pull request #673 from Celegans12/feat/agc-pm4-cond-exec
feat(agc): implement COND_EXEC
2026-10-06 07:49:33 +13:00
Dean 5e68f0ad09
Merge pull request #654 from Celegans12/feat/agc-write-data-cache-policy
feat(agc): accept the WRITE_DATA cache policy
2026-10-06 07:48:51 +13:00
Dean 75aa7f2197
Merge pull request #651 from Celegans12/feat/agc-interpolant-mapping-f16-high
feat(agc): implement the interpolant mapping variant for high-half f16 inputs
2026-10-06 07:48:08 +13:00
Dean d9162684ee
Merge pull request #646 from Celegans12/fix/agc-get-is-trinity-mode
fix(agc): store sceAgcGetIsTrinityMode's flag through its out pointer
2026-10-06 07:47:55 +13:00
Dean a974aebf92
Merge pull request #728 from adriadam10/feat/agcdriver-submit-validation-names
fix(agcdriver): name the four SubmitValidation stubs from their NIDs
2026-10-06 07:47:13 +13:00