Skip to content

Environment variables

The port reads a few hundred environment variables. Some are for players (upscaler, frame rate, controls). Most are diagnostics and developer switches. This page lists every variable found in src/, gpu/, bbsc/, scripts/, launcher/, run.sh, packaging/ and tools/, with what the code does with it. The information comes from the code on main (0.51-linux.16). When a comment and the code disagree, the code wins.

How to set them

In the launcher: go to Advanced → Developer → Extra variables (NAME=value, space-separated). The settings key is extra_env in the launcher's settings.json. The field is parsed in game_environment() (launcher/bbport_launcher.py:693):

for item in s["extra_env"].split():
    if "=" in item:
        key, value = item.split("=", 1)
        env[key] = value
  • The field is split on whitespace. Each piece is split at its first =: BB_UPSCALER=fsr4 BB_AUDIO_GAIN=1.5 RADV_DEBUG=nohiz.
  • There is no quoting. A value cannot contain spaces, and quotes are kept literally as part of the value (BB_X="a" gives "a" with the quotes). Use separators the variable itself accepts, such as ; or ,.
  • A piece without = is ignored without any message. If a name appears twice, the last one wins.
  • Any name is accepted, including third-party ones (RADV_DEBUG, MANGOHUD, VK_*, __GL_*).
  • The result goes to run.sh. Both the launcher's Play button and --play (Steam shortcut, Steam Deck game mode) use it.

From a terminal (source checkout): BB_GAME_DIR=/path/to/CUSA03173 BB_FPS=60 bash run.sh. Without the launcher, nothing sets the launcher's variables. run.sh then uses its own defaults (game folder ../CUSA03173, uncapped frame rate, and so on).

From a terminal (AppImage): BB_UPSCALER=fsr4 ./Bloodborne-bbport-x86_64.AppImage --play starts the game with the launcher's saved settings. Mind the precedence below: the launcher's own settings replace a variable of the same name from the shell. Extra variables replace both. The AppImage keeps its data (bbport.ini, saves, logs) in BB_DATA_DIR, by default ~/.local/share/bbport.

bbport.ini: many graphics options live in bbport.ini and the in-game menu, not in the environment. A few variables override those keys at start: BB_UPSCALER, BB_UPSCALE_PRESET, BB_FSR_SHARPNESS, BB_JITTER, BB_REACTIVE* and BB_OBJECT_MOTION (gpu/shim/bbport_settings.cpp:192-208). Values set this way stay in force until the next start.

Precedence

