RISCOS: Don't force the use of dynamic areas on RISC OS 5

This commit is contained in:
Cameron Cawley 2023-02-28 22:46:03 +00:00
parent 86ee1a982f
commit a12c007e92
3 changed files with 14 additions and 4 deletions

View File

@ -21,6 +21,9 @@ For a more comprehensive changelog of the latest experimental code, see:
HDB:
- Fixed bug with inability to pick up red envelope with keyboard.
RISC OS port:
- Fixed crash on RISC OS 5 with games that require lots of RAM.
#### 2.7.0 "The Real Slim Shader" (2023-02-26)

View File

@ -32,10 +32,6 @@
#include <kernel.h>
#include <swis.h>
// By declaring this variable we force libunixlib to always use dynamic areas for data allocations
// This frees up space for plugins and allows to have plenty of space for data
const char *const __dynamic_da_name = "ScummVM Heap";
// HACK: These two function are part of private API in libunixlib
// They let allocate and free data in the application space where the stack is placed below 64MB
// When using malloc with big chunks we end up in memory mapped areas above 64MB

View File

@ -12,6 +12,17 @@ RMEnsure DigitalRenderer 0.55 Error ScummVM requires DigitalRenderer 0.55 or lat
Unset Alias$RMLoadIfThere
| By setting ScummVM$Heap we force libunixlib to always use dynamic areas for data allocations
| This frees up space for plugins and allows to have plenty of space for data
Set HasLargeWimpSlot no
RMEnsure UtilityModule 6.00 Set HasLargeWimpSlot yes
RMEnsure UtilityModule 5.00 Set HasLargeWimpSlot no
If "<HasLargeWimpSlot>" = "no" Then Set ScummVM$Heap ""
If "<HasLargeWimpSlot>" = "no" Then SetEval ScummVM$HeapMax 128
Unset HasLargeWimpSlot
| If running from the desktop, redirect stdout and stderr to a file.
| This shouldn't happen when running from the command line, so that commands like "<ScummVM$Dir> --help" still work as expected.
Set Alias$Run_ScummVM Run <Obey$Dir>.scummvm %%*0 ><Choices$Write>.ScummVM.stdout 2><Choices$Write>.ScummVM.stderr