diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-09-09 11:59:29 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-09-09 11:59:29 +0200 |
| commit | 7acdd87198ac42e95f97fe943dafab9c73a22fc3 (patch) | |
| tree | bc13d2e0236e03757750cb9d317c80953ec8e6a7 | |
| parent | 4fb9c658a13a7f1909b5929d1a0895b6e3488075 (diff) | |
| download | box64-7acdd87198ac42e95f97fe943dafab9c73a22fc3.tar.gz box64-7acdd87198ac42e95f97fe943dafab9c73a22fc3.zip | |
[DYNAREC] Fully trust volatile metadata when they are present (fixes Starfield freeze)
| -rw-r--r-- | src/dynarec/dynarec_native_pass.c | 4 | ||||
| -rw-r--r-- | system/box64.box64rc | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/dynarec/dynarec_native_pass.c b/src/dynarec/dynarec_native_pass.c index a90206fb..fc3d06a9 100644 --- a/src/dynarec/dynarec_native_pass.c +++ b/src/dynarec/dynarec_native_pass.c @@ -135,7 +135,7 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int } int is_opcode_volatile = box64_wine && VolatileRangesContains(ip) && VolatileOpcodesHas(ip); - if (is_opcode_volatile && !dyn->insts[ninst].lock_prefixed && dyn->insts[ninst].will_write) + if (is_opcode_volatile && !dyn->insts[ninst].lock_prefixed) DMB_ISHST(); #endif if((dyn->insts[ninst].x64.need_before&~X_PEND) && !ninst) { @@ -198,7 +198,7 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int INST_EPILOG; #if STEP > 1 - if (is_opcode_volatile && !dyn->insts[ninst].lock_prefixed && dyn->insts[ninst].will_read) + if (is_opcode_volatile && !dyn->insts[ninst].lock_prefixed) DMB_ISHLD(); #endif diff --git a/system/box64.box64rc b/system/box64.box64rc index 05ddfdf4..d00221e6 100644 --- a/system/box64.box64rc +++ b/system/box64.box64rc @@ -821,6 +821,10 @@ BOX64_DYNAREC_CALLRET=1 BOX64_DYNAREC_CALLRET=1 BOX64_DYNAREC_BIGBLOCK=3 +[Starfield.exe] +BOX64_DYNAREC_BIGBLOCK=3 +BOX64_DYNAREC_CALLRET=1 + [steam.exe] BOX64_DYNAREC_BIGBLOCK=3 BOX64_DYNAREC_CALLRET=1 |