Files
AnyPS5/docs/dev/debt/changes/docs-libscecamera-pointer-args-before-open.md

13 lines
3.9 KiB
Markdown

# libSceCamera
## change [sceCameraGetWhiteBalance and sceCameraGetAutoExposureGain]
- [sceCameraGetWhiteBalance and sceCameraGetAutoExposureGain](../../../core/libs/prx/libSceCamera/src/Attributes.cpp) (libSceCamera) - returning SCE_CAMERA_ERROR_PARAM for an unwritable output pointer is a host-safety fallback; whether the console faults or returns an argument error on unmapped memory is unmeasured. Before any `sceCameraOpen` on a PS5 (firmware 11.60, payload process; a title process may differ) the console answered `0x802e0000` for the handles -1 and 0 with an own buffer, with NULL and with the unmapped pointer `0x10` (handle -1), left the buffer unchanged and logged `invalid handle`, so the handle check answers first and the question for an unmapped pointer stays open (one run; the registers after the handle were assumed to hold the pointers).
## change [sceCameraGetWhiteBalance]
- [sceCameraGetWhiteBalance](../../../core/libs/prx/libSceCamera/src/Attributes.cpp) (libSceCamera) - returning SCE_CAMERA_ERROR_PARAM for an unwritable output pointer is a host-safety fallback; whether the console faults or returns an argument error on unmapped memory is unmeasured. Before any `sceCameraOpen` on a PS5 (firmware 11.60, payload process; a title process may differ) the console answered `0x802e0000` for the handles -1 and 0 with an own buffer, with NULL and with the unmapped pointer `0x10` (handle -1), left the buffer unchanged and logged `invalid handle`, so the handle check answers first and the question for an unmapped pointer stays open (one run; the registers after the handle were assumed to hold the pointers).
## change [sceCameraGetDeviceConfig]
- [sceCameraGetDeviceConfig](../../../core/libs/prx/libSceCamera/src/Config.cpp) (libSceCamera) - returning SCE_CAMERA_ERROR_PARAM for an unwritable output pointer is a host-safety fallback; whether the console faults or returns an argument error on unmapped memory is unmeasured. Before any `sceCameraOpen` on a PS5 (firmware 11.60, payload process; a title process may differ) the console answered `0x802e0000` for the handles -1 and 0 with an own buffer, with NULL and with the unmapped pointer `0x10` (handle -1), left the buffer unchanged and logged `invalid handle`, so the handle check answers first and the question for an unmapped pointer stays open (one run; the registers after the handle were assumed to hold the pointers).
## change [sceCameraGetConfig, sceCameraSetConfig and sceCameraSetConfigInternal]
- [sceCameraGetConfig, sceCameraSetConfig and sceCameraSetConfigInternal](../../../core/libs/prx/libSceCamera/src/Config.cpp) (libSceCamera) - returning SCE_CAMERA_ERROR_PARAM for an unwritable output or unreadable configuration pointer is a host-safety fallback; whether the console faults or returns an argument error on unmapped memory is unmeasured. Before any `sceCameraOpen` on a PS5 (firmware 11.60, payload process; a title process may differ) the console answered `0x802e0000` for sceCameraGetConfig with the handles -1 and 0 and sceCameraSetConfig with the handle -1 (an own buffer, NULL and `0x10`), left the buffer unchanged and logged `invalid handle`; `sceCameraSetConfigInternal` was not called. The handle check answers first, so the question for an unmapped pointer stays open (one run; the registers after the handle were assumed to hold the pointers).
## change [sceCameraGetDeviceConfigWithoutHandle]
- [sceCameraGetDeviceConfigWithoutHandle](../../../core/libs/prx/libSceCamera/src/Config.cpp) (libSceCamera) - returning SCE_CAMERA_ERROR_PARAM for an unwritable output pointer is a host-safety fallback; whether the console faults or returns an argument error on unmapped memory is unmeasured. On a PS5 (firmware 11.60, payload process; a title process may differ) the console answered `0x802e0000` for an own 256-byte buffer in all four argument registers and left the buffer unchanged (one run); NULL and an unmapped pointer were not tried, so the question stays open.