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

reimplement multi gba patch #81

Open
wants to merge 1 commit into
base: splitscreen
Choose a base branch
from
Open

reimplement multi gba patch #81

wants to merge 1 commit into from

Conversation

andres-asm
Copy link

No description provided.

core1->reset(core1);
_setupMaps(core1);
core2->reset(core2);
_setupMaps(core2);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm about 80% sure calling this function four times will leak memory or otherwise misbehave. You're hardcoding core1 anyways, remove the other three calls. The resets are fine.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the setupMaps stuff?
I just did everything 4x but I wasn't sure of that yeah

_setupMaps(core);

core1->reset(core1);
_setupMaps(core1);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, why is this called from two different places, is that really correct

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this retro_load_game? I'm just following the original core here

core1->saveState(core1, tmp);
memcpy(data, tmp, tmp_size);
free(tmp);
tmp = malloc(tmp_size);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't say freeing and immediately allocating a new one makes much sense, but I guess it does no harm either?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah considering it's the same size you're right

@andres-asm
Copy link
Author

  1. they aren't linked
  2. crashes on unload
  3. crashes on loading a state from normal mgba
  4. only loads SRM for the first mgba

I think in core1->deinit(core1); if may free the memory allocated to the game already so that may be why it crashes?

@endrift
Copy link
Collaborator

endrift commented Dec 8, 2017

Link API is probably gonna be rewritten soonish so it may make sense to lay off the link implementation for a bit.

@andres-asm
Copy link
Author

Thanks for the heads-up I just wanted to get the "multi-core core" working first I have no idea on how to implement the API anyhow :)

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

Successfully merging this pull request may close these issues.

3 participants