Homebrew RELEASE melonDS for Switch — continuation

catlover007

Developer
OP
Developer
Joined
Oct 23, 2015
Messages
663
Trophies
1
XP
2,898
Country
Germany
melonDS is a Nintendo DS emulator mainly developed by Arisotura (@StapleButter). It was first ported to the Switch by @Hydr8gon. I'm responsible for several optimisations and the current port. Depending mostly on whether a game utilises the 3D hardware of the DS a lot of games already reach fullspeed without overclocking.

The last few releases of my continuation where done in Hydr8gon's thread which quickly resulted in a lot of confusion.

Setup


For those coming from older versions of my port, using the /melonds directory located at the sd card root is still possible.

Since Release 5 the JIT recompiler isn't enabled by default, so make sure to enable (under Emulation Settings), since the interpreter is pretty slow.

Atmosphere title replacement to launch the hbmenu is the only supported method of running melonDS!
If you don't know what that means: press R while starting any game from the Switch's main menu to enter the hbmenu, don't use the album!

  • Download the latest release from here: https://github.com/RSDuck/melonDS/releases
  • Extract the release onto your sd card, so that there's /switch/melonds folder melonds.nro and some other files inside it.
  • NAND, BIOS and firmware files go into /switch/melonds as well
  • ROM files can be placed anywhere on the sd card
For DS mode the following files are necessary (in parantheses is how they should be named for melonDS to recognises them):
  • ARM9 BIOS (bios9.bin)
  • ARM7 BIOS (bios7.bin)
  • DS mode firmware (firmware.bin)
For DSi mode the following files are necessary (in parantheses is how they should be named for melonDS to recognises them):
  • DSi ARM9 BIOS (biosdsi9.rom)
  • DSi ARM7 BIOS (biosdsi7.rom)
  • DSi mode firmware (firmware_dsi.bin)
  • NAND dump (nand.bin)
For information on how to dump those files from your own DS or DSi see here: http://melonds.kuribo64.net/faq.php
Release notes


Release 6, fix 1:

Just a few bug fixes (the pendulum on the title screen in Chrono Trigger, several things in Mortal Kombat and a freeze in Pokemon Platinum, likely also in Diamond/Perl).

Release 6:

This release is a big one, because we finally hit fullspeed in most games including 3d ones! This is all thanks to the new 2D and 3D renderers which run on your Switch's GPU (which previously was only used for the GUI and putting the video output onto the screen) instead of CPU.

The 3D renderer doesn't use the builtin triangle drawing functionality melonDS's OpenGL renderer does, thus it doesn't have issues like it (https://github.com/Arisotura/melonDS/issues?q=is:open+is:issue+label:OpenGL). Instead it's basically the good old software rasteriser but translated to run on GPUs thus ideally it should have the same pretty amazing compability.

Both the new 2D and the new 3D renderer are implemented using deko3D for minimal CPU usage compared to OpenGL, though I want to port both of them back to OpenGL for desktop melonDS. In the future there's the possibility for some enhancements like high resolution rendering with less issues than the OpenGL renderer currently has (I'm sure yet whether Switch can handle this, so don't get your hopes too high on this).

For older versions look inside the spoiler.
Release 5, fix 1:

Bug fixes, also the overclocking option was readded.

Release 5:
It's been a long while since the last release, but we're finally here! It has a completely new GUI, DSi support and of course a bunch of bug fixes and smaller additions. Since a lot of work went into the GUI there aren't many new optimisations in this release, but this will change for the next one! The controls have been changed, pausing is now done by pressing ZL and ZR at the same time.

