Homebrew WIP melonDS for Switch

  • Thread starter Thread starter Hydr8gon
  • Start date Start date
  • Views Views 653,876
  • Replies Replies 1,382
  • Likes Likes 87
Hey, I've released the overclocking build! Here it is. Full changelog:

So yeah, max overclock will get you some decent speeds. Less intensive stuff (gen 4 Pokemon battles, Ace Attorney, etc.) will run full speed. Unfortunately I still haven't completely figured out the audio (read: I still have no idea what I'm doing) so even at full speed it doesn't sound perfect. If it's too annoying, I guess you could just mute it for now. Or wait until I figure it out. Anyways, have fun with the overclock!
niceeeeeee, thanks for this!
 
As far as screen layouts go, please consider a "hotswapping" style implementation, for games where you dont need to see both screens all the time.

Basically resize top/bottom screen to zoom till fit in a default horizontal holding the switch as you normally would layout, then swap screens if you touch the black bars on the side - or something to that extent.

Thanks in advance for considering. :)

n.
 
Is there any way to get back to the main menu while in a game? For example to change roms or to change screen layout or clock speed?
Not yet, it's on the TODO list.

As far as screen layouts go, please consider a "hotswapping" style implementation, for games where you dont need to see both screens all the time.

Basically resize top/bottom screen to zoom till fit in a default horizontal holding the switch as you normally would layout, then swap screens if you touch the black bars on the side - or something to that extent.

Thanks in advance for considering. :)

n.
This will probably be a thing once the rest of the screen layouts are added and the in-game menu is added.
 
  • Like
Reactions: Admiral-Purple
re: audio

it appears that the Switch API you're using runs at 48000Hz

but you copied the output system 'regular' melonDS uses, which is meant to run at 47340Hz

so, you'll need to either resample up, or use another audio output API that supports more exotic output rates

(reason for the 47340Hz rate was programming convenience. 1024 samples at that rate are exactly 710 samples at the core sample rate of 32823.6328125Hz. reason that is a hairy number is because sound mixing is driven by the DS system clock)
 
Last edited by Arisotura,
re: audio

it appears that the Switch API you're using runs at 48000Hz

but you copied the output system 'regular' melonDS uses, which is meant to run at 47340Hz

so, you'll need to either resample up, or use another audio output API that supports more exotic output rates

(reason for the 47340Hz rate was programming convenience. 1024 samples at that rate are exactly 710 samples at the core sample rate of 32823.6328125Hz. reason that is a hairy number is because sound mixing is driven by the DS system clock)
Interesting, I was curious about the numbers there when I was looking through the UI to steal the sound code. :P This'll lead me in the right direction. At the same time though, I pretty much have no idea what an audio is so I wouldn't know where to begin writing a resampler. I could always just use SDL for sound output, but that feels like a messy solution considering nothing else is using SDL. I'm a bit busy tomorrow, but I'll try to hop on IRC at some point and maybe we can figure something out? I gotta go to sleep right now though.
 
  • Like
Reactions: Rickyman
I've been working on an Arm64 JIT for Desmume recently. It is still in a very early state, only most ALU and basic memory instructions is implemented though there is a noticable performance boost.
I wonder whether it's worth further developing it or possibly squeezing it into melonDS, though doing so would probably ruin some of it's accuracy, which would make doing it pointless.
 
I've been working on an Arm64 JIT for Desmume recently. It is still in a very early state, only most ALU and basic memory instructions is implemented though there is a noticable performance boost.
I wonder whether it's worth further developing it or possibly squeezing it into melonDS, though doing so would probably ruin some of it's accuracy, which would make doing it pointless.
@StapleButter is the onc you want to ask :)
 
What exactly will benefit from overclocking? The CPU should be more than good enough for NDS emulation.
Not if we're using an interpreter and a software renderer.

I've been working on an Arm64 JIT for Desmume recently. It is still in a very early state, only most ALU and basic memory instructions is implemented though there is a noticable performance boost.
I wonder whether it's worth further developing it or possibly squeezing it into melonDS, though doing so would probably ruin some of it's accuracy, which would make doing it pointless.
Of course it would be worth it! Recompilers don't have to be 100% accurate; that's what the interpreter is for.

Overclocking nice, wish they could add that to every CFW. Can you mess up with voltages too?
The overclocking functionality is a part of libnx, it should work on any CFW. It looks like there are functions to set the voltage, but I'm probably not gonna mess with that.
 
Quick update! Same place as always. I fixed the sound output. I actually fixed it a few hours ago but I didn't realize because my testing scenario (Pokemon SoulSilver battle) was running slightly below full speed so it was crackling no matter what. Note to self: add FPS counter. Ace Attorney sounds perfect (when the text isn't scrolling).

tl;dr if your sound is still shitty the game isn't full speed.

Also thanks to @StapleButter for dealing with my incompetence and explaining the resampler code to me. I feel like I know more about audio now, if only a little :P
 
thanks this is really cool ghost trick running not too bad!


Thanks for the high quality video showing off the emulator! I think I'll add this to the OP, if you don't mind :)

Shame you recorded before the audio fix, but that's not a big deal. It only really sounds good when the game is full speed anyways.

Edit: bit of a late edit here, but I'm only now discovering that there are still some audio issues if playing docked, which explains the audio in the video. Really weird stuff though. It sounds fine in handheld.
 
Last edited by Hydr8gon,

Site & Scene News

Popular threads in this forum