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

Glitch When Loading Rom on Second Multiplayer Window #854

Closed
ackamp opened this issue Aug 12, 2017 · 24 comments
Closed

Glitch When Loading Rom on Second Multiplayer Window #854

ackamp opened this issue Aug 12, 2017 · 24 comments
Labels
Milestone

Comments

@ackamp
Copy link

@ackamp ackamp commented Aug 12, 2017

So I have a Rom for Pokemon Emerald and I wanted to trade with another save file I created on a copy of that ROM so I could have all three starters. I had everything ready on either account but whenever I wanted to load the copy of the ROM in the second multiplayer window, the ROM a) wouldn't load b) a white screen would show up.

@bsngardner
Copy link

@bsngardner bsngardner commented Nov 23, 2017

I can confirm this bug. I am running the development version, but I downgraded to the newest release and it has the same problem. I tried changing video settings (opengl to software).

@endrift
Copy link
Member

@endrift endrift commented Nov 23, 2017

White screen is a sync issue. Try switching the audio driver or changing sync settings.

Fwiw, this is going to get heavily rewritten at some point.

@Numero256
Copy link

@Numero256 Numero256 commented Nov 28, 2017

Sync settings or drivers dont change anything. It will just get very laggy.

@ghost
Copy link

@ghost ghost commented Apr 13, 2018

Regarding this issue, I can confirm I have the same issue in 0.7.0 (Arch Linux). I managed to get pokemon "working" the following way:

First, I mute the audio and turn off Sync to Audio, then turn on Sync to Video instead. I also turn off Frame skip. Then I load my pokemon ROM. Once load, I leave the intro running and I don't press any buttons in the pad. Instead, I open the multiplayer window, and load the other ROM. The game freezes at a white screen.

Then I disable Sync with video, and leave the intro loop. When it loops, the game syncs with the other window and both games are now working. I enable Sync with video again, and then proceed to play using a gamepad in one window, and the keyboard with the other.

However, there is a big issue with the FPS lock. I just noticed that while one window tries to keep it up at 60FPS, the other goes above 63FPS during trading. And that's when the desync happens and I get link errors in game. It's very unstable. Also the FPS target won't work when Sync to video is enabled, it will attempt to lock at 60FPS no matter what. Not sure if this is an intended feature.

I also tried to link with Sync to audio enabled and FPS locked to 45FPS, and upon entering the room, I got a communication error, so it's no good either. Also I got a speed up of 47FPS in one of the windows.

I also tried changing the audio engine to Qt, same results. Tried to lock at 59.7 (native) FPS. Got a speed up of 63FPS. Communication error when starting a duel. It sometimes let me do a trade or two, or even battle for a while, but it will eventually desync and show me a communication error. I also tried to switch to OpenGL version 1.1 (forced), nothing. Same results. And if I switch to Software (Qt), I get an error right when I attempt to enter the room. And don't even try to Sync to video while in software mode, the game soft locks.

@chopfitzroy
Copy link

@chopfitzroy chopfitzroy commented May 5, 2018

Getting this issue also, any updates?

Cheers.

@DataFlame
Copy link

@DataFlame DataFlame commented Sep 27, 2018

Can confirm.

On Linux Mint 19 Tara, mGBA 0.6.1.

@seokgicom
Copy link

@seokgicom seokgicom commented Dec 23, 2018

you may try this
1.Open a multiplayer window and just load both of the roms you wanna play. (If you've loaded the rom and were playing it already, reset it so the emulator can play the intro)
2.After loading, intro of the first window will play. (second window will show white screen for now)
Then uncheck [sync to audio] (uncheck [sync to video] also if it's checked) in the emulation tab
2. wait for a while for the game on the second window to operate
*make sure the emulator is not paused (it's in the emulation tab)
3. check [sync to audio] again

@basil-conto
Copy link

@basil-conto basil-conto commented Feb 5, 2019

With a build of latest master (0.8 5436 0c9802e) on Debian Testing, trying to link Pokemon Gold/Silver does not result in any white screens, but I get similar hangs, speedups, and communication errors as described above, also when toggling sync settings.

i'm just curious as to what the status of this issue is and whether there is anything I can do to help debug it or figure out what's happening (with assistance/instruction, of course).

Either way, I'd like to take this opportunity to thank everyone working to provide this very fun project.

@rtandy
Copy link

@rtandy rtandy commented Aug 24, 2019

This seems to be fixed (or at least working well enough) since a9e96c7, tried GB/GBC and GBA games and all good so far. Qt frontend on Debian 10 (Buster).

@mathturtle
Copy link

@mathturtle mathturtle commented Oct 16, 2019

So do you have any idea when a9e96c7 will be included as part of a release? I was hoping it would be part of the next version, but checking the one released last month it is not included in 0.7.3 and I still see the issue in that release. I'd rather not build master from source just to play a game...

@endrift
Copy link
Member

@endrift endrift commented Oct 16, 2019

It will be in 0.8.0, which will have a beta out soon.

@fancythedeveloper
Copy link

@fancythedeveloper fancythedeveloper commented Oct 16, 2019

@mathturtle If you really want to test that commit, just get the nightly/development version.

@mathturtle
Copy link

@mathturtle mathturtle commented Oct 20, 2019

Thanks for pointing those out @fancythedeveloper. I grabbed the nightly build and tried trading between Pokemon Gold and Silver and it worked fine. However when I try to trading between Pokemon Gold and Crystal both sides see the other's Pokemon as corrupted. Not sure if that is a related issue or not though. I can't test the Gen 2 to Gen 1 trading thing because my quick tests of what works haven't got that far in the game yet. I'll update this if/when I get that far.

@Rada81
Copy link

@Rada81 Rada81 commented Mar 31, 2020

Hi,

I have 0.8.1 version of mgba, I can't load my save on the multiplayer windows, any advices, helps?

@GhostoftheValley
Copy link

@GhostoftheValley GhostoftheValley commented Apr 10, 2020

im on 0.8.1 and can confirm trading up from fire red --> emerald at least causes the white screen trying to go open the 2nd game in a multiplayer window. tried opening the games in either order and it wont work no regardless of settings i played with.

@grayeagle22
Copy link

@grayeagle22 grayeagle22 commented Apr 16, 2020

@Rada81 @GhostoftheValley
I recently downloaded and tried to trade with mGBA 0.8.1 and had the same issues.

I was able to get the trade to work when trading from Emerald to Emerald (for Machamp). I will list the general steps first, then the full description at the bottom.

Here is how I solved it: General steps

  1. You need to have 2 separate folders of save files that include the ROM, the .sav, and .ssx (the "x" being the number of the save state).
  2. Load the ROM from the new folder and play a second game to the point you get the initial pokedex and have at least 2 pokemon in your party (like 5 min with using the space bar to increase game speed).
  3. Save the game next to the trade center in any pokecenter 2nd floor...VERY IMPORTANT Actually save the game "normally". Press enter, then save, then overwrite any existing file. This writes to your .sav file. Do not save to a state for this.
  4. Change audio and video drivers to "QT", set frame skip to zero, and uncheck the audio and video sync.
  5. Open "new multiplayer window” and load the ROM from you original save folder.
  6. Reset both windows
  7. Load the game from the main screen after the intro for each window. Do not load a save state
  8. Go back and forth between the windows to bring each one to talk to the trade lady, save, and agree to enter the trade.
  9. From here it's the basic trade routine. Just need to hop between windows to issue commands.
  10. When done, save the game (.sav) or the state (.ssx). It does not matter at this point.
  11. Enjoy!

Longer description:
I started with one set of saves for my "actual" game; the ROM, .sav, and .ssx ("x" being the number of the save state). Then simply created a new folder and copied the ROM to it. Start the ROM from the new folder to get a new .sav file. This new .sav file is crucial as it essentially creates a new player ID and makes it appear as if there are two different "people" trading. You cannot trade between the same player ID and is why I think I initially had issues when trying to use the same .sav file. Play the new game to the point you get the initial pokedex and have at least 2 pokemon in your party (like 5 min with using the space bar to increase game speed). Save the game on the second floor by the trace center in the pokecenter. Make sure to save the game "normally" by pressing enter, then going to "save", then overwriting any file there. Do no worry if it says a save already exists, this will not overwrite your "actual" game. Also, do not use a save state.

Next, we need to change the mGBA settings. Set audio and display drivers to “QT”, and uncheck video and audio sync.

Open a “new multiplayer window” which should leave you with two open windows. In the new window, load the ROM from the folder with your “actual” or “old” game. The two windows should now each have a “different” ROM and .sav file loaded. Do now worry if the new window shows up white right now. Reset each window and they should both start the game and be faster than normal. Don’t worry about this.

At this point, it’s easiest if you have both saves next to the trade center in any pokecenter. If not, load your original game and save the game as stated above with the pokemon in your party you want to trade.

Once you have the games saved as you want, get to the main screen in each window and load each save game from the main screen. Do not load a save state!

From here you will have to hop back and forth between the windows to get each one to talk to the trade lady and get set up for the trade. Once in the trade center it’s the same routine as normal.

I do not know how this works with FireRed, but I wouldn't be surprised if it is a similar process regarding the settings and .sav files.

Hope this helps!

@grayeagle22
Copy link

@grayeagle22 grayeagle22 commented Apr 16, 2020

Hi,

I have 0.8.1 version of mgba, I can't load my save on the multiplayer windows, any advices, helps?

For a more succinct reply:
You need a second folder with the ROM, .sav, and .ssx ("x" being the save state number) in order to load them in a second window. My full comment regarding trading is above.

@ccfman2004
Copy link

@ccfman2004 ccfman2004 commented Aug 9, 2020

Issue is still in 0.8.3 and development build 0.9.0. macOS 10.14.6

It seems the problem mostly occurs if I try to load a different save file than the default one.

@endrift endrift added this to the mGBA 0.9.0 milestone Aug 12, 2020
@endrift endrift closed this in 32a8a47 Feb 7, 2021
@endrift
Copy link
Member

@endrift endrift commented Feb 7, 2021

I fixed the most common case of this in 32a8a47, though it can still happen in some (usually audio) sync-related cases.

@PeeJayBonobo
Copy link

@PeeJayBonobo PeeJayBonobo commented Feb 8, 2021

Unfortunately, the commit breaks Advance Guardian Heroes multiplayer; when I boot it up on the second player's screen, it crashes both windows, whether BIOS is enabled or disabled. Every other game I tested works.

mGBA_AdvanceGH_CrashOnSecondBootMP.mp4

@endrift
Copy link
Member

@endrift endrift commented Feb 8, 2021

Are you sure it's that commit in specific? Does it not happen on the commit prior?

@PeeJayBonobo
Copy link

@PeeJayBonobo PeeJayBonobo commented Feb 8, 2021

Are you sure it's that commit in specific? Does it not happen on the commit prior?

It worked in every other commit before it, the only difference is, I had to load it on P1 window (which will boot perfectly fine), load it on P2 Window (which gets white-screened), and then reset P1 window for it to work (which will boot in both screens perfectly fine).

@endrift
Copy link
Member

@endrift endrift commented Feb 8, 2021

I'm able to reproduce. I'll look into it.

@endrift
Copy link
Member

@endrift endrift commented Feb 9, 2021

Ok, fixed and pushed.

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

Successfully merging a pull request may close this issue.

None yet