Homebrew WIP melonDS for Switch

  • Thread starter Thread starter Hydr8gon
  • Start date Start date
  • Views Views 653,702
  • Replies Replies 1,382
  • Likes Likes 87
It should work on all firmwares. Honestly every time someone's had trouble getting the emulator to find their firmware it was a naming issue. Alternatively, it also checks for the files in the directory that the .nro is in, so if your .nro is just in the switch directory and not in the melonds directory, you can try putting them there. Other than that, I don't know.

Eureka, that was it, thank you! I'm so used to NROs being placed in the switch folder without additional files {if necessary} having to be in the same section.

Now, I just have to remember not to bump the L button as it keeps freezing my Switch and/or giving me an error code so I have to reboot. Didn't think to write down the code, but I'll do it if I see it again.
 
Eureka, that was it, thank you! I'm so used to NROs being placed in the switch folder without additional files {if necessary} having to be in the same section.

Now, I just have to remember not to bump the L button as it keeps freezing my Switch and/or giving me an error code so I have to reboot. Didn't think to write down the code, but I'll do it if I see it again.
Strange, L savestates but it shouldnt be crashing. I thought I fixed the savestate crashes, but I guess not. Next update will have L and R open an ingame menu instead so it should be safe from crashing either way.

By the way, next update will come later today ;)
 
Alright, here it is! melonDS 0.7.1 for Switch. From now on I'll be trying to keep version numbers consistent with core melonDS, but if I have to make a Switch-specific update I'll indicate that in the version somehow.

Here's a changelog from the last version:
-New OpenGL-based UI made to look like a native Switch application
-Added the ability to quit the application with the + button from the file browser
-Added the missing options from core melonDS, including the rest of the screen layouts
-Added an in-game pause menu where you can save/load states, change options, or return to the file browser (press L or R to access)

So yeah, this is the UI release. It's also the release where I'll be taking it out of pre-release status, seeing as pretty much all of the features I wanted to add are finished. No, most games still aren't full speed. 0.8 will bring a hardware renderer which will take care of that.

I'll update the OP with new screenshots and such, so check that out if you're interested.

As @StapleButter said before, 0.7.1 is sort of a testing release for the new timings. If you find any issues with games behaving strange, please report them. I did include a temporary fix for some of the issues that have already been discovered, though.

Oh, @OkazakiTheOtaku, if it's not too much trouble could you update the .nsp forwarder to redirect to /switch/melonds/melonds.nro instead of /switch/melonds.nro? I think it makes more sense to have the .nro in there, seeing as that's where the BIOS files are, and also the new romlist.bin file from 0.7.1. That's also how I'll be packaging the releases from now on, in a .zip with the .nro at that location. Thanks!
 
Last edited by Hydr8gon,
the new gui is only able to show 9 folders..anything after 9 folder isnt visible. this happens to me on both the root folder and any subfolder with more then 9 folders in.
 
Oh, @OkazakiTheOtaku, if it's not too much trouble could you update the .nsp forwarder to redirect to /switch/melonds/melonds.nro instead of /switch/melonds.nro? I think it makes more sense to have the .nro in there, seeing as that's where the BIOS files are, and also the new romlist.bin file from 0.7.1. That's also how I'll be packaging the releases from now on, in a .zip with the .nro at that location. Thanks!
I can certainly do that. I have work today but I will get it uploaded as soon as possible. Thank you for your hard work!

--------------------- MERGED ---------------------------

@Hydr8gon had more time than I thought, and worked on the first try so here it is :)
It is a new TID again so make sure to delete the old one. The only change is that it now redirects to SD:/switch/melonds/melonds.nro, as requested.
 

Attachments

Alright, here it is! From now on I'll be trying to keep version numbers consistent with core melonDS, but if I have to make a Switch-specific update I'll indicate that in the version somehow.

Thanks for the update, speed seems to be much improved with the timing fixes. But since 0.7.1 savestates don't seem to work at all for me, if I select "save state" or "load state" from the new in-game options menu the game just resumes and nothing happens.
 
Thanks for the update, speed seems to be much improved with the timing fixes. But since 0.7.1 savestates don't seem to work at all for me, if I select "save state" or "load state" from the new in-game options menu the game just resumes and nothing happens.
The savestate system was updated between this release and the last release, and as such compatability was broken. For some reason if you try to load an incompatible savestate the emulator will be unable to save or load states until you restart it. It's annoying, but it's better than crashing the system, which is what would happen before. As a general rule, don't rely on savestates, especially across emulator versions. But I will look into the issue of them not working after a failed load. This release has a few minor issues; I also discovered that audio output is still bad in docked mode, even though it sounds fine in handheld. Hopefully I'll have these issues fixed for the next release.
 
