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

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
really impressive great job, I'm going to test this on my O3DS XL and give feedback
It's best to manage your expectations with this. Even on new3ds, early testing shows this emu is very slow. It's early in development however and he's testing porting the DSonPSP source so maybe we'll get better results from that. Don't think this will ever be usable on old3ds though.

Honestly, if we can even get something like Peggle to run at full speed on N3ds, it will be a great accomplishment.
 
Last edited by zoogie,

shutterbug2000

Cubic NINJHAX!
OP
Member
Joined
Oct 11, 2014
Messages
1,088
Trophies
0
Age
29
XP
4,878
Country
United States
It's best to manage your expectations with this. Even on new3ds, early testing shows this emu is very slow. It's early in development however and he's testing porting the DSonPSP source so maybe we'll get better results from that. Don't think this will ever be usable on old3ds though.

Honestly, the DSonPSP source IS giving pretty good results, but the graphics corruption is the big problem here.
 

itsthenavy

Well-Known Member
Member
Joined
Sep 3, 2015
Messages
102
Trophies
0
Age
31
XP
175
Country
United States
I just want a playable Meteos without needing the card.

@shutterbug2000 Looking at your code, you're copying the pixel data from the top screen buffer to the texture, correct? I could maybe help if I can get a visual of the "graphical corruption."
 

shutterbug2000

Cubic NINJHAX!
OP
Member
Joined
Oct 11, 2014
Messages
1,088
Trophies
0
Age
29
XP
4,878
Country
United States
I just want a playable Meteos without needing the card.

@shutterbug2000 Looking at your code, you're copying the pixel data from the top screen buffer to the texture, correct? I could maybe help if I can get a visual of the "graphical corruption."

Ok, well, I'm uploading the video right now, which has the corruption in it. I'll post it here when it's done :D
 

Spaqin

Well-Known Member
Member
Joined
Feb 17, 2015
Messages
123
Trophies
0
Age
29
XP
199
Country
Poland
I'm not the most experienced with sf2dlib, so I end up with graphical corruption. If anyone with experience with sf2dlib would want to provide some tips/advice as to what could be going wrong, here's the rendering code:


Code:
     for(i=0; i < 256*192; i++)
     {
     dstA[i] = src[i]; //Screen buffer to top screen buffer
     dstB[i] = src[(256*192)+i]; //Screen buffer to bottom screen buffer
     }
 
    sf2d_texture *texture = sf2d_create_texture(256, 192, TEXFMT_RGB5A1, SF2D_PLACE_RAM);
    void* texturedata = texture->data;
    u16* texturedata16 = (u16*)texturedata;
     for(x=0; x < (256*192); x++){
        texturedata16[x] = dstA[x];
     
    }
1. Why are you copying data twice, from src to dst, then to texture data? That's a waste of so many cycles.
2. Did you tile the texture after creating it? You need to call
Code:
sf2d_texture_tile32(texture);
before it's drawn.
 

MSearles

Well-Known Member
Member
Joined
Jan 4, 2016
Messages
598
Trophies
0
Age
36
XP
2,661
Country
United States
I really hope this pans out. Every time someone comes out of the woodwork talking about the possibility of DS emulation, it always ends up in disappointment.
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,494
Country
United States
If only the 3DS supported programmable fragment shaders. It would have helped a lot with emulating the graphical systems of platforms like the DS, SNES, etc. For instance, the 3DS lacks proper paletted texture support (it can be done, but at a cost of processing and certain features by doing it an oddball way with bumpmapping), so you'd have to go out of your way, using the CPU, to convert the various textures to a format that's understandable by the GPU.

