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

  • Thread starter Thread starter shutterbug2000
  • Start date Start date
  • Views Views 734,809
  • Replies Replies 2,759
  • Likes Likes 153
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,
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.
 
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."
 
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
 
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.
 
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.
 
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,


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.
 
Did you test an actual game? I mean, when you said "decent FPS" were you talking about this specific SNES emulator?
 
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
 
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