Homebrew [WIP] 3DeSmume (DS emulator for 3DS)

Perska

Active Member
Newcomer
Joined
Aug 22, 2015
Messages
34
Trophies
0
XP
112
Country
Finland
The mandelbrot test ROM that was included with @Robz8's ZIP seemed to work properly (was a bit slow), testing with Mario Party DS now.
After that I'll check how slow M&L: PiT runs.
 

itsthenavy

Well-Known Member
Member
Joined
Sep 3, 2015
Messages
102
Trophies
0
Age
31
XP
175
Country
United States
Now that the shootposting is out of the way, how's progress on the emulator going?
I go to sleep and the thread goes to garbage again. Looking at the master and fork @MasterFeizz made, there hasn't been any commits since last night. From the sounds of it Feizz got touch input at least partly started, but he probably won't push a commit with that until it's working. Once input is done there's a couple of options that can be considered moving forward:
  • Replace the DeSmume core with a newer revision
  • Implement audio
  • Implement hardware accelerated graphics
Not in order of importance, though replacing the emulation core is probably the best place to start. With it being fully interpreted performance is not great. My knowledge on emulators is shaky, but some instructions probably don't have to be interpreted and can be run directly because the DS and 3DS share an architecture, which gives some performance increases. Audio is probably better to implement when there's a stable framerate going, and can potentially hit performance too, but that might be a bit off. Hardware accelerated graphics means that the emulator has to move away from directly writing to the frame buffer. The lack of accelerated graphics is also why NSMB has no models.

Gotta start small though. The fact that it works is promising alone. It may not run great in the end, but I'm impressed it runs as well as it does.
 

Xandrid

Well-Known Member
Member
Joined
Mar 27, 2016
Messages
1,034
Trophies
0
XP
1,795
Country
Nigeria
I tested 3DeSmume with Dokapon Journey, I got a white screen for a few seconds, then it went to the game, now it's stuck on the Creating backup memory screen

Actually scratch what I said before, it came off the screen, it just took a while, fps aren't the best, but aren't so bad. Also kinda glitchy
 
Last edited by Xandrid,

MasterFeizz

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
1,098
Trophies
1
Age
29
XP
3,710
Country
United States
I go to sleep and the thread goes to garbage again. Looking at the master and fork @MasterFeizz made, there hasn't been any commits since last night. From the sounds of it Feizz got touch input at least partly started, but he probably won't push a commit with that until it's working. Once input is done there's a couple of options that can be considered moving forward:
  • Replace the DeSmume core with a newer revision
  • Implement audio
  • Implement hardware accelerated graphics
Not in order of importance, though replacing the emulation core is probably the best place to start. With it being fully interpreted performance is not great. My knowledge on emulators is shaky, but some instructions probably don't have to be interpreted and can be run directly because the DS and 3DS share an architecture, which gives some performance increases. Audio is probably better to implement when there's a stable framerate going, and can potentially hit performance too, but that might be a bit off. Hardware accelerated graphics means that the emulator has to move away from directly writing to the frame buffer. The lack of accelerated graphics is also why NSMB has no models.

Gotta start small though. The fact that it works is promising alone. It may not run great in the end, but I'm impressed it runs as well as it does.

Touch input is working, the core of the emulator is the problem and I don't see any reason to work on the current emulation core instead of moving to a newer revision. Instructions can't be run as is, there are lots of other factors not just the architecture of the cpu. You have to see the system as a whole.
 

itsthenavy

Well-Known Member
Member
Joined
Sep 3, 2015
Messages
102
Trophies
0
Age
31
XP
175
Country
United States
Touch input is working, the core of the emulator is the problem and I don't see any reason to work on the current emulation core instead of moving to a newer revision. Instructions can't be run as is, there are lots of other factors not just the architecture of the cpu. You have to see the system as a whole.
I figured the ISA was similar enough to maybe work with given TWL_FIRM can execute things, but we don't exactly have access to that. I guess I was wrong. Though it makes me ask: is TWL_FIRM an interpreter? I don't know much about that. I guess the best performance boost would come if we have access to JIT. Is that dynarec?

Sorry for all the questions. I'm interested in learning more as this develops. As I've said, emulation isn't my forte, but I want to learn more through watching this.
 

MasterFeizz

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
1,098
Trophies
1
Age
29
XP
3,710
Country
United States
I figured the ISA was similar enough to maybe work with given TWL_FIRM can execute things, but we don't exactly have access to that. I guess I was wrong. Though it makes me ask: is TWL_FIRM an interpreter? I don't know much about that. I guess the best performance boost would come if we have access to JIT. Is that dynarec?

Sorry for all the questions. I'm interested in learning more as this develops. As I've said, emulation isn't my forte, but I want to learn more through watching this.
No, think of it this way: There is an ARM7 core inside the 3DS, the TWL_FIRM sets up the ARM9 to DSi mode and turns on the ARM7 core, there is no emulation. TWL_FIRM is running DS software native on actual hardware.
 

itsthenavy

Well-Known Member
Member
Joined
Sep 3, 2015
Messages
102
Trophies
0
Age
31
XP
175
Country
United States
No, think of it this way: There is an ARM7 core inside the 3DS, the TWL_FIRM sets up the ARM9 to DSi mode and turns on the ARM7 core, there is no emulation. TWL_FIRM is running DS software native on actual hardware.
And because TWL_FIRM only looks for cards in Slot-1 we can't leverage TWL_FIRM for native execution and have no way of enabling the ARM7 core ourselves? So there is a way, but there is no access to it. I kinda forgot the emulator is running in homebrew which means it's running in ARM11, right?
 

Bedel

The key of the blade
Member
Joined
Oct 28, 2015
Messages
1,384
Trophies
0
XP
2,860
Country
United States
And because TWL_FIRM only looks for cards in Slot-1 we can't leverage TWL_FIRM for native execution and have no way of enabling the ARM7 core ourselves? So there is a way, but there is no access to it. I kinda forgot the emulator is running in homebrew which means it's running in ARM11, right?
Yes but it could use the ARM9 since we already have exploits to do it in most of system versions, and also A9LH
 

Fazana

Professional Trashposter
Member
Joined
Mar 7, 2016
Messages
121
Trophies
0
Location
Local Chippy
XP
497
Country
And because TWL_FIRM only looks for cards in Slot-1 we can't leverage TWL_FIRM for native execution and have no way of enabling the ARM7 core ourselves? So there is a way, but there is no access to it. I kinda forgot the emulator is running in homebrew which means it's running in ARM11, right?

So if I'm following this right, A9 can be used natively to do the A9 stuff on the DS, then the A11 can emulate the A7, which has plenty of processing power, bringing accurate and speedy emulation with overhead for extra post-processing features?
 

LarBob

Well-Known Member
Member
Joined
Dec 29, 2013
Messages
370
Trophies
0
Age
23
XP
563
Country
United States
Here the emulator is in-game Super Princess Peach. Probably took around 20 minutes to get past the cutscenes at the beginning.
 
  • Like
Reactions: iVcU

MasterFeizz

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
1,098
Trophies
1
Age
29
XP
3,710
Country
United States
Dammit, so it's not that simple then, fair enough.
No, like I said before you have to look at the system as a whole, not just the CPU. The biggest example of this is the original Xbox emulation, the xbox is a pentium 3 with an nvidia gpu but how well is it "emulated", not well at all.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: https://www.youtube.com/watch?v=2e1d3daJ0HE