- GPU_L8 + GPU_A8 on the same texture area to handle the 2-bit, 4-bit, and 8-bit formats (all have to be converted to 8-bit, and use alpha-testing to crop out the indices meant to be transparent)
- GPU_RGB5551 can handle the Direct color format (15-bit color, 1-bit alpha)
- GPU_LA8 can handle the A3I5 and A5I3 formats (Alpha 3-bit + Indexed 5-bit and Alpha 5-bit + Indexed 3-bit, both converted to 8-bits for both parts. A3I5 could technically get away with GPU_LA4 if you don't mind losing one bit for alpha in exchange for using half the space to hold the converted texture)

Then there's the oddity. The 4x4-Texel Compressed format, which would more or less require a full conversion to GPU_RGB5551, and any changes to the palette for which it uses or changing the palette base would require a full reconversion, and with the maximum textures size for this format being 1024x512 (or 512x1024), that would be a LOT of conversion. Now, the texture is quite complex, so I dunno if palette animation would be a thing normally used for it, so if it isn't, reconversion may not happen often, if at all.

All of these also have to be converted to Z-curve order as well. These are all just for the 3D engine. This doesn't count the 2D engine(s).
 
Last edited by DiscostewSM,

loco365

Well-Known Member
Member
Joined
Sep 1, 2010
Messages
5,457
Trophies
0
XP
2,927


Ok, here it is! The "game" being emulated is the snes emu snemulds 0.6.

Once you get the corruption fixed, perhaps taking a video from the Homebrew Launcher would be more advisable. For all we know in that video, you could be trying to just load some garbled graphics from pretty much anything. Not that I don't believe you, but the video doesn't really show too much.
 

KaduPSE

Revolution and cake
Member
Joined
Dec 26, 2015
Messages
260
Trophies
0
XP
408
Country
Brazil
Did you test an actual game? I mean, when you said "decent FPS" were you talking about this specific SNES emulator?
 

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
It's GPL'd so if he ever releases a binary, he will be required to publish source. No reason to hound and harass him about it.
Please don't do that. We saw what happened in the NTR thread.

I already regret suggesting to shutterbug to make a thread. Expecting people not to be stupid was pretty foolhardy of me.
I'm not saying "Omg post the source now". I'm saying post a topic when you have _something_ to show. Honestly, the video he showed could be a 20 line C++ program that just shows garbled graphics. There's a difference between a WIP thread like FreeShop's, which showed a video of the application working, and someone posting "Look, I'm working on this thing, just trust me, I'm totally not lying".

Brb, going to create a "[WIP] running PS4 games on 3ds" thread
 

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
I'm not saying "Omg post the source now". I'm saying post a topic when you have _something_ to show. Honestly, the video he showed could be a 20 line C++ program that just shows garbled graphics. There's a difference between a WIP thread like FreeShop's, which showed a video of the application working, and someone posting "Look, I'm working on this thing, just trust me, I'm totally not lying".

Brb, going to create a "[WIP] running PS4 games on 3ds" thread
Shutterbug is not some Team H2O scrub if that's what you're wondering :P
Yes, he's actually posted two vids, one on his profile and one here. The one on his profile actually looks like something (albeit achingly slow). Give him some more time.
I guess you're a trustworthy person, but your video is all except a proof.
It show perfectly nothing.
Just sart a Pokemon game as B12W, even with 5fps, and show us the proof.
He started on this yesterday. Stop asking him for videos before he has any decent time to polish his code.

This is from his profile a couple of days back:

This is not great but its with just a couple days of coding and little optimization and polish.
 
Last edited by zoogie,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • sombrerosonic @ sombrerosonic:
    and C++
  • SylverReZ @ SylverReZ:
    @sombrerosonic, "Unity to die. Coding is a fuck."
  • sombrerosonic @ sombrerosonic:
    Rez how else am I suppose to make my horny AI who wants people to love it?
  • SylverReZ @ SylverReZ:
    Real women are better, AI isn't worth the trouble.
  • AncientBoi @ AncientBoi:
    Mine would be easy. All it has to do is bob it's head :D:evil::blush:
    +1
  • SylverReZ @ SylverReZ:
    Psi can make an AI babe lol.
    +1
  • K3Nv2 @ K3Nv2:
    I knew I should've bought the 50ft ethernet cord over the 25 lesson learned size matters
    +2
  • Bunjolio @ Bunjolio:
    vffvb gferwbgereg
  • AncientBoi @ AncientBoi:
    :O [☎️ Bunjolio's mother that he's swearing]
  • Bunjolio @ Bunjolio:
    she*
    +2
  • K3Nv2 @ K3Nv2:
    Fuck
    +1
  • J @ Just_Ragnar:
    What are mlc.bin files and are they important or can i delete them off my wii u sd card
  • AncientBoi @ AncientBoi:
    My apologies there little Miss @Bunjolio :mellow::blush::)
  • AncientBoi @ AncientBoi:
    Butt I'm still telling her :P
  • K3Nv2 @ K3Nv2:
    Never gonna give you upNever gonna let you downNever gonna run around and desert youNever gonna make you cryNever gonna say goodbyeNever gonna tell a lie and hurt you
  • AncientBoi @ AncientBoi:
    I don't recognise the song. Which one is it?
  • K3Nv2 @ K3Nv2:
    Sigma
  • SylverReZ @ SylverReZ:
    @Bunjolio, Sometimes people make mistakes, if you correct them then they'll remember.
  • SylverReZ @ SylverReZ:
    Try not to easily get offended if somebody calls you by different pronouns by mistake.
  • K3Nv2 @ K3Nv2:
    What I can't just call someone a dick or a vagina
    AncientBoi @ AncientBoi: :O