Files
AnyPS5/docs/dev/debt/libSceBluetoothHid.md
T
Yunus Shaikh 56047ebb97 fix(libSceBluetoothHid): refuse a null parameter block as the module does
BunnyFl ran firmware 13.42's libSceBluetoothHid natively. A null block
given to sceBluetoothHidParamInitialize returns 0x81540001, so it now
returns InvalidArgument instead of throwing, and the test checks that
answer. The run also shows sceBluetoothHidRegisterCallback reading the
event thread's priority and affinity through the stored value, which
makes it the BluetoothHidThreadParam pointer the signature declares;
the debt entry cites the run and its limits.
2026-10-26 05:35:55 -07:00

1.9 KiB

libSceBluetoothHid technical debt

Silent stubs

  • libSceBluetoothHid: the host still has no device backend or event worker. Registration retains only lifecycle state and never delivers the recovered 104-byte callback events. Custom worker scheduling throws; device ioctl failures and resource exhaustion are not modeled.

Unknown function info

  • sceBluetoothHidGetDeviceName and sceBluetoothHidGetDeviceInfo: output pointers are forwarded to device ioctls without accessing the buffers. Their output sizes and layouts remain unresolved. Report APIs use 64-bit device handles; device-info and disconnect APIs use 32-bit device IDs.
  • sceBluetoothHidParamInitialize follows firmware 13.42's module as BunnyFl ran it natively (comment; not a console, and neither the kernel side of /dev/bt nor the event thread's work is covered): it writes its second argument at offset 0 of the 16-byte block, clears the 32-bit word at offset 8, leaves bytes 12 to 15 and returns 0, and a null block returns 0x81540001. SharpProspero types that argument as a 64-bit value; it is the address of a BluetoothHidThreadParam, since sceBluetoothHidRegisterCallback reads the event thread's priority and affinity through it. The same run covers sceBluetoothHidThreadParamInitialize, still unimplemented here
  • sceBluetoothHidDebugGetVersion: returns a constant without reading arguments, so the supplied implementation does not establish whether the public prototype has unused parameters.