Release 4:
I wanted to make this release already multiple months ago, though always something came into my way, whether it was some feature I wanted to finish or later me loosing seeing it as pointless when a Drastic port will happen sooner or later. Thus a lot of smaller things have been accumulating:

  • Fast memory emulation by mirroring virtual memory so that it has the same layout as on the DS. This also should resolve all previous issues with Literal Optimisations
  • Start at making geometry submission faster
  • The GUI is now rendered using deko3d instead of OpenGL (using mesa). Deko3d not only has less overhead, but this also reduced the binary size significantly. Special thanks go to fincs and where we're at it also to the the other devkitpro and libnx people like yellows8 and Wintermute!
  • Misc improvements to the GUI (the rom directory isn't hardcoded anymore, a melony color scheme, ...)
  • Better screen layout options
  • Alternative ways to give touchscreen inputs, including my (unironically besides using the real touchscreen) favourite mode: motion control. See the FAQ for more info
  • This isn't really that noteworthy, but in 30 FPS games every second (3D) frame is now skipped automatically
  • A bunch of fixes, optimisations and features I can't remember because I'm too unorganised
As I've already described in the old thread, sooner or later DSi and wifi support will be added to this port (the first was recently merged into master, the latter is thanks to the improved indirect wifi mode now possible on switch as well). Optimisations to make 3D rendering faster are together with a new GUI on my list as well, but one step at at time.

FAQ?


How can the emulation be paused?

Press ZL and ZR at the same time.

How can I fast forward?

By pressing either ZL or ZR depending which button is used to do a touchscreen click (which depends on whether Left handed mode is enabled in the Input settings). Note that this is not available in gyro mode, because there this button is used for recalibration.

What do the Block Size, Branch Optimisations, Literal Optimisations and Fast Memory settings do?

Ideally they can stay enabled/at maximum all the time because they enable optimisations beneficial for the performance. But if there's an issue with the JIT recompiler it can be tracked down faster. Only touch them if something unexpected happens and mention which (if any) setting makes a difference in bug reports.

I want to play with a Flip Grip. Which settings should I use?

Use the Global Rotation option which rotates the entire GUI. Shout-out here to @uzimakiuchiha who got me a Flip Grip!

I want to play a game where the DS is held side ways (like e.g. Dr Kawashima's Brain Training), which should I do?

For this case it's the best to use the Screen rotation in the Display settings, once a game is launched (it rotates the buttons as well, as if you're holding the DS that way).

How can I quickly switch the focussed screen?

Press down the right stick. There's also an automatic mode where we the main screen is guessed in the display settings.

How can I only display one screen at a time (and for some reason I want it to be stretched across the whole screen ruining all proportions)?

Go into the Display settings. Set Top aspect ratio and Bottom aspect ratio to 16:9 and then set Screen sizing to either Top only or Bottom only.

How do I use gyro control?

First enable it in the Input settings. Press ZL or ZR (depending on whether you enabled Left handed mode in the Input Settings) to calibrate the rotation. Since this utilises the gyroscopes (and not IR like the Wiimote, which gives an absolute position) it's only based on it's rotation, so it needs recentering if you change the way you hold the Switch/Joy-Con.

How can I change the access the DS menu (e.g. for changing the system language)?

Press Boot Firmware or disable the setting Direct boot in the Emulation settings.

Starting a DSiWare dumped as a NDS file doesn't work, what is wrong?

To run DSiWare it needs to be installed on the NAND. If you start it from the filebrowser it will be started as a cartridge and thus fail to load.

How can I give microphone input? (e.g. a lot of games require one to blow into the microphone)

Press down the left stick to simulate a blowing noise. Proper microphone input via an external microphone is currently not supported.
 
Last edited by catlover007,

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,185
Trophies
1
Age
41
XP
4,825
Country
Germany
I'm glad this isn't dead.
Do you maintain the libretro core for the Switch as well btw or standalone only?
 

zenjiki

Well-Known Member
Newcomer
Joined
Feb 13, 2006
Messages
81
Trophies
0
XP
989
Country
United States
Awesome can't wait to try it, and thanks again for all your hard work! Question @catlover007 , before I know there was a limit to number of games that is shown, is that still the case? I have all my favorite games of all the Nintendo systems in the same folder and just wondering if its time to separate into different folders.
 

ShadowOne333

QVID PRO QVO
Developer
Joined
Jan 17, 2013
Messages
10,686
Trophies
1
XP
12,472
Country
Mexico
Awesome news, catlover!
Glad you're still going forward with this :)

Do you happen to know how often is the libretro core upstreamed to your latest changes?
 

Chaseroni

New Member
Newbie
Joined
Jul 18, 2020
Messages
3
Trophies
0
Age
27
XP
47
Country
United States
Amazing work on this! Thank you for doing it, sooo many more games are playable now :)
Is it possible to add the space-between-screens functionality to the libretro core? It works great in the standalone but I don't see it as an option in the core, thanks again!
 
  • Like
Reactions: Cruz8

HappehLemons

Well-Known Member
Member
Joined
Jan 24, 2011
Messages
101
Trophies
0
XP
248
Country
United States
Thanks for all the work on this! What are some of the more problematic game currently? Is it just mostly anything that uses the 3D functionality?
 

KurtKocaine

Well-Known Member
Newcomer
Joined
Jan 7, 2017
Messages
45
Trophies
0
Age
23
XP
46
Country
United States
Hopefully my suggestion to use Fossil Fighters as benchmark for 3D graphics pulled through :^) Downloading rn
 

catlover007

