diff --git a/Assets/dll/ares64.wbx.zst b/Assets/dll/ares64.wbx.zst index 7a228052ba..8b77c9623f 100644 Binary files a/Assets/dll/ares64.wbx.zst and b/Assets/dll/ares64.wbx.zst differ diff --git a/waterbox/ares64/BizInterface.cpp b/waterbox/ares64/BizInterface.cpp index 9ff179d9b4..a15cfb5cd8 100644 --- a/waterbox/ares64/BizInterface.cpp +++ b/waterbox/ares64/BizInterface.cpp @@ -845,10 +845,13 @@ ECL_EXPORT void SetInputCallback(void (*callback)()) ECL_EXPORT void PostLoadState() { + // fixme: make it so we can actually use this approach (there's various invalidation problems with the recompiler atm) +#if false ares::Nintendo64::cpu.recompiler.allocator.release(bump_allocator::zero_fill); ares::Nintendo64::cpu.recompiler.reset(); ares::Nintendo64::rsp.recompiler.allocator.release(bump_allocator::zero_fill); ares::Nintendo64::rsp.recompiler.reset(); +#endif } ECL_EXPORT void GetDisassembly(u32 address, u32 instruction, char* buf) diff --git a/waterbox/ares64/ares/ares/ares/memory/fixed-allocator.cpp b/waterbox/ares64/ares/ares/ares/memory/fixed-allocator.cpp index ee92ac771e..db5c2ff7b8 100644 --- a/waterbox/ares64/ares/ares/ares/memory/fixed-allocator.cpp +++ b/waterbox/ares64/ares/ares/ares/memory/fixed-allocator.cpp @@ -7,7 +7,7 @@ namespace ares::Memory { FixedAllocator::FixedAllocator() { } #else -alignas(4096) u8 fixedBuffer[128_MiB] ECL_INVISIBLE; +alignas(4096) u8 fixedBuffer[8_MiB]; FixedAllocator::FixedAllocator() { _allocator.resize(sizeof(fixedBuffer), 0, fixedBuffer); diff --git a/waterbox/ares64/ares/ares/n64/cpu/cpu.cpp b/waterbox/ares64/ares/ares/n64/cpu/cpu.cpp index 956c0ec479..b8e97ec9eb 100644 --- a/waterbox/ares64/ares/ares/n64/cpu/cpu.cpp +++ b/waterbox/ares64/ares/ares/n64/cpu/cpu.cpp @@ -155,8 +155,8 @@ auto CPU::power(bool reset) -> void { context.setMode(); if constexpr(Accuracy::CPU::Recompiler) { - auto buffer = ares::Memory::FixedAllocator::get().tryAcquire(64_MiB); - recompiler.allocator.resize(64_MiB, bump_allocator::executable | bump_allocator::zero_fill, buffer); + auto buffer = ares::Memory::FixedAllocator::get().tryAcquire(4_MiB); + recompiler.allocator.resize(4_MiB, bump_allocator::executable | bump_allocator::zero_fill, buffer); recompiler.reset(); } } diff --git a/waterbox/ares64/ares/ares/n64/cpu/cpu.hpp b/waterbox/ares64/ares/ares/n64/cpu/cpu.hpp index 722c2af5f4..6b02685900 100644 --- a/waterbox/ares64/ares/ares/n64/cpu/cpu.hpp +++ b/waterbox/ares64/ares/ares/n64/cpu/cpu.hpp @@ -872,7 +872,7 @@ struct CPU : Thread { auto emitCOP2(u32 instruction) -> bool; bump_allocator allocator; - Pool** pools = alloc_invisible(1 << 21); //2_MiB * sizeof(void*) == 16_MiB + Pool* pools[1 << 21]; //2_MiB * sizeof(void*) == 16_MiB } recompiler{*this}; struct Disassembler { diff --git a/waterbox/ares64/ares/ares/n64/rsp/rsp.cpp b/waterbox/ares64/ares/ares/n64/rsp/rsp.cpp index 76598cf55d..534b74fbc1 100644 --- a/waterbox/ares64/ares/ares/n64/rsp/rsp.cpp +++ b/waterbox/ares64/ares/ares/n64/rsp/rsp.cpp @@ -115,8 +115,8 @@ auto RSP::power(bool reset) -> void { } if constexpr(Accuracy::RSP::Recompiler) { - auto buffer = ares::Memory::FixedAllocator::get().tryAcquire(64_MiB); - recompiler.allocator.resize(64_MiB, bump_allocator::executable | bump_allocator::zero_fill, buffer); + auto buffer = ares::Memory::FixedAllocator::get().tryAcquire(4_MiB); + recompiler.allocator.resize(4_MiB, bump_allocator::executable | bump_allocator::zero_fill, buffer); recompiler.reset(); }