mirror of
https://git.triforceproject.com/triforce/source
synced 2026-12-02 05:48:50 -04:00
Triforce v0.9.1
The 16 GB update: idle memory unlocked and handed back to Windows while playing, empty pages under freed locks returned, and a page-file check at launch that warns before a too-small page file can crash the game.
This commit is contained in:
@@ -740,7 +740,8 @@ static uint64_t read_at(Ctx *c, uint64_t id, int64_t off, uint64_t buf, uint64_t
|
||||
const int64_t stall0 = stall_host_begin(); /* ((Triforce, OS-51) the read itself, not the wait for the core after it) */
|
||||
/* ((Triforce, 11-21, MEM-09) the kernel's ReadFile does not fault pages in: heap pages nothing touched yet (committed
|
||||
as they are touched now, heap_commit.h) are touched for it first) */
|
||||
hos_guest_touch(buf, size);
|
||||
void hos_guest_kio_begin(uint64_t addr, uint64_t size), hos_guest_kio_end(void);
|
||||
hos_guest_kio_begin(buf, size); /* ((Triforce, 12-01) and no zero block given back under the read: hos_mem.c) */
|
||||
const int io = hos_guest_io_begin(GP(buf), size); /* (Triforce: the kernel writes there: rx_backend.c) */
|
||||
while (done < size) {
|
||||
OVERLAPPED ov = {0};
|
||||
@@ -752,6 +753,7 @@ static uint64_t read_at(Ctx *c, uint64_t id, int64_t off, uint64_t buf, uint64_t
|
||||
done += got;
|
||||
}
|
||||
hos_guest_io_end(io);
|
||||
hos_guest_kio_end();
|
||||
stall_host_end(STALL_HOST_READ, stall0, done);
|
||||
if (away) hos_vcore_back();
|
||||
HOS_WRITTEN(GP(buf), (size_t)done); /* (into guest memory: the GPU may read it) */
|
||||
@@ -808,10 +810,12 @@ HLE(_ZN2nn2fs9WriteFileENS0_10FileHandleElPKvmRKNS0_11WriteOptionE) {
|
||||
it. HOS_WRITE_KEEP_CORE=1: the core held through writes and flushes, as before */
|
||||
const int away = fs_write_keep_core() ? 0 : hos_vcore_away();
|
||||
const int64_t stall0 = stall_host_begin(); /* ((Triforce, OS-51) the host's part of a long frame: stall_host.h) */
|
||||
hos_guest_touch(ARG(2), ARG(3)); /* ((Triforce, 11-21, MEM-09) as the read: touched before the kernel reads them) */
|
||||
void hos_guest_kio_begin(uint64_t addr, uint64_t size), hos_guest_kio_end(void);
|
||||
hos_guest_kio_begin(ARG(2), ARG(3)); /* ((Triforce, 11-21, MEM-09) as the read: touched before the kernel reads them) */
|
||||
const int io = hos_guest_io_begin(GP(ARG(2)), ARG(3)); /* (Triforce: the kernel reads there: rx_backend.c) */
|
||||
WriteFile(fh->h, GP(ARG(2)), (DWORD)ARG(3), &put, &ov);
|
||||
hos_guest_io_end(io);
|
||||
hos_guest_kio_end();
|
||||
stall_host_end(STALL_HOST_WRITE, stall0, put);
|
||||
if (away) hos_vcore_back();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user