Developer
OP
Developer
Joined
Oct 23, 2015
Messages
663
Trophies
1
XP
2,898
Country
Germany
Awesome can't wait to try it, and thanks again for all your hard work! Question @catlover007 , before I know there was a limit to number of games that is shown, is that still the case? I have all my favorite games of all the Nintendo systems in the same folder and just wondering if its time to separate into different folders.
it now shows as many games as their names fit into your Switch's RAM, so a lot, though there's no search feature (though atleast they're sorted alphabetically now).

How well do the generation V games run?
can you atleast have the decency of writing Pokemon generation 5 games? Sometimes I understand desmume developers with their contempt against Pokemon. There are so many other good games out there and so many people are thinking about nothing but Pokemon. And that comes from someone who likes Pokemon!

/rant off :lol: please don't take this too seriously, I just had to get that out once. They still need overclocking.

Awesome news, catlover!
Glad you're still going forward with this :)

Do you happen to know how often is the libretro core upstreamed to your latest changes?
Amazing work on this! Thank you for doing it, sooo many more games are playable now :)
Is it possible to add the space-between-screens functionality to the libretro core? It works great in the standalone but I don't see it as an option in the core, thanks again!
they're likely waited for the next release, idk I don't have much to do with them

Thanks for all the work on this! What are some of the more problematic game currently? Is it just mostly anything that uses the 3D functionality?

problematic is pretty much everything which renders a lot of geometry (which sometimes can be surprising as some 2d games use the 3d hardware). But for example 4th gen Pokemon games are already playable (didn't play much, it could be possible that it gets worse later in the game) without overclocking as they're lighter in this department.

Is there a way to get xBRZ filter?
it's on my list, though optimisations and fixes usually have higher priority

Hopefully my suggestion to use Fossil Fighters as benchmark for 3D graphics pulled through :^) Downloading rn
tbh I haven't tried Fossil Fighters once, though I doubt if the game improved if it's bottlenecked by the 3d renderer which I haven't really touched since the last version.

Though what I did do was to implement alternative options to give touchscreen input
 

Hakata

Member
Newcomer
Joined
Jul 19, 2020
Messages
6
Trophies
0
Age
33
XP
185
Country
Japan
Thanks for all the work! I am not a native speaker, so hope you could understand what I am going to say:D

I tried several games on my device hacked by SXCORE Chip. Unfortuntely none of them could be loaded. I did put the required bios files in the right folder and even verified CRC checksum. Also I tried lanuching the app in both applet mode and photo album, but nothing changed.

Whenever I hit the Load button, It just either stuck or crashed. I have no idea what I have missed. Is there a compatability issue with the new hacking chip? Please help me...
 
Last edited by Hakata,

Rickyman

Active Member
Newcomer
Joined
Jun 19, 2018
Messages
32
Trophies
0
Age
21
XP
879
Country
Spain
Thanks for all the work done, apart of all the optimizations that you have made, i wanted to point the incredible good work done with the touchscreen input, it is now possible to play metroid prime hunters on an ds emulator easily and comfortable with the offset mode (hope to see it with the mouse mode on pc too!) and specifically with the motion mode.
Cheers!
 

Rickyman

Active Member
Newcomer
Joined
Jun 19, 2018
Messages
32
Trophies
0
Age
21
XP
879
Country
Spain
Thanks for all the work! I am not a native speaker, so hope you could understand what I am going to say:D

I tried several games on my device hacked by SXCORE Chip. Unfortuntely none of them could be loaded. I did put the required bios files in the right folder and even verified CRC checksum. Also I tried lanuching the app in both applet mode and photo album, but nothing changed.

Whenever I hit the Load button, It just either stuck or crashed. I have no idea what I have missed. Is there a compatability issue with the new hacking chip? Please help me...
This also happened to me the first time i tried it (I am using Atmosphere), but when i tried another game it worked fine, i tried to reproduce it with the game it crashed before to see if the problem was the file but now it works fine, so i am not sure what was the cause.
Also, if i am not wrong launching throught the album is called applet mode, so i guess what you was trying to say is that apart of launching throught album you tried throught a game (which probably you need to)
 

itsmefloflo

Active Member
Newcomer
Joined
Jul 16, 2018
Messages
39
Trophies
0
Age
38
XP
556
Country
France
This also happened to me the first time i tried it (I am using Atmosphere), but when i tried another game it worked fine, i tried to reproduce it with the game it crashed before to see if the problem was the file but now it works fine, so i am not sure what was the cause.
Also, if i am not wrong launching throught the album is called applet mode, so i guess what you was trying to say is that apart of launching throught album you tried throught a game (which probably you need to)

Hi !

I have SX OS and i met crash Melonds also. (I use the « Title+R » method to go to homebrew launcher. I noticed that when i disable fast memory emulation option, the game doesn’t crash anymore but i loose an interesting option. Thanks by advance if someone has a workaround or an explanation. By the way, catlover your emulator is awesome ! Thanks !
 
  • Like
Reactions: sorabora

Zkajavier

Well-Known Member
Member
Joined
Sep 13, 2009
Messages
258
Trophies
0
XP
863
Country
Costa Rica
I love you so much catlover007, I'm so happy you didn't let this die. Thank you!
This thing runs amazingly well for most games and I'll be definitely following its development.
 
General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: i too have a weakness for pie