Last edited by Hydr8gon,
Been using this for a while now and i think this is my favorite emulator on switch simply because its ds on switch. I wonder if this version of melon ds would get added to retroarch?
 
Strange, L savestates but it shouldnt be crashing. I thought I fixed the savestate crashes, but I guess not. Next update will have L and R open an ingame menu instead so it should be safe from crashing either way.

By the way, next update will come later today ;)

Didn't mention these when talking about the L-button freeze/rebooting.

When launching MelonDS through the Homebrew Menu NSP, my Switch froze for 15-20 seconds or so, said this application has closed {or something like that}, then went back to Switch's home screen.

When launching through the Album, that's where I got the freeze, system error code, and had to reboot.
 
Been using this for a while now and i think this is my favorite emulator on switch simply because its ds on switch. I wonder if this version of melon ds would get added to retroarch?
melonDS does have a RetroArch core. I actually uploaded a Switch build a while ago, lost somewhere in one of the RetroArch threads. It ran like crap and it didn't support touch, so I made my own port. There's much more freedom this way, and I can do stuff specifically for melonDS, like optimizations and such. Even before overclocking this port ran much better than the RetroArch core, so you can imagine it was pretty bad. They seem to have threading disabled too, which doesn't help.
 
  • Like
Reactions: Csmrcc
melonDS does have a RetroArch core. I actually uploaded a Switch build a while ago, lost somewhere in one of the RetroArch threads. It ran like crap and it didn't support touch, so I made my own port. There's much more freedom this way, and I can do stuff specifically for melonDS, like optimizations and such. Even before overclocking this port ran much better than the RetroArch core, so you can imagine it was pretty bad. They seem to have threading disabled too, which doesn't help.
Ahhh gotcha, works for me!
 
With the new UI browsing nds roms seems very slow (i have 12 in a folder right now). Thanks for your work!
 
With the new UI browsing nds roms seems very slow (i have 12 in a folder right now). Thanks for your work!
Yeah, theres definitely some optimization that needs to be done. I have a few ideas for it. For now, I just wanted to get rid of the ugly text UI as soon as possible [emoji14]
 
  • Like
Reactions: Rickyman
bûrp

As @StapleButter said before, 0.7.1 is sort of a testing release for the new timings. If you find any issues with games behaving strange, please report them. I did include a temporary fix for some of the issues that have already been discovered, though.
I looked at your quickfix and this might have the side effect of making things run too slow, since kCodeCacheTiming is 5.

it was tuned to be an average of icache hits vs misses, considering that you'd only need to check the icache upon instructions that are at the beginning of a cache line; all further instructions until the next cache line can be considered already cached.

that being said, I don't think it would affect a whole lot of things. I just prefer a more realistic timing model, in the lack of perfect emulation :P

regardless, the issues have been fixed, so there will be a 0.7.2 real soon, and you'll be able to update :)


also re: savestates

you can detect when a savestate fails to load (namely because the version is outdated): https://github.com/StapleButter/melonDS/blob/master/src/libui_sdl/main.cpp#L1145

and yeah savestate compatibility was broken with 0.7 since there were changes that required that. I could work on that if some folks around really want to keep their old savestates, though.


edit- melonDS 0.7.2 is released, already. now be quick @Hydr8gon :P
 
Last edited by Arisotura,
bûrp


I looked at your quickfix and this might have the side effect of making things run too slow, since kCodeCacheTiming is 5.

it was tuned to be an average of icache hits vs misses, considering that you'd only need to check the icache upon instructions that are at the beginning of a cache line; all further instructions until the next cache line can be considered already cached.

that being said, I don't think it would affect a whole lot of things. I just prefer a more realistic timing model, in the lack of perfect emulation :P

regardless, the issues have been fixed, so there will be a 0.7.2 real soon, and you'll be able to update :)


also re: savestates

you can detect when a savestate fails to load (namely because the version is outdated): https://github.com/StapleButter/melonDS/blob/master/src/libui_sdl/main.cpp#L1145

and yeah savestate compatibility was broken with 0.7 since there were changes that required that. I could work on that if some folks around really want to keep their old savestates, though.


edit- melonDS 0.7.2 is released, already. now be quick @Hydr8gon :P

Thanks! Where can I find the NRO for 0.7.2?
 

Site & Scene News

Popular threads in this forum