Triforce v0.8.0

Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-25 10:21:32 -06:00
parent 861702476a
commit 4fa4f9188b
881 changed files with 179428 additions and 15581 deletions

View File

@@ -10,6 +10,8 @@ the same offset.
rtld is part of this image: in the emulator it runs first and binds the GOTs itself, to the same values this
builder binds them to (same module order, same lookup).
"""
import sys
import kit # noqa: F401 (sys.path)
import nso2 # noqa: F401 (DT_RELR)
import nso
@@ -62,5 +64,29 @@ class EdenImage(nx_image.NxImage):
self.hook_syms[name] = sym
self._relocate()
self.code = [(m.base + lo, m.base + hi, m.name) for m in self.modules for lo, hi in [m.code_range()]]
self.lookups()
self._entries()
self.names = self.symbol_names()
def lookups(self):
"""(after self.mem and self.code are made) the lift's discovery reads every instruction it walks through word() and
in_code(), 40 million times each for OoT, where NxImage's unpack a word with struct and loop over self.code each time.
Here the words are a view of the image as 32-bit numbers and the code ranges a flat tuple, with the same answers
(tests/test_lift_lookups.py)"""
self._base = nx_image.MAIN_BASE
self._spans = tuple((lo, hi) for lo, hi, _ in self.code)
self._words = memoryview(self.mem).cast("I") if sys.byteorder == "little" and len(self.mem) % 4 == 0 else None
def in_code(self, a):
if a & 3:
return False
for lo, hi in self._spans:
if lo <= a < hi:
return True
return False
def word(self, a):
off = a - self._base
if self._words is not None and not off & 3 and 0 <= off < len(self.mem):
return self._words[off >> 2]
return super().word(a)