Repository navigation
Expand file tree
/
Copy pathgame-widescreen.toml
More file actions
339 lines (304 loc) · 12 KB
/
Copy pathgame-widescreen.toml
File metadata and controls
339 lines (304 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
[game]
name = "Disruptor"
id = "SLUS-00224"
exe = "input/SLUS_002.24.code"
disc = "input/Disruptor (USA).cue"
load_address = "0x80011200"
entry_pc = "0x80048CE4"
text_size = "0x00045738"
stack_base = "0x801FFFF0"
[recompiler]
seeds = "seeds/functions.txt"
bios_config = "psxrecomp/bios/OpenBIOS.toml"
out_dir = "generated"
out_stem = "SLUS_002.24.code"
strict = true
discovery = "whole-image"
mod_function_entry_funcs = ["0x80011888", "0x80011944", "0x80013544", "0x8001A46C", "0x8001A794", "0x8001C044", "0x8001C484", "0x8001D3D8", "0x80020DD8", "0x80032514", "0x80039450", "0x8003B78C", "0x8003FE6C", "0x80040E68", "0x800427D0", "0x800429DC", "0x80042BB8", "0x80044A10", "0x80044BDC", "0x80046134", "0x8004B3D4", "0x8004D348", "0x8004D410", "0x8004D684"]
[[recompiler.patch]]
id = "disruptor-gameplay-frame-floor"
address = "0x80043E90"
expected = "0x28420002"
replacement = "0x28420001"
# A streamed read the entry hook served (src/game/session/streamed_reads.cpp) leaves before the drive: the flag
# clear this store did is the hook's when it does not serve. sb zero,0(s0) becomes bne t9,zero to the epilogue.
[[recompiler.patch]]
id = "disruptor-streamed-read-served"
address = "0x8001199C"
expected = "0xA2000000"
replacement = "0x17200014"
# EXIT under CREDITS on the main menu (src/game/session/main_menu_exit.cpp): the handler draws a ninth item, and its
# cursor wraps past it. slti v0,s0,8, ori v0,zero,7 and slti v0,v0,8 count 9 items.
[[recompiler.patch]]
id = "disruptor-main-menu-items"
address = "0x8001C178"
expected = "0x2A020008"
replacement = "0x2A020009"
[[recompiler.patch]]
id = "disruptor-main-menu-up-wrap"
address = "0x8001C1A4"
expected = "0x34020007"
replacement = "0x34020008"
[[recompiler.patch]]
id = "disruptor-main-menu-down-wrap"
address = "0x8001C1D0"
expected = "0x28420008"
replacement = "0x28420009"
# CONTROLLER OPTIONS is off the main menu (src/game/session/main_menu_exit.cpp) and the launcher binds the keys to the
# default layout: a loaded save keeps layout 0 instead of the one it was saved with. andi a0,a0,3 becomes andi a0,a0,0.
[[recompiler.patch]]
id = "disruptor-controller-layout-load"
address = "0x8001DBB8"
expected = "0x30840003"
replacement = "0x30840000"
# Calls made after an instruction of the game that ran from RAM. A site is an address and the whole
# instruction word expected there. Native code gets the same calls from the generator's own lists, which
# a contract keeps equal to these.
# Disruptor has no architectural pitch state. The project implements its
# opt-in vertical camera at a deliberately finite set of resident instruction
# sites: CPU-projected screen-Y centres, proven vertical participation tests,
# the two projectile-construction convergence points, and the common renderer
# epilogue. Every complete instruction word is pinned so a different retail
# revision fails generation instead of silently modifying unrelated code.
#
# The generated callback is appended after the vanilla instruction. At zero
# pitch it is an exact no-op; the runtime callback decodes the pinned word to
# identify the destination register or the required post-instruction action.
[[recompiler.instruction_hook]]
callback = "disruptor_vertical_camera_instruction_hook"
sites = [
# CPU world projection centres (ORI rt,zero,120).
["0x8003AD54", "0x34020078"],
["0x8003ADE4", "0x34020078"],
["0x8003B140", "0x34020078"],
["0x8003B1EC", "0x34020078"],
["0x8003B764", "0x34020078"],
["0x8003B990", "0x34020078"],
["0x8003BDA4", "0x34020078"],
["0x8003C4B4", "0x34020078"],
["0x8003C99C", "0x34020078"],
["0x8003D07C", "0x34020078"],
["0x8003D398", "0x34030078"],
["0x8003F6B0", "0x34020078"],
# Proven camera-vertical object participation pairs.
["0x8003B900", "0x0205102A"],
["0x8003B90C", "0x0202102A"],
["0x8003BD14", "0x0206102A"],
["0x8003BD20", "0x0202102A"],
["0x8003CDB8", "0x0065102A"],
["0x8003CDC4", "0x0062102A"],
# Normal-weapon and psionic construction convergence loads.
["0x8002E4B8", "0x92640022"],
["0x8002EAF0", "0x92430020"],
# Common renderer epilogue: restore the neutral projection horizon.
["0x8004279C", "0x8FBF016C"],
]
# Disruptor's experimental far-rendering override is host-only: reviewed
# loads of the retail far/fade globals are substituted after the original LW,
# leaving guest RAM untouched. Additional reviewed portal, object-decision,
# and packet-boundary instructions feed read-only diagnostics through the same
# callback. The renderer entry starts a measurement span and the reviewed
# common epilogue closes it. Keep this callback independent from the
# vertical-camera dispatcher so either enhancement can be built and tested in
# isolation.
[[recompiler.instruction_hook]]
callback = "disruptor_far_rendering_instruction_hook"
sites = [
# Portal traversal: the recursion depth, where a walk past the game's own
# distance is turned back from a sector out of memory, unique-room
# completion, and the three candidate-distance values before their tests.
["0x8003A0F8", "0x93B300C0"],
["0x8003A390", "0xA082001F"],
["0x8003A92C", "0x00005812"],
["0x8003A964", "0x00681021"],
["0x8003AA74", "0x00AC1021"],
# Far-distance loads from $gp + 0x4A0.
["0x8003A914", "0x8F8C04A0"],
["0x8003B8C8", "0x8F8304A0"],
["0x8003BCE0", "0x8F8204A0"],
["0x8003C168", "0x8F8304A0"],
["0x8003CD64", "0x8F8304A0"],
# Object distance-decision results.
["0x8003B8D8", "0x0072182A"],
["0x8003BCEC", "0x0053102A"],
["0x8003C178", "0x0077182A"],
["0x8003CD70", "0x0077182A"],
# Fade-start loads from $gp + 0x494.
["0x8003B2CC", "0x8F820494"],
["0x8003BA30", "0x8F820494"],
["0x8003BE40", "0x8F820494"],
["0x8003C628", "0x8F820494"],
["0x8003C878", "0x8F820494"],
["0x8003D28C", "0x8F820494"],
["0x8003FB0C", "0x8F840494"],
# Billboard post-pass CLUT-row selection.
["0x80043184", "0x8F820494"],
# Main-renderer visible-list and packet boundaries.
["0x800410E0", "0x93830310"],
["0x800410F8", "0x8F820680"],
["0x800411D8", "0x8F8301D4"],
# Mesh renderer: a face with a corner it marked is tested on that corner's real sides.
["0x80046C18", "0x3021003F"],
# Mesh renderer: the split's middle point on the diagonal the whole polygon's triangles share.
["0x8004791C", "0xACAD0004"],
# Mesh renderer: the split quarters' texture words meet at texel 16.
["0x80047AD0", "0xAF290030"],
["0x80047B90", "0xAF290030"],
["0x80047D18", "0xAF290030"],
# Common renderer epilogue.
["0x8004279C", "0x8FBF016C"],
]
# Disruptor's world actors and pickups are CPU-built POLY_FT4 billboards.
# Their projected centre goes through the reviewed classic-wide X squash, but
# their retail pixel width does not. These are five final packet writes plus
# the deferred base-actor submission seam; the host callback tags only a
# completed, shape-validated packet for proportion repair.
[[recompiler.instruction_hook]]
callback = "disruptor_billboard_aspect_instruction_hook"
sites = [
["0x8003BB88", "0xA6030016"],
["0x8003BFB0", "0xA6030016"],
["0x8003C848", "0xA6030016"],
["0x8003CAD4", "0xA6020016"],
["0x8003D488", "0xA2060025"],
["0x800433A0", "0x02A02821"],
]
# Disruptor's sky backdrop routine lays SPRT tiles over the opening it has
# already clamped to the 320-pixel frame. These four seams hand the host the
# left edge, the panorama scroll and the right edge before the tile loop reads
# them, so classic widescreen can ask for the columns a wider view needs.
[[recompiler.instruction_hook]]
callback = "disruptor_backdrop_tiles_instruction_hook"
sites = [
["0x8003B328", "0x8FB80040"],
["0x8003B338", "0x00621821"],
["0x8003B348", "0x8FB80028"],
["0x8003B5A8", "0x8F8205B8"],
["0x8003B638", "0x8FB80040"],
]
# Disruptor's sky backdrop routine lays SPRT tiles over the opening it has
# already clamped to the 320-pixel frame. These four seams hand the host the
# left edge, the panorama scroll and the right edge before the tile loop reads
# them, so classic widescreen can ask for the columns a wider view needs.
[[recompiler.instruction_hook]]
callback = "disruptor_sprite_depth_instruction_hook"
sites = [
["0x8003B98C", "0xAFA20010"],
["0x8003BDA0", "0xAFA20010"],
["0x8003C4B0", "0xAFA20010"],
["0x8003D078", "0xAFA20010"],
["0x8003D1B4", "0xA4379EA0"],
]
# Disruptor's sky backdrop routine lays SPRT tiles over the opening it has
# already clamped to the 320-pixel frame. These four seams hand the host the
# left edge, the panorama scroll and the right edge before the tile loop reads
# them, so classic widescreen can ask for the columns a wider view needs.
[[recompiler.instruction_hook]]
callback = "disruptor_intro_skip_instruction_hook"
sites = [
["0x800147B0", "0x2A820003"],
["0x80020A80", "0x2A02005E"],
["0x80048678", "0x30420940"],
]
# A weapon or psionic key shows its list: the HUD's read of the mode, and each list's two reads of the buttons that move the choice.
[[recompiler.instruction_hook]]
callback = "disruptor_weapon_list_instruction_hook"
sites = [
["0x8003D840", "0x93840310"],
["0x8003E014", "0x8C637670"],
["0x8003E098", "0x8C427670"],
["0x8003E0F8", "0x93830310"],
["0x8003E8C8", "0x8FBF00DC"],
["0x8003E7B8", "0x8C637670"],
["0x8003E84C", "0x8C427670"],
]
[runtime]
debug_port = 4624
window_title = "Disruptor Recompiled"
memcard_dir = "saves"
disc_speed = "1x"
bios_hle = false
overlay_cache = true
overlay_backend = "auto"
# PsyQ v_wait 0x8004B51C, audited as R4's in config_schema.md: only the -1 timeout test at 0x8004B544 reads the 16(sp) counter, 0x8004B590 loops on the VSync count 0x8005B920
idle_skip = true
idle_skip_store_counters = true
# PsyQ libds StGetNext's wait at 0x80048AD8 (movies): s0 counts 0x800000 down, its one exit is s0 == 0 at 0x80048AE8, the other a ready frame (v0 == 0 at 0x80048AE0)
idle_skip_store_counter_sites = ["0x8004B544", "0x8004B590", "0x80048AD8", "0x80048AE8"]
# 180 ms put the sound 0.2 s behind the movies. 45 ms held through the two heaviest capsules with the queue never under 34 ms.
[audio]
buffer_ms = 45
# Its English text has no Shift-JIS to inventory: the scan on every call took 40% of the emulation thread in a crowd.
[localization]
capture = false
[video]
aspect_ratio = "16:9"
renderer = "opengl"
supersampling = 4
antialiasing = true
texture_filtering = "nearest"
# The movies fill all 320 columns, the framework's default blanks the last 8.
depth24_trailing_margin = 0
[controller]
default_mode = "digital"
allow_hybrid = false
lock_mode = true
[widescreen]
gte_game_mode = true
native_wide = false
hud_sprt_squash = true
nw_hud_corners = false
offer = true
offer_ultrawide = true
adaptive_view = true
[widescreen.cull]
slti_sites = ["0x8003D0F8", "0x8003D110"]
slti_lower_sites = ["0x8003D108", "0x8003D118"]
[[widescreen.cull.yaw_cone]]
address = "0x80040FE8"
expected = "0x24710020"
full_turn = 256
[[widescreen.cull.yaw_cone]]
address = "0x80040FF0"
expected = "0x2472FFE0"
full_turn = 256
[[widescreen.cull.horizontal_slt]]
address = "0x8003B8EC"
expected = "0x0067102A"
[[widescreen.cull.horizontal_slt]]
address = "0x8003B8F8"
expected = "0x0062102A"
[[widescreen.cull.horizontal_slt]]
address = "0x8003BD00"
expected = "0x0067102A"
[[widescreen.cull.horizontal_slt]]
address = "0x8003BD0C"
expected = "0x0062102A"
[[widescreen.cull.horizontal_slt]]
address = "0x8003C194"
expected = "0x02A9102A"
[[widescreen.cull.horizontal_slt]]
address = "0x8003C1A0"
expected = "0x02A2102A"
[[widescreen.cull.horizontal_slt]]
address = "0x8003CDA4"
expected = "0x0068102A"
[[widescreen.cull.horizontal_slt]]
address = "0x8003CDB0"
expected = "0x0062102A"
[widescreen.backdrop]
x_sites = [
"0x8003A578", "0x8003A650", "0x8003B244", "0x8003B2A0",
"0x8003B988", "0x8003BD9C", "0x8003C4AC", "0x8003D074",
"0x8003F6B4",
]
# Session-only diagnostic candidate; runtime-disabled unless explicitly enabled.
unsquash_funcs = ["0x8003A0F0"]
[audit]
[[audit.regions]]
name = "Main executable"
rom_start = "0x800"
rom_end = "0x45F38"
vaddr_base = "0x80011200"
[audit.normalize]
kseg_mask = "0x1FFFFFFF"