Homebrew WIP melonDS for Switch

dragnipur

Active Member
Newcomer
Joined
Jul 26, 2017
Messages
38
Trophies
0
Age
28
XP
457
Country
United States
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!
 

notimp

Well-Known Member
Member
Joined
Sep 18, 2007
Messages
5,779
Trophies
1
XP
4,420
Country
Laos
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.
 

Hydr8gon

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

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
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,

Hydr8gon

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

catlover007

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

Billy Acuña

Well-Known Member
Member
Joined
Oct 10, 2015
Messages
3,126
Trophies
1
Age
31
XP
3,701
Country
Mexico
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 :)
 

Hydr8gon

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

Hydr8gon

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

Hydr8gon

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

General chit-chat
Help Users
  • No one is chatting at the moment.
    BakerMan @ BakerMan: +1