Files
Mihawk 9844f9bc45 Add native FBNeo with verified colours and bounded catalogue storage
Build the pinned full core with the existing native SDK/import pipeline and
upstream metadata. Preserve native XRGB8888 and convert RGB565 callbacks for
the frontend's RGBA Vulkan upload. Adapt decoder bounds handling without
unwinding, keep metadata storage owned, and bulk-allocate the driver catalogue
to avoid exhausting the native heap. Leave PS5_Vulkan and existing cores intact.

Verification: bash tools/verify.sh (format, unit, build, integration, evidence;
63 tests); bash tools/run-title.sh --no-build --core-test=fbneo --watch 240.
Eight loader cycles and failed-load recovery pass. Both 16/32-bit games and
menu/next-game transitions passed owner confirmation: "Works flawlessly!"
Zero GPU refusals/API failures, kernel fatal signals or audio backend errors;
frontend/native Quit returned zero. Optional serialization hint #87 remains
unsupported. Record both resolved failed runs and the final acceptance.

Evidence: evidence/fbneo-native/{capture,expectation,build,abi,loader,recovery}.json
Replay: bash tools/verify.sh evidence
Frontend: 41cb59a98907d3c382fa7c6c2282e64740a2d079364fd7f231dd0ddef7a2ca10
Core: 0e4231a238af2e5cc2630568abcaec2d3fe5356d647ec87ab9d9c13e8da66e44
2026-09-19 17:05:53 -04:00

27 lines
985 B
C

/* FBNeo 16-bit drivers retain RGB565 internally; frontend receives XRGB8888. */
#ifndef PS5_FBNEO_VIDEO_H
#define PS5_FBNEO_VIDEO_H
#include <stddef.h>
#include <stdint.h>
static inline uint32_t ps5_fbneo_xrgb(uint16_t pixel)
{
const uint32_t r = pixel >> 11, g = (pixel >> 5) & 63u, b = pixel & 31u;
return (((r << 3) | (r >> 2)) << 16) | (((g << 2) | (g >> 4)) << 8) |
(b << 3) | (b >> 2);
}
static inline bool ps5_fbneo_frame(uint32_t *output, size_t capacity,
const uint16_t *input, size_t pitch,
unsigned width, unsigned height)
{
if (!width || !height || width > capacity / height || pitch % sizeof(uint16_t) ||
pitch / sizeof(uint16_t) < width)
return false;
for (unsigned y = 0; y < height; ++y)
for (unsigned x = 0; x < width; ++x)
output[(size_t)y * width + x] = ps5_fbneo_xrgb(input[(size_t)y * (pitch / 2) + x]);
return true;
}
#endif