Dolphin, the GameCube and Wii emulator - Forums

Full Version: New Prototype GCN GBA Link Cable Emulation Demo
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
(05-21-2014, 02:28 AM)Gir Wrote: [ -> ]Would it make more sense to have a GBA emulator built into dolphin and also function like the Gameboy Player.

No it doesn't make more sense. As someone making their own GBA emulator right now (yeah, baseline work is underway) I can tell you that creating or integrating an existing GBA emulator is not trivial in the least. Additionally, maintainence would be an issue (a pretty big one in fact). It's more work than needs to be done when the current solution (two different emulators) poses no major issues.

byuu

Figured I should stop by for this.

So this was news to me as well, but pleasantly so. I'm very open to the idea of linking up with Dolphin for GCN link cable emulation, and I'll try and support it at some point in the future officially. May be a few months though.

What really surprises me is the compatibility. I was under the impression there were no issues with Dolphin+VBA-M. Hearing that higan has higher compatibility already is somewhat surreal to me.

My GBA emulation is relatively young. Only about 1-2 months of real development work has gone into it thus far. It strives for very high accuracy and simulates all of the various wait-states and penalties of the GBA. The really big problem with it right now is that I've been unable to find reliable information to emulate ROM prefetch, which greatly speeds up some games. So by emulating all of the slowdowns, and not the major speedup, the result is emulation that can run significantly slower than a real GBA. In emulation, running way too fast is much better than running a little too slow, so this is a big deal.

But if and when this issue is addressed, I'm fairly confident GBA compatibility will be very high in higan afterward. So what I'm getting at is, I don't think this is ready for prime-time public usage yet. But getting the Dolphin support in now will certainly not hurt. Just please be patient with the emulation quality until then. With any luck, this'll drum up some interest and I can get some help improving my GBA core, like from jchadwick recently.

...

From another perspective ... I used to only emulate the SNES. Similar to the Game Boy Player, the SNES had the Super Game Boy, which combined an SNES with a Game Boy. Initially I emulated this by including gambatte in with bsnes. Later, I implemented my own Game Boy emulator.

The biggest advantage to using the existing best-in-class emulator is that it will have higher compatibility. It is also a lot less work.

The downside is that the projects are guaranteed to be structured very differently. Trying to merge two very different projects together produces some of the ugliest, toughest to compile code you can imagine. And that shim is highly volatile. New versions will break this interface, your patches won't be accepted upstream, etc. There is also a big concern around licensing, if both projects don't use eg the same GPL revision.

Eventually, I was willing to sacrifice a bit of compatibility because I wanted it all integrated. I don't regret the decision, but it has been a lot of work. Probably the worst aspect was that once I had infrastructure for SNES+GB, I started adding more and more systems. GBC, NES, and GBA. It's easy to get carried away once you get past the challenge of supporting multiple systems in one emulator.

So as for what Dolphin should do, that's up to them.

If they ever want to build higan's GBA core into Dolphin binaries, I'd be willing to grant them a GPLv2 license to that portion of the code to do that. (The SNES section is strictly GPLv3 for its anti-TiVoization clauses.)

In the interests of the current design to keep things separate, I'm going to be pushing for a standardized IPC interface that is cross-platform and emulator-agnostic. Ideally, I'd like any GBA emulator to easily be able to connect to Dolphin in the same way higan does, without having to bring in higan-specific paradigms. Nor for the GCN side to require Dolphin-specific paradigms, if at all possible.

...

