Shokunin
dd5fdec6bb
Add opt-in draw-distance clamps ([[draw_distance.clamp]])
...
Many PS1 renderers drop a primitive whose depth index falls past the end
of their ordering table. Raising that limit can write past the table, so
a title can now list such guards in game.toml with the register that
carries the index and the last safe value. While a trusted mod has called
psx_mod_set_draw_distance_clamp(1), generated main-EXE code clamps that
register before the guard runs, so far geometry is kept in the farthest
slot instead of popping in later.
- Off by default and reset at every session start, so netplay and every
title that lists no sites run unchanged; with no sites the generated
code and declarations are byte-identical.
- Main executable only: the full instruction word is the guard,
generation fails on a mismatch or a load-delay hazard, captured
overlay code keeps its own code (the sites are not part of the overlay
config identity), and the dirty-RAM interpreter applies the clamp
where the game's text image holds the listed word.
- Compatibility: code_generator.cpp is a codegen-hash input, so the
codegen hash and the overlay-cache tag change for every title, sites
or not. Savestates from earlier builds are refused, and overlay shards
rebuild once on first visit. Generated code and behaviour are
unchanged for a title without sites or with the switch off.
- Tests: draw_distance_codegen_test (config rules, emission, guards,
declarations, overlay identity) and draw_distance_interp_test (store,
switch, interpreted guards); the session-reset guard covers the switch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-01 11:36:48 -07:00
..
2026-09-03 07:39:06 -07:00
2026-09-30 15:57:32 +03:00
2026-06-06 23:04:23 -07:00
2026-09-30 19:26:29 -04:00
2026-09-30 02:43:46 -07:00
2026-09-30 20:23:16 -07:00
2026-07-13 21:52:25 -07:00
2026-09-30 15:06:59 -07:00
2026-09-28 21:02:48 -07:00
2026-09-28 20:52:24 -07:00
2026-07-19 12:11:56 -07:00
2026-09-05 12:38:01 -07:00
2026-08-11 14:34:12 -07:00
2026-07-20 13:42:06 -07:00
2026-07-29 03:18:10 -04:00
2026-09-30 19:26:29 -04:00
2026-08-31 09:16:14 +03:00
2026-07-29 03:18:10 -04:00
2026-09-30 19:26:29 -04:00
2026-09-26 06:43:12 -07:00
2026-07-17 23:56:58 -07:00
2026-04-28 21:29:19 -07:00
2026-08-05 18:16:16 -07:00
2026-08-11 14:34:12 -07:00
2026-09-30 12:55:56 -07:00
2026-08-30 23:24:47 +03:00
2026-04-28 21:29:19 -07:00
2026-09-11 23:39:11 -07:00
2026-09-11 23:39:11 -07:00
2026-08-01 02:15:34 -07:00
2026-07-20 17:34:12 -07:00
2026-09-26 06:31:33 -07:00
2026-09-11 23:39:47 -07:00
2026-09-14 17:26:33 +03:00
2026-08-27 21:17:20 -07:00
2026-09-28 16:54:33 -07:00
2026-08-31 09:15:39 +03:00
2026-09-03 01:23:01 +03:00
2026-10-01 11:36:48 -07:00
2026-09-05 19:53:03 +03:00
2026-07-29 03:18:10 -04:00
2026-09-07 16:11:22 +03:00
2026-08-14 19:12:37 -07:00
2026-09-28 18:30:24 -07:00
2026-08-27 13:21:17 -07:00
2026-08-27 13:21:17 -07:00
2026-09-28 21:02:43 -07:00
2026-09-28 21:02:43 -07:00
2026-06-09 20:09:25 -07:00
2026-08-29 04:33:56 +03:00
2026-08-29 04:43:30 +03:00
2026-09-28 20:52:24 -07:00
2026-09-30 20:23:16 -07:00
2026-09-06 13:36:37 +03:00
2026-09-29 14:04:53 -07:00
2026-09-28 20:52:23 -07:00
2026-09-30 20:23:16 -07:00
2026-07-14 18:35:07 -07:00
2026-07-14 18:34:32 -07:00
2026-09-30 20:23:16 -07:00
2026-09-08 12:52:09 -07:00
2026-09-26 08:03:57 -07:00
2026-07-21 15:54:07 -07:00
2026-09-14 17:26:34 +03:00
2026-09-26 06:31:33 -07:00
2026-09-14 17:26:31 +03:00
2026-08-25 01:50:55 -07:00
2026-09-04 23:32:45 -07:00
2026-08-25 20:37:49 -07:00
2026-09-28 20:52:23 -07:00
2026-09-30 20:23:16 -07:00
2026-09-30 02:43:46 -07:00
2026-09-29 17:55:26 -07:00
2026-07-14 20:03:02 -07:00
2026-09-24 14:38:03 -07:00
2026-08-15 12:15:23 +03:00
2026-09-14 17:26:30 +03:00
2026-09-11 16:38:34 -04:00
2026-08-25 13:10:52 -07:00
2026-09-30 12:55:56 -07:00
2026-07-29 03:18:10 -04:00
2026-09-28 23:42:17 -07:00
2026-09-28 23:42:17 -07:00
2026-09-11 23:39:47 -07:00
2026-09-30 16:10:59 +03:00
2026-09-30 20:23:16 -07:00
2026-09-29 21:57:34 -07:00
2026-08-31 19:28:10 -07:00
2026-09-25 22:27:47 -07:00
2026-09-30 12:55:56 -07:00
2026-08-25 20:37:49 -07:00
2026-09-13 16:50:26 -07:00
2026-09-28 23:42:17 -07:00
2026-09-13 16:50:26 -07:00
2026-10-01 11:36:48 -07:00
2026-09-26 13:58:16 -07:00
2026-09-30 20:23:16 -07:00
2026-09-28 16:26:33 -07:00
2026-09-13 21:06:58 -07:00
2026-09-28 16:51:21 -07:00
2026-09-28 22:05:03 -07:00
2026-09-30 15:58:52 +03:00
2026-09-30 14:30:38 -07:00
2026-09-30 15:59:58 +03:00
2026-08-11 14:34:12 -07:00
2026-08-11 14:34:12 -07:00
2026-08-11 23:52:31 -04:00
2026-07-20 14:13:46 -07:00
2026-09-30 02:43:45 -07:00
2026-09-26 08:03:57 -07:00
2026-09-30 02:43:46 -07:00
2026-09-11 23:39:47 -07:00
2026-07-19 16:19:57 -07:00
2026-07-19 12:11:56 -07:00
2026-09-26 08:03:58 -07:00
2026-09-30 02:43:46 -07:00
2026-09-30 02:43:46 -07:00
2026-07-18 08:32:42 -07:00
2026-09-28 18:03:43 -07:00
2026-09-30 14:27:29 -07:00
2026-08-31 19:28:10 -07:00
2026-09-03 07:39:07 -07:00
2026-08-30 14:20:09 -04:00
2026-08-06 00:52:14 -04:00
2026-08-27 16:26:44 +03:00
2026-09-12 23:30:41 -07:00
2026-07-19 12:11:56 -07:00
2026-07-19 14:54:30 -07:00
2026-09-26 08:03:57 -07:00
2026-09-26 08:03:57 -07:00
2026-09-30 00:24:07 -07:00
2026-08-25 01:54:42 -07:00
2026-09-26 15:38:21 -07:00
2026-08-11 14:34:12 -07:00
2026-08-31 09:15:51 +03:00
2026-09-30 20:23:16 -07:00
2026-09-11 23:39:47 -07:00
2026-09-29 17:55:26 -07:00
2026-09-28 21:02:47 -07:00
2026-09-28 22:19:08 -07:00
2026-09-28 22:19:08 -07:00
2026-09-29 17:55:26 -07:00
2026-09-04 07:33:08 -04:00
2026-07-18 08:32:42 -07:00
2026-09-30 20:23:16 -07:00
2026-09-05 21:47:40 +03:00
2026-08-25 01:39:33 -07:00
2026-09-26 08:03:58 -07:00
2026-09-30 00:24:07 -07:00
2026-09-07 17:17:30 +03:00
2026-09-13 16:33:46 -07:00
2026-09-13 16:33:46 -07:00
2026-08-11 14:34:12 -07:00
2026-09-13 16:33:46 -07:00
2026-08-11 14:34:12 -07:00
2026-08-05 18:16:16 -07:00
2026-07-14 18:56:51 -07:00
2026-08-21 23:34:25 +01:00
2026-08-26 21:43:28 +03:00
2026-09-05 12:17:16 -04:00
2026-08-25 02:11:25 -07:00
2026-07-29 03:18:10 -04:00
2026-07-21 15:54:17 -07:00
2026-07-21 15:54:29 -07:00
2026-09-06 14:16:53 +03:00
2026-07-21 15:55:06 -07:00
2026-07-21 15:55:11 -07:00
2026-08-25 11:17:44 -04:00
2026-07-21 15:54:42 -07:00
2026-09-30 23:30:28 -07:00
2026-09-24 14:42:12 -07:00
2026-09-12 14:47:47 -07:00
2026-07-29 03:18:10 -04:00
2026-09-28 22:05:03 -07:00
2026-09-30 21:38:17 -07:00
2026-09-03 01:20:41 +03:00
2026-09-07 22:40:23 -07:00
2026-09-13 19:27:03 -07:00
2026-09-20 12:01:32 -07:00
2026-08-27 21:17:20 -07:00
2026-09-19 20:02:29 -07:00
2026-09-19 19:06:42 -07:00
2026-09-20 12:01:32 -07:00