-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EE: Expose advanced option for extra memory #11111
Conversation
I think adding "Debug" or "Dev Console" (like Duckstation) in parentheses would be better (or move to another section entirely). My initial thought is that people are going to be inclined to check it off because it sounds faster (and possibly crash their games) |
I know @stenzek raised a concern the last time this was proposed here. It seems like this will create another page of memory after all of the initial allocations are completed? Ensuring that from the host perspective IOP memory is still directly after the 'main' 32mb EE memory mapping? |
This seems a little bit less like emulation and more the beginning of creating a vm for a machine that never existed. It’s expanding the scope of the pro just for no real good reason. If you want to home brew for a more powerful machine try anything newer than a ps2. |
My understanding is that #10082 eliminated this concern because the memory map now already reserves space for 128 MB of EERAM. That said, I am by no means an expert here. |
TOOL consoles had 128mb |
This has a purposeful use for modding games. You have an enormous amount of space to put extra logic / assets. Do you have a good reason why this shouldn't be added to the emulator?
I'll have to see what Stenzek says, I'm not too familiar with how our vtlb works. |
Forgot to mention before, this should be added to |
Please don't do merge commits to update your branch. Instead rebase your branch onto our master and resolve any conflicts that way. |
6ef9213
to
6dcfe69
Compare
6dcfe69
to
6b48467
Compare
6b48467
to
175f7bd
Compare
the Linux crash has been fixed , the pr will probably need a bit more testing but its looking good |
6f09293
to
0235920
Compare
You can download CI builds from the Checks tab on this pull request. Here is the latest SSE4 Windows build. |
Advanced options are hidden by default, you need to enable them through Tools -> Show Advanced Settings. If you need any additional help I suggest joining the PCSX2 Discord to avoid derailing the issue discussion. |
e812f74
to
557fc7b
Compare
The psHu64, psHu128 and psSu64 macros are also unused, but are kept for completeness.
557fc7b
to
5f57b05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, untested.
Latest changes seems to be causing crash on Linux if you try to load save state with mismatched memory size (128MB on 32MB). NOTE: Looks to be a Linux-only issue. Reproduction step:
Crash Log
|
Hm. That probably means it's not resetting the VM on failed load. Probably need a call to https://github.com/PCSX2/pcsx2/blob/master/pcsx2/SaveState.cpp#L1151 and |
I notice that there are a bunch of TLB misses reported in the log when doing this on Windows. It just happens to not always crash (which does seem consistent with the VM not being reset). Calling |
That fixes it! |
For testing purposes, here are some sample ELFs: 128mb-samples.zip
|
I... don't really see why the entry point being above 32MB is an issue? Unless it's the BIOS/bootstrap replacing the hardcoded TLB mappings, and the higher address isn't mapped yet. That said, if you have more than 32MB of code/data, you have greater problems. :D |
Contributes to #5803
This PR Exposes a new "Enable Extra Memory" option in the Advanced options menu:
The option bumps the amount of memory available to the EE to 128 MB, allowing homebrew (and a limited selection of other titles) to take advantage of expanded RAM limits. I considered exposing the option in the Emulation menu, but the feature does not seem like one that should be exposed to the average user so directly.
Once the VM has been started, any changes to the extra memory option are ignored. The option's state is cached at memory initialization time and is remembered in save states (necessitating a version bump).
When the option is enabled, the
RFU060
(SetupThread) andGetMemorySize
syscalls are overridden to behave as if the BIOS supported expanded RAM. Due to the fact that the size of the EE's memory can now change during the PCSX2 process lifetime, I also had to introduce newPs2MemSize::GetExposedRam
andPs2MemSize::TotalRam
members. I welcome any suggestions for a better approach here.I have tried my best to follow existing style and convention, but as this is my first real contribution to PCSX2 I may have made some mistakes here and there. Please let me know if anything sticks out.