Developers’ Retrospective Part 2: tehpola’s Musings

It was probably around two years ago that I first got a recompiler working that could actually recompile something. I had written some MIPS assembly code in a computer architecture course which would compute factorials. I fed my MIPS code into my recompiler and it computed factorials on the Wii. At the time, that was really exciting for me, but the recompiler was very far from doing much useful. Over the two years, a lot of the original recompiler was overhauled, and I made a couple attempts at rewriting the recompiler more or less from scratch; however, in the end, I came back to the once-reworked original code, and continued to improve on it. After a while I was starting to run more than carefully crafted demos, and after a lot of blood, sweat, and tears, we have a dynamic recompiler which will stably run several games at full speed. This is the first release with a working dynarec. It generates native code for almost all of the N64 instructions; it has, as far as I’ve seen, an accurate cycle count (as relative as mupen64, anyways); and already several optimizations have gone into it. Its still not perfect, several games won’t run at all, and not all games that do run are full speed, but we’re working on improving on that for subsequent releases. For more technical details on the dynarec, see Wii64 Dynarec Part 1 and Part 2 (I’m still planning on continuing the series when I have a chance).
Also, due to sound quality issues with the RSP plugin we were using (rsp_hle-ppc), we’ve begun fixing mupen64′s rsp_hle to be endian agnostic. I believe that rsp_hle-ppc was derived from an early version of the RSP plugin which would later become the rsp_hle in mupen64. Unfortunately, whoever had done all the significant improvements to it since had neglected to maintain endian-neutrality. So, we had to either use the dated, but working, rsp_hle-ppc or work to fix rsp_hle, with all its improvements, so that it would work on the big-endian systems. Up until this release we’ve been using rsp_hle-ppc which has resulted in some sound quality issues, and some games’ sound just didn’t work (StarFox 64, for example). With Beta 1, we’ve fixed up many rsp_hle endian issues and hope to get those changes upstream to other projects so that people can enjoy better sound on other big endian systems. There are still issues, but overall, the sound quality has improved, and certain games which previously had garbled sound (Starfox 64) now sound excellent.
Working on this emulator has been a huge learning experience for me, and I hope everyone is excited about the Beta 1 release as I am.
Since the release we’ve started updating the google code SVN with all the commits we had made to our private repository. We made sure to include a source archive with the binary, but felt that having the whole source history publicly accessible would give more insight into our code and motivations and allow others to see the progression in our work. It will take some time before all the code has been migrated because we’re checking to make sure we don’t have any conflicts, but hopefully it will be appreciated.
In the not-too-distant future, we’re planning on releasing a Beta 1.1 version which will improve some minor changes which were brought to our attention after the Beta 1 release. Hopefully, although these will only be small changes, they will address some of the larger annoyances people have reported.

