libretroadmin c7810dd7f1 graphics: integerize NGPC dark-filter palette precompute
The dark-filter palette LUT precompute (palette_init16, dark_filter_level > 0)
used a float normalize->darken->rescale roundtrip for what is an integer
4-bit-per-gun color system. The float was confined to this cosmetic,
non-hardware filter and never touched a per-pixel path, but it made the
generated palette non-reproducible across compilers/ABIs (rounding order,
FMA contraction) and pulled FP into a precompute that has no need of it.

Replace darken_rgb() with darken_channel(), an exact-rational round-half-up
form in Q14 fixed point (BT.601 weights 4899/9617/1868, sum == 1<<14). The
[0,1] normalize and *15 rescale cancel algebraically, so the per-channel
result is round(c * (1 - (level/100)*lumasum/((1<<14)*15))) with the
dark_factor<0 clamp preserved as an early-out to black.

Empirically swept against the prior float path over all 100*16*16*16
(level,r,g,b) combinations: 65 of 1,228,800 outputs differ, all by <=1 on a
4-bit gun. Each disagreement is a half-LSB straddle where float32
accumulation lands just under x.5 (e.g. green 14.49995 at level 5, color
4,15,0); the exact-rational form is the more correct result there. All
intermediates fit signed 32-bit (max 737,280,000), so MSVC C89 safe with no
64-bit dependency. objdump confirms zero FP instructions in palette_init16.
2026-06-29 20:28:11 +02:00
2024-10-21 14:44:39 -07:00
2022-07-25 23:37:47 +02:00
2026-06-15 19:46:25 +02:00
2019-12-30 01:56:58 +08:00
2026-04-02 15:48:21 +01:00
2026-06-15 08:33:46 +02:00
2026-06-15 08:33:46 +02:00
2026-06-15 19:34:28 +02:00
2026-06-15 19:34:28 +02:00
2026-06-15 19:34:28 +02:00
2026-06-15 19:34:28 +02:00
2016-10-14 11:01:29 -06:00
2016-10-14 11:01:29 -06:00
2026-06-15 08:33:46 +02:00
2020-10-06 03:58:34 +02:00
2019-12-28 13:00:07 +01:00
2026-06-15 19:34:28 +02:00
2020-10-06 01:37:08 +02:00
2026-06-15 19:56:38 +02:00
2016-10-14 11:01:29 -06:00
2019-12-29 09:33:32 +08:00
2026-06-15 19:56:38 +02:00
2022-07-25 23:37:47 +02:00
2026-06-15 19:34:28 +02:00
2026-06-15 19:56:38 +02:00
2020-10-03 23:57:24 +02:00
2020-10-03 23:07:51 +02:00
2026-06-15 19:34:28 +02:00
2026-06-15 19:46:25 +02:00
2016-10-14 10:39:19 -06:00
2016-10-14 11:01:29 -06:00
2021-09-21 23:10:17 +02:00
2020-10-04 00:08:42 +02:00
2026-06-15 19:56:38 +02:00
2026-06-15 19:56:38 +02:00

RACE-NGPC-Emulator-PSP

This is the RACE NGPC emulator modified by "theelf" to run on the PSP. It is likely forked from the Akop Karapetyan PSP version of RACE (http://psp.akop.org/race).

S
Description
No description provided
Readme GPL-2.0
1.6 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 73.1%
Assembly 18.4%
C++ 5.9%
Makefile 1.5%
Pawn 1.1%