Open Henrik0x7F opened 6 years ago
I think this is valid since the N64 supports 16MB, but even with that change, I doubt this mod will run properly on mupen64plus.
Does anyone know if a test ROM exists to test 16MB functionality? If that exists then I could work on this
I know @PeterLemon has some interesting N64 tests but a 16MB test that works on real hardware would be nice.
Using 16M is not currently possible. Just simply changing the amount of allocated RDRAM is not sufficient. But with some additional work it should be doable. For instance, in a lot of places (core and gfx/rsp plugins) there are some 0x7fffff masks that need to be changed to 0xffffff. If you want to tackle that, PR are welcome :)
Edit: also there is the RDRAM_MAX_SIZE macro to change
We only need the gfx plugin to be aware of the 16mb. So changing the allocation size, replacing 0x7FFFFF with 0xFFFFFF and updating RDRAM_MAX_SIZE in the core library is enough to make the core work with 16mb? In the rice plugin (which we plan to use) is a g_dwRamSize int. Is it sufficient to change only this variable?
The mupen64plus API now supports checking the RDRAM size reported by the core (as of 2.5.1), so the Rice video plugin should be updated to support this, see here for example:
https://github.com/ata4/angrylion-rdp-plus/commit/185f81b2660c8dae2481b0b747b45fc210cb8521
So instead of setting g_dwRamSize to 0x800000, you would do something like:
CoreGetVersion = (ptr_PluginGetVersion) DLSYM(CoreLibHandle, "PluginGetVersion");
int core_version;
CoreGetVersion(NULL, &core_version, NULL, NULL, NULL);
if (core_version >= 0x020501)
g_dwRamSize = *g_GraphicsInfo.RDRAM_SIZE;
else
g_dwRamSize = 0x800000;
Besides that, like @bsmiles32 mentioned, there are a few places where a 0x7fffff mask is applied that would need to be changed. You'd also need some way to configure the core to use 16MB, it can't be the default, right now we default to 8MB and have a "DisableExtraMem" option to set it to 4MB, but there is currently no way via the config to set it to 16MB
Do all occurrences of 0x7FFFFF need to be replaced with 0xFFFFFF? Because it often occurs as part of other constants. For example 0x7FFFFFFFLL
If your using email, I changed that to #623
For Super Mario 64 Online we need 16mb RAM. Is this possible by changing some integers and recompiling the core or a video plugin? For example this int: mupen64plus/mupen64plus-video-rice/issues/79