Friday, June 24, 2011

Wiirtual Boy

Nearly a year ago I announced I was going to work on porting the RealityBoy emulator to bring Virtual Boy games to be playable on the Wii. At the time, RealityBoy was the best Virtual Boy emulator as well as being the simplest to port in my opinion. It wasn't going to be easy; RealityBoy was based on the ALLEGRO library and it wasn't written with PowerPC nor big endian architecture in mind.  For the most part it was going to have to be completely rewritten. In order to make my work better benefit the Wii homebrew development community I was able to (with the help of "DarkNation") bang out a simple port of ALLEGRO to Wii. Coupled with this and a lot of reworking on RealityBoy I was able to get emulation going but I was unable to receive any sort of sound or video output. I assumed this was because the ALLEGRO port was still rather incomplete. A lot of work lied ahead of me. And with school, work, and other personal pressures building up I had very little spare time to work on this.

Around this time, the mednafen emulator released a beta build which included virtual boy support. Mednafen contains arguably the most powerful, optimized emulators for each of the platforms it supports. Furthermore, mednafen is based upon SDL and OpenGL, the former of which we have a port for on the Wii and the latter of which can be easily rewritten as GX (the Wii's video hardware API). Ryphecha, the lead developer behind mednafen, actually contacted me personally to let me know. She really wanted me to drop my RealityBoy port and turn to mednafen (which had previously never even been looked at as a possibility to be ported to the Wii by anyone ever). I played with mednafen for a little bit. At the time I was so distracted by so many different things I didn't get very far beyond compiling the emulator on Linux and playing with the source to see how it works and what could be cut out for a port of only the VirtualBoy component to Wii.

Then a month ago, during my last week of finals, a developer named "raz0red" contacted me. Apparently I wasn't the one who had taken an interest in mednafen. raz0red had done what I had sought out to do by using mednafen to get Virtual Boy games running on the Wii. I accepted his offer to join forces and do a proper Virtual Boy emulator for the Wii. My work was mainly done in optimizing the emulated hardware (which, by the way, Ryphecha was infinitely helpful for by answering all my questions and even going so far as to send me some snippets of code). I really think the emulator turned out pretty well. It's not perfect, but it's about as close as we can possibly get.

Take a look:

Working on this emulator was a great experience and it taught me a lot. After a rather long hiatus it was great to finally start making progress with Wii homebrew software development again. This reminds me that I need to thank everyone for putting up with my "off and on" sprees of development and for supporting me through all of it.

If you haven't yet already, you can grab Wiirtual Boy here.

I've got more plans for this summer. I've had an infinitely popular shooter ported and running on Wii since October that I need to finally finish. I've also been toying with the idea of porting another part or all of mednafen to Wii (for fun, I have emulation of something else in it mostly working). Not to mention I have several old projects that need to be cleaned up and finished. As always, I'll keep my blog updated to the latest.

23 comments:

  1. Hi Arikado, porting Mednafen is an interesting idea, were you planning on porting Mednafen in it's entirety or just pick a few of the cores?

    What are the chances of the GBA core being better than what's already available to the Wii?

    The only reason I ask is because although VBAGX is an amazing Emu, it does have problems playing certain games like Sonic Advance 2/3 and Golden Sun?

    Do you think Mednafen's version could run better?

    I'm not familiar with Mednafen but I think it would be an awesome alternative to what's on the Wii currently and would be the cherry on the Wii cake to have a single Emulator that could load games for different cores (sort of like what CoinOPS does)

    Thanks Arikado..

    ReplyDelete
  2. Mednafens GB/GBA emulation core is actually based upon VBA. However, it's vastly improved and fixes many bugs in it. While you should test it to be certain, I am pretty sure there aren't any compatibility issues with it as it has been part of mednafen for quite a while now. The team really goes out of their way not only to include as many emulators as possible but to also make sure that they have the very best, most flawless ones.

    I definitely want to bring over as much more of mednafen as I can. As a developer it's easier to port it over one small part at a time in separate emulators. This allows for optimizations to be made that only work for that particular emulator as well as a simple, custom GUI. Having said that though, it makes a lot of sense to keep platforms like GB and GBA in the same emulator. I'm weighing a lot of pro's and cons of how to port over more of it as well as evaluated how much time I have; So I don't anything "official" to announce at this time other than that yes I want to port over more (and I do some more of it working hehe ;) )

    ReplyDelete
  3. GBA Mednafen works flawlessly with the games I'm having issues with on VBAGX.
    Although Mednafen is running on PC which obviously has a lot more resources to run the problem games on Wii.

    Maybe it would be possible to port a POC version of the Mednafen GBA core so people could test the speed differences between the two, I'd definitely be happy to be a tester for this :P

    ReplyDelete
  4. We had a breakthrough with Wiirtual Boy last night so right now pushing out a new release as soon as possible is our main priority ;) (We also want to add a new feature to the GUI for the next release which we are working on too ;) ).

    And thanks for the heads up that you may want to test future stuff :)

    ReplyDelete
  5. yeah, I'm up for testing anything Emu related :)
    Do you have an IRC channel ?

    ReplyDelete
  6. Thank you!!. Excelent Work!. I love it :D

    ReplyDelete
  7. Lemme guess... That "popular shooter" is Duke Nukem 3D?

    ReplyDelete
  8. that color switching option is a life saver!

    ReplyDelete
  9. OT, but I have an issue with DOP-Mii v15 that hasn't received any attention:

    https://code.google.com/p/dop-mii/issues/detail?id=84

    Good luck with all your projects!

    ReplyDelete
  10. Hendricks266 : Your issue is just a clone of other issues of the same problem. Newer libogc revisions broke my syscheck implementation in which it crashes upon reading some patched IOSs due to memory no longer being allocated correctly and I haven't had time to fix it. If you're desperate theres a million syscheck programs which do the same thing. Google "syscheck GX" for example.

    ReplyDelete
  11. The thing is, I can't install any IOS either. That's the more pressing issue.

    ReplyDelete
  12. Hendricks266 then tl;dr you don't know how the Wii works and you probably shouldn't be using DOP-Mii.

    ReplyDelete
  13. Arikado, you're Wiirtualboy is awesome! The ability to cycle between 2D and various 3D color schemes is pretty cool, but I can't seem to figure out which (if any) color schemes might work with the 3D glasses that have been handed out at movie theaters recently.

    ReplyDelete
  14. My respect for you just went down. I *do* know how the Wii works, and I've successfully performed many tasks using DOP-Mii in the past.
    All I'm trying to say is that on my Wii, installing IOSs with DOP-Mii v14.2 works, but with v15 it crashes immediately after it loads the data to install. I'm looking for help, and I guess I'll get none.

    ReplyDelete
  15. Hendricks266: I don't have a problem using it. And you're the first person out of literally thousands to tell me you have a problem installing IOSs with it. I can only assume you're not loading an IOS capable of installing other IOSs with certain patches or something along those lines. If there really is a seriously fundamental flaw in DOP-Mii preventing IOS installations then I sincerely apologize to you but I'll need solid evidence to support this. Until then, my only explanation is the obvious one.

    ReplyDelete
  16. Arikado:
    I'm using IOS 36 v3351, patched with FakeSign, ES_Identify, and NAND Permissions, installed to slot 236. I've also tried 36 v3607 with the same patches, and a number of cIOSs, but those crash earlier. AHPBROT mode also crashes at the installation time.
    I would try to copy down the stack dump for you, but on my blurry TV screen I can't distinguish between some of the decimal and hexadecimal numerals (B and 8, D and 0). The bottom half fixes this by using lowercase, but the top half does not.

    ReplyDelete
  17. So this is why Desmume Wii hasn't seen anymore news.

    Glad to find out Wiirtual Boy now has color change options.

    ReplyDelete
  18. Hendricks266 : Since I needed to fix syscheck anyways I'll try and set aside some time in the very near future to work on it. I'll try and reproduce your IOSs to see if I can also reproduce your problems. Thanks!

    Anon: DeSmuME Wii has seen quite a bit of activity this last month ..

    ReplyDelete
  19. BTW What happenned to the Desmume Wii Builder Site,I have not been able to access it since R208 was compiled.

    ReplyDelete
  20. How would I know what happened to it? I don't run it.

    ReplyDelete
  21. Arikado: If it helps, the installation crash problem appears in r159.

    ReplyDelete
  22. Hendricks266 : Do me a favor and let me know if you have better luck with the beta I just put out in my latest post. Thanks.

    ReplyDelete