40 thoughts on “Developers’ Retrospective Part 2: tehpola’s Musings

  1. “I hope everyone is excited about the Beta 1 release as I am.”

    That’s an understatement!

    And everyone enjoys these musings and reflections as well. You guys rock.

  2. Yay! I’m so happy to see the code go public again, I can’t wait to be able to follow this emulator in realtime like I can follow Dolphin.

    I’ve been working on a complete playthrough of Banjo Kazooie, it’s a little unstable but it seems to be working out really well. This totally rocks, it’s been *ages* since I last played it, and I know I’m not alone with experiences like this.

    I’m glad this was such a fun learning experience too, I mean, that makes it more than worth it on your end. This is the stuff of legends guys, it really is. ^_^

  3. Just wanted to say thanks and well done for all the hard work you guys have done. I was just wondering if there’s any possibility of getting Goldeneye, Perfect Dark and Conker’s Bad Fur Day to run in the future..? Those 3 games will never appear on the VC so would be great if you can manage it. Thanks again, this and the WiiSX emulator are worth installing the Homebrew Channel alone. Brilliant stuff.

  4. I was excited beyond any means, but my friend and his father got excited as well and are going out and buying a Wii mainly because of this project. The idea of playing GoldenEye again on the wii via Wii64 is exciting and keeps my friend and myself excited about the future of gaming classics on wii.

    On a different note, between my SQL class, and searching for a job, I have been reviewing your code for a good read (how others pick up a good book). It has given some insight to the project and gives me more of an appreciation for your hard work. I am looking forward to future releases and future reads.

  5. The beta 1 is good, but as all know, have some issues.
    A lot of games works, some games have graphical glitches and in some cases (like Goemon’s Great Adventure), when you select a character, AUTOMATICALLY the emulator went to the main menu.

    Oh, and i also, i “discovered” something: I read that a lot of people can’t access to load a game in the USB options, that issue is because you need to connect the USB in the other port and should work fine!

    I want to know if you can fix a bug with some games that have a freeze problem when you load a file inside the game, like Mystical Ninja Starring Goemon, Goemon Great Adventure, and of course, all Rare games that never comes to VC.

    Keep working in this emulator, because it has a nice future.

  6. I am assuming you have seen this already, but as reviewing code to move from private to public, I am sure you are also seeing that it gives a new eye to the code at hand. by doing so, you will see things which you haven’t seen before and may see a few bugs you could fix. Hopefully this will shed some light and a fresh look at your code.

  7. this project is great. It’s always cool to hear your side of the story. Looking forward to future releases. Hopefully the optimization will come a little easier now…

  8. I remember when wii64 first came out, when i seen it i thought it wasn’t possible to run it on wii. at that time the psp n64 emulator, daedalusx64, was a lot better. now just after one beta its greatly improved, now its pass the compatibility of daedalusx64.
    zelda OoT still has problems with sound on wii64 and it has some slow downs but hopefully it’ll be fixed soon. But the game I hope to have fixed the most is Banjo Tooie. in beta 1 the screen flickers and everything is white.

    I’m really interested in this project

  9. Figured I’d restate some things here: I’d like completely customizable controls if possible for the beta 1.1 release. For instance I’d like to make smash 64 work with melee controls. (Game Cube X and Y as C-Up and C-Left, Z as R, R and L as Z, up on the d-pad as L, A as A, B as B, Perhaps down on the d-pad being the menu button)

    And the last thing: The tornadoes in Hyrule don’t show up. If you could add/fix these, I’d have nothing left for you to do. I’m primarily interested in Smash 64.

    But whatever. Great work regardless. I’m sure these things will be addressed at some point, even if it’s not the next release. I can certainly wait.

  10. Hmmm… I haven`t posted since before the much anticipated release of beta 1 (because, now I could finally play games at more respectable speeds than before), and when I learned of a new release of beta 1 I knew I had to post before I was too late. xP

    Here are some known issues with some of the titles deemed working, that I have found so far.

    Starfox 64: Sound is really off at the start and fixes itself later on during play
    LoZ OoT: Graphical Errors Stretch screen when moving up latters, moving through hallways, and when pushing objects. A few layering problems make the forest temple difficult defeating the poe sisters (pictures and puzzle cube). Also, it tends to lag somewhat (issue with lag going to the sub-menu)
    Loz MM: Screen flickers, making it hard to play
    007 TWINE: no audio, Graphical errors cause giant colored blocks to be throughout the game on vehicles, stairs, big doors, tops of barrels. Lag at times to load data, can`t go to menu during it. Graphical issue with quit menu in multiplayer with another player, causes half the screen to blacken. Same problem with streetching graphics going up ladders as in Loz OoT.
    F-Zero: slight flickering every once in awhile. Details missing from vehicles.
    Snowboarder Kids: menu screens go blank for details picking a board.
    Sin and Punishment: Missing graphics. Playable.
    Paper Mario: Major screen flickering
    Body Harvest: Really slow. Some missing graphics
    Super Smash Bros.: Missing Graphics for coin placement on characters, fire from fire flower, attacks by pok`e mon, and bombs.

    The following games work perfectly without any issues I know of so far.

    Super Mario 64
    Wave Race 64
    Rampage World Tour
    Quest 64
    Megaman 64

    A few suggestions for beta 1.1 or beta 2.
    Make save features not so close to each other, and allow something to automatically load save files. Save States crap out every once in awhile and don`t save… check into it. Also, it would be nice if we could visually see which save state we`d like to open.

    Still testing out games, but I’ll try to keep posted about other issues I run across. For the most part, it seems that most problems run universally across all games (example Rare games don’t run) or stretching just in certain parts of games. I wasn’t expecting a lot out of beta 1, but it looks as though wii64 even with its slight quirks and layering issues seems to be consistent as I have seen so far. I’m really excited to see where this emulator is going.

    I do have one question though, if static or dynamic on the wii is better? I know that there isn’t a whole lot of room to mess with, and considering how well your dynamic is working if tinkering with the dynamic would help with lag time or slow down points where the code has to be reinterpreted? or would static be a better choice, allowing maybe even the slower gamecube to run at better speeds? Wasn’t sure if this was covered earlier, but so far the dynamic works fairly well all things considered on the wii.

  11. Another interesting read. I can’t thank you guys enough for Wii64 beta 1, and can’t wait for beta 1.1!

    Thanks again,

    – CHR15x94

  12. Yea thanks alot! Its really good. Actully can someone please tell me how to get on the wii64 menu with wiimote/numchuk without pressing reset?
    Cheers ;)

  13. I have been watching the changes recently and wondering how the programming is going?

  14. I just found this app recently, and i must say that it has become my favorite, higher even than gecko OS.
    the thing that i am looking forward to most in beta 1.1, is the fixing of the issues in banjo tooie. this game is the reason i got this app in the first place, and i was quite disapointed when it didn’t work right. at that point i didn’t know about the compatability list. though, you can imagine my confusion when i checked that list and it shows banjo tooie working in perfect condition.
    one sugestion that i don’t think anybody mentioned, while you have options to switch between save pack and rumble pack, i must also say that there are different controllers. for example, there is one specific controller that uses a turbo function to enable you to hold a button down, and it reads it as pressing the button many times very fast. an option to use your controller like this would be nice
    beside all that, this app is my favorite, good job with it, and im donating for banjo tooie.

  15. btw, may I suggest making links in the compatability list for users to post problems that they have experienced for that game.

  16. Excellent suggestion twilight_prince, of course after the next release it would have to be refreshed, but I agree. That would be helpful!

  17. God stuff. Always good to hear the “behind the scenes” stories, Even though I honestly do not understand many of the technical terms (I’m in bio science, not computer science). I can still hardly believe that this is mostly done by just three guys. Amazing…

  18. You guys are great!!!
    Can’t believe that 3 guys are enough for the job ^^

    And I’m very happy to see that emukidid posted on the issues that they are actually working on the dynarec code for Goldeneye 007, Blast Corps, Conkers BFD, Donkey Kong 64 and Turok 2 & 3

    just wanted to ask one thing…Is there any chance of playing these games when the next release comes? *-*
    (I just love playing Conker’s BFD ^^)

    I wish I could help you guys with the code

    Thanks a lot for all the hard work gou guys have been doing!!!

  19. I’ve been wondering about this problem I ran into in OoT v1.0 [J], everything went well until I reached the Forest Temple; in the room with the green Poe sister (Amy) the puzzle doesn’t trigger the battle, no matter how you solve it, is this a ROM problem… maybe I should check another OoT ROM
    Also the blocks “click” 1 step before leaving a gap between them.

  20. I have the same problem as well. I tried both of the previous suggestions, neither of which made the blocks fall into the floor.

  21. @Matt:
    No, we’re still working on Beta 1.1. We’ve all been fairly busy and haven’t had much time to work on the emulator much lately.

    Yes, we still have about 40 commits to go at this point before we reach Beta 1′s code.

  22. I’d like to know if you’re aiming to release Beta 1.1 in the next weeks or if it’s gonna take many months? I’m sure a lot of people are also wondering the same thing. I’m very eager to it’s release and thanks a lot for taking the time to create this emulator. (btw, sorry if my english isn’t that great, it’s my second language)

  23. some one on here said megaman 64 worked perfect..but for me there is squares in the sky and the voices and sounds are screechy..anyone else having these problems or am i useing the wrong rom file?