mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.17k stars 70 forks source link

Allow custom amount of RAM #203

Closed Iritscen closed 1 year ago

Iritscen commented 1 year ago

Now that we have a build-your-own-Mac feature, can the amount of RAM be customizable too? Currently an OS 9 Mac is given 128 MB of RAM, but some apps require more than that, especially some of the games that are now available to run on it via the CD Library. For instance, the Deus Ex demo wants 154 MB of RAM (and yes, Deus Ex does run in SheepShaver because it drops into the software renderer). Maybe giving a Mac less RAM will also be desirable in some cases, e.g. if that's the solution to #39.

that-ben commented 1 year ago

I would have thought it would be as simple as editing the prefs file... ramsize

... but upon doubling the RAM amount (256MB instead of 128MB) I was greeted with this error: adsdasdas

With the Windows build of SheepShaver, it would have worked, but in this WASM build, perhaps it's rooted deeper and/or baked in the compiled program.

mihaip commented 1 year ago

Making the RAM size be customizable is a good idea. As of right now I'm using a fixed Emscripten heap size (256 MB for Basilisk II and SheepShaver, 32M MB for Mini vMac)

There a way to allow growth beyond the initial size, but there are some gotchas.

that-ben commented 1 year ago

If you've set the heap size to 256MB for SheepShaver, then why are we only seeing 128MB in? https://infinitemac.org/2000/Mac%20OS%209.0.4

dasasdssa

mihaip commented 1 year ago

The heap size is for the entire emulator instance, which needs additional RAM for the screen buffer and any other data structures that it sets up, so not all of it is available as RAM for the emulated Mac (but you can get pretty close, e.g. 224MB does work).

that-ben commented 1 year ago

Oh I see!

mihaip commented 1 year ago

This is now available (and I bumped up the heap size on the Emscripten side so that 256MB is possible, and made it the default for SheepShaver-based instances).