mirror of
https://github.com/BillyOutlast/bloodborne_pc.git
synced 2026-10-12 02:25:51 +00:00
A ring of the writes the GPU emulation makes to guest memory (fences, WriteData, everything through TryWriteBacking: buffer and image downloads), with a scan for the qword found in the corrupted heap free list (0x0000005300000000). On a guest fault the registers and the logged writes near them are printed. With the log on, a 20 min run did not hit the fault. Co-Authored-By: Claude Opus 5.5 <[email protected]>
39 lines
1.8 KiB
C
39 lines
1.8 KiB
C
/* C interface of the GPU library (gpu/): shadPS4's Liverpool/Vulkan video core,
|
|
* GnmDriver, VideoOut and kernel event queues, adapted to the native loader. */
|
|
#ifndef BBGPU_H
|
|
#define BBGPU_H
|
|
#include <stdint.h>
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
typedef struct {
|
|
const char *title; /* window title */
|
|
const char *serial; /* CUSA id, names the pipeline cache */
|
|
const char *user_dir; /* pipeline cache/logs directory */
|
|
uint32_t sdk_version; /* from the eboot's procparam */
|
|
uint32_t psf_attributes; /* param.sfo ATTRIBUTE */
|
|
int32_t width, height; /* initial window size */
|
|
} BbGpuConfig;
|
|
/* Registers kernel event queues (needed with or without graphics). */
|
|
void bbgpu_register_kernel(void);
|
|
/* Creates window, Vulkan device, presenter and GPU command processor. */
|
|
int bbgpu_init(const BbGpuConfig *config);
|
|
/* Function for an imported NID ("NID#lib#mod"), or 0 when the GPU library does not provide it. */
|
|
uintptr_t bbgpu_resolve(const char *scoped_nid);
|
|
/* Called first by the loader's SIGSEGV handler: 1 when a GPU page-tracking fault was handled. */
|
|
int bbgpu_handle_fault(void *ucontext, void *address);
|
|
/* BB_WRITE_LOG=1: prints the logged GPU-side writes to guest memory near the fault. */
|
|
void bbgpu_dump_guest_writes(void *ucontext);
|
|
/* Keyboard text entry through the game window (IME dialog). begin returns 0 when
|
|
* no window exists; poll returns 0 typing, 1 confirmed, 2 cancelled (UTF-8 text). */
|
|
int bbgpu_text_input_begin(const char *initial_utf8, const char *prompt_utf8);
|
|
int bbgpu_text_input_poll(char *out_utf8, uint64_t size);
|
|
/* 1 while the in-game settings menu is open: the game's pad input is held neutral. */
|
|
int bbgpu_overlay_captures_input(void);
|
|
/* Number of symbols registered by the vendored libraries (diagnostics). */
|
|
unsigned bbgpu_symbol_count(void);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|