Friday, January 28, 2011

More N64 emulator updates

During the last weeks, I worked a bit on improving my mupen64 port, here are the things I did.

As SM64 started to work well, I switched to the Zelda rom for my testing, it is a much more complex game to emulate graphics wise, so obviously it was completely buggy and painfully slow on the first run. The biggest problem was that unlike SM64, most of the rendering was done with my slowest pixel shader, and fixing the bugs would have made it even slower so I decided to do a complete rewrite of the shader. This time I designed it around something I just discovered: constant boolean registers, it allows flow control without a big performance hit. I took me a few tries to get it fast and accurate, but now that pixel shader is almost as fast as the old one on simple cases while being more accurate and much faster on complex cases. I also made my old shader as accurate as I could, it is now used for some rare cases the new one can't emulate. With a few more fixes to libxenon and the emulator (implementing 2D rendering for example), this makes Zelda reasonably fast and playable.

Next game was Mario Kart 64, this time it was fast and looking good on the first try, but crashed after a few races with some 'out of memory' message. It turns out something very important was missing from the libxenon 3D driver: a way to free what you allocate ! (texures/vertex buffers/...) So I replaced the very basic GFX memory allocator with some malloc-like one I found in libxenon sourcecode, and modified the emulator texture cache to actually free old textures when needed.

I think it's time for a new video so here it is :)

18 comments:

  1. Man, I've been reading this stuff silently, and this is absolutely amazing. You are the homebrew scene for Jtags. I'd love to hear about hdmi xell. :D

    ReplyDelete
  2. Thx from spain men, great work.

    ReplyDelete
  3. Thanks for the great work.

    ReplyDelete
  4. This is great. I can really see a great speed.
    congratulations on the progress
    We hope soon to enjoy your work.

    ReplyDelete
  5. wow great work :) can't wait to see zelda running

    ReplyDelete
  6. Legend.

    p.s. Tried to comment using my WordPress details, but get the error...

    "Your OpenID credentials could not be verified."

    ReplyDelete
  7. Awesome work, look forward to this being released. Can't wait to try it out.

    -Phake

    ReplyDelete
  8. Digital Nintendosex AWESOME stuff...


    Can't wait !!

    ReplyDelete
  9. Is there any new developments GliGli ??

    ReplyDelete
  10. M0AR UPDATES!!!!

    lol, seriously, dying to hear some news about progress, how's it going?

    ReplyDelete
  11. Looks great. Keep up the good work!!!

    ReplyDelete
  12. Any new news I've been surfing the web every week for new news on ur work. Can we please get a update? Ill donate if necessary

    ReplyDelete
  13. Thank you for the time/effort you've put into this project. We all appreciate the hard work.

    ReplyDelete
  14. I think it would fair to say this project has been either put on hold or has been discontinued.

    Maybe there are some issues that have yet to be worked out ??

    Gli Gli, Will you please update your Blog. (if your still reading these comments)

    People would like to know either way what's going on with this Emulator..

    THNKS :)

    ReplyDelete
  15. WAITING FOR NEWS! GOOD WORK! I WANT TO PLAY MARIO KART ON 360!

    THANKS

    ReplyDelete