Skip to content
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

Mask GetPointer Differently on GameCube #4303

Closed
wants to merge 1 commit into from

Conversation

JMC47
Copy link
Contributor

@JMC47 JMC47 commented Oct 5, 2016

GameCube can't access EXRAM I'm guessing, so we need to wrap it different. Number was verified by LibOGC or something by someone who wasn't me.

Fixes Starfox Assault crash better this time.


This change is Reviewable

@@ -391,7 +391,10 @@ u8* GetPointer(u32 address)
{
// TODO: Should we be masking off more bits here? Can all devices access

This comment was marked as off-topic.

This comment was marked as off-topic.

@BhaaLseN
Copy link
Member

BhaaLseN commented Oct 5, 2016

That comment was what got me the idea of doing this in here; and the mask 0x01ffffff is the next-best thing for the amount of physically available RAM on a GameCube.
I suppose it still applies though, since we don't exactly know if that covers all cases; and we still have games/cases where it doesn't affect enough to fix things. Somewhere else in that file, it mentions that the whole function is just a guesstimation of what could be.

Should probably be "mask", not "wrap" tho ;)

@JMC47 JMC47 changed the title Wrap GetPointer Differently on GameCube Mask GetPointer Differently on GameCube Oct 5, 2016
@shuffle2
Copy link
Contributor

shuffle2 commented Oct 6, 2016

These masks should probably be derived from Memory::REALRAM_SIZE or something (or else MP3 beta will break 😛 )

@JMC47
Copy link
Contributor Author

JMC47 commented Oct 6, 2016

Right. If I could modify this to work with Metroid Prime 3's Beta, that'd be even better. Is there a way to do that?

@JMC47
Copy link
Contributor Author

JMC47 commented Oct 6, 2016

Note: Metroid Prime 3's beta doesn't run right now without modifying Dolphin, so if I can kill two birds with one stone, I definitely will. It'd make a good video.

@shuffle2
Copy link
Contributor

shuffle2 commented Jun 6, 2017

converting the enum values into variables should be possible without too much trouble, but I'd be willing to bet there will be some perf impact, since the values are used in a bunch of pretty hot code paths.

Someone should try it, I guess ;)

@JMC47
Copy link
Contributor Author

JMC47 commented Mar 23, 2018

This PR is wrong, 24/32 MB is open bus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants