mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.42k stars 747 forks source link

Single Pak Link Broken #425

Closed wildgoosespeeder closed 3 years ago

wildgoosespeeder commented 7 years ago

In mGBA 0.5.0, any game that supports single pak links is broken during transmission. Tried it with SMA4 and the F-Zero games. Multi pak links are fine.

To allow for single pak mode, you need the GBA BIOS enabled. When the animation is playing, press start+select.

endrift commented 7 years ago

Known issue. It's a problem with Normal SIO mode (i.e., it's not implemented at the moment).

wildgoosespeeder commented 7 years ago

Enhancement? Isn't this a bug?

endrift commented 7 years ago

It's an unimplemented feature.

wildgoosespeeder commented 7 years ago

But it attempts to run but fails. Seems like a bug to me.

endrift commented 7 years ago

The reason it fails is because the hardware transmission mode it uses isn't implemented. That's not a bug, it's an unimplemented feature.

wildgoosespeeder commented 7 years ago

Do you have any idea how to write it? NO$GBA emulates properly. If it is open source, you can use that, if you don't know how.

endrift commented 7 years ago

I had a half-working implementation previously, but I removed it due to it not working fully and breaking some other stuff. I'll put it back and get it working fully later.

Also NO$GBA is not open source, and please don't doubt whether or not I can implement a feature. I wrote the whole emulator basically by myself.

wildgoosespeeder commented 7 years ago

I wasn't doubting you. Thought I could save you some time, if at all possible. Turns out I can't because NO$GBA is not open source (bummer).

endrift commented 7 years ago

Ah, sorry, it came off a bit harsher than you'd meant it then. There's documentation out there of how it works, but for some reason it would bail out after transferring about 1/4 of the data, and I never got around to debugging it. It was a low priority for me due to the fact that single pak isn't really as useful in emulators as it is on hardware.

Testsr commented 4 years ago

Is the Normal SIO mode still unimplemented? If so, I would work on it.

endrift commented 4 years ago

What do you mean "still"? It's been implemented for ages, it's just kinda broken due to how I sync multiple cores.

Testsr commented 4 years ago

The last update on this thread had the normal SIO not done. I think the solution to Single Pak Play is to get SWI 25h implemented. See https://www.akkit.org/info/gbatek.htm#biosmultibootsinglegamepak

endrift commented 4 years ago

You're wrong. The problem is that normal mode is broken (even if it is implemented). SWI 0x25 isn't used.

Testsr commented 4 years ago

I tested the newest Master build on with a gba bios. Opened up Sonic Advance 3 in one mGBA multiplayer window and booted the bios in the second multiplayer window.

When Single Pak mode was selected on the Battle screen,the windows connected successfully, but after pressing start on the rom side, the rom errored out with a communication error.

endrift commented 4 years ago

Yes, because (as I said) normal mode is currently broken.

endrift commented 4 years ago

Having debugged this only a few days ago, you're again wrong. Normal mode is used for game upload (though in-game communication is done through multiplayer mode).

Testsr commented 4 years ago

Ok, you are correct. I tested on no$gba, and Normal mode is used for the transfer.

endrift commented 4 years ago

As I said already, the way I sync multiple cores is fragile and it's not compatible with normal mode at the moment. It would take some heavy revamping of this sync code to fix, which admittedly I've been talking about doing anyway.

Testsr commented 4 years ago

I hope the this sync code revamp gets done soon. I am sorry for being foolish about things I did not know. Can I help you with anything?

endrift commented 3 years ago

I forgot to comment on this after I did it, but I did some work on Normal Mode a month ago, but this issue still doesn't appear to be resolved. Further investigation is still needed.