Commit Graph
10 Commits
Author SHA1 Message Date
akkadbakkad89andDevin fe6cd4504f fix(libSceFont): correct drawup option1, sealed error path, and pool return
Firmware 4.03 re-disassembly of the drawup bodies fixes three
transliteration errors:

- Option1Flags[1] is 0x3000, not 0x2000: the option1 jump table at
  0x37fcc routes index 1 to case code that ors 0x2000 then falls into
  or 0x1000.
- Sealed paths run the shared error epilogue (store at frame+4 and
  invoke the registered callback), like every other error path; use
  DrawupRecordError instead of a bare return.
- DrawupPoolAllocate returns memory + completingNodeIndex*slotSize
  (0x1bcc0 marks slots start..start+count but returns the node whose
  span finished the run), not the run's first slot.

The 13.42 emulator report matches on all three; its callback
suppression and +0x20 pool entries are firmware differences, not
deviations here.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-01 04:16:05 +01:00
akkadbakkad89andDevin e215d6f0e0 fix(libSceFont): make drawup color packing use cvttss2si semantics
DrawupPackColor converted channel floats with static_cast<int32_t>,
which is undefined for NaN — the same input DrawupColorValid admits.
The firmware bodies pack with vcvttss2si into 64-bit registers, whose
invalid-conversion result is 0x8000000000000000; the low dword the
packing ORs in is 0, so an unrepresentable channel contributes a zero
byte. Implement the conversion explicitly: in-range values truncate
through int64_t, everything else contributes 0. The FlatColor NaN
regression now checks the firmware-faithful packed word (0x00000000
instead of the int32-indefinite 0x80000000 the old codegen happened to
emit). Verified under -fsanitize=float-cast-overflow
-fno-sanitize-recover on Linux: clean run, test passes.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-01 04:16:05 +01:00
akkadbakkad89 b258d8ed3a feat(libSceFont): implement drawup flat color and gradient record producers 2026-11-01 04:16:04 +01:00
akkadbakkad89andDevin 3f90ab8e0b fix(libSceFont): correct drawup option1, sealed error path, and pool return
Firmware 4.03 re-disassembly of the drawup bodies fixes three
transliteration errors:

- Option1Flags[1] is 0x3000, not 0x2000: the option1 jump table at
  0x37fcc routes index 1 to case code that ors 0x2000 then falls into
  or 0x1000.
- Sealed paths run the shared error epilogue (store at frame+4 and
  invoke the registered callback), like every other error path; use
  DrawupRecordError instead of a bare return.
- DrawupPoolAllocate returns memory + completingNodeIndex*slotSize
  (0x1bcc0 marks slots start..start+count but returns the node whose
  span finished the run), not the run's first slot.

The 13.42 emulator report matches on all three; its callback
suppression and +0x20 pool entries are firmware differences, not
deviations here.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-31 16:33:04 +00:00
akkadbakkad89 74948cef4c fix(libSceFont): guard drawup pool scan index and size test descriptor 2026-10-31 14:21:02 +05:30
akkadbakkad89 23527403a5 feat(libSceFont): implement drawup texture image/pattern record producers
Firmware 4.03 bodies at 0x20cb0 (image) and 0x20f50 (pattern) recovered:
frame magic/sticky/parameter checks with error store at +4 and hook,
record-pool u16 free-run allocation under the pool mutex, 0x80 record
header (type 0x40/0x50, sequence, payload at +0x80), descriptor memcpy
of mode bytes, and same-sequence queue append bumping frame+0x28.
libSceFont links libkernel for scePthreadMutexLock/Unlock; guest test
covers validation, record bytes, queue order and the allocator.
2026-10-31 13:05:37 +05:30
akkadbakkad89 d9a6517b6f fix(libSceFont): correct DrawupFillTexturePatternObject ABI
Firmware 4.03 body at 0x20f50 takes ten integer arguments with the\noutput pointer last - the PPSA20397 libSceFontGsm.prx caller rotates\nsix registers and pushes four stack arguments, no float registers.\nUpdate the declaration, stub and signature assertion, and record the\nverified offsets and record/queue semantics in the debt file.
2026-10-31 12:45:22 +05:30
hyvvs facc4e8781 fix(libSceFont): restore drawup texture argument ABI 2026-10-29 02:22:40 +01:00
hypermistandClaude Opus 5.5 9539761192 refactor(libSceFont): declare sceFontSetGraphicsErrorCallback in the library header
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 12:06:11 +13:00
hypermistandClaude Opus 5.5 6116b70b04 feat(libSceFont): build the graphics region and fill descriptors as the console does
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 22:57:00 +13:00