Homebrew WIP melonDS for Switch

Billy Acuña

Well-Known Member
Member
Joined
Oct 10, 2015
Messages
3,126
Trophies
1
Age
31
XP
3,701
Country
Mexico
Last edited by Billy Acuña,
  • Like
Reactions: Monti64

Hydr8gon

Dragon Trainer
OP
Developer
Joined
Dec 15, 2014
Messages
316
Trophies
1
Website
hydr8gon.github.io
XP
2,580
Country
Canada
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:
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.
 
D

Deleted User

Guest
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.
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.
 

mitcha

مجاهد صنديد مقاتل عنيد
Member
Joined
Dec 20, 2015
Messages
405
Trophies
0
Location
collo (chullu)
XP
1,761
Country
Algeria
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.
thank you very much for the hard work and the time passed on all this stuff.
will wait we're not in hurry.
 

catlover007

Developer
Developer
Joined
Oct 23, 2015
Messages
720
Trophies
1
XP
3,923
Country
Germany
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.
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.
 

Hydr8gon

Dragon Trainer
OP
Developer
Joined
Dec 15, 2014
Messages
316
Trophies
1
Website
hydr8gon.github.io
XP
2,580
Country
Canada
Noice
secret.png
 

Arisotura

rise of melonism
Member
Joined
Dec 5, 2009
Messages
839
Trophies
1
Age
30
Location
center of the Sun
Website
kuribo64.net
XP
2,498
Country
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.
 

Billy Acuña

Well-Known Member
Member
Joined
Oct 10, 2015
Messages
3,126
Trophies
1
Age
31
XP
3,701
Country
Mexico
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.
Good news indeed! Can't wait to see more good stuff from you two guys @StapleButter and @Hydr8gon
 

Hydr8gon

Dragon Trainer
OP
Developer
Joined
Dec 15, 2014
Messages
316
Trophies
1
Website
hydr8gon.github.io
XP
2,580
Country
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!
 

Hydr8gon

Dragon Trainer
OP
Developer
Joined
Dec 15, 2014
Messages
316
Trophies
1
Website
hydr8gon.github.io
XP
2,580
Country
Canada
How is speed with hw render
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 :)
 

Cencil

Well-Known Member
Member
Joined
Aug 24, 2016
Messages
292
Trophies
0
XP
1,122
Country
Canada
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.

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!
 

Monti64

Member
Newcomer
Joined
Apr 25, 2019
Messages
9
Trophies
0
Age
22
XP
162
Country
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 :)
 

spotanjo3

Well-Known Member
Member
Joined
Nov 6, 2002
Messages
11,145
Trophies
3
XP
6,211
Country
United States
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.

Nonono. Just take your time to make it best on Switch. Please just take your time, ok ? Good job!
 

Hydr8gon

Dragon Trainer
OP
Developer
Joined
Dec 15, 2014
Messages
316
Trophies
1
Website
hydr8gon.github.io
XP
2,580
Country
Canada
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 :)
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).
 
  • Like
Reactions: Monti64 and MK73DS

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Maximumbeans @ Maximumbeans: butte