Lastly, I did recently start to emulate the Game Boy Player from the reverse end, and succeeded in adding rumble support to some GBA games. I am not talented enough to emulate the Gamecube, so this is more of a simulation of the GBP BIOS disk. It'll be interesting to consider using Dolphin + higan to emulate the Game Boy Player, assuming there is interest. Although it is far less interesting than the SGB in terms of added features. It's pretty much just rumble support added to a half-dozen titles.
(05-21-2014, 06:23 AM)byuu Wrote: [ -> ]What really surprises me is the compatibility. I was under the impression there were no issues with Dolphin+VBA-M. Hearing that higan has higher compatibility already is somewhat surreal to me.
If you consider any of the vba-m code, this becomes less of a mystery.
http://sourceforge.net/p/vbam/code/HEAD/tree/trunk/src/gba/GBA.cpp
(05-21-2014, 06:23 AM)byuu Wrote: [ -> ]My GBA emulation is relatively young. Only about 1-2 months of real development work has gone into it thus far. It strives for very high accuracy and simulates all of the various wait-states and penalties of the GBA. The really big problem with it right now is that I've been unable to find reliable information to emulate ROM prefetch, which greatly speeds up some games. So by emulating all of the slowdowns, and not the major speedup, the result is emulation that can run significantly slower than a real GBA. In emulation, running way too fast is much better than running a little too slow, so this is a big deal.
The fortunate thing here is that any computer capable of running dolphin can do (at least one instance of) higan, no problem. I can get about 300fps in a normal release build of higan and whatever the stock settings are, while dolphin is running. See, it's a good thing that dolphin doesn't use all your cores!
The ultimate test will be 4 Higans, Dolphin on LLE audio, and recording it at the same time!

byuu

> If you consider any of the vba-m code, this becomes less of a mystery.

Ah. Reminds me of Snes9X. The code itself isn't horrible, but there's absolutely no structure to it. CPU serialization, PPU rendering, ROM loading, an embedded ROM, BIOS HLE, DMA transfers, system reset, really long functions, a function called CPULoop that does colorspace conversion blitting, etc ... weighing in at over 4,400 lines, all in a single source file. I would add virtually no comments, but I'm not really great at that myself either.

Sadly, I'd say that most emulators are written this way. If you ever want to really wreck your brain, take a look at the ZSNES source. It's all of the above, in x86 assembly (no code flow indentation), with zero comments, and cryptic names (often just registers.)

I have my warts as well, of course. Shared processor cores means the ARM logic isn't in the gba/ project, so that it can be shared by the ST018 SNES CPU. And I tried to do this operator overloaded thing for the MMIO registers that just totally didn't work out at all like I wanted. Undoing that is high on my todo list. If you do have any constructive criticism on my code, I'd be happy to improve upon it, time permitting.

> The fortunate thing here is that any computer capable of running dolphin can do (at least one instance of) higan, no problem.

Oh, I mean the simulation is too slow. So parts of some games will feel like they are slowing down, even though you are at 60fps output.

> See, it's a good thing that dolphin doesn't use all your cores!
> The ultimate test will be 4 Higans, Dolphin on LLE audio, and recording it at the same time!

From the way I see it, a PC fast enough to run Dolphin should be no problem for higan.

higan is entirely single-threaded, so you'll basically need a system that has one core for each instance of higan, plus however many more you need for Dolphin. It would probably make sense to use the scheduling APIs to make sure higan and Dolphin don't try and share a core at the same time.

So ... 4x higan + Dolphin will probably want something like a Core i7-3930K or better.

1x higan + Dolphin should be okay on a more modest i7-2600K, presuming that the two don't end up fighting each other for a shared resource.
Yeah; I was more or less just saying how ridiculous it's going to be. Dolphin on its own + LLE audio is enough to bring any computer to its knees. When it comes to Higan, on my core i5 3570K, I can run two on one core both at full speed. So, if we're doing Dolphin on HLE (2 cores) plus 4 Higans (also on 2 cores) it's possible that my computer could run everything full speed. But, until the GCN GBA link stuff has multiple GBAs simulated, I won't actually know for sure that it'll work.

Edit: Plus, recording it would be completely out of the question at that point, since it would absolutely max out my computer even if it worked at all.
That's where I come in with a slightly more Dolphin-friendly CPU, and Shadowplay.

This challenge is looking much more like it's software limited than hardware limited.
Hi,
I'm new in this forum and I've a few questions about Higan.
1. How can I conntect Higan with Dolphin? Is the tab "Server" in "Configuration Settings" for Dolphin or for other Higans?
2. Higan needs a GBA-Bios and I've it, but how can I use it?
3. Can I use the save game from a game as SAV-file? Because I want to continue my save game from a game and not to create a new save game.

Thank you!
It's not ready, you can't use that right now...
What a shame! Do you mean 1., 2. or 3.?
But at JMC47 it works. Didn't you see the video?
Pages: 1 2 3 4 5 6 7 8