The environment is built in this order. A later step wins.

  1. The environment the launcher (or the AppImage) was started with.
  2. The launcher's own settings (game_environment(), launcher/bbport_launcher.py:619-698).
  3. Some are always written: BB_GAME_DIR, BB_MODS_*, BB_PROMPTS, BB_GESTURES_NO_MOTION, BB_PATCHES_*, BB_LANGUAGE, BB_REGION, BB_MENU_LANGUAGE, BB_FULLSCREEN, BB_PRESENT_MODE, BB_SKIP_NETWORK_CHOICE, BB_FPS, BB_DISCORD and BB_STEAM_OVERLAY. For these, a shell value is replaced.
  4. Others are written only when the setting is on or not empty: BB_HDR, BB_FPS_LIMIT, BB_DRAW_PIPE, BB_READBACKS, BB_PREUPLOAD, BB_PC_MODEL, BB_GPU_PROFILE, BB_PAD_DEADZONE (only when the dead zone is not 4 %), BB_PAD_LIGHTBAR and others. For these, a shell value survives while the setting is off.
  5. Hunter's Atlas (atlas_environment(), launcher/bbport_launcher.py:598): always BB_ATLAS_ENABLED (0 when the map is off or not prepared); with the map on also BB_MAP_DIR, BB_MAP_ART_DIR, BB_MAP_FONT, BB_MAP_CATALOG, BB_MAP_CONFIG, BB_MAP_TRAVEL_ENABLED, BB_MAP_ITEMS_ENABLED, BB_MAP_ITEM_CATEGORIES, BB_MAP_FOG_ENABLED=0 and BB_MAP_NPC_MODE=all.
  6. Online (only when Play online is on and the online module exists): scripts/online.py environment() adds BB_ONLINE, BB_SHADNET_*, BB_UPNP, BB_COMMUNITY_SERVER, BB_SEAMLESSHUNT_TOMBS, SHADPS4_P2P_* and the BBSC options (scripts/bbsc.py).
  7. Extra variables come last and override everything above, including the launcher's own settings and the BBSC options.
  8. run.sh mostly fills in defaults with ${VAR:-default}, so a value you set is kept. It does force a few:
  9. BB_AS_0_3=1 forces BB_GUEST_IN_PLACE=0, BB_HOST_COPY_WAITS=all and BB_PRODUCER_CHECK=1.
  10. BB_SAVE_LOG=1 forces BB_FRAME_STATS=1.
  11. BB_AUTO_RENDER_RES=1 makes run.sh unset BB_RENDER_RES, BB_OUTPUT_RES and BB_UI_RES, so do not set it by hand.
  12. When bbport.ini asks for a non-1080p output without live resolution and BB_RENDER_RES is unset, run.sh exports BB_RENDER_RES, BB_OUTPUT_RES and BB_DMEM_MB itself.
  13. BB_BBSC_LIB is unset unless BB_BBSC=1 and BB_ONLINE=1.
  14. SHADPS4_HTTP_HOST_OVERRIDES_JSON is rewritten whenever online play is on.
  15. BB_PRESENCE_DIR is rewritten when Discord is on, and BB_TROPHY_DIR when the trophy list is prepared.
  16. MANGOHUD is dropped while Steam's own performance overlay (mangoapp) runs.
  17. run.sh exports defaults that differ from the code's built-in ones: BB_COPY_GPU_BUFFERS=1, BB_GPU_WRITE_TWINS=1, BB_GPU_WRITE_TWINS_MAX=65536, BB_PREUPLOAD=1, BB_UFFD=0, BB_GUEST_IN_PLACE=$BB_PC_MODEL, BB_VBLANK_HZ (from BB_FPS) and BB_PC_MODEL (1 on AMD, 0 elsewhere).
  18. libbbsc sets BBSC_MOD_SEAMLESS=0 and SHADPS4_BBSC_FIVE_HUNTERS=0 itself on a public game server (The Hunter's Dream, nodreamforthehunter.com, shadps4.net or scej-network.jp; Seamless Hunt is not one), whatever was asked (bbsc/emulator/mod/linux/bbsc_mod_linux.cpp:360, the list in bbsc/emulator/mod/bbsc_http.cpp:245).

Value formats vary from one variable to another:

  • The shadPS4-style Flag() (gpu/shim/core/emulator_settings.h:14) takes any value starting with 1, y or t as on.
  • Most port switches look at a leading 1, or treat everything but 0 as on.
  • A few logs and traps turn on when set to any value, 0 included.
  • BBSC switches are off only with 0.

The Values column gives the rule for each variable. Where it says "(default X)", that is the behaviour when the variable is unset. In the tables:

  • Launcher: marks variables the launcher writes from a setting. Use the setting rather than the extra field.
  • Internal: marks variables set by run.sh or the package. Leave them alone.

Most useful

Variable What it does
BB_UPSCALER Upscaler at start: off, fsr3, fsr4, fsr411, taa, dlss (overrides bbport.ini/menu).
BB_UPSCALE_PRESET Upscaler preset at start: 0 Native AA, 1 Quality, 2 Balanced, 3 Performance, 4 Ultra Performance.
BB_FSR_SHARPNESS Upscaler sharpening strength, 0–2 (default 0.5).
BB_RENDER_RES Fixed render resolution WxH patched in at start (presets then need a restart).
BB_FPS Frame-rate patch: uncap (default), 60, 90 or 30 (launcher: Frame rate → Mode).
BB_FPS_LIMIT FPS cap; 0 or unset = no limit (launcher: FPS limit).
BB_PRESENT_MODE Vulkan present mode: Mailbox (default), Fifo (vsync), FifoRelaxed or Immediate.
BB_DISPLAY Monitor for the window/fullscreen: number or part of its name.
BB_GPU_ID Which GPU to use, by Vulkan device index.
BB_PC_MODEL Memory model: 1 = new (default on AMD), 0 = the 0.3 one (default elsewhere).
BB_DRAW_PIPE Two-stage GPU pipeline, 20–30 % faster: 1 on, 0 off (default on with 8+ CPU threads).
BB_PREUPLOAD Background upload into VRAM: 0 off, 1 rewritten memory only (run.sh default), 2 everything (~3 GB more VRAM).
BB_ASYNC_PIPELINES 0 makes the game wait for shader compiles instead of skipping a draw for a frame or two.
BB_ANISO Anisotropic filtering ratio (default 16; 0 = the game's own).
BB_DLSS 0 turns DLSS support off on NVIDIA.
RADV_DEBUG / BB_AUTO_NOHIZ AMD GCN 3–5 on RADV: run.sh sets RADV_DEBUG=nohiz unless BB_AUTO_NOHIZ=0.
BB_PAD_DEADZONE / BB_PAD_DEADZONE_OUTER Inner (default 5) and outer (default 127) stick dead zones, of 127 (launcher: Controls → Stick dead zone (%), the inner one).
BB_MOUSE_DEADZONE Minimum stick deflection used for mouse look (default 16 of 127).
BB_AUDIO_GAIN Master volume multiplier, up to 8 (default 1.0).
BB_SAVE_LOG 1 saves the log and per-frame statistics to <data>/logs/ (for bug reports).
MANGOHUD 1 shows the MangoHud overlay.

Display & window

Variable Values (default) What it does Where
BB_CJK_FONT path to a font file (unset: fontconfig's choice for zh-cn) Font merged into the in-game menu font for Simplified Chinese texts; without one, fc-match picks a system font (Noto Sans CJK, WenQuanYi...), else Chinese text shows as boxes. gpu/shim/bbport_overlay.cpp:1145
BB_DISPLAY monitor number (1, 2, ... in SDL order) or part of its name (unset: SDL's primary display) Launcher: Graphics > Display > Monitor. The monitor the window and fullscreen go to (issue #69); bb-gpu-capabilities --displays lists them, and the log says which one was taken. No match: the primary one. gpu/shim/window.cpp:16, launcher/bbport_launcher.py:644
BB_FULLSCREEN 1 or 0 (windowed) Launcher: Graphics > Display > Fullscreen. Creates the game window fullscreen when the value starts with 1. gpu/shim/window.cpp:116, launcher/bbport_launcher.py:639
BB_GPU_ID Vulkan device index (-1: automatic ranking) Which GPU the game uses, by its index in the Vulkan device list; out of range asserts. bb-gpu-capabilities follows it too. gpu/shim/core/emulator_settings.h:22, gpu/shadps4/video_core/renderer_vulkan/vk_instance.cpp:146, tools/gpu_capabilities.c:257
BB_HDR 1/y/t or unset (off) Launcher: Graphics > Display > Allow HDR (set only when on). Allows an HDR swapchain (the colour-space extension and an HDR surface format) when the display offers it. gpu/shim/core/emulator_settings.h:60, gpu/shadps4/video_core/renderer_vulkan/vk_swapchain.cpp:246, launcher/bbport_launcher.py:652
BB_LIVE_RES 0 | 1 (default: bbport.ini live_resolution, else off) For output sizes other than 1080p: 1 = live resolution changes (guest at 1080p, host targets scaled at run time, change without restart; slower), 0 = startup resolution patch. Overrides bbport.ini live_resolution=0/1/auto. Outputs wider than 16:9 always take the startup patch. run.sh:75-122
BB_MENU_LANGUAGE en, ru, es, it, fr, de, pt_BR, zh_CN (first two letters compared; unset: LC_ALL/LC_MESSAGES/LANG/LANGUAGE) Launcher: the launcher's own language. Language of the in-game menu until one is chosen in it (bbport.ini menu_language wins). gpu/shim/bbport_settings.cpp:165, launcher/bbport_launcher.py:638
BB_NVIDIA_EGL 0 = off (default on) Packaged builds with the host NVIDIA driver: sets __EGL_VENDOR_LIBRARY_FILENAMES to the host's EGL vendor files, NVIDIA first (issue #107); 0 leaves it unchanged. launcher/bbport_vulkan.py:116-124
BB_NVIDIA_LIB_DIR directory (default none) Packaged builds: an extra directory searched for the host NVIDIA Vulkan driver library. launcher/bbport_vulkan.py:74-76
BB_OUTPUT_RES WxH Internal (run.sh exports it from bbport.ini output_res for non-1080p outputs without live resolution; unset again on restart). Output size the upscaler fills when the scene is rendered at a startup-patched size (BB_RENDER_RES); also passed to scripts/patches.py. gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:199, run.sh:119, run.sh:190
BB_PRESENT_MODE Mailbox, Fifo, FifoRelaxed, Immediate (Mailbox) Launcher: Graphics > Display > Present mode. Vulkan present mode; a mode the driver lacks falls back to Fifo. Any other value logs an error and uses Mailbox. gpu/shim/core/emulator_settings.h:25, gpu/shadps4/video_core/renderer_vulkan/vk_swapchain.cpp:281, launcher/bbport_launcher.py:640
BB_PRESENT_THREAD 0 = off; else on (on) Swapchain work runs on a separate swap thread next to the present thread; 0 runs it on the present thread. gpu/shadps4/core/libraries/videoout/driver.cpp:76-81
BB_RENDER_RES WxH (unset = live resolution path; scene at the menu's preset) Explicitly sets the game's render resolution with a patch at start (the older path). Fixes the scene size: presets and resolution then need a restart, and TAA at another size is refused. Above 1920x1080 run.sh raises BB_DMEM_MB to 9152. gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:208, run.sh:71, run.sh:119
BB_UI_RES WxH (unset: 1920x1080) Internal (run.sh exports it from patches.py --print-scaled for outputs wider than 16:9 on the startup patch, unless bbport.ini aspect_patch=0; unset again on restart). The game's UI coordinate space: 1080 high and as wide as the output's aspect ratio (2580x1080 for 3440x1440), the HUD canvas width patches.py writes (ultrawide_writes). The UI composition recognizes UI draws by this size and scales them to the output; scripts/hud_layout.py lays out the menu movies for it. gpu/shadps4/video_core/renderer_vulkan/ui_composition.h:24, run.sh:119-122, run.sh:124
LC_ALL / LC_MESSAGES / LANG / LANGUAGE locale In-game menu language when BB_MENU_LANGUAGE is unset; the launcher also derives its UI and game language from the system locale. gpu/shim/bbport_settings.cpp:151-163, launcher/bbport_i18n.py:4984-5010
VK_ADD_DRIVER_FILES ICD JSON list Packaged builds: prepended to the bundled driver list. launcher/bbport_vulkan.py:72-73
VK_DRIVER_FILES ICD JSON list (default: loader's) Vulkan loader's driver list. run.sh --software sets Lavapipe; packaged builds set it to the host NVIDIA ICD plus bundled Mesa unless you set it (or VK_ICD_FILENAMES) yourself; dropped when it points into Steam's pressure-vessel. run.sh:4-13, launcher/bbport_vulkan.py:66-80, packaging/bbport-entry.c:37-49
VK_ICD_FILENAMES ICD JSON list Older name of VK_DRIVER_FILES; if set, packaged builds leave driver selection alone. launcher/bbport_vulkan.py:66-67
__EGL_VENDOR_LIBRARY_FILENAMES file list If set, packaged builds do not replace it with the host's EGL vendor files (see BB_NVIDIA_EGL). launcher/bbport_vulkan.py:119

Graphics & upscalers

Variable Values (default) What it does Where
BB_ANISO integer (16); 0 = the game's own samplers Mipmapped linear samplers of graphics draws get this anisotropic filtering ratio instead of the PS4's (sharper floors, stairs and walls at grazing angles). gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:3584
BB_AUTO_NOHIZ 0 = off (default 1) On GCN 3–5 GPUs under RADV (Polaris, Vega and their APUs) run.sh sets RADV_DEBUG=nohiz to avoid black halos/missing geometry from depth compression; 0 disables that. Ignored if you set RADV_DEBUG yourself. run.sh:212
BB_DLSS 0 = off; unset = on when available NVIDIA DLSS through the optional bridge library (libbbport_dlss.so + NVIDIA's libnvidia-ngx-dlss). 0 disables it; without the libraries or on other GPUs nothing changes. gpu/shadps4/video_core/renderer_vulkan/vk_dlss.cpp:176, gpu/shadps4/video_core/renderer_vulkan/vk_dlss.h:8
BB_FSR1 1/y/t or 0 (off) shadPS4's FSR 1 pass in the presenter (spatial upscale of the final image); separate from the port's upscalers (bbport.ini upscaler). gpu/shim/core/emulator_settings.h:59, gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp:175
BB_FSR411_DIR directory (unset = fsr4_411 next to run.sh) Internal (run.sh sets it to /fsr4_411 when that exists). Where the FSR 4.1.1 assets built by tools/fsr4cap/build_assets.sh are looked up. gpu/shadps4/video_core/renderer_vulkan/vk_fsr4.cpp:244, run.sh:34, launcher/bbport_launcher.py:449
BB_FSR411_VARIANT int8 / fp8emu (unset = FP8 when the GPU supports it and its assets exist, else INT8) Forces which FSR 4.1.1 model variant runs: int8 skips FP8; fp8emu uses the emulated-FP8 set (needs FP16 cooperative matrices). gpu/shadps4/video_core/renderer_vulkan/fsr411/fsr411.cpp:295
BB_FSR4_DIR directory (fsr4_shaders) Where the FSR 4 (v07) SPIR-V passes and weights from tools/fetch_fsr4_assets.sh are loaded from. gpu/shadps4/video_core/renderer_vulkan/vk_fsr4.cpp:26, gpu/shadps4/video_core/renderer_vulkan/vk_fsr4.h:7
BB_FSR4_LINEAR 0 = off; unset/other = on FSR 4 gets the game's tonemapped sRGB frame decoded to linear light and the output encoded again. 0 (or toggle bit 63): the encoded frame as before (A/B). gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:1846
BB_FSR4_OPT 0 = originals; unset/other = optimized FSR 4 uses the fixed/faster passes from fsr4_shaders/opt/ (tools/fsr4_optimize.sh) when present. 0 keeps AMD's original passes. gpu/shadps4/video_core/renderer_vulkan/vk_fsr4.cpp:126
BB_FSR_SHARPNESS number 0–2 (bbport.ini sharpness, default 0.5) Upscaler sharpening (RCAS) strength; overrides the bbport.ini/menu value "sharpness" at start. Above 1 an extra sharpen pass adds the rest. gpu/shim/bbport_settings.cpp:199, gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:1269
BB_INTEL_TONEMAP_FIX 0 | 1 (default: on for Intel CPUs, off otherwise) Applies the community "Intel Black Tonemap Fix" patch (tone mapping turns black on Intel CPUs, DLC areas most); 0/1 forces it off or on. scripts/patches.py:59-62, scripts/patches.py:100
BB_INTERP_INT_FIX 1 = on, 0 = off (unset = on for GPUs without fragment-shader barycentrics, e.g. older NVIDIA/Pascal) Forces the integer-interpolation workaround in translated shaders on or off. gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp:414
BB_JITTER 0/1 (1; overrides bbport.ini jitter) Camera jitter for the temporal upscalers. gpu/shim/bbport_settings.cpp:199, gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:354
BB_MOTION_LARGE 0 = off; unset/other = on Large bone palettes (16–64 KiB, the large beasts) get object motion vectors like small skeletons. 0 leaves them to camera vectors as before. gpu/shadps4/video_core/renderer_vulkan/motion_history.h:46
BB_OBJECT_MOTION 0/1 (bbport.ini object_motion, off by default) Per-object motion vectors for the temporal upscaler: less ghosting on characters, about 10% FPS. The variable overrides bbport.ini at start. gpu/shim/bbport_settings.cpp:202, gpu/shadps4/video_core/renderer_vulkan/vk_object_motion.cpp:58
BB_OCCLUSION_QUERIES 1 = on (off; BB_PM4_SELFTEST=1 also turns it on) Opt-in: the game's occlusion queries become real Vulkan occlusion queries. Off: counters are a fixed "everything visible" sequence (the 0.3 model), because with an upscaler jittered tests made light glows flash. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:253
BB_ZPASS_IN_ORDER 0 = off; unset/other = on Without BB_OCCLUSION_QUERIES: the stand-in occlusion counts are written in order with the draws, after the DMA that zeroes the query's block, as on the PS4. Written ahead of it, the game's queries never finished and it made new ones until it read a null handle (issue #23). 0: written at decode, as before. gpu/shadps4/video_core/amdgpu/liverpool.cpp:588
BB_RCAS 1/y/t or 0 (1) RCAS sharpening in shadPS4's presenter FSR 1 pass (only with BB_FSR1); not the in-game Sharpening (RCAS) setting. gpu/shim/core/emulator_settings.h:65, gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp:176
BB_RCAS_ATTENUATION integer, thousandths (250 = 0.25) RCAS attenuation of shadPS4's presenter FSR 1 pass. gpu/shim/core/emulator_settings.h:26, gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp:178
BB_REACTIVE 0/1 (bbport.ini reactive, off by default) Reactive mask for the upscaler (opt-in): on Bloodborne's thin mist it trades trails for jitter shimmer. Overrides bbport.ini at start. gpu/shim/bbport_settings.cpp:200, gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:947
BB_REACTIVE_MAX 0-1 (0.9; overrides bbport.ini reactive_max) Upper bound of the TAA reactive mask (never fully reactive). gpu/shim/bbport_settings.cpp:201, gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:1064
BB_REACTIVE_SCALE 0-16 (1; overrides bbport.ini reactive_scale) Reactive mask = relative colour change times this scale. gpu/shim/bbport_settings.cpp:200, gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:1064
BB_REACTIVE_THRESHOLD 0-1 (0.2; overrides bbport.ini reactive_threshold) Reactive mask is zero below this colour change. gpu/shim/bbport_settings.cpp:201, gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:1064
BB_UPSCALER off / fsr3 / fsr4 / fsr411 / taa / dlss / none (unset = bbport.ini upscaler / in-game menu) Overrides the upscaler chosen in bbport.ini/menu at start; any unknown value means off. none also disables the upscaler machinery entirely (no camera tracking, the menu cannot turn it on). scripts/patches.py only distinguishes fsr3 from everything else. gpu/shim/bbport_settings.cpp:192, gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:190, scripts/patches.py:511
BB_UPSCALE_PRESET 0 Native AA, 1 Quality, 2 Balanced, 3 Performance, 4 Ultra Performance (overrides bbport.ini preset) Upscaler preset at start. Note: run.sh's startup render size still comes from bbport.ini; only patches.py --print-preset-size honours it. gpu/shim/bbport_settings.cpp:202, scripts/patches.py:513
RADV_DEBUG RADV flags (run.sh may set nohiz) Mesa RADV debug flags; if you set it, run.sh's automatic nohiz for GCN 3–5 (BB_AUTO_NOHIZ) is skipped. run.sh:212

Performance & memory

Variable Values (default) What it does Where
BB_ASYNC_PIPELINES 0 = off; anything else / unset = on New graphics pipelines of passes drawn every frame compile on worker threads while their draws are skipped for a frame or two, instead of the game standing still for the driver. 0: compiled on the GPU thread, the game waits. gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp:734, gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.h:212
BB_ASYNC_PIPELINE_THREADS integer ≥1 (unset = CPU threads / 4, clamped 1–4) Number of worker threads for BB_ASYNC_PIPELINES. gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp:643
BB_ASYNC_SUBMIT 0 = off; unset/other = on Submissions go out from the recording threads once their segments are recorded, instead of the GPU thread waiting for them (~65 µs each). Only with recording worker threads. gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.cpp:150
BB_CONSTANTS_IN_PLACE 1 = on (off) With BB_GUEST_IN_PLACE: small read-only buffers (constants) are read by the GPU where the game wrote them instead of being copied when the draw is decoded or recorded. Experiment toggle bit 1 inverts it at run time. gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:507, gpu/shadps4/video_core/buffer_cache/buffer.h:57
BB_CONSTRAM_PIPE 0 = off; unset/other = on With the two-stage draw pipe: before the command processor writes guest memory with the CPU (constant RAM dump), it waits only for the queued packets that read those bytes, not all of them. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:900, gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.h:114
BB_COPY_GPU_BUFFERS first char 1/y/t = on; run.sh exports 1 when unset (code default without run.sh: off) Internal. The command buffers of each submission are copied when the game submits them and decoded from the copy (the game reused that memory before the GPU thread got to it: "Unimplemented PM4 type 0" after loading a save). 0 decodes guest memory directly. run.sh:276, gpu/shim/core/emulator_settings.h:56, gpu/shadps4/video_core/amdgpu/liverpool.h:252
BB_COPY_MERGE_KB integer KiB (64) Maximum gap between buffer copies of the game's copy shader (HLE path) that are merged into one batch. gpu/shadps4/video_core/renderer_vulkan/vk_shader_hle.cpp:203
BB_COPY_SHADER_NATIVE 0 = HLE; unset/other = native With the game's memory in place, the game's buffer copy shader runs as itself (translated). 0: the copy list is read on the CPU and copied by the port (older HLE path). Experiment bit 2 inverts it at run time. gpu/shadps4/video_core/renderer_vulkan/vk_shader_hle.cpp:272
BB_COPY_THREADS 0-16 (a quarter of the available hardware threads, 1-4) Number of threads that split large guest memory copies. gpu/shim/bbport_copy.cpp:30, src/runtime_memory.c:738
BB_DIRECT_SEGMENT 0 = off; unset/other = on With BB_ASYNC_SUBMIT, commands recorded on the GPU thread (e.g. upscaler passes) get their own command-buffer segment instead of waiting for the recording threads (~90 µs). 0: the wait. gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.cpp:647
BB_DMEM_MB MiB, 5056–16384 (default 5056; run.sh sets 9152 for render sizes above 1080p) Direct memory size reported to the game (retail PS4: 5056 MiB); the resolution patches above 1080p need more or the game exits at start. src/runtime_memory.c:22-30, run.sh:132, run.sh:132
BB_DRAW_PIPE 1 = on, 0 = off (unset = on with 8+ CPU threads) Launcher: Advanced > Performance > "Two-stage GPU pipeline" (Auto/On/Off). Two-stage GPU command pipeline (decode and record on separate threads): 20–30% faster; turn off if unstable. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:830, launcher/bbport_launcher.py:657
BB_FAULT_SKIP_TEXTURES 0 = off; unset/other = on A write fault on a page no tracked image protects skips the texture cache lock (guest threads no longer wait 0.3–0.6 s behind texture uploads). 0: every fault takes the lock, as before. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:4328
BB_FAULT_WINDOW KiB, clamped 4-1024 and rounded up to a power of two (256) Size of the window unprotected around a guest write fault (write tracking), so neighbouring writes do not fault again. Window at or below one tracker page = feature off. gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:691-698
BB_FPS_LIMIT frames per second; 0 or unset = no limit Launcher: Graphics > Frame rate > FPS limit (set only when > 0). Frames per second the present thread lets through. gpu/shim/core/emulator_settings.h:51, launcher/bbport_launcher.py:655
BB_FRAMES_AHEAD integer ≥0 (1); 0 = no bound The GPU command thread runs at most this many guest frames ahead of the GPU, so GPU-bound frames finish at an even rate instead of in bursts. gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp:475
BB_GARLIC_VRAM 0 = off; any other value on (unset = on, except on integrated GPUs) With the PC memory model, Garlic memory (what the GPU reads a lot: geometry, textures) gets a VRAM copy kept current like a default heap; 0 keeps it in place too. Ignored when the fixed arena is in use. gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:474-479, 2189-2192
BB_GC_IDLE_SECONDS seconds, clamped 1-63 (20) Texture collector: below the pressure mark an image is evicted once unused for this long (the textures of an area left behind). gpu/shadps4/video_core/texture_cache/texture_cache.cpp:1345, 1367-1371
BB_GC_PRESSURE_IDLE_SECONDS seconds, clamped 0-63 (5) Texture collector: under VRAM pressure an image is evicted once unused for this long (over the critical mark for 1 s first, then by submissions). gpu/shadps4/video_core/texture_cache/texture_cache.cpp:1379-1388
BB_GC_PRESSURE_PERCENT percent, clamped 10-75 (60) Texture collector, dedicated GPUs below 8 GB: the pressure mark is at least this share of the budget (was 40 %, about what the game holds outside textures, so such cards were under pressure all session). The critical mark is unchanged. gpu/shadps4/video_core/texture_cache/texture_cache.cpp:62-76
BB_GC_KEEP_GPU_WRITTEN 0 = off; else on (on) Texture collector: images the GPU wrote stay in VRAM until past the critical mark and unused for a minute, linear ones like tiled ones (issue #30). 0: linear ones are downloaded and freed under mere pressure, as before. gpu/shadps4/video_core/texture_cache/texture_cache.cpp:1453
BB_GC_TILE_BACK 0 = off; else on (on) Texture collector: past the critical mark, a GPU-written tiled image unused for a minute is tiled back into the game's memory before it is freed (issues #13, #14). 0 = dropped unwritten as before, which left the Hunter's Dream black. Multisampled images are always dropped. gpu/shadps4/video_core/texture_cache/texture_cache.cpp:1435-1470, 201-250
BB_GPU_COMMAND_WRITES 0 = off; unset/other = on With BB_GUEST_IN_PLACE: the game's WRITE_DATA commands are performed by the GPU in stream order, as the PS4 command processor does, instead of a CPU store at decode time. 0: CPU store. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:212, gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.h:204
BB_GPU_LABELS 0 = off; 1 = on; unset = on except on AMD GFX8 (Polaris, RX 4xx/5xx) With BB_GUEST_IN_PLACE and honest labels: end-of-pipe labels (fences) are written by the GPU itself into the game's memory. 0: by a CPU thread after the GPU. GFX8 stalled with GPU-written labels (upstream #203), so it gets the CPU's unless 1. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:301-316
BB_GPU_SPIN_US microseconds, negative = 0 (200 with 12+ hardware threads, else 0) The GPU command thread spins this long before sleeping when it runs out of work, so the next of the ~20 submissions of a frame is picked up without a condition-variable wake-up. 0 = no spinning (saves CPU on small machines). gpu/shadps4/video_core/amdgpu/liverpool.cpp:163-171
BB_GPU_TIMESTAMPS 0 = off; unset/other = on With BB_GUEST_IN_PLACE: the game's GPU timestamps (100 MHz clock) are written by the GPU in stream order. 0: written by the CPU. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:290
BB_GPU_WRITE_TWINS 1 = on; run.sh exports 1 when unset (code default without run.sh: off) Internal. A guest write into a page holding bytes the GPU is still writing (counters, small compute outputs) does not wait for the GPU: the guest's bytes are kept as a "twin". Not with BB_READBACKS=2. run.sh:279, gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:291-306
BB_GPU_WRITE_TWINS_MAX bytes per page; run.sh exports 65536 when unset (code default without run.sh: 1024) Internal. Only pages with at most this many GPU-written bytes get twins; larger outputs (vertices the CPU reads back, FaceGen) keep waiting for the GPU. run.sh:279, gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:296, 308-313
BB_GUEST_GPU_MEMORY 1 = on (off; implied by BB_GUEST_IN_PLACE=1 on a capable GPU) Guest direct memory comes from GPU-visible Vulkan chunks (dma-buf, or host import on NVIDIA) instead of the memfd, so the GPU reads the game's data in place. Disables BB_UFFD (dma-buf cannot be write-protected by userfaultfd). gpu/shim/bbport_guest_memory.cpp:700-718, gpu/shadps4/video_core/page_manager.cpp:723-728, run.sh:195
BB_GUEST_IN_PLACE 1 = on, anything else = off Internal (run.sh: = BB_PC_MODEL, forced 0 by BB_AS_0_3=1; set by hand overrides the memory model). The GPU uses the game's direct memory where it is (GPU-visible chunks) instead of copies in VRAM, and command-processor writes/labels/timestamps are done by the GPU in order. Part of the new memory model (BB_PC_MODEL=1). gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:515, gpu/shadps4/video_core/buffer_cache/buffer.h:38, run.sh:239
BB_GUEST_MEMORY dmabuf, host, or unset (AMD: dma-buf chunks; other GPUs: host memory import first) How the game's direct memory is made GPU-visible in the new memory model: dma-buf chunks or imported host memory (VK_EXT_external_memory_host). host fails instead of falling back when import does not work. gpu/shim/bbport_guest_memory.cpp:668
BB_GUEST_VRAM 1 or unset (off) Experiment: the game's direct memory in VRAM the CPU maps through the PCI BAR (Resizable BAR), as GDDR is the PS4's one memory: no VRAM copies. gpu/shim/bbport_guest_memory.cpp:37
BB_HONEST_FLUSH_US integer µs (2000; a header comment says 1000) With honest labels: at the end of a guest submission, recorded work that signals wait for is submitted at most once per this interval while the GPU still has work. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:400
BB_HONEST_IDLE_BACKLOG integer bytes (65536) With honest labels: work is not submitted early "because the GPU is idle" while this many bytes of draws are still queued for the recording thread. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:416
BB_HONEST_IDLE_FLUSH 0 = off; unset/other = on With honest labels: signalled work is submitted at once when the GPU has finished everything submitted (instead of waiting for BB_HONEST_FLUSH_US). gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:412
BB_HONEST_LABELS 1 = on (unset = on only with BB_GUEST_IN_PLACE) Fences/labels (EOP, EOS, mem semaphores) are written once the GPU has finished the work before them, as the hardware does, instead of when that work is recorded. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:98, gpu/shadps4/video_core/amdgpu/liverpool.cpp:448
BB_HOST_COPY_WAITS all (unset = only when needed) Internal (run.sh sets all with BB_AS_0_3=1). all: before every guest write, wait for all host copies (the old 0.3 behaviour). Default: wait only when a host copy may still read the written range. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.h:130, run.sh:239
BB_INDIRECT_GUARD 0 = off; unset/other = on Guards indirect compute dispatches: implausible group counts (garbage from particle simulations that caused device lost) are zeroed and the dispatch skipped, and counted in the log. 0: the game's counts as they are. gpu/shadps4/video_core/renderer_vulkan/vk_indirect_guard.cpp:57, gpu/shadps4/video_core/renderer_vulkan/vk_indirect_guard.h:11
BB_INDIRECT_DRAW_GUARD 0 = off; unset/other = on Guards indirect draws: a vertex (or index) count times the instance count past BB_INDIRECT_DRAW_GUARD_MAX (garbage that would keep the GPU busy past the driver's timeout, issue #19) is zeroed and the draw skipped, and counted in the log. An open render pass is paused for the check and continued. 0: the game's arguments as they are. gpu/shadps4/video_core/renderer_vulkan/vk_indirect_draw_guard.cpp:60, gpu/shadps4/video_core/renderer_vulkan/vk_indirect_draw_guard.h:13
BB_INDIRECT_DRAW_GUARD_MAX integer 1–4294967295, decimal or 0x hex (16777216); invalid keeps the default Most vertices (or indices) times instances one indirect draw may run before BB_INDIRECT_DRAW_GUARD skips it. gpu/shadps4/video_core/renderer_vulkan/vk_indirect_draw_guard.cpp:42
BB_INDIRECT_GUARD_MAX integer 1–4294967295, decimal or 0x hex (4194304); invalid keeps the default Most workgroups one indirect dispatch may launch before BB_INDIRECT_GUARD skips it. gpu/shadps4/video_core/renderer_vulkan/vk_indirect_guard.cpp:35
BB_LAYER_MEMORY 1 = on, 0 = off (unset = chosen by the memory model per GPU) The layer's memory module: the game's memory bound in place with VRAM copies, without sparse binding (NVIDIA's sparse binding stalls the GPU for seconds). 0: AMD's sparse arena. See BB_PC_MODEL. gpu/shim/bbport_guest_memory.cpp:546, run.sh:204
BB_LAYER_MIRROR_FLOOR_PERCENT percent, max 90 (25) Layer memory module: share of the driver's VRAM budget the VRAM mirrors keep against the texture collector; above it they yield to images, below it images yield. gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:3930
BB_LAYER_MIRROR_GROWTH_MB MiB; 0 = none (64) Layer memory module: the most room a growing VRAM mirror gets above its current end. gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:610-616
BB_LAYER_RELOAD_RESET 0 = off; else on (on) Layer memory module: a block the GPU once wrote in place that the loaders then write whole may have a VRAM copy again (dynamic blocks piled up over area loads and lamp travel, lowering the frame rate). 0: kept in place for good, as before. gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:2596
BB_LAYER_UNMAP_RESET 0 = off; else on (on) Layer memory module: blocks the game unmaps whole lose what kept them in place (CPU writes, GPU writes in place, failed watches); memory mapped there again starts as new. 0: as before. gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:3308
BB_LAYER_READ_TRAPS 1 = on (off) What the GPU writes into a VRAM copy only is made no-access for the CPU until it is copied back, so the CPU never reads stale data. Off by default for now. gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:1285
BB_LAYER_WATCH 0 = off; else on (on; needs BB_LAYER_WRITE_TRAPS) Layer memory module: blocks the CPU writes unannounced get VRAM copies too, write-trapped and uploaded again after the CPU's next write. gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:410-424
BB_PC_MODEL 1 = new | 0 = 0.3 model (default: 1 on AMD GPUs, 0 elsewhere) Launcher: Advanced → "Memory and translation model" (Auto leaves it to run.sh). Memory model: 1 = the GPU uses the game's memory in place and the command processor's work is translated (implies BB_GUEST_IN_PLACE=1); 0 = 0.3 model (VRAM copies, write tracking). A value in extra variables wins over "Auto". run.sh:212, run.sh:199, launcher/bbport_launcher.py:671
BB_PC_MODEL_ANY_GPU 1 or unset (off) Lets the new memory model's sparse arena run on non-AMD GPUs that would otherwise fall back to the 0.3 model (NVIDIA: rebinding memory held the GPU for seconds). gpu/shim/bbport_guest_memory.cpp:513, gpu/shim/bbport_guest_memory.h:35
BB_PIPELINE_CACHE 1/y/t or 0 (1) The port's pipeline cache: shaders are compiled again at startup from the stored list (warm-up). 0 turns it off. gpu/shim/core/emulator_settings.h:64, gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_serialization.cpp:330
BB_PIPE_SIGNALS 0 = off; unset/other = on (with honest labels and the draw pipe) Fences, GPU-idle/frame signals and their submissions are handed to the draw recording thread as ordered tasks instead of draining it first (~15 waits a frame). gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:376, gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.h:234
BB_PIPE_SPIN_US integer µs ≥0 (200 with 12+ CPU threads, else 50) How long the draw-pipe consumer spins waiting for work before sleeping. Lower values leave more CPU to the game on few-core machines (Steam Deck). gpu/shadps4/video_core/renderer_vulkan/vk_draw_pipe.h:209
BB_PREP_WORKERS integer 0–16 (half the CPU threads, clamped 1–8) Number of idle-priority worker threads that prepare draws speculatively ahead of the GPU thread (pipeline and resource selection). 0 = none. gpu/shadps4/video_core/renderer_vulkan/vk_draw_prep.cpp:54
BB_PREUPLOAD 0 = off, 1 = rewritten memory already in VRAM only (no new VRAM), 2 = all of the game's GPU memory (~3 GB more VRAM); without run.sh unset = 0 Launcher: Advanced > Performance > "Background pre-upload into VRAM" (run.sh exports 1 when unset). Background upload of the game's GPU memory into VRAM ahead of use: fewer hitches when areas load. Always off with BB_GUEST_IN_PLACE (the GPU reads the game's memory itself). gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:386, run.sh:197, launcher/bbport_launcher.py:661
BB_PREUPLOAD_MB integer MiB per frame (16) Most memory the background pre-upload (BB_PREUPLOAD) puts into VRAM per frame. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:1625
BB_READBACKS 0 = off, 1 = relaxed, 2 = precise (1 = relaxed) Launcher: Advanced > Performance > "GPU data readbacks by the CPU" (Relaxed = unset, Off = 0, Precise = 2). shadPS4's GPU readback mode. Relaxed by default: without readbacks FaceGen reads stale GPU-written vertices (vertex explosions). 2 also read-protects GPU-written pages and disables BB_GPU_WRITE_TWINS. gpu/shim/core/emulator_settings.h:27-29, launcher/bbport_launcher.py:659, 524-525
BB_READBACK_LINEAR 1/y/t or 0 (off) shadPS4's readback of linear (untiled or narrow) images to guest memory. gpu/shim/core/emulator_settings.h:66, gpu/shadps4/video_core/texture_cache/texture_cache.cpp:786
BB_READBACK_QUEUE 0 = off; unset/other = on Uses a separate compute/transfer queue to read back GPU data finished long ago, without waiting behind the queued frame. 0 turns it off. gpu/shadps4/video_core/renderer_vulkan/vk_instance.cpp:499
BB_STAGING_KEEP_MB integer MiB (512) How much of the staging upload ring is kept (and populated at startup) instead of being trimmed when idle; re-creating blocks during streaming bursts caused stutter. gpu/shadps4/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp:27
BB_SUBMIT_AHEAD integer >= 0 (2) The first K submissions of a frame do not wait for the previous frame, so translation overlaps the GPU (1080p Yahar'gul: 101 -> 154 FPS). 8 or more leaked the game's heap; if the heap grows anyway K becomes 0 for the session. gpu/shadps4/core/libraries/gnmdriver/gnmdriver.cpp:134-149
BB_TEXTURE_HELPER 1 = on, 0 = off (unset = off) A spinning helper thread binds textures for the draw recording thread. Measured neutral on 16 threads, so opt-in. gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:2195
BB_UFFD first char 1 = on (run.sh: 0) Internal (run.sh exports 0 when unset). Write tracking with userfaultfd write-protection instead of mprotect (no address-space write lock); falls back to mprotect if the kernel lacks it. Off by default: the Steam Deck crashed with it. Ignored with BB_GUEST_GPU_MEMORY=1. run.sh:272, gpu/shadps4/video_core/page_manager.cpp:545-551, 723-737
BB_VBLANK_HZ Hz; 0 or >120 = uncapped (60 if unset in the library) Internal (run.sh derives it from BB_FPS (uncap 480, 90 90, else 60). Vblank rate. Above 120 Hz (or 0) a finished frame is presented at once instead of on the next vblank tick; 60/90 are the fixed-timestep presets. gpu/shim/core/emulator_settings.h:30, run.sh:280
BB_VK_RECORD_THREAD 0 = off; unset/other = on Vulkan commands are recorded on dedicated recording threads. 0 records on the calling thread (suspected in vertex explosions, issue #39). gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.cpp:120
BB_VK_RECORD_THREADS integer 1–8 (3 with 12+ CPU threads, 2 with 8+, else 1) Number of Vulkan recording threads; the command stream is cut into segments recorded in parallel. gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.cpp:97
BB_VK_SEGMENT_KB integer KiB ≥1 (64) Size of command-stream segments handed to the recording threads (~60 draws per 64 KiB). gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.cpp:127
BB_VMA_BLOCK_MB integer MiB ≥1 (64; VMA's own default is 256) Size of Vulkan memory allocator blocks. Smaller blocks are returned to the driver sooner when freed. gpu/shadps4/video_core/renderer_vulkan/vk_instance.cpp:906
BB_VMA_DEDICATED_MB MiB; 0 = never (4) Images of this size or more get dedicated memory, returned to the driver when freed (shared VMA blocks left ~0.9 GB of holes after texture evictions). gpu/shadps4/video_core/texture_cache/image.cpp:107-113
BB_VRAM_IDLE_SECONDS seconds (60) Mirrored (VRAM-copied) blocks not bound for this long go back in place. gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:1823, gpu/shadps4/video_core/buffer_cache/buffer_cache.h:412
BB_VRAM_PRESSURE_IDLE_SECONDS seconds (3) Near the critical VRAM mark, blocks no binding used directly for this long (an area left behind) go back in place first, longest unused first. gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:903-913
BB_VRAM_PRESSURE_PERCENT percent, max 95; 0 = off (85) How full VRAM is against the driver's budget: "tight" from this percent, "full" 5 points above (fewer VRAM copies then). gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:2045
BB_VRAM_PROMOTE_PERCENT percent (90) Past this share of the driver's VRAM budget no new VRAM copies are made; candidates wait and are read in place meanwhile (issue #32: 8 GB cards). gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:3944
MESA_SHADER_CACHE_MAX_SIZE size (run.sh default 4G) Mesa's shader cache size, larger than Mesa's default. run.sh:31
__GL_SHADER_DISK_CACHE run.sh default 1 NVIDIA's shader disk cache on (run.sh default; keeps compiled pipelines between sessions). run.sh:25-30
__GL_SHADER_DISK_CACHE_SIZE bytes (run.sh default 10737418240) NVIDIA's shader cache size (10 GiB by default here). run.sh:30
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP run.sh default 1 NVIDIA's shader cache without its size cleanup (as Steam sets it). run.sh:29

| BB_WINDOW_RECT | x,y,w,h as fractions of the game's display, e.g. 0,0,1,0.5 (default off) | Local co-op: the window's place and size on the game's display (BB_DISPLAY), without borders, instead of fullscreen. Needs X11 (SDL_VIDEO_DRIVER=x11): Wayland lets no window place itself. | gpu/shim/window.cpp |

Controls & input

Variable Values (default) What it does Where
BB_GAMEPAD SDL GUID, part of the name, or the device path (/dev/hidrawN, /dev/input/eventN; the log's gamepad connected line shows it) (default: first controller) Launcher: Controls → Gamepad → "Controller". Preferred controller, so wheels and other always-connected devices do not take over. The path tells two pads of the same model apart (local co-op). src/runtime_pad.c (preferred_gamepad), launcher/bbport_launcher.py:642
BB_GAMEPAD_STRICT 1 (default off) Local co-op: only the BB_GAMEPAD controller, never the first one or the one in use instead; with no BB_GAMEPAD, no controller at all. src/runtime_pad.c (gamepad_strict)
BB_KEYBOARD 0 (default on) Local co-op: this game ignores the keyboard and the mouse, and never takes the mouse. src/runtime_pad.c (keyboard_enabled)
BB_PAD_BACKGROUND 1 (default off) Local co-op: the controller keeps driving the game while another window has the focus, and the game keeps its sound then (bbport.ini's mute_unfocused is ignored). Launcher: the Multiplayer → Local tab sets it, with BB_WINDOW_RECT, BB_GAMEPAD, BB_GAMEPAD_STRICT, BB_KEYBOARD, BB_AUDIO and BB_DATA_DIR for each player (launcher/bbport_coop.py). gpu/shim/window.cpp, gpu/shim/bbgpu.cpp (bbgpu_audio_muted)
BB_MOUSE_DEADZONE 0–100 of 127 (default 16) Minimum right-stick deflection used for mouse look, so slow mouse movement still turns the camera past the game's dead zone. src/runtime_pad.c:760
BB_PAD_CENTER lx,ly,rx,ry (default: measured) Overrides the measured neutral position of each stick axis. src/runtime_pad.c:27, src/runtime_pad.c:113-118
BB_PAD_CENTER_CAL 0 = off (default on) Disables measuring each axis' neutral and travel (for third-party pads whose axes are biased). src/runtime_pad.c:28, src/runtime_pad.c:110
BB_PAD_DEADZONE 0–126 (default 5) Launcher: Controls → "Stick dead zone (%)" (percent × 127 / 100; written only when not 4 %). Inner stick dead zone, as shadPS4's analog_deadzone. src/runtime_pad.c:113, launcher/bbport_launcher.py:645
BB_PAD_DEADZONE_OUTER 1–127 (default 127) Outer stick dead zone: travel up to this value maps to full deflection (helps pads that never reach full). src/runtime_pad.c:26, src/runtime_pad.c:115
BB_PAD_LIGHTBAR RRGGBB hex colour, an optional leading # (unset: SDL's own, the player's colour) Launcher: Controls → "Controller light bar colour" (set only when on). Every controller with a light bar (DualShock 4, DualSense) shows this colour, set when it is opened. src/runtime_pad.c:297, launcher/bbport_launcher.py:649, launcher/bbport_launcher.py:1461
BB_PROMPTS playstation | xbox | switch | keyboard (default playstation) Launcher: Controls → Gamepad → "Button prompts" (Automatic follows the controller). Button prompts of the game's menus, made from the game's files at start. run.sh:136, scripts/menu_prompts.py:57, launcher/bbport_launcher.py:631
BB_STEAM_INPUT_X11 0 = keep Wayland (default on) Launched from Steam with Steam Input on a Wayland desktop, the game window goes through Xwayland (SDL_VIDEO_DRIVER=x11): Steam sends its virtual controller's input only to a focused window it can see, and it sees only X11 windows (issue #12). Not when SDL_VIDEO_DRIVER is set. run.sh
BB_STEAM_OVERLAY 1 = on (default 0) Launcher: Setup → Game → "Steam overlay", under "Add to Steam" (saved as soon as it changes). Started from Steam, the game gets Steam's 64-bit gameoverlayrenderer.so in LD_PRELOAD, read from the nearest process above that still has it (the AppImage's sharun clears LD_PRELOAD in every program it runs), and nothing else Steam preloads. On a Wayland desktop the window goes through Xwayland (SDL_VIDEO_DRIVER=x11), since Steam draws its overlay only on X11 windows; not when SDL_VIDEO_DRIVER is set (issue #28). run.sh:370, launcher/bbport_launcher.py:687, launcher/bbport_launcher.py:1260

Audio

Variable Values (default) What it does Where
BB_AUDIO none, or unset (sound on) none keeps the game silent: the runtime uses a silent timer instead of an SDL audio device, and the trophy chime is off too. src/runtime_audio.c:83, gpu/shim/bbport_overlay.cpp:832
BB_AUDIO_DUMP file path prefix (default off) Writes the raw converted PCM of each audio port to .port.ch.. src/runtime_audio.c:252
BB_AUDIO_GAIN float >0 and ≤8 (default 1.0) Master gain applied to the game's audio output. src/runtime_audio.c:173
BB_AUDIO_STATS any value = on (default off) Per-port audio timing statistics (gaps between submissions) in the log. src/runtime_audio.c:251
BB_AUDIO_TRACE 1 = on (default off) Logs AJM decoder configurations and failing jobs, plus sound file opens and failed reads (missing game sounds). src/runtime_ajm.c:77, src/runtime_file.c:222
BB_SOUND_HACK 0 = off (default on) Bloodborne "sound hack": sets the flag at 0x204E of userdata0010 in each save before the game reads it, otherwise some sounds (e.g. weapon sounds) never play; 0 leaves saves untouched. src/runtime_savedata.c:72-79

Game & patches

Variable Values (default) What it does Where
BB_FPS uncap | 60 | 90 | 30 (default uncap) Launcher: Graphics → Frame rate → "Mode". Frame-rate patch: uncap = delta-time patch with 480 Hz vblank and sprint fix; 60/90 = fixed-timestep patches (90 adds the sprint fix); 30 = unpatched. Also picks BB_VBLANK_HZ when that is unset. run.sh:77, run.sh:77, scripts/patches.py:17-21
BB_GAME_MENU 0, or unset (on) 0 leaves the game's System menu as it is: no port pages (Display, Game effects, Game patches) built into the game's own menu. gpu/shim/bbport_game_menu.cpp:596, gpu/shim/bbport_game_menu.h:5
BB_GESTURES_NO_MOTION 0 | 1 (default 0) Launcher: Controls → Gamepad → "Gestures menu without motion-control icons". Dommo's stripped-down gestures menu (no motion-control icons), made from the game's files at start. run.sh:137, scripts/menu_prompts.py:15, launcher/bbport_launcher.py:632
BB_GX_COMMAND_HEAP 0 = off (default 1) Patch that enlarges the game's two per-frame GX command heaps to 1 MiB (crashes when a frame fills the 256 KiB heap); 0 keeps the game's size. scripts/patches.py:83-91
BB_LANGUAGE PS4 system language number: 0 Japanese, 1 English, 2 French, 3 Spanish, 4 German, 5 Italian, 8 Russian, ... (runtime default 1) Launcher: Setup > Game language (Auto: from the desktop locale). The system language the runtime reports to the game; also picks the trophy names' language and the in-game menu's default language. src/runtime_services.c:70, gpu/shim/bbport_game_menu.cpp:104, launcher/bbport_launcher.py:635
BB_MODS_ENABLED 0 | 1 (default 1) Launcher: Mods → Mods → "Load mods". Whether mods are merged into the game's files for this launch. run.sh:166, launcher/bbport_launcher.py:629
BB_PATCHES patch names separated by ";" (default none) Extra patch names (from patches/Bloodborne.xml) applied at start. run.sh:190, run.sh:190
BB_REGION eu | na | empty (default: the dump's param.sfo) Launcher: Setup → "Game region". The game's region for this launch; picks the regional text (e.g. Spanish from Spain or Latin American). run.sh:189, scripts/content_profile.py:3-5, launcher/bbport_launcher.py:636
BB_SKIP_GAME_CHECK 1 = skip (default check) Skips the check that the game files are the supported 1.09 dump (wrong eboot, missing update, broken extraction). scripts/game_check.py:11, scripts/game_check.py:72, scripts/prepare.py:288
BB_SKIP_NETWORK_CHOICE 0 | 1 (default 1) Launcher: Multiplayer → Online → "Skip the "play online / offline" choice" (default on). Patch: the title screen goes straight to the main menu, online when online play is on (BB_ONLINE=1), as PLAY ONLINE on a PS4, offline otherwise; 0 shows the online/offline dialog. scripts/patches.py:73-80, launcher/bbport_launcher.py:650
BB_TROPHY_KEY 32 hex characters (default none) Launcher: Trophies → "Trophy key". The PS4 trophy key; decrypts trophy names and descriptions in the game's language (without it they are in English). run.sh:351, scripts/trophies.py:495, launcher/bbport_launcher.py:689
BB_USER_NAME text (Hunter) The PS4 user name reported to the game and the online module; also the default answer to a text-input dialog when the on-screen keyboard is unavailable. src/runtime_services.c:55, gpu/bbnet/include/core/user_manager.h:38

Saves & files

Variable Values (default) What it does Where
BBSC_SAVE_DIR folder path; default unset Folder holding userdata0000.. on hosts that keep saves elsewhere (bbhost); BBSC counts its slots as the active save and copies it in its save backups. On the port BBSC looks in ./user (working folder) otherwise. bbsc/emulator/src/core/bloodborne_re.cpp:5931, bbsc/emulator/src/core/bloodborne_re.cpp:14468
BB_CONFIG path (run.sh: /bbport.ini; the GPU library alone: ./bbport.ini) Internal (run.sh default $BB_DATA_DIR/bbport.ini). Path of bbport.ini, the settings file read by the GPU library (in-game menu settings), the controls (key./pad. lines) and the launcher. run.sh:21, gpu/shim/bbport_settings.cpp:21, src/runtime_pad.c:519
BB_DATA_DIR directory (default: the port directory; AppImage/Nix: $XDG_DATA_HOME/bbport) Internal. Writable directory for generated files (out/), saves (user/), bbport.ini, mods, patches and logs. run.sh:16-18, launcher/bbport_launcher.py:56, packaging/appimage-sharun.sh:74
BB_DLC_DIR directory (default none) Launcher: Setup → "DLC folder". Folder with the dumped add-ons (one folder each, e.g. SPEXPANSIONDLC03); linked as /addcont/ so the runtime reports them installed.</td> <td><code>run.sh:178</code>, <code>launcher/bbport_launcher.py:626</code></td> </tr> <tr> <td><code>BB_GAME_DIR</code></td> <td>directory (default ../CUSA03173)</td> <td><strong>Launcher:</strong> Setup → "Game folder". The game's folder (eboot.bin, sce_module, …).</td> <td><code>run.sh:63-65</code>, <code>launcher/bbport_launcher.py:622</code>, <code>scripts/patches.py:494</code></td> </tr> <tr> <td><code>BB_GPU_USER_DIR</code></td> <td>directory</td> <td><strong>Internal</strong> (run.sh: defaults to BB_USER_DIR, else <data>/user). Where the GPU library keeps its caches (pipeline cache etc.) and the player's DLSS folder (<dir>/dlss). Set by run.sh before the GPU library loads.</td> <td><code>gpu/shadps4/common/path_util.cpp:88</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_dlss.cpp:95</code>, <code>run.sh:24</code></td> </tr> <tr> <td><code>BB_MODS_CONFIG</code></td> <td>file (default <data>/mods.json)</td> <td><strong>Launcher:</strong> always set to <data>/mods.json. The mods list/configuration used by scripts/mods.py.</td> <td><code>run.sh:165</code>, <code>launcher/bbport_launcher.py:628</code></td> </tr> <tr> <td><code>BB_MODS_DIR</code></td> <td>directory (default <data>/mods)</td> <td><strong>Launcher:</strong> Mods → Mods → "Mods folder". Folder the mods are loaded from (also used by BB_MOD_TRACE).</td> <td><code>run.sh:165</code>, <code>launcher/bbport_launcher.py:627</code>, <code>src/runtime_file.c:390</code></td> </tr> <tr> <td><code>BB_PATCHES_CONFIG</code></td> <td>file (default <data>/patches.json)</td> <td><strong>Launcher:</strong> always set to <data>/patches.json. Configuration of the external patches.</td> <td><code>run.sh:192</code>, <code>launcher/bbport_launcher.py:634</code></td> </tr> <tr> <td><code>BB_PATCHES_DIR</code></td> <td>directory (default <data>/patches)</td> <td><strong>Launcher:</strong> Mods → Third-party patches → "Patches folder". Folder of external patch files.</td> <td><code>run.sh:192</code>, <code>launcher/bbport_launcher.py:633</code></td> </tr> <tr> <td><code>BB_USER_DIR</code></td> <td>folder path; default <data dir>/user (run.sh); BBSC falls back to ./user</td> <td><strong>Launcher:</strong> Setup > Saves > "Saves folder". User folder: saves, trophies, DLC links, host_overrides.json, bbsc/ logs. The launcher sets it only when a saves folder is chosen; also the default of BB_GPU_USER_DIR.</td> <td><code>launcher/bbport_launcher.py:624</code>, <code>run.sh:24</code>, <code>88</code>, <code>313</code>, <code>bbsc/emulator/mod/linux/bbsc_mod_linux.cpp:114</code></td> </tr> </tbody> </table> <h2 id="hunters-atlas-map">Hunter's Atlas (map)<a class="headerlink" href="#hunters-atlas-map" title="Permanent link">¶</a></h2> <table> <thead> <tr> <th>Variable</th> <th>Values (default)</th> <th>What it does</th> <th>Where</th> </tr> </thead> <tbody> <tr> <td><code>BB_ATLAS_ENABLED</code></td> <td>1 or 0 (unset: the map's own <code>settings.ini</code>)</td> <td><strong>Launcher:</strong> Mods → Map (Hunter's Atlas) → "In-game map". The in-game map on or off; while set, the map's own switch in the game is greyed out. 0: none of its code runs.</td> <td><code>src/probe.c:626</code>, <code>gpu/shim/bbport_map.cpp:304</code></td> </tr> <tr> <td><code>BB_MAP_DIR</code></td> <td>folder (<code>navigation-map/maps</code>)</td> <td><strong>Launcher:</strong> the maps Hunter's Atlas generated.</td> <td><code>gpu/shim/bbport_map.cpp:294</code></td> </tr> <tr> <td><code>BB_MAP_ART_DIR</code></td> <td>folder (<code><maps>/../art</code>)</td> <td><strong>Launcher:</strong> the map's pictures.</td> <td><code>gpu/shim/bbport_map_art.cpp:79</code></td> </tr> <tr> <td><code>BB_MAP_FONT</code></td> <td>file</td> <td><strong>Launcher:</strong> the font the map's names are drawn with.</td> <td><code>gpu/shim/bbport_overlay.cpp:1232</code></td> </tr> <tr> <td><code>BB_MAP_CATALOG</code></td> <td>file (<code><maps>/../catalog.json</code>)</td> <td><strong>Launcher:</strong> names of places and items.</td> <td><code>gpu/shim/bbport_map.cpp:174</code></td> </tr> <tr> <td><code>BB_MAP_CONFIG</code></td> <td>file (<code><maps>/../settings.ini</code>)</td> <td><strong>Launcher:</strong> the map's settings file.</td> <td><code>gpu/shim/bbport_map.cpp:295</code></td> </tr> <tr> <td><code>BB_MAP_TRAVEL_ENABLED</code></td> <td>1 = on (off)</td> <td><strong>Launcher:</strong> "Travel to lamps from the map".</td> <td><code>gpu/shim/bbport_map_features.cpp:70</code>, <code>src/runtime_atlas_state.c:162</code></td> </tr> <tr> <td><code>BB_MAP_ITEMS_ENABLED</code></td> <td>1 = on (off)</td> <td><strong>Launcher:</strong> "Items on the map".</td> <td><code>gpu/shim/bbport_map_features.cpp:70</code></td> </tr> <tr> <td><code>BB_MAP_FOG_ENABLED</code></td> <td>1 = on (off; the launcher writes 0)</td> <td>Areas not visited yet stay hidden.</td> <td><code>gpu/shim/bbport_map_features.cpp:70</code></td> </tr> <tr> <td><code>BB_MAP_NPC_MODE</code></td> <td>all | new_dialogue | hidden (all)</td> <td>Which characters the map shows.</td> <td><code>gpu/shim/bbport_map_features.cpp:71</code></td> </tr> <tr> <td><code>BB_MAP_ITEM_CATEGORIES</code></td> <td>comma list (healing,insight,equipment,echoes)</td> <td>Which items the map shows.</td> <td><code>gpu/shim/bbport_map_features.cpp:73</code></td> </tr> <tr> <td><code>BB_MAP_SOUND_GAIN</code></td> <td>0–2 (0.024)</td> <td>Volume of the map's sounds.</td> <td><code>src/runtime_audio.c:75</code></td> </tr> <tr> <td><code>BB_ATLAS_DEBUG</code></td> <td>1 = on (off)</td> <td>Logs what the map reads from the game's quick menu.</td> <td><code>src/runtime_map.c:107</code>, <code>gpu/shim/bbport_atlas_menu.cpp:35</code></td> </tr> <tr> <td><code>BB_ATLAS_QA</code> / <code>BB_ATLAS_QA_DEVICE</code> / <code>BB_MAP_TEST_CONTROL</code> / <code>BB_MAP_TEST_TRACE</code></td> <td>test hooks</td> <td>Automated map tests.</td> <td><code>gpu/shim/bbport_map.cpp:388</code>, <code>gpu/shim/bbport_map.cpp:412</code>, <code>gpu/shim/bbport_map.cpp:412</code>, <code>gpu/shim/bbport_atlas_menu.cpp:70</code></td> </tr> </tbody> </table> <h2 id="online-co-op">Online & co-op<a class="headerlink" href="#online-co-op" title="Permanent link">¶</a></h2> <table> <thead> <tr> <th>Variable</th> <th>Values (default)</th> <th>What it does</th> <th>Where</th> </tr> </thead> <tbody> <tr> <td><code>BB_SEAMLESSHUNT_TOMBS</code></td> <td>1 = keep (0)</td> <td><strong>Launcher:</strong> Multiplayer → Online → "Bloodstains on Seamless Hunt". Keeps bloodstains and death visions on Seamless Hunt's game server. Off by default: they crash the game with "Transaction failed" there (#10), so those requests are left unanswered and the game goes on without them.</td> <td><code>scripts/online.py:177</code>, <code>scripts/online.py:508</code></td> </tr> <tr> <td><code>BB_BRIDGE</code></td> <td>1 = on (default 0)</td> <td><strong>Launcher:</strong> Multiplayer → Online → shadNet server "The Hunter's Dream". Uses bbbridge on this PC as the shadNet server: run.sh starts bbbridge-cli for the launch (or reuses one already listening on 127.0.0.1:31313) and stops it when the game ends.</td> <td><code>run.sh:308</code>, <code>scripts/online.py:159</code></td> </tr> <tr> <td><code>BB_CLIENT_VERSION</code></td> <td>text (shadPS4 bbport)</td> <td>Client version string reported to the shadNet server, for a server whose clientversions.cfg expects another format.</td> <td><code>gpu/bbnet/shadps4/shadnet/client.cpp:542</code></td> </tr> <tr> <td><code>BB_COMMUNITY_SERVER</code></td> <td>host[:port] (launcher sets it when online)</td> <td><strong>Launcher:</strong> Multiplayer → Online → "Game server". The community game server (messages, bloodstains, phantoms) the game's own server traffic is redirected to.</td> <td><code>scripts/online.py:500</code>, <code>scripts/online.py:500</code></td> </tr> <tr> <td><code>BB_NP_COUNTRY</code></td> <td>country code (us)</td> <td>Country reported for the PSN user by the online module.</td> <td><code>gpu/bbnet/include/core/user_manager.h:45</code></td> </tr> <tr> <td><code>BB_NP_LANGUAGE</code></td> <td>language code (en)</td> <td>Language reported for the PSN user by the online module.</td> <td><code>gpu/bbnet/include/core/user_manager.h:46</code></td> </tr> <tr> <td><code>BB_ONLINE</code></td> <td>1 or 0/unset (off)</td> <td><strong>Launcher:</strong> Multiplayer → Online (online play on). Online play: the runtime loads the online module (gpu/bbnet) and sends the game's network and PSN imports to it; run.sh then sets up the shadNet server, overrides, bbbridge and BBSC.</td> <td><code>src/runtime_net.c:26</code>, <code>gpu/bbnet/include/core/emulator_settings.h:83</code>, <code>run.sh:294</code></td> </tr> <tr> <td><code>BB_SHADNET_NPID</code></td> <td>online ID (empty: shadNet off)</td> <td><strong>Launcher:</strong> Multiplayer → Online (online ID; The Hunter's Dream: the Discord sign-in's). Online ID used to log in to the shadNet server; empty disables the shadNet user.</td> <td><code>gpu/bbnet/include/core/user_manager.h:41</code>, <code>scripts/online.py:162</code></td> </tr> <tr> <td><code>BB_SHADNET_PASSWORD</code></td> <td>text (empty)</td> <td><strong>Launcher:</strong> Multiplayer → Online (password). Password for the shadNet login.</td> <td><code>gpu/bbnet/include/core/user_manager.h:42</code>, <code>scripts/online.py:163</code></td> </tr> <tr> <td><code>BB_SHADNET_SERVER</code></td> <td>host:port (code fallback 127.0.0.1:31313)</td> <td><strong>Launcher:</strong> Multiplayer → Online (server); run.sh default play.seamlesshunt.com:31313 when online. shadNet server the online module connects to.</td> <td><code>gpu/bbnet/include/core/emulator_settings.h:85</code>, <code>run.sh:299</code>, <code>scripts/online.py:499</code></td> </tr> <tr> <td><code>BB_SHADNET_TOKEN</code></td> <td>text (empty)</td> <td>Token passed with the shadNet login (np_handler); the launcher never sets it.</td> <td><code>gpu/bbnet/include/core/user_manager.h:43</code>, <code>gpu/bbnet/shadps4/core/libraries/np/np_handler.cpp:85</code></td> </tr> <tr> <td><code>BB_SHADNET_WEBAPI</code></td> <td>URL (code fallback http://127.0.0.1:31315)</td> <td><strong>Launcher:</strong> Multiplayer → Online (WebAPI); run.sh default http://<server host>:31315. shadNet WebAPI used for summon signs and the HTTP host overrides.</td> <td><code>gpu/bbnet/include/core/emulator_settings.h:86</code>, <code>run.sh:307</code>, <code>scripts/online.py:501</code></td> </tr> <tr> <td><code>BB_UPNP</code></td> <td>1/y/t or 0 (1)</td> <td><strong>Launcher:</strong> Multiplayer → Online (UPnP); The Hunter's Dream forces 0. Opens the P2P UDP port on the router through UPnP (issue #121).</td> <td><code>gpu/bbnet/include/core/emulator_settings.h:88</code>, <code>gpu/bbnet/shadps4/core/libraries/network/p2p_sockets.cpp:239</code>, <code>scripts/online.py:164</code></td> </tr> <tr> <td><code>SHADPS4_BLOODBORNE_SEAMLESS_COOP</code></td> <td>non-empty and not "0" = on; default off</td> <td><strong>Launcher:</strong> Multiplayer → Online (own server + bbport.json online_seamless, no UI row). Online module: routes summon-messenger HTTP requests to the shadNet WebAPI (the server needs BloodborneSeamlessCoop=true). Inside libbbsc the same name is redirected to BBSC_MOD_SEAMLESS and ignored.</td> <td><code>gpu/bbnet/shadps4/core/libraries/network/http.cpp:814</code>, <code>805-808</code>, <code>scripts/online.py:184</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:959</code></td> </tr> <tr> <td><code>SHADPS4_P2P_PORT</code></td> <td>1-65535 (unset: a random port each time)</td> <td><strong>Launcher:</strong> Multiplayer → Online (P2P port; 0 = not set); The Hunter's Dream sets the bridge's port. Pins the local UDP port of the P2P transport (useful for a manual port forward); an invalid value stops the transport.</td> <td><code>gpu/bbnet/shadps4/core/libraries/network/p2p_sockets.cpp:201</code>, <code>scripts/online.py:166</code></td> </tr> <tr> <td><code>SHADPS4_P2P_RELAY</code></td> <td>0/off, auto/direct, a.b.c.d:port, or unset (relay forced)</td> <td><strong>Launcher:</strong> set to 0 when seamless co-op is off or for The Hunter's Dream. UDP relay on the shadNet server's address (port 3478): unset sends every peer through it from the first frame; auto/direct = direct first, relay after 2 s; 0/off disables it; ip:port is a test override.</td> <td><code>gpu/bbnet/shadps4/core/libraries/network/p2p_sockets.cpp:586</code>, <code>scripts/online.py:157</code>, <code>scripts/online.py:157</code></td> </tr> <tr> <td><code>SHADPS4_P2P_RELAY_PORT</code></td> <td>1-65535 (3478)</td> <td>Port of the P2P UDP relay.</td> <td><code>gpu/bbnet/shadps4/core/libraries/network/p2p_sockets.cpp:594</code></td> </tr> <tr> <td><code>SSL_CERT_FILE</code></td> <td>CA bundle path (default: first found)</td> <td>CA certificates for HTTPS when online; run.sh picks the system bundle if unset or unreadable.</td> <td><code>run.sh:302</code></td> </tr> </tbody> </table> <h2 id="seamless-co-op-bbsc">Seamless co-op (BBSC)<a class="headerlink" href="#seamless-co-op-bbsc" title="Permanent link">¶</a></h2> <table> <thead> <tr> <th>Variable</th> <th>Values (default)</th> <th>What it does</th> <th>Where</th> </tr> </thead> <tbody> <tr> <td><code>BBSC_MOD_HOOKS</code></td> <td>"0" off, anything else or unset on (mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Co-op hooks". Master switch that installs the BBSC co-op hooks (warps, world sync, Hunter's Dream, messages...); most other BBSC features need it. In libbbsc it stands in for SHADPS4_BLOODBORNE_RE_TRACE.</td> <td><code>bbsc/emulator/mod/mod.json:12</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:962</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:962</code></td> </tr> <tr> <td><code>BBSC_MOD_SEAMLESS</code></td> <td>"0" off, anything else or unset on (mod.json default true). Forced to 0 by libbbsc on a public game server.</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Seamless summon". Master switch for Wozzardman's seamless summon (summon without the vanilla signs and waits). In libbbsc it stands in for SHADPS4_BLOODBORNE_SEAMLESS_COOP.</td> <td><code>bbsc/emulator/mod/mod.json:11</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:958</code>, <code>bbsc/emulator/mod/linux/bbsc_mod_linux.cpp:370</code></td> </tr> <tr> <td><code>BBSC_RELAY</code></td> <td>host[:port] (port default 20444); empty/unset: the game server address from the host_overrides file</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Relay address". BBSC relay server for warps and world sync. Unset: taken from SHADPS4_HTTP_HOST_OVERRIDES_JSON, else <user>/host_overrides.custom.json, then host_overrides.json. Launcher passes it only when non-empty.</td> <td><code>bbsc/emulator/mod/mod.json:41</code>, <code>bbsc/emulator/mod/bbsc_relay.cpp:123-160</code></td> </tr> <tr> <td><code>BBSC_SCALE_BOSS_HP</code></td> <td>integer percent; default 100 (code and mod.json); launcher range 0-300, the code clamps to 0-1000</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Boss HP per guest (%)". Extra health for bosses, per guest. Needs SHADPS4_BBSC_SCALING; a summoned guest uses the host's numbers (sent over the relay).</td> <td><code>bbsc/emulator/mod/mod.json:34</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13515</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13515</code></td> </tr> <tr> <td><code>BBSC_SCALE_BOSS_STAGGER</code></td> <td>integer percent; default 20 (code and mod.json); launcher range 0-200, the code clamps to 0-1000</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Boss stagger resistance per guest (%)". Bosses are harder to stagger, per guest. Needs SHADPS4_BBSC_SCALING; a summoned guest uses the host's numbers (sent over the relay).</td> <td><code>bbsc/emulator/mod/mod.json:37</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13516</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13516</code></td> </tr> <tr> <td><code>BBSC_SCALE_DAMAGE</code></td> <td>integer percent; default 15 (code and mod.json); launcher range 0-200, the code clamps to 0-1000</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Enemy damage per guest (%)". Extra damage for enemies and bosses, per guest. Needs SHADPS4_BBSC_SCALING; a summoned guest uses the host's numbers (sent over the relay).</td> <td><code>bbsc/emulator/mod/mod.json:35</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13516</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13516</code></td> </tr> <tr> <td><code>BBSC_SCALE_ENEMY_HP</code></td> <td>integer percent; default 40 (code and mod.json); launcher range 0-300, the code clamps to 0-1000</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Enemy HP per guest (%)". Extra health for normal enemies, per guest. Needs SHADPS4_BBSC_SCALING; a summoned guest uses the host's numbers (sent over the relay).</td> <td><code>bbsc/emulator/mod/mod.json:33</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13515</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13515</code></td> </tr> <tr> <td><code>BBSC_SCALE_ENEMY_STAGGER</code></td> <td>integer percent; default 15 (code and mod.json); launcher range 0-200, the code clamps to 0-1000</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Enemy stagger resistance per guest (%)". Normal enemies are harder to stagger, per guest. Needs SHADPS4_BBSC_SCALING; a summoned guest uses the host's numbers (sent over the relay).</td> <td><code>bbsc/emulator/mod/mod.json:36</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13516</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13516</code></td> </tr> <tr> <td><code>BBSC_SCALE_NPC_HUNTERS</code></td> <td>only "1" turns it on (default off; mod.json default false)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Scale NPC hunters". Henryk, Djura and the other hostile NPC hunters also get the enemy scaling (off = vanilla).</td> <td><code>bbsc/emulator/mod/mod.json:32</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13727</code></td> </tr> <tr> <td><code>BB_BBSC</code></td> <td>1 = on (default 0)</td> <td><strong>Launcher:</strong> Multiplayer → Online → "Seamless co-op (BBSC)". Loads BBSC (libbbsc.so) into the game; only takes effect together with BB_ONLINE=1.</td> <td><code>run.sh:294</code>, <code>run.sh:294</code>, <code>scripts/bbsc.py:60</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_AREA_LIST_CAP</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>Asks the server for fewer messages and bloodstains per area: long lists crashed the game ("Panic 265").</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:49</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp</code> (CapBbscAreaListRequest)</td> </tr> <tr> <td><code>SHADPS4_BBSC_BELLS_ANYWHERE</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Bells anywhere". The kit's bells ring anywhere, the Hunter's Dream included; role, Insight and being online still count.</td> <td><code>bbsc/emulator/mod/mod.json</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:52</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_CINEMATIC</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>The camera that follows a co-op partner while you are dead (needs SHADPS4_BBSC_SPECTATE): Tab, E or left click the next hunter, Shift+Tab or Q the previous one, F a free camera and back, F1 off until the next death; R1/L1 and the sticks on a gamepad. On Linux the free filming camera (F1 at any time) is left out: every key and mouse button also reaches the game through bbport's pad.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:46</code>, <code>bbsc/emulator/src/core/bbsc_cinematic.cpp</code>, <code>bbsc/emulator/mod/linux/bbsc_mod_linux.cpp:751</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_CONNECT_FIRST</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Cross-map summon". Cross-map summon: join first, then one load into the host's map.</td> <td><code>bbsc/emulator/mod/mod.json:13</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:33</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:16788</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_DEATH_PENALTY</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Bloodstain on death". A kept death (session not lost) still drops a bloodstain and the echoes.</td> <td><code>bbsc/emulator/mod/mod.json:25</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:27</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:8171</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_DREAM</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Hunter's Dream together". A guest uses the Doll, workshop and messengers in the host's Hunter's Dream.</td> <td><code>bbsc/emulator/mod/mod.json:16</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:26</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:10086</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_FIVE_HUNTERS</code></td> <td>"0" off, any other value on (default on; mod.json default true) Forced to 0 by libbbsc on a public game server.</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Five hunters". The host may summon up to 4 guests (5 hunters).</td> <td><code>bbsc/emulator/mod/mod.json:27</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:45</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:442</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:15425</code>, <code>bbsc/emulator/mod/linux/bbsc_mod_linux.cpp:371</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_FLOOR_GUARD</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Floor guard". No crash when a character's floor was unloaded.</td> <td><code>bbsc/emulator/mod/mod.json:30</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:25</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:12704</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_FREE_BELL</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Free Beckoning Bell". The Beckoning Bell costs no Insight.</td> <td><code>bbsc/emulator/mod/mod.json:26</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:44</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:15751</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_FULL_ECHOES</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Full echoes". A summoned guest is paid the host's rate of Blood Echoes, not half.</td> <td><code>bbsc/emulator/mod/mod.json:21</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:22</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:430</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_GUEST_ITEMS</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Guest items". A guest picks up and keeps items in the host's world.</td> <td><code>bbsc/emulator/mod/mod.json:23</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:23</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:432</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:6542</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_INVADE_ANYWHERE</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>Every world open to invaders (Bell Maiden SpEffect 9020).</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:48</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:14727</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_LAMP</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Lamps in co-op". The host can use lamps during a session (lamp prompt works in co-op; only while hosting).</td> <td><code>bbsc/emulator/mod/mod.json:18</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:29</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:418</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_LOAD_COVER</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Black fade on joins". The guest's summon/follow loads happen behind a black fade.</td> <td><code>bbsc/emulator/mod/mod.json:29</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:21</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:7106</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_MESSAGES</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Co-op texts". Co-op texts that fit seamless play (no "Returning to your world").</td> <td><code>bbsc/emulator/mod/mod.json:28</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:32</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:12762</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_NO_FOG_WALLS</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "No co-op fog walls". Co-op area fog walls hidden; leaving the area is allowed.</td> <td><code>bbsc/emulator/mod/mod.json:17</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:31</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:424</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:9821</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_NO_HP_PENALTY</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "No guest HP cut". Removes the summoned guest's 30% max HP cut (effect 9006).</td> <td><code>bbsc/emulator/mod/mod.json:22</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:30</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:9707</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_P2P_CHANNEL</code></td> <td>a value starting with 0, f or F turns it off; else on (mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "P2P channel". Sends BBSC's own messages (follow, world sync, scaling, leaving) straight to the other players over the game's own connection when there is no BBSC relay; needed on public servers (The Hunter's Dream).</td> <td><code>bbsc/emulator/mod/mod.json:40</code>, <code>bbsc/emulator/mod/bbsc_channel.cpp:348-352</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_PEERS</code></td> <td>npid=host:port,npid=host:port (unset)</td> <td>Static peer map ("direct connection" mode, e.g. on Tailscale/Radmin/ZeroTier): a listed player's address wins over the server lookup. The port is that player's SHADPS4_P2P_PORT.</td> <td><code>gpu/bbnet/shadps4/core/libraries/np/np_matching2/np_matching2_signaling.cpp:112</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_PEERS_JSON</code></td> <td>file path (<user dir>/bbsc_peers.json)</td> <td>JSON file of static peers ({"NPID": "host:port"}); entries in SHADPS4_BBSC_PEERS win.</td> <td><code>gpu/bbnet/shadps4/core/libraries/np/np_matching2/np_matching2_signaling.cpp:113</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_PERSIST</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>Keeps the co-op session alive through loads and deaths (persistent-session patches). 0 disables them.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:38</code>, <code>bbsc/emulator/src/core/bbsc_persistence.cpp:125</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_PERSIST_BOSS</code></td> <td>"0" off, any other non-empty value on; default off (not a default-on switch)</td> <td>Persistent-session patch group "Boss": keeps the session through a boss clear.</td> <td><code>bbsc/emulator/src/core/bbsc_patch_tables.h:414</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:84-86</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_PERSIST_HOSTDEAD</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Stay when the host dies". The guest keeps the session if the host dies.</td> <td><code>bbsc/emulator/mod/mod.json:19</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:42</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:422</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_PERSIST_MATCHCHECK</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>Ignores the post-load matching-check kick.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:39</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:416</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_PERSIST_TASKS</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>Keeps member tasks across a kept load.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:41</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:420</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_REJOIN</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>Guest rejoin / reinsert after a kept death.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:40</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:3470</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_SCALING</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Enemy scaling". Enemies and bosses get stronger (HP, damage, stagger) for every guest; replaces the game's own boss buff. Amounts: BBSC_SCALE_*.</td> <td><code>bbsc/emulator/mod/mod.json:31</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:47</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:436</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13515</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_SHARED_PROGRESS</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Shared progress". When a guest goes home, bosses, shortcuts, doors and lamps the host has done are added to the guest's own world (adds only; NPC quests and the character untouched; saves backed up first).</td> <td><code>bbsc/emulator/mod/mod.json:38</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:17</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:10791</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_SKIP_LEAVE_LIMIT</code></td> <td>"0" off, any other non-empty value on; default off</td> <td>Persistent-session patch group "LeaveLimit"; exact effect not described in code, see bbsc/emulator/src/core/bbsc_patch_tables.h:426.</td> <td><code>bbsc/emulator/src/core/bbsc_patch_tables.h:426</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_SOLID_NPCS</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Solid NPCs". A guest sees NPCs solid, not as grey wandering ghosts.</td> <td><code>bbsc/emulator/mod/mod.json:24</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:24</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:434</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:13934</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_SPECTATE</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Respawn in place". A dead player respawns in place / spectates instead of leaving the session.</td> <td><code>bbsc/emulator/mod/mod.json:20</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:43</code>, <code>bbsc/emulator/src/core/bbsc_patch_tables.h:428</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:3996</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_TIMELINE</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>A short <code>bbsc-timeline-*.txt</code> of what happened in each game (joins, hosts, deaths, bosses) in <code><user dir>/bbsc/logs</code>, next to <code>bbsc-mod-*.log</code>; the last 5 are kept.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:51</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:1028</code>, <code>bbsc/emulator/mod/linux/bbsc_mod_linux.cpp</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_WARP_JOIN</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>After a cross-map join, one more real reload (fixes lighting).</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:34</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:4503</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_WARP_TOGETHER</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Warp together". The guest follows the host through lamp warps.</td> <td><code>bbsc/emulator/mod/mod.json:14</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:17</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:4733</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_WORLD_SYNC</code></td> <td>"0" off, any other value on (default on; mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "World sync". The guest loads the host's map with the host's world state (doors, bosses, lifts).</td> <td><code>bbsc/emulator/mod/mod.json:15</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:20</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:5191</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_WORLD_SYNC_ALL</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>With SHADPS4_BBSC_WORLD_SYNC, the guest takes the host's world flags for every area, not only the one the host is in.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:50</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:5214</code></td> </tr> <tr> <td><code>SHADPS4_BLOODBORNE_RE_TRACE</code></td> <td>ignored by libbbsc (aliased to BBSC_MOD_HOOKS)</td> <td><strong>No effect in this port.</strong> In the BBSC emulator build this installed the BBSC hooks; in the port's libbbsc (BBSC_MOD) the name is redirected to BBSC_MOD_HOOKS, so setting it has no effect.</td> <td><code>bbsc/emulator/src/core/bloodborne_re.cpp:962</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:36</code></td> </tr> </tbody> </table> <h2 id="discord">Discord<a class="headerlink" href="#discord" title="Permanent link">¶</a></h2> <table> <thead> <tr> <th>Variable</th> <th>Values (default)</th> <th>What it does</th> <th>Where</th> </tr> </thead> <tbody> <tr> <td><code>BB_DISCORD</code></td> <td>0 = off (default 1)</td> <td><strong>Launcher:</strong> Setup → "Discord status" (default on). Discord Rich Presence helper (scripts/discord_presence.py) that shows the area and co-op partners; 0 turns it off.</td> <td><code>run.sh:359</code>, <code>launcher/bbport_launcher.py:686</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_DISCORD</code></td> <td>"0" or "false" off, else on (mod.json default true)</td> <td><strong>Launcher:</strong> Multiplayer > Online > Seamless co-op (BBSC) > BBSC settings > "Discord status". BBSC's own Discord status (area, boss fights, number of hunters). Read only by bbsc_discord.cpp, which the Linux libbbsc does not compile (bbsc/CMakeLists.txt), so it has no effect in this port; bbport's presence is BB_DISCORD.</td> <td><code>bbsc/emulator/mod/bbsc_discord.cpp:31-35</code>, <code>bbsc/CMakeLists.txt:22-29</code>, <code>bbsc/emulator/mod/mod.json:39</code></td> </tr> </tbody> </table> <h2 id="diagnostics-logs">Diagnostics & logs<a class="headerlink" href="#diagnostics-logs" title="Permanent link">¶</a></h2> <table> <thead> <tr> <th>Variable</th> <th>Values (default)</th> <th>What it does</th> <th>Where</th> </tr> </thead> <tbody> <tr> <td><code>BB_BREADCRUMBS</code></td> <td>0 = off; unset/other = on</td> <td>GPU breadcrumbs (VK_AMD_buffer_marker): on device lost the log says which draw/dispatch never finished. 0 turns them off.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_breadcrumbs.cpp:59</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_breadcrumbs.h:7</code></td> </tr> <tr> <td><code>BB_BUFFER_STATS</code></td> <td>1 = on (off)</td> <td>Prints every 5 s how buffer bindings reach the GPU by guest region (stream copies, arena bindings, re-uploaded bytes) and how many frames the GPU lags behind.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:984</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:4799</code></td> </tr> <tr> <td><code>BB_CAMERA_LOG</code></td> <td>any value = on (off)</td> <td>Prints the camera position every 100 ms (for scripted movement tests at different frame rates).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_camera_motion.cpp:295</code></td> </tr> <tr> <td><code>BB_CAPTURE_DIR</code></td> <td>directory (unset = current directory)</td> <td>Where the frame analyzer (BB_CAPTURE_TRIGGER) writes frame_<time>.txt.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_frame_capture.cpp:87</code></td> </tr> <tr> <td><code>BB_CAPTURE_TRIGGER</code></td> <td>file path (unset = off)</td> <td>Frame analyzer: creating this file records the next full frame (every render pass with its targets, depth, draw count, shaders, textures, and compute dispatches) to a text file.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_frame_capture.cpp:133</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_frame_capture.h:2</code></td> </tr> <tr> <td><code>BB_CE_STATS</code></td> <td>1 or unset (off)</td> <td>Statistics of the constant engine's dumps (DumpConstRam per second, bytes, pages) and how often the translator reads memory a dump wrote in the last 100 ms.</td> <td><code>gpu/shim/bbport_ce_stats.h:1</code></td> </tr> <tr> <td><code>BB_COPY_SHADER_TRACE</code></td> <td>any value = on (off)</td> <td>Logs the copy shader's buffers every 2 s.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_shader_hle.cpp:161</code></td> </tr> <tr> <td><code>BB_DCB_STATS</code></td> <td>first char 1/y/t (off)</td> <td>Structure of graphics command buffers (read-only scan, printed every 5 s): how many buffers, draws per buffer, state set before the first draw.</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.cpp:1071</code>, <code>1383</code></td> </tr> <tr> <td><code>BB_DEBUG_MOTION</code></td> <td>1 = on (off)</td> <td>Blends the motion vectors as colors into the frame before it is shown.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_camera_motion.cpp:77</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_camera_motion.h:3</code></td> </tr> <tr> <td><code>BB_DUMP_DIR</code></td> <td>directory (out/dump)</td> <td>Where the upscaler/present/final frame dumps (BB_DUMP_TRIGGER, BB_PRESENT_DUMP_TRIGGER, BB_FINAL_DUMP_TRIGGER) are written.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:91</code></td> </tr> <tr> <td><code>BB_DUMP_FRAMES</code></td> <td>integer ≥1 (8)</td> <td>How many frames one BB_DUMP_TRIGGER dump records.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:70</code></td> </tr> <tr> <td><code>BB_DUMP_SHADERS</code></td> <td>1/y/t or 0 (off)</td> <td>shadPS4's shader dump: writes the translated shaders to disk.</td> <td><code>gpu/shim/core/emulator_settings.h:58</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp:1332</code></td> </tr> <tr> <td><code>BB_DUMP_TRIGGER</code></td> <td>file path (unset = off)</td> <td>Creating this file dumps the upscaler's images of the next BB_DUMP_FRAMES frames as raw files in BB_DUMP_DIR (temporal stability checks; tools/dump_view.py converts them).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:56</code></td> </tr> <tr> <td><code>BB_FAULT_WAIT</code></td> <td>1 or unset (off)</td> <td>A fatal fault or a GPU-library assertion leaves the process alive and stopped in its handler, so a debugger can attach (bash tools/debug_attach.sh <pid>); a desktop notice says so.</td> <td><code>src/probe.c:150</code>, <code>gpu/shim/common/assert.cpp:12</code></td> </tr> <tr> <td><code>BB_FILE_TRACE</code></td> <td>1 = on (default off)</td> <td>Logs every guest path the game opens, stats or checks (mods, missing files).</td> <td><code>src/runtime_file.c:127-129</code></td> </tr> <tr> <td><code>BB_FINAL_DUMP_TRIGGER</code></td> <td>file path (unset = off)</td> <td>Creating this file saves the next frame as presented (after FSR and post-processing) as final_<w>x<h> in BB_DUMP_DIR (used by tools/frame.sh KIND=final).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:164</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.h:41</code></td> </tr> <tr> <td><code>BB_FRAME_LOG</code></td> <td>file path (unset = off)</td> <td>With BB_FRAME_STATS: one CSV line per flip (frame time, waits, stage times, allocations…), to find what long frames (stutter) have in common. BB_SAVE_LOG=1 points it at logs/<time>.frames.csv.</td> <td><code>gpu/shadps4/core/libraries/videoout/driver.cpp:526</code>, <code>run.sh:47</code></td> </tr> <tr> <td><code>BB_FRAME_STATS</code></td> <td>Flag(): first char 1/y/t = on (off)</td> <td><strong>Launcher:</strong> Advanced > Developer > "Frame statistics in the log" (run.sh also sets it with BB_SAVE_LOG=1). Prints flip rate and frame-time spread (plus many internal counters) every 5 s. Without it a short summary line is printed every 30 s.</td> <td><code>gpu/shadps4/core/libraries/videoout/driver.cpp:380</code>, <code>launcher/bbport_launcher.py:665</code></td> </tr> <tr> <td><code>BB_FREE_CHECK</code></td> <td>1 = on (off)</td> <td><strong>Launcher:</strong> Advanced > Developer > "Crash diagnostics" (together with BB_WRITE_LOG and BB_PRODUCER_CHECK). Diagnostic for the guest heap corruption at guest offset 0x263b8e7: every write the GPU emulation makes to guest memory is checked against the free list of the game's label pool, and a watcher thread reports corrupted free lists. Slightly slower.</td> <td><code>gpu/shim/bbport_free_check.h:2</code>, <code>gpu/shim/bbport_free_check.cpp:488-494</code>, <code>launcher/bbport_launcher.py:679</code></td> </tr> <tr> <td><code>BB_FSR4_PROFILE</code></td> <td>1 = on (off)</td> <td>FSR 4 / 4.1.1: GPU time per pass, printed every 300 frames. fsr4-bench sets it itself.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/fsr411/fsr411.cpp:280</code>, <code>gpu/tools/fsr4_bench.cpp:305</code></td> </tr> <tr> <td><code>BB_FSR4_STATS</code></td> <td>1 or unset (off)</td> <td>Prints the driver's per-pass statistics of the FSR 4 pipelines (registers, spills, instruction counts) when VK_KHR_pipeline_executable_properties is available; read by the patched FSR 4 provider, set by fsr4_bench --stats.</td> <td><code>gpu/patches/fsr-vulkan/0001-FSR-4-v07-provider-BB_FSR4_PROFILE-pass-timings-BB_F.patch:50</code>, <code>gpu/tools/fsr4_bench.cpp:307</code></td> </tr> <tr> <td><code>BB_GAME_MENU_TRACE</code></td> <td>1 or unset (off)</td> <td>How often the game asks for the port's menu texts (per 2 s).</td> <td><code>gpu/shim/bbport_game_menu.cpp:474</code></td> </tr> <tr> <td><code>BB_GARLIC_VRAM_RANGE</code></td> <td>begin,end (C integers, hex with 0x) (unset = whole address space)</td> <td>Keeps VRAM copies only for guest addresses in [begin, end): for finding the block whose copy goes stale by halving the range.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:2188</code></td> </tr> <tr> <td><code>BB_GNM_CENSUS</code></td> <td>1 or unset (off)</td> <td>Hooks the eboot's libGnm entry points, counts the calls per function and prints the busiest every 5 s.</td> <td><code>gpu/shim/bbport_gnm_hooks.h:4</code>, <code>gpu/shim/bbport_gnm_hooks.cpp:513</code></td> </tr> <tr> <td><code>BB_GNM_CENSUS_FILE</code></td> <td>file path (unset: no file)</td> <td>With the Gnm census: writes every function's total calls so far (offset, calls, cb method, PM4) to this file.</td> <td><code>gpu/shim/bbport_gnm_hooks.cpp:437</code></td> </tr> <tr> <td><code>BB_GNM_CENSUS_RANGE</code></td> <td>first:last table indices (all)</td> <td>Hooks only that range of the libGnm table (for bisecting).</td> <td><code>gpu/shim/bbport_gnm_hooks.cpp:543</code></td> </tr> <tr> <td><code>BB_GNM_OBSERVE</code></td> <td>1 or unset (off)</td> <td>Command buffer methods run through an observing stub; submissions are checked against the packets known API calls wrote (statistics in the census report). Also enables the hooks without BB_GNM_CENSUS.</td> <td><code>gpu/shim/bbport_gnm_hooks.cpp:69</code>, <code>gpu/shim/bbport_gnm_hooks.cpp:514</code></td> </tr> <tr> <td><code>BB_GNM_TRACE</code></td> <td>hex offset[:count] (count 40)</td> <td>With the census or observer: prints the arguments, the caller and the packets written by the first <code>count</code> calls of the libGnm function at that offset.</td> <td><code>gpu/shim/bbport_gnm_hooks.cpp:84</code>, <code>gpu/shim/bbport_gnm_hooks.cpp:524</code></td> </tr> <tr> <td><code>BB_GPU_LOG</code></td> <td>trace, debug, info, warning, error, critical (warning)</td> <td>Log level of the GPU library (shadPS4 log); unknown values mean warning.</td> <td><code>gpu/shim/common/logging/log.cpp:11</code>, <code>gpu/shim/common/logging/log.h:2</code></td> </tr> <tr> <td><code>BB_GPU_PROFILE</code></td> <td>1 = on (off)</td> <td><strong>Launcher:</strong> Advanced > Developer > "GPU profile in the log". GPU time per render pass, dispatch and upscaler run, printed every 5 s (GPU ms per frame by label).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_gpu_profiler.cpp:13</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_gpu_profiler.h:2</code>, <code>launcher/bbport_launcher.py:683</code></td> </tr> <tr> <td><code>BB_HEAP_SITES</code></td> <td>1 or unset (off)</td> <td>Wraps the game's malloc replacement and counts live allocations per call site; prints the sites whose live bytes grew (what leaks when the guest heap runs out). Also patches the deferred object release to count failed registry checks.</td> <td><code>gpu/shim/bbport_heap_sites.cpp:2</code>, <code>gpu/shim/bbport_guest_hooks.cpp:45</code></td> </tr> <tr> <td><code>BB_HLE_STATS</code></td> <td>any value = on (off)</td> <td>Logs how often the compute-shader substitutions (HLE) fire.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:2385</code></td> </tr> <tr> <td><code>BB_IMAGE_COPY_LOG</code></td> <td>any value = on (off)</td> <td>Logs (first 40) the compute image copies the port recognizes and replaces.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:2947</code></td> </tr> <tr> <td><code>BB_IMAGE_SYNC_LOG</code></td> <td>set (any value) = on (off)</td> <td>Logs image refreshes from memory the GPU wrote, and the images refreshed most per 5 s with their flags.</td> <td><code>gpu/shadps4/video_core/texture_cache/texture_cache.cpp:326</code>, <code>910-921</code></td> </tr> <tr> <td><code>BB_IMAGE_WATCH</code></td> <td>guest address (hex with 0x) (unset = off)</td> <td>Prints how the image at that guest address is used (first 300 events).</td> <td><code>gpu/shadps4/video_core/texture_cache/texture_cache.cpp:308</code></td> </tr> <tr> <td><code>BB_LABEL_TRAP</code></td> <td>1, 2, or unset (off); needs BB_FREE_CHECK=1</td> <td>Label trap of the free check: 1 makes pool pages with pending fence labels read-only (slow), 2 puts breakpoints on the guest allocator's release and the collector's done branch; a label block released before its fence landed is reported.</td> <td><code>gpu/shim/bbport_free_check.cpp:657</code>, <code>gpu/shim/bbport_free_check.h:49</code></td> </tr> <tr> <td><code>BB_LAYER_PAGED_STATS</code></td> <td>any value = on (off)</td> <td>Prints paged buffer bindings per shader every 5 s (layer memory module).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:3182</code></td> </tr> <tr> <td><code>BB_LAYER_WRITE_LOG</code></td> <td>set (any value) = on (off)</td> <td>Layer memory module: logs large (1 MiB+) GPU writes kept in place, and the images near them.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:1234-1236</code></td> </tr> <tr> <td><code>BB_MOD_TRACE</code></td> <td>1 = on (default off)</td> <td>Logs the first 32 files the game opens from the mods folder.</td> <td><code>src/runtime_file.c:390-398</code></td> </tr> <tr> <td><code>BB_MOTION_SELECT_LOG</code></td> <td>1 = on (off)</td> <td>Logs each G-buffer vertex shader once with its buffer sizes and whether object motion selected it.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp:900</code></td> </tr> <tr> <td><code>BB_OCCLUSION_READ_TRACE</code></td> <td>1 = on (off)</td> <td>Pages with occlusion counters become no-access after an event until the game's first access, to report whether results were on the CPU by then.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_occlusion.cpp:360</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_occlusion.h:60</code></td> </tr> <tr> <td><code>BB_OCCLUSION_TRACE</code></td> <td>integer N (0)</td> <td>Logs the first N occlusion events with their frame and render pass.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_occlusion.cpp:274</code></td> </tr> <tr> <td><code>BB_PASS_BREAK_TRACE</code></td> <td>1 = on (off)</td> <td>Every 5 s: who ended a render pass that began again with the same state (attachments stored and loaded again).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.cpp:267</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.h:789</code></td> </tr> <tr> <td><code>BB_PRESENT_DUMP_COUNT</code></td> <td>integer ≥1 (1)</td> <td>How many consecutive frames one BB_PRESENT_DUMP_TRIGGER saves.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:2222</code></td> </tr> <tr> <td><code>BB_PRESENT_DUMP_TRIGGER</code></td> <td>file path (unset = off)</td> <td>Creating this file saves the completed display buffer (with the game's UI) as present_<w>x<h> in BB_DUMP_DIR; used by tools/frame.sh.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:2220</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp:407</code></td> </tr> <tr> <td><code>BB_PRODUCER_CHECK</code></td> <td>1 = on (off)</td> <td><strong>Launcher:</strong> Advanced > Developer > "Crash diagnostics" (also set by run.sh with BB_AS_0_3=1). Checks that only one thread at a time records into the scheduler (costs an atomic exchange per recorded command).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.h:845</code>, <code>launcher/bbport_launcher.py:681</code>, <code>run.sh:239</code></td> </tr> <tr> <td><code>BB_READBACK_LOG</code></td> <td>file path (unset = off)</td> <td><strong>Internal</strong> (set by run.sh when BB_SAVE_LOG=1 to logs/<time>.readbacks.csv). CSV of every download of GPU-written buffer memory back to guest memory: who asked, where, how much, how long it took, how old the GPU's write was, whether the readback queue served it.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:138-160</code>, <code>run.sh:48</code></td> </tr> <tr> <td><code>BB_RECORDER_TRACE</code></td> <td>1 = on (off)</td> <td>Prints the most frequent direct command-buffer callers every 2000 calls.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.cpp:315</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.h:822</code></td> </tr> <tr> <td><code>BB_RESIDENCY_MIX</code></td> <td>1 or 2 (off)</td> <td>Prints bindings per kind (none, in place, mirror, mixed) and written, every 2 s; 2 also lists the in-place or mixed bindings with the most bytes (layer module).</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:106-110</code>, <code>162-164</code>, <code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:459-465</code></td> </tr> <tr> <td><code>BB_RESIDENCY_REPORT</code></td> <td>trigger file path (unset = off)</td> <td>When the file appears (checked once a second), reports the blocks bound in place in the last seconds and why they have no VRAM copy.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:3108</code></td> </tr> <tr> <td><code>BB_RES_STATS</code></td> <td>1 = on (off)</td> <td>Every 5 s: whether bound shaders read their resource descriptors from user-data registers or from tables in memory, per draw and dispatch.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:2317</code></td> </tr> <tr> <td><code>BB_SAMPLE_THREAD</code></td> <td>thread name (default off)</td> <td>With frame stats: samples where that guest thread runs with SIGPROF and reports it.</td> <td><code>src/runtime_kernel.c:464</code>, <code>src/runtime_kernel.c:464</code></td> </tr> <tr> <td><code>BB_SAVE_LOG</code></td> <td>1 = on (default off)</td> <td><strong>Launcher:</strong> Advanced → Developer → "Save the log and statistics to a file". Also writes this run's output to <data>/logs/<time>.log and turns on BB_FRAME_STATS with .frames.csv and .readbacks.csv next to it.</td> <td><code>run.sh:41-53</code>, <code>launcher/bbport_launcher.py:667</code></td> </tr> <tr> <td><code>BB_SAVE_TRACE</code></td> <td>1 = on (default off)</td> <td>Logs every operation on save files (/savedataN).</td> <td><code>src/runtime_file.c:224-225</code></td> </tr> <tr> <td><code>BB_SCENE_DEBUG</code></td> <td>file path (unset = off)</td> <td>Once the file exists (it is consumed), prints for one frame why passes keep the native size and which scene targets are read at native size.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:1644</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:1644</code></td> </tr> <tr> <td><code>BB_SECTIONS</code></td> <td>1 = on (off)</td> <td>Time the draw recording thread spends per part of a draw (and ordered tasks by function), printed with the draw-pipe statistics.</td> <td><code>gpu/shim/bbport_sections.h:51</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:1300</code></td> </tr> <tr> <td><code>BB_SYNC_TRACE</code></td> <td>set (any value) = on (off)</td> <td>Prints each SyncForCpuRead (command-processor read of memory: drain and finish of the GPU work).</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.cpp:1363</code></td> </tr> <tr> <td><code>BB_TAA_DIAGNOSTICS</code></td> <td>integer 1–3 (unset = off)</td> <td>TAA upscaler: selects a diagnostic output of the TAA shader, and with BB_DUMP_TRIGGER also dumps the TAA history images. Meaning of 1–3: see gpu/shadps4/video_core/host_shaders/taa.comp:16.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:797</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:1976</code></td> </tr> <tr> <td><code>BB_TILE_BACK_LOG</code></td> <td>set (any value) = on (off)</td> <td>Logs each image written back into the game's memory because a texel buffer reads it, with the age of its last GPU write (first 400).</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:3651</code></td> </tr> <tr> <td><code>BB_TIMELINE</code></td> <td>output file path (unset = off)</td> <td>Records a timeline of the frame's way to the GPU (guest submissions and waits, decoding, Vulkan submissions, GPU completion); starts BB_TIMELINE_START seconds in, written once when the buffer is full (~15 s of play).</td> <td><code>gpu/shim/bbport_timeline.h:2-5</code>, <code>42</code></td> </tr> <tr> <td><code>BB_TIMELINE_START</code></td> <td>seconds (30)</td> <td>With BB_TIMELINE=<file>: recording of the frame timeline starts this many seconds after the first event (and stops when the buffer is full, ~15 s).</td> <td><code>gpu/shim/bbport_timeline.h:4</code></td> </tr> <tr> <td><code>BB_TRACE_ADDR</code></td> <td>addr,size (C integers; size default 4096) (unset = off)</td> <td>That guest range is traced from the start by the binding trace; only has an effect when BB_TRACE_SIZE is also set (non-zero).</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:2643</code></td> </tr> <tr> <td><code>BB_TRACE_SEMA</code></td> <td>any value = on (default off)</td> <td>Logs every blocking semaphore wait (deadlock diagnosis).</td> <td><code>src/runtime_sema.c:69</code></td> </tr> <tr> <td><code>BB_TRACE_SHADER</code></td> <td>hex hash[,hash…] (unset = off)</td> <td>For those shaders: the buffers they bind (address, size, read/written, whether in place or in VRAM, how often), printed every 5 s.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:3034</code></td> </tr> <tr> <td><code>BB_TRACE_SIZE</code></td> <td>bytes (C integer) (0 = off)</td> <td>Bindings over GPU-written buffers of that size are counted by the path they take and reported every 5 s.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.h:318-320</code>, <code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:2638</code></td> </tr> <tr> <td><code>BB_UI_TRACE</code></td> <td>any value = on (off)</td> <td>Logs the draws of frames that ended without the output-size UI (shown at the game's own size), and of one that had it.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.h:229</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:393</code></td> </tr> <tr> <td><code>BB_VK_MARKERS</code></td> <td>1/y/t or 0 (off)</td> <td>Vulkan debug markers for guest and host passes (for RenderDoc and similar tools).</td> <td><code>gpu/shim/core/emulator_settings.h:71</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:65</code></td> </tr> <tr> <td><code>BB_VK_VALIDATION</code></td> <td>1/y/t or 0 (off)</td> <td><strong>Launcher:</strong> Advanced > Developer > Vulkan validation layers. Enables the Vulkan validation layers (much slower).</td> <td><code>gpu/shim/core/emulator_settings.h:74</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp:155</code>, <code>launcher/bbport_launcher.py:685</code></td> </tr> <tr> <td><code>BB_VK_VALIDATION_SYNC</code></td> <td>1/y/t or 0 (off)</td> <td>Synchronisation validation in the Vulkan validation layer (with BB_VK_VALIDATION).</td> <td><code>gpu/shim/core/emulator_settings.h:76</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_platform.cpp:311</code></td> </tr> <tr> <td><code>BB_VRAM_ACCESS_TRAP</code></td> <td>set (any value) = on (off)</td> <td>Blocks moved to VRAM are closed to the CPU (PROT_NONE); the first CPU access to each is recorded (code site, read or write) and the block opened again. Finds CPU readers of data the GPU writes in VRAM.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:2994</code></td> </tr> <tr> <td><code>BB_VRAM_TRAP_RANGE</code></td> <td>addr,size (C integers) (unset = all blocks)</td> <td>With BB_VRAM_ACCESS_TRAP: only blocks over that range, re-armed for every packet, every access counted by site.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:2977</code></td> </tr> <tr> <td><code>BB_WAIT_LOG</code></td> <td>file (default off)</td> <td>With BB_SAMPLE_THREAD/frame stats: writes per-frame wait sites (cond/mutex/sema/sleep, counts and ms) to this file.</td> <td><code>src/runtime_kernel.c:389</code></td> </tr> <tr> <td><code>BB_WAIT_TRACE</code></td> <td>1 or unset (off)</td> <td>Attributes each wait for GPU ticks (Scheduler::Wait) to its thread and call stack; the frame stats print the stacks that waited longest.</td> <td><code>gpu/shim/bbport_wait_trace.h:2</code></td> </tr> <tr> <td><code>BB_WARN_META_TEXTURE</code></td> <td>any value = on (off)</td> <td>Logs a warning when a shader reads texture metadata as a texture.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:3336</code></td> </tr> <tr> <td><code>BB_WATCH</code></td> <td>addr,size (unset = off)</td> <td>What the shader translator reads on the CPU from that guest range (user data pointing into it, constants copied from it), printed every 2 s.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:1076</code></td> </tr> <tr> <td><code>BB_WRITE_LOG</code></td> <td>1, 2, or unset/0 (off)</td> <td><strong>Launcher:</strong> Advanced > Developer > Crash diagnostics (with BB_FREE_CHECK, BB_PRODUCER_CHECK). Ring of the writes the GPU emulation makes to guest memory (fences, WriteData, DMA, downloads), dumped when the guest faults. 1 logs at the write itself (changes timing), 2 where the command thread decodes the fence or WriteData.</td> <td><code>gpu/shim/bbport_write_log.h:2</code>, <code>gpu/shim/bbport_write_log.cpp:37</code>, <code>launcher/bbport_launcher.py:680</code></td> </tr> <tr> <td><code>BB_WRITE_VERIFY</code></td> <td>1 = on (off; only without write tracking)</td> <td>Pages the GPU side watches are write-protected anyway to verify that every CPU write to them is announced.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer.h:53</code>, <code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:497-503</code></td> </tr> <tr> <td><code>MANGOHUD</code></td> <td>1 = on (default off)</td> <td><strong>Launcher:</strong> Advanced → Developer → "MangoHud". MangoHud overlay. run.sh keeps it off if Steam's performance overlay (mangoapp) runs, and uses the system MangoHud instead of the bundled one when installed.</td> <td><code>run.sh:246</code>, <code>launcher/bbport_launcher.py:663</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_TRACE_MAPS</code></td> <td>"0" off, any other non-empty value on; default off</td> <td>Logs which maps are resident (and which one the player is in) whenever the set changes.</td> <td><code>bbsc/emulator/src/core/bloodborne_re.cpp:6305</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_TRACE_WALLS</code></td> <td>"0" off, any other value on; default on (BBSC default-on switch, not in mod.json)</td> <td>Logs which map objects get shown/made solid (fog walls).</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:28</code>, <code>bbsc/emulator/src/core/bloodborne_re.cpp:8840</code></td> </tr> <tr> <td><code>SHADPS4_CAPTURE_BLOODBORNE_SUMMON</code></td> <td>non-empty and not "0" = on; default off</td> <td>Online module writes capture files of summon-messenger HTTP requests (for collect-logs). Listed as default-on in BBSC but only the online module reads it.</td> <td><code>gpu/bbnet/shadps4/core/libraries/network/http.cpp:734</code>, <code>bbsc/emulator/src/core/bbsc_persistence.h:37</code></td> </tr> <tr> <td><code>VK_LOADER_LAYERS_DISABLE</code></td> <td>layer list</td> <td><strong>Internal.</strong> run.sh --software disables all implicit layers; with MANGOHUD=1 and a system MangoHud, run.sh adds the bundled MangoHud layer so only one overlay draws.</td> <td><code>run.sh:12</code>, <code>run.sh:255</code></td> </tr> </tbody> </table> <h2 id="developertests">Developer/tests<a class="headerlink" href="#developertests" title="Permanent link">¶</a></h2> <table> <thead> <tr> <th>Variable</th> <th>Values (default)</th> <th>What it does</th> <th>Where</th> </tr> </thead> <tbody> <tr> <td><code>BBSC_EMULATOR</code></td> <td>path</td> <td><strong>No effect in this port.</strong> Windows bbsc-launch only: another program to start instead of the emulator. Not built for the Linux port.</td> <td><code>bbsc/emulator/mod/bbsc_launch.cpp:263-268</code></td> </tr> <tr> <td><code>BBSC_URL_OVERRIDES</code></td> <td>0 = off</td> <td><strong>No effect in this port.</strong> Windows bbsc.dll only (bbhost): turns off its own URL overrides. The Linux build leaves URL overrides to the online module and never reads it.</td> <td><code>bbsc/emulator/mod/bbsc_http.cpp:158</code>, <code>176-181</code></td> </tr> <tr> <td><code>BB_ASYNC_FENCES</code></td> <td>1 = on; anything else off (off)</td> <td>Experiment: an end-of-pipe fence is written once the guest memory copies on the copy threads are done instead of waiting for them. Measured slower (79 vs 83 FPS), so off. Ignored when honest labels are in use.</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.cpp:476</code></td> </tr> <tr> <td><code>BB_AS_0_3</code></td> <td>1 = on (default off)</td> <td><strong>Launcher:</strong> Advanced → Developer → "Synchronisation as in 0.3". Reverts what changed since the 0.3 release, for comparisons: run.sh forces BB_GUEST_IN_PLACE=0, BB_HOST_COPY_WAITS=all, BB_PRODUCER_CHECK=1 (overriding any value you set for those).</td> <td><code>run.sh:238</code>, <code>launcher/bbport_launcher.py:675</code></td> </tr> <tr> <td><code>BB_CAMERA_INVERSE</code></td> <td>own (unset = the game's stored inverse)</td> <td>own: camera motion vectors use the inverse of the view matrix computed by the port instead of the one the game stores (A/B test; they agree to float precision).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_camera_motion.cpp:280</code></td> </tr> <tr> <td><code>BB_CAMERA_Y</code></td> <td>up / down (unset = from the G-buffer viewport)</td> <td>Forces the screen y sign used by camera motion vectors (for tests); normally the frame's G-buffer viewport decides.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_camera_motion.cpp:313</code></td> </tr> <tr> <td><code>BB_CHUNK_TEXTURES</code></td> <td>0 = off; else on (on)</td> <td>A/B switch for the PC memory model (BB_GUEST_IN_PLACE): texture data is read by the GPU straight from the guest memory chunk it is in (no CPU copy, no VRAM buffer copy) when the range is contiguous.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:419</code>, <code>gpu/shadps4/video_core/buffer_cache/buffer_cache.h:209</code></td> </tr> <tr> <td><code>BB_CHUNK_UPLOADS</code></td> <td>0 = off; else on (on)</td> <td>A/B switch for the PC memory model: VRAM copies are uploaded by GPU copies from the guest chunks; 0 = CPU staging instead.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:410</code></td> </tr> <tr> <td><code>BB_CONTENT_SKU</code></td> <td>full | trial (default full)</td> <td>AppContent SKU reported to the game (a probe setting, not a licence check).</td> <td><code>run.sh:189</code>, <code>scripts/content_profile.py:33</code></td> </tr> <tr> <td><code>BB_CP_DECODER</code></td> <td>1 = on (off)</td> <td>Opt-in: graphics command buffers are decoded by the translator's own decoder (gpu/cp) instead of shadPS4's packet walk. Off by default: the GPU thread spends ~7 % more per draw.</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.cpp:906</code>, <code>gpu/shadps4/video_core/amdgpu/liverpool.h:111</code></td> </tr> <tr> <td><code>BB_CP_SHADOW</code></td> <td>1 = on (off)</td> <td>Self-check: the translator's own decoder (gpu/cp) also decodes every top-level graphics buffer in the shadow and the register files are compared; the first differences are printed. Off with the PM4 self-test or BB_CP_DECODER=1.</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.cpp:1059-1108</code></td> </tr> <tr> <td><code>BB_DEBUG_KEEP</code></td> <td>1 (set by tools/debug_attach.sh)</td> <td>tools/debug_attach.py: keep the process stopped/attached after the dump; see tools/debug_attach.py:74.</td> <td><code>tools/debug_attach.py:74</code>, <code>tools/debug_attach.sh:18</code></td> </tr> <tr> <td><code>BB_DEBUG_OUT</code></td> <td>file (default stdout)</td> <td>Output file of tools/debug_attach.py (gdb attach helper).</td> <td><code>tools/debug_attach.py:5</code></td> </tr> <tr> <td><code>BB_DIRECT_MEMORY_ACCESS</code></td> <td>1/y/t or 0 (off)</td> <td>shadPS4's direct memory access in shaders: when off, shaders that read memory themselves (uses_dma) get no DMA buffer.</td> <td><code>gpu/shim/core/emulator_settings.h:57</code>, <code>gpu/shadps4/shader_recompiler/ir/passes/shader_info_collection_pass.cpp:179</code></td> </tr> <tr> <td><code>BB_DUMP_GOT</code></td> <td>guest GOT offset (hex/dec)</td> <td>With BB_SAMPLE_THREAD sampling: prints which host function a guest GOT slot calls.</td> <td><code>src/runtime_kernel.c:480</code></td> </tr> <tr> <td><code>BB_FENCE_DELAY_TEST</code></td> <td>1 = on (off)</td> <td>Experiment: holds every 200th fence back 80 ms, to test whether late labels corrupt the guest heap (the sequence numbers come from BB_FREE_CHECK=1).</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.cpp:407-414</code></td> </tr> <tr> <td><code>BB_FIXED_ARENA</code></td> <td>1/0 forces on/off (unset = on when guest memory is host-imported, i.e. NVIDIA)</td> <td>NVIDIA workaround for the sparse arena: the arena keeps the first binding of every block, so game data is read in place and never moved to VRAM. Not used with the layer memory module (BB_LAYER_MEMORY); only with BB_GUEST_IN_PLACE.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:435-457</code></td> </tr> <tr> <td><code>BB_FSR411_OUT</code></td> <td>directory (default fsr4_411 in the tree; launcher sets it)</td> <td><strong>Internal.</strong> Where tools/fsr4cap/build_assets.sh writes the FSR 4.1.1 asset set.</td> <td><code>tools/fsr4cap/build_assets.sh:37</code>, <code>launcher/bbport_launcher.py:466</code></td> </tr> <tr> <td><code>BB_FSR4CAP_CLEAN</code></td> <td>1 = remove work folder (launcher sets it when packaged)</td> <td><strong>Internal.</strong> build_assets.sh removes its work folder after building FSR 4.1.1 assets.</td> <td><code>tools/fsr4cap/build_assets.sh:142</code>, <code>launcher/bbport_launcher.py:462</code></td> </tr> <tr> <td><code>BB_FSR4CAP_FP8</code></td> <td>auto | 1 | 0 (default auto)</td> <td>FSR 4.1.1 capture: also record the DLL's FP8 matrix variant outside RDNA4 via GE-Proton's FP16 emulation (1), or never (0); auto records it only where the DLL uses it (RDNA4).</td> <td><code>tools/fsr4cap/capture_all.sh:10-15</code>, <code>tools/fsr4cap/capture_all.sh:176</code></td> </tr> <tr> <td><code>BB_FSR4CAP_RUNNER</code></td> <td>steam | direct (default automatic)</td> <td>FSR 4.1.1 capture: steam = use Steam's runtime even where umu-run would be used; direct = run Proton directly from the start.</td> <td><code>tools/fsr4cap/capture_all.sh:37</code>, <code>tools/fsr4cap/proton.sh:118-135</code></td> </tr> <tr> <td><code>BB_FSR4CAP_SPOOF</code></td> <td>0 = off (default 1)</td> <td>FSR 4.1.1 capture: when AMD's DLL offers only FSR 3/2 on this GPU, retry with the GPU reported as an RX 7800 XT.</td> <td><code>tools/fsr4cap/capture_all.sh:16-19</code>, <code>tools/fsr4cap/capture_all.sh:131</code></td> </tr> <tr> <td><code>BB_FSR4CAP_WORK</code></td> <td>directory (default out/fsr4cap; launcher sets <data>/fsr4cap when packaged)</td> <td><strong>Internal.</strong> Work folder of build_assets.sh (must be under $HOME for Steam's runtime).</td> <td><code>tools/fsr4cap/build_assets.sh:19-20</code>, <code>tools/fsr4cap/build_assets.sh:36</code>, <code>launcher/bbport_launcher.py:461</code></td> </tr> <tr> <td><code>BB_FSR4_TIERS</code></td> <td>space-separated list (default "1080 2160")</td> <td>Which FSR 4 asset tiers tools/fetch_fsr4_assets.sh downloads.</td> <td><code>tools/fetch_fsr4_assets.sh:6</code>, <code>tools/fetch_fsr4_assets.sh:18</code></td> </tr> <tr> <td><code>BB_GAME_PROFILE</code></td> <td>none, or unset (by TITLE_ID)</td> <td><code>none</code> runs the game as an unknown one, without the Bloodborne profile (the code notes Bloodborne then crashes).</td> <td><code>gpu/games/game_profile.cpp:22</code>, <code>gpu/games/bloodborne.cpp:17</code></td> </tr> <tr> <td><code>BB_GC_BUDGET_MB</code></td> <td>MiB (unset = 0 = driver budget, integrated GPUs only)</td> <td>Texture collector: applies the integrated-GPU rule (marks at 70/85/95 % of the budget) with this fixed budget on any GPU. For tests on a desktop.</td> <td><code>gpu/shadps4/video_core/texture_cache/texture_cache.cpp:1324-1335</code></td> </tr> <tr> <td><code>BB_GPU_DATA_CHECK</code></td> <td>0 = off; else on (on)</td> <td>With the PC memory model, GPU writes not finished yet and data the GPU wrote into a VRAM copy count as GPU-modified for CPU access checks (issue #122). 0 = not counted.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:1366-1374</code></td> </tr> <tr> <td><code>BB_GPU_LABELS_PORTABLE</code></td> <td>anything but 0 = on (off)</td> <td>Writes GPU labels with portable Vulkan buffer updates even when VK_AMD_buffer_marker is available (testing the non-AMD path).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:326</code></td> </tr> <tr> <td><code>BB_GPU_WRITES_IN_PLACE</code></td> <td>1 = on (off)</td> <td>With the PC memory model and no write tracking, GPU-written buffers are kept in the game's memory (in place) instead of VRAM; costs ~9 ms a frame over PCIe on an RX 7800 XT.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:1118-1127</code></td> </tr> <tr> <td><code>BB_GUEST_HOOKS</code></td> <td>0 = off; else on (on)</td> <td>Hooks in the game's own code from its profile (gpu/games): the memory hooks with the PC memory model, the fixes of the game's own bugs (BB_JOB_SLOT_FIX, BB_KERNEL_CLAMP) with either model. 0 = none, as for a game the port knows nothing about.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:572-583</code>, <code>gpu/shim/bbgpu.cpp:384-393</code>, <code>gpu/games/bloodborne.cpp:17</code></td> </tr> <tr> <td><code>BB_JOB_SLOT_FIX</code></td> <td>0 = off (default on)</td> <td>A render job that fails gives its pool slot back (the game kept it: Laurence's cinematic above 30 FPS emptied the pool and hung); also when a runner is destroyed holding one.</td> <td><code>gpu/shim/bbport_guest_hooks.cpp:443-470</code></td> </tr> <tr> <td><code>BB_KERNEL_CLAMP</code></td> <td>0 = off (default on)</td> <td>Raises the blur kernel's base sample count to 3 at the entry of 0xbbc3e0 (game data now and then gives 2: exception 0xa0020007).</td> <td><code>gpu/shim/bbport_guest_hooks.cpp:472-491</code></td> </tr> <tr> <td><code>BB_GUEST_HOOK_TRAPS</code></td> <td>1 or unset (off)</td> <td>Keeps the guest hooks as int3 traps instead of native detours.</td> <td><code>gpu/shim/bbport_guest_hooks.cpp:72</code>, <code>gpu/shim/bbport_guest_hooks.cpp:529</code></td> </tr> <tr> <td><code>BB_GUEST_WHOLE_CHUNKS</code></td> <td>1 or unset (off)</td> <td>Acts as if mapping a dma-buf at an offset failed (tests the NVIDIA path).</td> <td><code>gpu/shim/bbport_guest_memory.cpp:608</code></td> </tr> <tr> <td><code>BB_HEAP_HOOKS</code></td> <td>0, or unset (on)</td> <td>0 (bisecting): the game heap's ranges are not reported to the GPU side.</td> <td><code>gpu/shim/bbport_guest_hooks.cpp:513</code></td> </tr> <tr> <td><code>BB_HLE_OFF</code></td> <td>bit mask, decimal or 0x hex (0): 1 = image copy, 2 = metadata clear, 4 = image clear</td> <td>Experiment: the selected compute-shader substitutions (HLE) run as the game's own shaders instead.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:2389</code></td> </tr> <tr> <td><code>BB_HONEST_FLIPS</code></td> <td>1 = on (off)</td> <td>Experiment: a flip completes once the GPU has finished the frame (as on the PS4) instead of when the frame is queued. Did not help, so off.</td> <td><code>gpu/shadps4/core/libraries/videoout/driver.cpp:745-755</code></td> </tr> <tr> <td><code>BB_HONEST_IDLE_US</code></td> <td>microseconds (200)</td> <td>With honest labels (BB_HONEST_LABELS): how long the GPU command thread waits idle before flushing unsubmitted work that fences may be waiting for.</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.cpp:136-146</code></td> </tr> <tr> <td><code>BB_HOT_PAGES</code></td> <td>1 = on (off)</td> <td>Opt-in: pages the guest writes again and again stay writable and are uploaded on every use instead of faulting. Off by default: in Hunter's Nightmare the set grew to ~14k pages and cost far more (33 FPS).</td> <td><code>gpu/shadps4/video_core/buffer_cache/region_manager.h:259-273</code></td> </tr> <tr> <td><code>BB_IMAGE_TRAPS</code></td> <td>0 = off; else on (on, only with the PC memory model and no write tracking)</td> <td>Pages under images are trapped for writes, so a write nobody announced still reaches the texture cache. 0 = announced writes only, as before.</td> <td><code>gpu/shadps4/video_core/page_manager.cpp:225-240</code></td> </tr> <tr> <td><code>BB_IME_TEXT</code></td> <td>text (default unset)</td> <td>Answers every on-screen keyboard (IME) dialog at once with this text (automated runs).</td> <td><code>src/runtime_services.c:298</code></td> </tr> <tr> <td><code>BB_INPLACE_TEXTURES</code></td> <td>1 = on (off)</td> <td>A/B switch for the PC memory model: texture data bound in place whatever its memory type. Off by default: sampled data looked smeared and ghosted with it (2026-10-04).</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:411</code>, <code>426-433</code></td> </tr> <tr> <td><code>BB_INTERNAL_HEIGHT</code></td> <td>pixels (1080)</td> <td>Height of the video-out driver's internal screen (shadPS4 setting). See BB_RENDER_RES for the render size.</td> <td><code>gpu/shim/core/emulator_settings.h:24</code>, <code>gpu/shadps4/core/libraries/videoout/video_out.cpp:494</code></td> </tr> <tr> <td><code>BB_INTERNAL_WIDTH</code></td> <td>pixels (1920)</td> <td>Width of the video-out driver's internal screen (shadPS4 setting).</td> <td><code>gpu/shim/core/emulator_settings.h:23</code>, <code>gpu/shadps4/core/libraries/videoout/video_out.cpp:493</code></td> </tr> <tr> <td><code>BB_LAYER_GPU_WRITES</code></td> <td>0, 1 or 2 (1)</td> <td>Layer memory module (BB_LAYER_MEMORY): where GPU writes may land in VRAM copies: 0 nowhere (in place), 1 in blocks the CPU has not written since they were handed out (render targets and other GPU-only data), 2 anywhere (gave exploding vertices and garbage textures).</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.h:220-223</code>, <code>gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:1209-1217</code></td> </tr> <tr> <td><code>BB_LAYER_PAGED</code></td> <td>0 = off; else on (on)</td> <td>Layer memory module (tests): 0 cuts huge bindings in place instead of going through the page table.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:1200-1207</code></td> </tr> <tr> <td><code>BB_LAYER_VOLATILE</code></td> <td>1 = on (off)</td> <td>Layer memory module: a range with a few unannounced ("volatile") blocks goes into one mirror anyway, those blocks refreshed for every binding that reads them. Off by default: the refreshes cost copies and render-pass breaks.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:58-70</code></td> </tr> <tr> <td><code>BB_LAYER_VOLATILE_IN_PASS</code></td> <td>0 = off; else on (on)</td> <td>Layer memory module: a read over volatile blocks inside an open render pass is bound in place instead of refreshing the mirror (a refresh copy ends the pass). 0 = refreshed in passes too (as before).</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:300-309</code></td> </tr> <tr> <td><code>BB_LAYER_WATCH_HOT</code></td> <td>1 = on (off)</td> <td>Experiment (layer memory module): blocks the CPU writes often are watched too and uploaded again after every write, as the 0.3 model does. Off: they go back in place (uploading them ended render passes).</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:428-438</code></td> </tr> <tr> <td><code>BB_LAYER_WRITE_TRAPS</code></td> <td>0 = off; else on (on)</td> <td>Layer memory module: blocks with a VRAM copy are write-protected so a write the game does not announce sends the block back in place before the next binding (else stale copies give exploding vertices and garbage textures). BB_LAYER_WATCH needs it.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache_layer.cpp:1386-1406</code></td> </tr> <tr> <td><code>BB_MEM_SEMAPHORE_ORDER</code></td> <td>0 = off; else on (on, only with honest labels)</td> <td>A MEM_SEMAPHORE signal is given once the GPU has finished the work before it, in stream order. 0 = signalled when decoded (as before).</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.cpp:497-507</code></td> </tr> <tr> <td><code>BB_MENU_KEYS_FILE</code></td> <td>file path (unset: off)</td> <td>Scripted menu tests: tokens in the file (toggle up down left right enter back l1 r1) are pressed one per frame when the file appears; it is then removed.</td> <td><code>gpu/shim/bbport_overlay.cpp:1087</code></td> </tr> <tr> <td><code>BB_NULL_GPU</code></td> <td>1/y/t or 0 (off)</td> <td>shadPS4's null GPU: the command processor is not bound to the rasterizer, so nothing is drawn.</td> <td><code>gpu/shim/core/emulator_settings.h:61</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:75</code></td> </tr> <tr> <td><code>BB_OBJECT_MOTION_ALL</code></td> <td>1 = on (off)</td> <td>Keeps the old broad object-motion path (every candidate draw, without the bone-palette gate) for visual A/B tests.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp:921</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:1705</code></td> </tr> <tr> <td><code>BB_OCCLUSION_LABEL_ORDER</code></td> <td>0 = off; unset/other = on</td> <td>With occlusion queries: results recorded before a label are written before it, as on the PS4. 0: labels may go ahead (statistics only).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_occlusion.cpp:228</code></td> </tr> <tr> <td><code>BB_PACKAGE_FSR411</code></td> <td>1 = include (build-time, default off)</td> <td>Nix build: package the FSR 4.1.1 models (extracted from AMD's DLLs; never in a public package).</td> <td><code>packaging/default.nix:12-14</code></td> </tr> <tr> <td><code>BB_PAD_FILE</code></td> <td>file (default off)</td> <td>Scripted input for automated runs: button names held while listed, lx=/ly=/rx=/ry= stick overrides, re-read when the file changes; token "replay" starts BB_PAD_REPLAY.</td> <td><code>src/runtime_pad.c:898</code></td> </tr> <tr> <td><code>BB_CAM_TRACE</code></td> <td>file (default off)</td> <td>Writes "ms yaw pitch" (radians) to this file whenever the camera turns, to measure how the game turns it for a stick input (with BB_PAD_FILE). Not with mouse_camera=direct.</td> <td><code>gpu/shim/bloodborne_cam.cpp</code> (TraceTick)</td> </tr> <tr> <td><code>BB_PAD_RECORD</code></td> <td>file (default off)</td> <td>F9 starts/stops recording the pad state (gamepad or keyboard) to this file.</td> <td><code>src/runtime_pad.c:943</code></td> </tr> <tr> <td><code>BB_PAD_REPLAY</code></td> <td>file (default off)</td> <td>Plays a BB_PAD_RECORD recording back, started by the token "replay" in BB_PAD_FILE.</td> <td><code>src/runtime_pad.c:975</code>, <code>src/runtime_pad.c:975</code></td> </tr> <tr> <td><code>BB_PIPE_VERIFY</code></td> <td>integer N (0 = off)</td> <td>Every Nth draw-pipe packet also carries the full register state, for verification. Exact check: see gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:1177.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:822</code></td> </tr> <tr> <td><code>BB_PM4_SELFTEST</code></td> <td>1 = on (off)</td> <td>Self-test of command-processor packets Bloodborne never sends (occlusion queries, COPY_DATA, COND_EXEC, predication, MEM_SEMAPHORE, timestamps): injected ~40 s into the game and the results printed. Turns on BB_OCCLUSION_QUERIES.</td> <td><code>gpu/shadps4/video_core/amdgpu/pm4_selftest.cpp:221</code>, <code>gpu/shadps4/video_core/amdgpu/pm4_selftest.h:2</code></td> </tr> <tr> <td><code>BB_PM4_SELFTEST_STEPS</code></td> <td>bit mask (C integer, 0x allowed) (all steps)</td> <td>PM4 self-test (BB_PM4_SELFTEST): which steps run (bit n = step n); others skipped.</td> <td><code>gpu/shadps4/video_core/amdgpu/pm4_selftest.cpp:250-254</code></td> </tr> <tr> <td><code>BB_PRESET_FILE</code></td> <td>file path holding a preset number (unset = off)</td> <td>Read about once a second; switches the upscaler preset like the menu does (scripted tests of live preset changes).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:323</code></td> </tr> <tr> <td><code>BB_PROBE</code></td> <td>path to a program; default bin/bb-probe (packaged) or out/bb-probe</td> <td>Runs this instead of bb-probe, e.g. a gdb wrapper; bb-gpu-capabilities is then taken from its folder.</td> <td><code>run.sh:90</code>, <code>236-239</code></td> </tr> <tr> <td><code>BB_RESIDENCY_VRAM_LIMIT_MB</code></td> <td>MiB (unset = 0 = no limit)</td> <td>Tests: VRAM counts as "full" after this many MiB of residency blocks, so blocks fall back to system memory read over the bus.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:1643-1648</code></td> </tr> <tr> <td><code>BB_SCENE_STENCIL_BITS</code></td> <td>1 = on (off)</td> <td>Forces reduced-size depth/stencil scene targets on GPUs without shader stencil export (e.g. Pascal), where they normally stay native (tests).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_scene_resolution.cpp:25</code></td> </tr> <tr> <td><code>BB_SHADOWS</code></td> <td>1 = on (off)</td> <td>With the PC memory model on a discrete GPU, a read-only binding of data the CPU writes in place is copied once per submission into VRAM and bound there. Off by default: cost more than reading in place (48 -> 44 FPS).</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.h:305-309</code>, <code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:2782</code></td> </tr> <tr> <td><code>BB_SKIP_CPU_CHECK</code></td> <td>1 = skip (default check)</td> <td>Skips the start-up check for the CPU features the game's code needs (AVX, BMI1, MOVBE, LZCNT, POPCNT); without them the game crashes with SIGILL.</td> <td><code>src/probe.c:45-52</code></td> </tr> <tr> <td><code>BB_SUBMIT_LOCK</code></td> <td>gpu | ahead | anything else (unset = frame/decode behaviour)</td> <td>Submission lock mode with honest labels: unset/other = submissions are handed to the GPU first and return once the previous frame finished; gpu = the lock as before (wait for GPU idle); ahead = experiment, submissions never wait and sceGnmSubmitDone(F) waits for frame F-1. Only "gpu" and "ahead" are compared in code.</td> <td><code>gpu/shadps4/core/libraries/gnmdriver/gnmdriver.cpp:92-130</code>, <code>gpu/shadps4/core/libraries/gnmdriver/gnmdriver.h:229</code></td> </tr> <tr> <td><code>BB_TEST_STAGE</code></td> <td>integer</td> <td><strong>Test only.</strong> Used only inside tests/test_run_settings.py's fake probe.</td> <td><code>tests/test_run_settings.py:45</code></td> </tr> <tr> <td><code>BB_TIMEOUT</code></td> <td>seconds, 0 = none (run.sh default 0)</td> <td>Watchdog: run.sh passes it as bb-probe --timeout; the process is stopped after that many seconds.</td> <td><code>run.sh:404</code>, <code>src/probe.c:381-437</code></td> </tr> <tr> <td><code>BB_TOGGLE_FILE</code></td> <td>file path (unset = off)</td> <td>The file holds "N [M]", re-read every 250 ms: N is a bit mask of optimizations switched off while the game runs, M temporary experiment bits (A/B without restarting). Bits listed in src/runtime_memory.c and gpu/shim/bbport_toggles.h.</td> <td><code>src/runtime_memory.c:774</code>, <code>src/runtime_memory.c:774</code>, <code>gpu/shim/bbport_toggles.h:1</code></td> </tr> <tr> <td><code>BB_TROPHY_PREVIEW</code></td> <td>trophy id (default off)</td> <td>At the game's first trophy call, shows that trophy's notice without recording it, to check how it looks.</td> <td><code>src/runtime_services.c:399</code></td> </tr> <tr> <td><code>BB_UI_TRIGGER_VS</code></td> <td>hex shader hash (0x34e8a281)</td> <td>Vertex shader hash that marks the UI/movie phase of a frame for the upscaler.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:196</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.h:225</code></td> </tr> <tr> <td><code>BB_UPSCALE_BEFORE_CS</code></td> <td>hex shader hash (0x9a9cf8a9)</td> <td>Compute shader hash before which the upscaler runs on the scene color (the post-processing combine pass).</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.cpp:193</code>, <code>gpu/shadps4/video_core/renderer_vulkan/vk_temporal_upscaler.h:207</code></td> </tr> <tr> <td><code>BB_VRAM_LIMIT_MB</code></td> <td>integer MiB (0 = no limit)</td> <td>Tests: the driver's VRAM budget is taken as at most N MiB, so the texture collector and VRAM copies behave as on a smaller card. Allocations themselves are not limited.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_instance.cpp:39</code></td> </tr> <tr> <td><code>BB_WORK_RETIRED</code></td> <td>0 = off; else on (on)</td> <td>GPU idle (sceGnmSubmitDone not blocking) also requires the draw recording thread and its deferred fences to be done; 0 = only submissions counted (Steam Deck crashes noted).</td> <td><code>gpu/shadps4/video_core/amdgpu/liverpool.h:141-150</code>, <code>gpu/shadps4/core/libraries/gnmdriver/gnmdriver.cpp:94</code></td> </tr> <tr> <td><code>BB_WRITE_TRACKING</code></td> <td>1 = on (off; on anyway without the PC memory model)</td> <td>Forces page write tracking (protection) back on with the PC memory model (BB_GUEST_IN_PLACE), where it is otherwise off.</td> <td><code>gpu/shadps4/video_core/buffer_cache/buffer_cache.cpp:487-495</code>, <code>gpu/shadps4/video_core/buffer_cache/buffer.h:48</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_NO_FAST_SIGN</code></td> <td>—</td> <td><strong>No effect in this port.</strong> Named only in the vanilla-emulator stub of SwitchEnabled; never read by libbbsc.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:59-67</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_NO_GUEST_HOOKS</code></td> <td>"0" off, any other non-empty value on; default off</td> <td>Isolation switch: skips the per-tick guest pre-match warp, deferred reload and responder re-ring (byte patches stay installed).</td> <td><code>bbsc/emulator/src/core/bloodborne_re.cpp:16170</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_NO_PLACEMENT_HEADER</code></td> <td>—</td> <td><strong>No effect in this port.</strong> Named only in the vanilla-emulator stub of SwitchEnabled (counts as set when BBSC is not built in); never read by libbbsc.</td> <td><code>bbsc/emulator/src/core/bbsc_persistence.h:59-67</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_PHANTOM_FLAGS</code></td> <td>"0" off, any other non-empty value on; default off</td> <td>Re-enables an experiment writing the phantom creation flags onto the guest (made the guest invisible and immune to damage).</td> <td><code>bbsc/emulator/src/core/bloodborne_re.cpp:3813</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_REINSERT</code></td> <td>joined | leftjoined; unset, empty or 0: off (default)</td> <td>Experimental: after a kept session end, replays the room members once the stage load is consumed; "leftjoined" also announces them as left first.</td> <td><code>bbsc/emulator/src/core/bloodborne_re.cpp:3396</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_REINSERT_DELAY_MS</code></td> <td>milliseconds; default 6000</td> <td>Delay before the experimental SHADPS4_BBSC_REINSERT replay runs.</td> <td><code>bbsc/emulator/src/core/bloodborne_re.cpp:3427</code></td> </tr> <tr> <td><code>SHADPS4_BBSC_REJOIN_V6</code></td> <td>"0" off, any other non-empty value on; default off</td> <td>Restores the older v6 deferred rejoin path instead of the default v7.</td> <td><code>bbsc/emulator/src/core/bloodborne_re.cpp:3474</code></td> </tr> <tr> <td><code>SHADPS4_P2P_SAME_HOST</code></td> <td>any value but 0 (off)</td> <td>Two instances on one machine: the peer given as this network's own public address is reached through loopback.</td> <td><code>gpu/bbnet/shadps4/core/libraries/network/p2p_sockets.cpp:65</code></td> </tr> </tbody> </table> <h2 id="internal">Internal<a class="headerlink" href="#internal" title="Permanent link">¶</a></h2> <table> <thead> <tr> <th>Variable</th> <th>Values (default)</th> <th>What it does</th> <th>Where</th> </tr> </thead> <tbody> <tr> <td><code>BB_SAVEDATA_TITLE</code></td> <td>title id</td> <td><strong>Set by the runtime</strong>, not by you: the save folder's title id, for BBSC's save path (<code>BBSC_SAVE_DIR</code>).</td> <td><code>src/runtime_savedata.c:106</code></td> </tr> <tr> <td><code>BB_AUTO_RENDER_RES</code></td> <td>1 or unset</td> <td><strong>Internal</strong> (run.sh sets it with BB_RENDER_RES/BB_OUTPUT_RES). Marks BB_RENDER_RES/BB_OUTPUT_RES as chosen by run.sh from bbport.ini output_res (startup patch); run.sh drops them (and BB_UI_RES) on an in-game restart so they are recomputed, and the menu shows the matching hint.</td> <td><code>run.sh:68-70</code>, <code>run.sh:119</code>, <code>gpu/shim/bbport_overlay.cpp:442</code></td> </tr> <tr> <td><code>BB_BBSC_LIB</code></td> <td>path to libbbsc.so; default out/bbsc/libbbsc.so or BB_BBSC_PACKAGED_LIB</td> <td><strong>Internal.</strong> Library bb-probe loads into the game for seamless co-op. run.sh unsets it unless BB_BBSC=1 and BB_ONLINE=1, then resolves it (an explicit value is kept as an override).</td> <td><code>src/probe.c:340</code>, <code>run.sh:341</code>, <code>287-295</code></td> </tr> <tr> <td><code>BB_BBSC_PACKAGED_LIB</code></td> <td>path (set by the AppImage entry)</td> <td><strong>Internal.</strong> Location of the packaged libbbsc.so; run.sh falls back to it when BB_BBSC_LIB is unset, the launcher uses it to know BBSC is available.</td> <td><code>packaging/appimage-sharun.sh:73</code>, <code>run.sh:341</code>, <code>launcher/bbport_launcher.py:559</code></td> </tr> <tr> <td><code>BB_BRIDGE_CLI</code></td> <td>path (default out/bbbridge/bbbridge-cli; AppImage sets its copy)</td> <td><strong>Internal.</strong> The bbbridge-cli binary used for The Hunter's Dream.</td> <td><code>run.sh:313</code>, <code>launcher/bbport_launcher.py:566</code>, <code>packaging/appimage-sharun.sh:71</code></td> </tr> <tr> <td><code>BB_BUNDLED_VK_DRIVER_FILES</code></td> <td>colon-separated ICD list (set by the Nix wrapper)</td> <td><strong>Internal.</strong> The package's own Mesa ICDs; bbport_vulkan.py puts them in VK_DRIVER_FILES (after the host NVIDIA ICD if one is found).</td> <td><code>launcher/bbport_vulkan.py:71</code>, <code>packaging/default.nix:215</code></td> </tr> <tr> <td><code>BB_DLSS_DIR</code></td> <td>directory (unset = next to bb-probe)</td> <td><strong>Internal.</strong> Where the DLSS bridge (libbbport_dlss.so) and NVIDIA's libnvidia-ngx-dlss are looked up. The AppImage entry sets it to its own dlss folder.</td> <td><code>gpu/shadps4/video_core/renderer_vulkan/vk_dlss.cpp:61</code>, <code>packaging/appimage-sharun.sh:69</code>, <code>launcher/bbport_launcher.py:434</code></td> </tr> <tr> <td><code>BB_FSR4CAP_CHECKED</code></td> <td>1 (set by the script itself)</td> <td><strong>Internal.</strong> build_assets.sh marks that the DLL check already ran (re-exec guard).</td> <td><code>tools/fsr4cap/build_assets.sh:49-51</code></td> </tr> <tr> <td><code>BB_FSR4CAP_ON_HOST</code></td> <td>1 (set by the script itself)</td> <td><strong>Internal.</strong> capture_all.sh re-runs itself on the host through systemd-run; this marks the re-run.</td> <td><code>tools/fsr4cap/capture_all.sh:47</code>, <code>tools/fsr4cap/capture_all.sh:62</code></td> </tr> <tr> <td><code>BB_FSR4CAP_SHELL</code></td> <td>1 (set by the script itself)</td> <td><strong>Internal.</strong> build_assets.sh re-exec guard inside nix-shell (missing build tools).</td> <td><code>tools/fsr4cap/build_assets.sh:65-68</code></td> </tr> <tr> <td><code>BB_FSR4CAP_TOOLS</code></td> <td>directory (launcher sets it when bundled)</td> <td><strong>Internal.</strong> Folder holding prebuilt dxil-spirv and fsr4cap.exe, so build_assets.sh needs no MinGW toolchain.</td> <td><code>tools/fsr4cap/build_assets.sh:13</code>, <code>tools/fsr4cap/build_assets.sh:38</code>, <code>launcher/bbport_launcher.py:465</code></td> </tr> <tr> <td><code>BB_FSR4CAP_UMU_SHELL</code></td> <td>1 (set by the script itself)</td> <td><strong>Internal.</strong> capture_all.sh re-exec guard inside a nix-shell with umu-launcher (NixOS).</td> <td><code>tools/fsr4cap/capture_all.sh:40-44</code></td> </tr> <tr> <td><code>BB_HOST_<NAME></code></td> <td>set by the packaged entry</td> <td><strong>Internal.</strong> Copies of host variables the packaged entry dropped (LD_PRELOAD, LD_LIBRARY_PATH, GTK_<em>, pressure-vessel VK_</em> …), kept only for the log.</td> <td><code>packaging/bbport-entry.c:19-28</code>, <code>packaging/appimage-sharun.sh:73-79</code></td> </tr> <tr> <td><code>BB_IN_NIX_SHELL</code></td> <td>1 (set by run.sh)</td> <td><strong>Internal.</strong> run.sh re-exec guard when it re-runs itself inside nix-shell.</td> <td><code>run.sh:37-39</code></td> </tr> <tr> <td><code>BB_NET_MODULE</code></td> <td>path (AppImage sets its copy; default gpu/libbbnet.so beside bb-probe)</td> <td><strong>Internal.</strong> The online module (libbbnet.so) the runtime dlopens.</td> <td><code>src/runtime_net.c:43-50</code>, <code>packaging/appimage-sharun.sh:70</code>, <code>launcher/bbport_launcher.py:582</code></td> </tr> <tr> <td><code>BB_PKGEXTRACT</code></td> <td>path (AppImage sets its copy)</td> <td><strong>Internal.</strong> pkgextract binary for "Install from PKG".</td> <td><code>scripts/pkg_install.py:50-51</code>, <code>launcher/bbport_launcher.py:573</code>, <code>packaging/appimage-sharun.sh:72</code></td> </tr> <tr> <td><code>BB_PREBUILT</code></td> <td>1 (AppImage/Nix wrapper)</td> <td><strong>Internal.</strong> Packaged build: binaries are installed next to run.sh, nothing is built and no nix-shell is used; the launcher stores data in BB_DATA_DIR.</td> <td><code>run.sh:14</code>, <code>run.sh:284</code>, <code>launcher/bbport_launcher.py:55</code>, <code>packaging/appimage-sharun.sh:66</code></td> </tr> <tr> <td><code>BB_PRESENCE_DIR</code></td> <td>directory (run.sh: out/presence, new each start)</td> <td><strong>Internal</strong> (run.sh, when Discord is on). Where the game writes the current area (<code>area</code>) and co-op partners (<code>coop</code>) for the Discord Rich Presence helper.</td> <td><code>run.sh:360</code>, <code>src/runtime_file.c:317</code>, <code>gpu/bbnet/shadps4/core/libraries/np/np_signaling/np_signaling_state.cpp:248</code></td> </tr> <tr> <td><code>BB_TROPHY_DIR</code></td> <td>directory (run.sh sets it)</td> <td><strong>Internal.</strong> Trophy list and icons prepared by scripts/trophies.py; trophies are recorded there and shown in the overlay.</td> <td><code>run.sh:354</code>, <code>src/runtime_services.c:335</code></td> </tr> <tr> <td><code>BB_VULKANINFO</code></td> <td>path (default vulkaninfo)</td> <td><strong>Internal.</strong> vulkaninfo binary used by bbport_vulkan.py --vulkan-info (packaged builds set their copy).</td> <td><code>launcher/bbport_vulkan.py:199</code>, <code>packaging/appimage-sharun.sh:68</code></td> </tr> <tr> <td><code>DISABLE_GAMESCOPE_WSI</code></td> <td>1 (set by the packaged entry)</td> <td><strong>Internal.</strong> Set when Steam's pressure-vessel Vulkan variables were dropped, turning off the host's gamescope WSI layer.</td> <td><code>packaging/bbport-entry.c:61-63</code>, <code>packaging/appimage-sharun.sh:87</code></td> </tr> <tr> <td><code>DISABLE_MANGOHUD</code></td> <td>1 (set by run.sh)</td> <td><strong>Internal.</strong> Set when Steam's performance overlay already draws MangoHud.</td> <td><code>run.sh:250</code></td> </tr> <tr> <td><code>DISABLE_VK_LAYER_VALVE_steam_fossilize_1</code></td> <td>1 (set by the Nix entry)</td> <td><strong>Internal.</strong> Disables Steam's fossilize Vulkan layer in the Nix package.</td> <td><code>packaging/bbport-entry.c:65</code></td> </tr> <tr> <td><code>DISABLE_VK_LAYER_VALVE_steam_overlay_1</code></td> <td>1 (set by the Nix entry)</td> <td><strong>Internal.</strong> Disables Steam's overlay Vulkan layer (a host library) in the Nix package.</td> <td><code>packaging/bbport-entry.c:64</code></td> </tr> <tr> <td><code>GSK_RENDERER</code></td> <td>launcher default cairo</td> <td><strong>Internal.</strong> GTK renderer of the launcher window (setdefault: your value wins).</td> <td><code>launcher/bbport_launcher.py:38</code></td> </tr> <tr> <td><code>PYTHON</code></td> <td>path (default python3 on PATH)</td> <td><strong>Internal.</strong> Python used by run.sh for its scripts (the AppImage/Nix set their own).</td> <td><code>run.sh:54-62</code>, <code>packaging/appimage-sharun.sh:67</code></td> </tr> <tr> <td><code>SHADPS4_HTTP_HOST_OVERRIDES_JSON</code></td> <td>path to a JSON file; unset: <user>/host_overrides.json</td> <td><strong>Internal.</strong> Host-overrides file (game URL rewrites) for the online module and BBSC's relay lookup. run.sh writes it from scripts/online.py whenever Online is on, overwriting any value given.</td> <td><code>run.sh:315</code>, <code>gpu/bbnet/shadps4/core/libraries/network/http.cpp:336-343</code>, <code>bbsc/emulator/mod/bbsc_relay.cpp:150-156</code></td> </tr> </tbody> </table> <h2 id="not-read-by-the-game">Not read by the game<a class="headerlink" href="#not-read-by-the-game" title="Permanent link">¶</a></h2> <p>These names look like game variables but are read only by the BBSC server's Docker image (<code>tools/bbsc-server</code>); putting them in the launcher has no effect.</p> <table> <thead> <tr> <th>Variable</th> <th>Values (default)</th> <th>What it does</th> <th>Where</th> </tr> </thead> <tbody> <tr> <td><code>BBSC_BBHOST</code></td> <td>0 = off (default 1)</td> <td>Server-side (tools/bbsc-server Docker image): 0 starts it without its bbhost-compatible service (TCP 18671, UDP 3478). Not a game variable.</td> <td><code>tools/bbsc-server/entrypoint.sh:16-18</code></td> </tr> <tr> <td><code>BBSC_HOST</code></td> <td>address (required)</td> <td>Server-side (tools/bbsc-server): the address players reach the BBSC game server at. Not a game variable.</td> <td><code>tools/bbsc-server/entrypoint.sh:2-14</code></td> </tr> <tr> <td><code>BBSC_SHADNET</code></td> <td>address (default BBSC_HOST)</td> <td>Server-side (tools/bbsc-server): the shadNet server the BBSC server talks to. Not a game variable.</td> <td><code>tools/bbsc-server/entrypoint.sh:3-7</code></td> </tr> </tbody> </table> <h2 id="known-quirks">Known quirks<a class="headerlink" href="#known-quirks" title="Permanent link">¶</a></h2> <ul> <li><strong><code>BB_UPSCALER</code> is read in three places.</strong></li> <li>The GPU library takes <code>off</code>/<code>fsr3</code>/<code>fsr4</code>/<code>fsr411</code>/<code>taa</code>/<code>dlss</code> (anything else means off).</li> <li><code>none</code> also switches off the upscaler machinery entirely.</li> <li><code>scripts/patches.py</code> only tells <code>fsr3</code> from the rest when it sizes the startup render patch.</li> <li><code>BB_UPSCALE_PRESET</code> is likewise ignored by <code>run.sh</code>'s startup size, which follows bbport.ini.</li> <li><strong>Two defaults.</strong></li> <li><code>BB_PREUPLOAD</code>, <code>BB_COPY_GPU_BUFFERS</code>, <code>BB_GPU_WRITE_TWINS</code> and <code>BB_GPU_WRITE_TWINS_MAX</code>: <code>run.sh</code> exports a value different from the code's built-in default. The tables give both.</li> <li><code>BB_SHADNET_SERVER</code>/<code>BB_SHADNET_WEBAPI</code>: the code falls back to <code>127.0.0.1</code>, <code>run.sh</code> to Seamless Hunt's <code>play.seamlesshunt.com</code>.</li> <li><code>BB_TIMEOUT</code>: bb-probe's own default is 10 s, but <code>run.sh</code> passes 0 (no watchdog).</li> <li><strong>Two names.</strong> Inside libbbsc, <code>SHADPS4_BLOODBORNE_RE_TRACE</code> is redirected to <code>BBSC_MOD_HOOKS</code>, and <code>SHADPS4_BLOODBORNE_SEAMLESS_COOP</code> to <code>BBSC_MOD_SEAMLESS</code> (<code>bloodborne_re.cpp:942-955</code>). <code>SHADPS4_BLOODBORNE_SEAMLESS_COOP</code> keeps a separate meaning in the online module (summons through the WebAPI).</li> <li><strong>BBSC switches not in mod.json</strong> have no launcher toggle, but they are on by default and can be turned off with <code>=0</code>:</li> <li><code>SHADPS4_BBSC_WARP_JOIN</code>, <code>PERSIST</code>, <code>PERSIST_MATCHCHECK</code>, <code>PERSIST_TASKS</code> and <code>REJOIN</code>;</li> <li><code>CINEMATIC</code> (F1 free camera) and <code>INVADE_ANYWHERE</code>;</li> <li><code>TRACE_WALLS</code>, a log.</li> <li><strong>BBSC scaling:</strong> the launcher limits <code>BBSC_SCALE_*</code> to 0–300/0–200, but the code clamps to 0–1000.</li> <li><strong>Variables that need another one:</strong></li> <li><code>BB_TRACE_ADDR</code> needs <code>BB_TRACE_SIZE</code>.</li> <li><code>BB_LABEL_TRAP</code> needs <code>BB_FREE_CHECK=1</code>.</li> <li><code>BB_TIMELINE_START</code> needs <code>BB_TIMELINE</code>.</li> <li><code>BB_GNM_TRACE</code> and <code>BB_GNM_CENSUS_RANGE</code> need <code>BB_GNM_CENSUS</code> or <code>BB_GNM_OBSERVE</code>.</li> <li><code>BB_FSR1</code>, <code>BB_RCAS</code> and <code>BB_RCAS_ATTENUATION</code> drive shadPS4's old FSR 1 presenter pass, not the port's upscaler or its sharpening.</li> <li><strong>No effect in the Linux port:</strong></li> <li><code>SHADPS4_BBSC_DISCORD</code>: <code>bbsc_discord.cpp</code> is not built, although the launcher still writes it.</li> <li><code>BBSC_URL_OVERRIDES</code> and <code>BBSC_EMULATOR</code>: Windows only.</li> <li><code>SHADPS4_BBSC_NO_PLACEMENT_HEADER</code> and <code>SHADPS4_BBSC_NO_FAST_SIGN</code>: never read.</li> <li><code>SHADPS4_BLOODBORNE_RE_TRACE</code>: aliased, see above.</li> <li><code>SHADPS4_BBSC_INTRO</code> is named in a comment (<code>bbsc_persistence.h</code>) and never read.</li> </ul> <h2 id="undocumented">Undocumented<a class="headerlink" href="#undocumented" title="Permanent link">¶</a></h2> <p>These variables are read, but the code does not say clearly enough what every value does:</p> <ul> <li><code>SHADPS4_BBSC_SKIP_LEAVE_LIMIT</code>: enables the persistent-session patch group "LeaveLimit"; its effect is not described (<code>bbsc/emulator/src/core/bbsc_patch_tables.h:426</code>).</li> <li><code>BB_TAA_DIAGNOSTICS</code>: the meaning of values 1–3 is in the shader (<code>gpu/shadps4/video_core/host_shaders/taa.comp:16</code>).</li> <li><code>BB_PIPE_VERIFY</code>: the exact check is in <code>gpu/shadps4/video_core/renderer_vulkan/vk_rasterizer.cpp:1177</code>.</li> <li><code>BB_DEBUG_KEEP</code>: used only by <code>tools/debug_attach.py:74</code>.</li> </ul> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer" > <a href="../CREDITS/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Credits"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg> </div> <div class="md-footer__title"> <span class="md-footer__direction"> Previous </span> <div class="md-ellipsis"> Credits </div> </div> </a> <a href="../DEBUGGING/" class="md-footer__link md-footer__link--next" aria-label="Next: Debugging a crash"> <div class="md-footer__title"> <span class="md-footer__direction"> Next </span> <div class="md-ellipsis"> Debugging a crash </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> <div class="md-copyright__highlight"> GPL-3.0-or-later. Bloodborne is by FromSoftware and Sony Interactive Entertainment; this project is not affiliated with either. No game files are included. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.instant", "navigation.sections", "navigation.top", "navigation.footer", "search.suggest", "search.highlight", "content.code.copy", "toc.follow"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../assets/javascripts/bundle.c21346df.min.js"></script> </body> </html>