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

@@ -114,11 +114,15 @@ static inline void *hos_guest_range(uint64_t a, uint64_t n) {
}
#define HOS_TICK_HZ 31250000ULL /* (mkw-recomp: the Switch 2 counter; the SDK checks it at init) */
/* ---- logging: HOS_TRACE=1 logs every HLE call that uses HOS_TRACE_CALL */
/* ---- logging: HOS_TRACE=1 logs every HLE call that uses HOS_TRACE_CALL. hos_log is info; (Triforce) hos_log_at gives a line
another level, written after the thread's tag ("[hos host] [trace] vk: ..."), for a log viewer to show or leave out
(docs/development.md, Log levels) */
enum { HOS_LOG_ERROR, HOS_LOG_WARN, HOS_LOG_INFO, HOS_LOG_DEBUG, HOS_LOG_TRACE };
extern int hos_trace;
void hos_log(const char *fmt, ...);
void hos_log_at(int level, const char *fmt, ...);
void hos_log_flush(void);
#define HOS_TRACE_CALL(name) do { if (hos_trace) hos_log("%s(%#llx, %#llx, %#llx, %#llx) lr %#llx", name, \
#define HOS_TRACE_CALL(name) do { if (hos_trace) hos_log_at(HOS_LOG_TRACE, "%s(%#llx, %#llx, %#llx, %#llx) lr %#llx", name, \
(unsigned long long)c->x[0], (unsigned long long)c->x[1], (unsigned long long)c->x[2], \
(unsigned long long)c->x[3], (unsigned long long)c->x[30]); } while (0)
void hos_fatal(Ctx *c, const char *fmt, ...);
@@ -127,6 +131,7 @@ void hos_fatal(Ctx *c, const char *fmt, ...);
uint64_t hos_sys_alloc(uint64_t size, uint64_t align); /* zeroed, from the system region, never freed */
uint64_t hos_region_alloc(uint64_t size, uint64_t align); /* address space above the heap */
void hos_region_free(uint64_t addr);
int hos_regions(uint64_t (*out)[2], int cap); /* ((Triforce) the regions held: {start, end}, at most cap; how many */
void hos_mem_init(uint64_t image_end);
extern uint64_t hos_heap_size, hos_heap_used, hos_total_memory, hos_program_size;
@@ -153,11 +158,19 @@ int hos_thread_priority(HosThread *t, int set, int value);
int hos_thread_core(HosThread *t);
int hos_cores(void);
/* virtual cores (hos_thread.c, HOS_VCORES=1): a guest thread gives its core up for a block (hos_vcore_away: 1 if it
held one) and takes one again after it (hos_vcore_back); checkpoints hand it to a better waiter that asked */
held one, or ran without one since an escape) and takes one again after it (hos_vcore_back); checkpoints hand it to a
better waiter that asked */
int hos_vcores_on(void);
int hos_vcore_away(void);
void hos_vcore_back(void);
void hos_vcore_checkpoint(void);
/* ((Triforce) HOS_CHAIN=<path> (hos_chain.c, diagnostic): blocks, wake-ups, sleeps and presents of the guest threads for
scripts/chain.py's critical path. kind: a wait that blocks begins / ends, a signal that can end one, a sleep begins /
ends, a present. lr 0: the current guest context's. Off: one load and a branch */
enum { HOS_CHAIN_WAIT = 1, HOS_CHAIN_WOKE, HOS_CHAIN_SIGNAL, HOS_CHAIN_SLEEP, HOS_CHAIN_AWAKE, HOS_CHAIN_PRESENT };
extern volatile int hos_chain_on;
void hos_chain_note(int kind, uint64_t key, uint64_t lr);
#define HOS_CHAIN(kind, key) do { if (__builtin_expect(hos_chain_on, 0)) hos_chain_note((kind), (key), 0); } while (0)
void hos_vcore_yield(void);
int hos_vcore_asked(void); /* a waiter asked this thread for its core (vc_kick) */
int hos_cv_sleep(void *cv, void *srw_lock, unsigned ms); /* SleepConditionVariableSRW (exclusive) for guest threads */