NULL

WIP melonDS for Switch

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by Hydr8gon, Sep 17, 2018.

  1. Billy Acuña

    Billy Acuña GBAtemp Addict

    Member
    11
    Oct 10, 2015
    Mexico
    Any perf improvements with OpenGL? I do think we still need an aarch64 dynarec in order to archive fullspeed on the Switch but I'm still curious :unsure:
     
    Last edited by Billy Acuña, May 3, 2019
    Monti64 likes this.
  2. Hydr8gon
    OP

    Hydr8gon Dragon Trainer

    Member
    8
    Dec 15, 2014
    Canada
    Not to get everyone's hopes down, but at the moment it's actually slower than the software renderer on the Switch. I experimented with doing the rendering completely separate from the emulator core, but even then a lot of things weren't reaching full speed (and synchronization was an issue).

    Regarding the recompiler, my understanding is that the 2 CPUs that the DS has make it difficult to write one that gives a worthwhile performance improvement. At some point I'd like to attempt writing one, but recompilers are a fair bit more complicated than interpreters, so I have some learning to do before then.

    I've been pretty programmed-out from NoiES lately (also life is kinda crappy), but once I'm ready to dive back in there are a few things I'd like to finish up there, and then I'll be turning my attention back to the DS. I have something in mind I'd like to tackle, but I don't wanna say too much about that because I'm not sure if it'll actually go anywhere.

    Oh, and when @StapleButter releases the beta version of the renderer, I'll release it on Switch, too. Hopefully also with those thread fixes I was talking about earlier, which I still haven't got to.
     
    uyjulian, Monti64, JJTapia19 and 4 others like this.
  3. Elalexyzoner

    Elalexyzoner Alex95

    Member
    3
    Jun 5, 2016
    Mexico
    Near Texas
    Don't worry, you don't have to explain yourself, you can take all the rest you want, you do a very good job making these emulators, we can wait the time you want. You're awesome.
     
    azoreseuropa and Hydr8gon like this.
  4. mitcha

    mitcha مجاهد صنديد مقاتل عنيد

    Member
    3
    Dec 20, 2015
    Algeria
    collo (chullu)
    thank you very much for the hard work and the time passed on all this stuff.
    will wait we're not in hurry.
     
  5. catlover007

    catlover007 GBAtemp Regular

    Member
    6
    Oct 23, 2015
    Germany
    don't count on me, but I have something in the work, though currently x64 only. In some games it really makes a difference, though you're right, the synchronisation holds it back.
     
    Billy Acuña, Hydr8gon and mitcha like this.
  6. Hydr8gon
    OP

    Hydr8gon Dragon Trainer

    Member
    8
    Dec 15, 2014
    Canada
    Noice
    secret.
     
  7. Elalexyzoner

    Elalexyzoner Alex95

    Member
    3
    Jun 5, 2016
    Mexico
    Near Texas
  8. StapleButter

    StapleButter 'New Member' registered since 2009. Fuck yea.

    Member
    10
    Dec 5, 2009
    France
    as far as melonDS is concerned: the two numbers are the current framerate vs the framerate it should be running at (normally ~60, but on the DS you can alter the framerate by messing with VCount-- ZXDS does that to run at 50FPS for example)


    also re: OpenGL renderer

    sorry it's taking so long, real life is shito here too

    regardless: I have potential good news for performance.

    basically the previous attempt at a renderer did things the old way: render 3D graphics, read them back via glReadPixels(), send them to the typical 2D pipeline, etc...

    this resulted in subpar performance, due to using glReadPixels().

    so we've been doing things in a different way, and let's say that we're getting good performance out of it. for example, on a decent (~2014) computer, we can run it at 4x hires with little to no performance loss.

    so this may improve performance on Switch too, but we'll have to see.

    there are still issues to iron out, but... we're getting there.
     
  9. Billy Acuña

    Billy Acuña GBAtemp Addict

    Member
    11
    Oct 10, 2015
    Mexico
    Good news indeed! Can't wait to see more good stuff from you two guys @StapleButter and @Hydr8gon
     
  10. seanp2500

    seanp2500 GBAtemp Advanced Fan

    Member
    6
    Jun 2, 2010
    United States
    This is good timing i want to play the ninokuni game
     
  11. Hydr8gon
    OP

    Hydr8gon Dragon Trainer

    Member
    8
    Dec 15, 2014
    Canada
    Heyo guys, it's been a while. Just like last time I disappeared, I've been working on a new project. If that random screenshot I posted three weeks ago didn't give it away, I'm actually working on my own completely original DS emulator! I know, I'm crazy. Well, today I was finally able to get some meaningful results, and from here progress will hopefully be steady! I wrote a bit of an article over here detailing my development process so far, if you're interested. Oh yeah... it's on Patreon, yep. I've never really done any sort of donation thing like this before (honestly I'm kind of embarrassed to do it!), and as I mention on the page I won't block anything from people who choose not to donate. I believe donations should happen because someone really wants to support a project, rather than feeling obligated to because if they don't they'll miss out. I will be posting development updates over there though, so even if you're not planning on donating it's still worth checking out if you're interested in the project. I won't stop supporting melonDS either; I'll bring the hardware renderer update to you all as well as any future updates (until my emulator overtakes melonDS as the superior emulator :evil:). In all seriousness though, NoiDS (name subject to change) isn't intended to be a replacement for melonDS. My goal is just to make something that's fast enough to run on the Switch, which probably means accuracy will have to take a hit. melonDS has fancy stuff like Wi-Fi emulation and near-perfect 3D rendering, so keep supporting melonDS as well! Anyways, that's all I have to say for now. Look forward to future developments!
     
  12. Chrona

    Chrona Advanced Member

    Newcomer
    4
    May 10, 2008
    Canada
    Looking forward to seeing what you can do :)
     
    Hydr8gon likes this.
  13. seanp2500

    seanp2500 GBAtemp Advanced Fan

    Member
    6
    Jun 2, 2010
    United States
    So wait is there something being released soon?
     
  14. Hydr8gon
    OP

    Hydr8gon Dragon Trainer

    Member
    8
    Dec 15, 2014
    Canada
    The melonDS hardware renderer release will probably be soon. The new emulator that I'm working on is nowhere close :P
     
  15. mustafag32g

    mustafag32g GBAtemp Advanced Fan

    Member
    7
    Jul 30, 2014
    Argentina
    How is speed with hw render
     
  16. Hydr8gon
    OP

    Hydr8gon Dragon Trainer

    Member
    8
    Dec 15, 2014
    Canada
    Last I tried it was slower than the software renderer, though Arisotura has been doing a lot of great work on it lately; I haven't tried the newest version yet, but it sounds like it might be faster. Unfortunately even when I completely disabled 3D rendering to see how the performance would fare, a lot of things weren't running full speed. That's why I'm trying to make an emulator of my own that's focused on being speedy :)
     
  17. Cencil

    Cencil GBAtemp Regular

    Member
    4
    Aug 24, 2016
    Canada
    This really shows you're genuinely an awesome dev. Really appreciate that, and all the work you've done on this project!

    Too bad other well known devs in this community don't seem to see it this way!
     
  18. Monti64

    Monti64 Newbie

    Newcomer
    1
    Apr 25, 2019
    Germany
    Now that makes it clear and we were able to see a 60fps red screen ^^ It's impressive how much stuff you are learning and starting right now :D
    But i don't really understand the accuracy. What changes when the emulator is less accurate (more graphical glitches like mini black lines when you move? Or does the Clock go faster than it should? that's what I imagine by that)
    Also I would like to ask if the next version with the hardware render does have a fix with the audio because of my switch always restarting. Because frameskip still seems like a nearly perfect solution already and I'm just waiting for that to be fixed :)
     
  19. azoreseuropa

    azoreseuropa GBAtemp Guru

    Member
    11
    Nov 6, 2002
    United States
    Azores/Portugal
    Nonono. Just take your time to make it best on Switch. Please just take your time, ok ? Good job!
     
  20. Hydr8gon
    OP

    Hydr8gon Dragon Trainer

    Member
    8
    Dec 15, 2014
    Canada
    I think the biggest thing for accuracy that can impact performance is timing. How long it takes to run an instruction, access memory, etc. and also synchronization between the 2 CPUs. Right now there's pretty much no timing system in place (the emulated CPUs are running too fast, basically) which could actually make performance worse because the processor has to keep up with the faster CPUs. Trying to make the timing too accurate though will also degrade performance, because of all the calculations and such required to figure out how fast everything should be running. I'll have to find some sort of balance between accuracy and speed. I also have a crazy idea or two that might help with performance, but it might mess up the synchronization, and I'm not sure how big of an impact that will have yet.

    Regarding the audio/thread issue in melonDS, honestly I almost forgot about that because I've been so busy with this new emulator. It's also hard to debug because it doesn't happen on my end. I'll try to look into it again before releasing the hardware renderer update, but I can't make any promises. I've always found libnx threads to be a little wonky anyways; I've had issues with starting multiple threads on the same core and with getting them to run at all on the fourth core (which did work when I first released melonDS, but somewhere along the line something external broke it).
     
    Monti64 and MK73DS like this.
Loading...