Homebrew SNES9x for Old 3DS

  • Thread starter Thread starter bubble2k16
  • Start date Start date
  • Views Views 883,851
  • Replies Replies 2,507
  • Likes Likes 147
Tech speak begins: :D

@DiscostewSM - To solve the priority problem:

On the main (or sub) screen:
1. Draw backdrop with depth 0 (depth test disabled)
- this effectively 'clears' the screen.

2. Draw sprites with depth appropriate depth values (3, 6, 9, 12), but they are drawn based on the sprite priority register $2102/3 (depth testing is disabled)
- this should effectively draw the sprite layer correctly but without the additional sprite layer texture

3. Draw backgrounds 0 to 3 with the appropriate depth values depending on the BG modes so that they will positioned correctly (depth testing is enabled)

This eliminates the need to have a separate sprite layer texture. Another reason I didn't have the sprite layer texture because I couldn't figure out how to extract the pixels that belonged to a certain depth. Furthermore, the benefit of this method I used was that it eliminated the need for deferred drawing of tiles, or extracting and redrawing the separate sprite layers later. So some games actually benefited from the modest performance improvement.

But there's probably some flaw somewhere in the priorities that isn't totally right yet...

Just for completeness, the problem of this method was the color math. But managed to find some tricks using the alpha channel to make it all work together. The idea was that the sub-screen textures always have 1.0 as the alpha - actually it doesn't matter because I do not use the sub screen's alpha for alpha blending. But it's the pixels in the main screen textures can either have 0.5 (for half color math), 1.0 (full color math), or 0.0039 (the smallest non-zero alpha for disabling color math). By setting the GPU_SetAlphaBlending with the correct formula (using the main screen's alpha as the destination alpha), and by doing a single pass of drawing the alpha-blended sub-screen to the main screen, we can reproduce most of the SNES color math logic rather efficiently. I'm surprised at how well it actually works on real 3DS hardware.

--------------------- MERGED ---------------------------

Frame drops:
Well, if you read my post, I said that the games lagged only and only when there's lost of sprites on screen, I didn't mentioned the special effects. even though this new update did fixed the transparency and parallax laggy screen issue, which again, is just too damn awesome! I am more worried about the (mini)fps drops with lots of sprites on screen, all the games I mentioned in my previous post run 100% perfectly in blargsnes, with no FPS drops; but in your emulator is still lagging a bit(different rendering engine, I presume), I am optimist that it can be fixed somehow.

@A Fireman - You mentioned BlargSnes runs 100% perfectly. You sure know how to give me a good challenge. :rofl2: Sprites are indeed rendered differently in Snes9x. In fact, Snes9x renders sprites line-by-line (8x1 pixels), but I think BlargSnes (iirc) renders them in big 8x8 pixel tiles and that's probably why it's smoother. Let's see if I can do anything there... I've got some ideas. :D
 
Last edited by bubble2k16,
@bubble2k16
You brought hi-res mode solution in v0.51 and since then games like Secret of Mana are fully playable. That's great :-)
Nevertheless the hi-res screens are a bit blurred... Is it possible to improve hi-res on 3ds screen ?
 
@Wargla - More like it's flickering (kind of how it will look like on a TV). It's a little crude, but I feel it looks the best and runs with the best performance. Any other methods I've thought of may end up looking ugly, or it may run too slow. Maybe in the far off future, I'll look into this. :)
 
Frame drops:
Well, if you read my post, I said that the games lagged only and only when there's lost of sprites on screen, I didn't mentioned the special effects. even though this new update did fixed the transparency and parallax laggy screen issue, which again, is just too damn awesome! I am more worried about the (mini)fps drops with lots of sprites on screen, all the games I mentioned in my previous post run 100% perfectly in blargsnes, with no FPS drops; but in your emulator is still lagging a bit(different rendering engine, I presume), I am optimist that it can be fixed somehow.
I'm aware of the unoptimized level modes, Turrican 2 has FPS-drops in Wormland and Rocket Ride levels, Pagemaster has heavy FPS-drops in the flying book bonus areas, but as you can see I did not reported them yet because I know there's more important thing to optimize(see above)

in-frame:
ok...

sound:
Fair enough, sound emulation may not be accurate but sounds good enough for now; upgrading sound emulation at the cost of performance is up to you.

Flickering:
oh.... ok. I reported that because I find flickering lines is so damn distracting, a shame nothing can be done about it.

-Dunno, but I know those games had worse bugs and low-FPS in previous versions(especially Turrican 2 I think...)
You forgot "could you please". You either aren´t very well-versed at english or you are flat out forcing your opinions onto some software program whose programmer gives you away for FREE.
 
Frame drops:
Well, if you read my post, I said that the games lagged only and only when there's lost of sprites on screen, I didn't mentioned the special effects. even though this new update did fixed the transparency and parallax laggy screen issue, which again, is just too damn awesome! I am more worried about the (mini)fps drops with lots of sprites on screen, all the games I mentioned in my previous post run 100% perfectly in blargsnes, with no FPS drops; but in your emulator is still lagging a bit(different rendering engine, I presume), I am optimist that it can be fixed somehow.
I'm aware of the unoptimized level modes, Turrican 2 has FPS-drops in Wormland and Rocket Ride levels, Pagemaster has heavy FPS-drops in the flying book bonus areas, but as you can see I did not reported them yet because I know there's more important thing to optimize(see above)

in-frame:
ok...

sound:
Fair enough, sound emulation may not be accurate but sounds good enough for now; upgrading sound emulation at the cost of performance is up to you.

Flickering:
oh.... ok. I reported that because I find flickering lines is so damn distracting, a shame nothing can be done about it.

-Dunno, but I know those games had worse bugs and low-FPS in previous versions(especially Turrican 2 I think...)



here is the source https://github.com/bubble2k16/snes9x_3ds/tree/master/source no one is going to stop you adding all that you want to add.

Good luck. :yay:


funny you are called Fireman; you just got burned by flame.



can someone explain why do people piss off the hand full of devs which do cool stuff in our scene. @bubble2k16 is such a nice good polite dev THANK YOU!
 
Last edited by Flame,
@bubble2k16 I already had the starter kit so I wasn't sure if it was a newer version. I just d/loaded it, and now everything looks different than before. I can see icons instead of question marks, but like I told Japancake, when I click on the SNES9x emulator, the bottom screen turns different colors and then goes to a yellow screen and gets frozen w/lines on the top screen. Am I doing something wrong or could my system be corrupted or something? I have tried everything, and yes, I pushed A to play the sound w/Soundhax, and it loaded into the Homebrew Launcher. BlargNES seems to work perfectly fine, but when I play my SMW game w/custom graphics and custom music, it gives me an error or something, The same thing happens when I try to load SMW2 in BlargNES.
 
Last edited by Lespna1,
@Flame, @Coto - Fireman's tone was not pleasing, but no worries, I wasn't pissed at all. :) To give him credit, he mentioned something about too many sprites slowing down games. I managed to do something about it and it give some sprite-heavy games some needed boost in performance. I'm also implementing some other rendering optimizations here and there. Hopefully, it can give some games an overall performance boost when the next version is released.

@WeedZ - Yes, BS Zelda can't really work yet. I may try to look into it but no guarantees though.

@Lespna1 - I think I can't really help anymore. It doesn't seem like a common problem everyone is facing. I'm sure some 2DS owners have been running this app fine. The yellow screen is a sign that it is stuck in some initialisation. If it's a memory problem, maybe you can try Snes9x for 3DS v0.71? It uses less memory than the v0.6x versions and it may work fine for you?
 
  • Like
Reactions: WeedZ and BL4Z3D247
There is a lot of chilean communities like that. They either learn the good and politely way or the bad way! You can always be polite but if they misbehave they learn the harsh way.

DS programming sure is fun (3DS is more thread / MMU segments oriented).. for now I am all for DS programming.

Also good work @bubble2k16 . Which I guess is the same guy who wrote the SnemulDS CPUcore . (dunno if the C code or the ARM SNES snezziboy opcode table merged).
 
@Lespna1 - I think I can't really help anymore. It doesn't seem like a common problem everyone is facing. I'm sure some 2DS owners have been running this app fine. The yellow screen is a sign that it is stuck in some initialisation. If it's a memory problem, maybe you can try Snes9x for 3DS v0.71? It uses less memory than the v0.6x versions and it may work fine for you?

Oh, I've tried v.0.61, v0.63, and v.0.70, but not 0.71. I tried the guide for Soundhax, and like I said, it loads into the Homebrew Launcher fine, but when I click on the emulator, I get that yellow screen. I wonder if the system might be corrupted or something. I got a 32GB SD card and the 4GB one that came w/the system, and it happens w/both of them. I guess I will try v0.71.
 
@Coto - Yup, you are right. I did the Snezziboy/DS's CPU+PPU core way back when. :) Must have been like 10 years ago? I was wondering when anyone would start to notice and ask me about SnemulDS/Snezziboy/SnezziDS. Just to clarify, the original SnemulDS was done by someone else called Archeide, I think. It was nice of him to ask for permission to use the CPU core in his optimised SnemulDS :) When I was coding Snezziboy, countless late nights and debugging. And those days that I had to deal with horrible layering and compatibility. I think it took me half a year to go from zero to the first version of Snezziboy I think. But today, there's even still a bug with Megaman X in SnezziBoy/DS/SnemulDS that I never knew how to fix. Talking about it brings back so much memories I could go on and on... :cry:

I prefer 3DS. It is easier because of the extra power; but the booting into home-brew wasn't like the easy as the good old DS days. But I'm happy we even have a way into the 3DS to run home-brew today. The DS/3DS is so much more natural for retro gaming; more so that Androids and lOSes. Since Snezziboy/SnezziDS I've honestly been waiting for a long time to getting back into SNES emulation on 3DS since 3DS first came out. But after waiting so long for it to be cracked I gave up. :)

Until when I finally checked back at the scene some early last year, StapleButter had already beaten me to it. :) But you know, I think more can be done, so from the moment I decided to go neck in, I went from zero to the first version in 4 full months. :) Snes9x gave me the big headstart, so a bulk of the work was on the optimisation which was really crazy stuff.

--------------------- MERGED ---------------------------

Oh, I've tried v.0.61, v0.63, and v.0.70, but not 0.71. I tried the guide for Soundhax, and like I said, it loads into the Homebrew Launcher fine, but when I click on the emulator, I get that yellow screen. I wonder if the system might be corrupted or something. I got a 32GB SD card and the 4GB one that came w/the system, and it happens w/both of them. I guess I will try v0.71.

I doubt v0.71 will help much. Seems like something has gone wrong somewhere. You mentioned some other home-brew also had problems?
 
Last edited by bubble2k16,
But today, there's even still a bug with Megaman X in SnezziBoy/DS/SnemulDS that I never knew how to fix. Talking about it brings back so much memories I could go on and on... :cry:

Yeah don't laught but Im backporting a SnemulVS (Visual C++) haha.

I get the feeling the megaman x glitch happens due a misusage of unimplemented/partial PB+PC register in CPU Core + Page fetch OR X/Y register implementation. I'll get there once I have a proper debugger. But it happens on Megaman X1 right after beating a boss/ ice stage.

/offtopic
 
Yeah don't laught but Im backporting a SnemulVS (Visual C++) haha.

I get the feeling the megaman x glitch happens due a misusage of unimplemented/partial PB+PC register in CPU Core + Page fetch OR X/Y register implementation. I'll get there once I have a proper debugger. But it happens on Megaman X1 right after beating a boss/ ice stage.

/offtopic

Nice. SnemulVS runs in the DS or in Windows? :)

Oh I was referring to the one when Megaman gets hit with a missile in the Launch Octopus stage when fighting the mini bosses. When Megaman gets hit, the player gets thrown back to the stage select screen.
 
You guys can add bs zelda 3rd quest to the not working list. I think the problem is its the only game I wanna play.
Never even knew about BS Zelda, just looked it up and now I have to fire up my Hyperspin PC and check it out.

Also, to keep it on topic, great news about the boost to the sprite-heavy games, bubbles2k16. Looking forward to the next release.
 
Last edited by BL4Z3D247, , Reason: Stupid smart phone autocorrect
  • Like
Reactions: WeedZ
Oh, I've tried v.0.61, v0.63, and v.0.70, but not 0.71. I tried the guide for Soundhax, and like I said, it loads into the Homebrew Launcher fine, but when I click on the emulator, I get that yellow screen. I wonder if the system might be corrupted or something. I got a 32GB SD card and the 4GB one that came w/the system, and it happens w/both of them. I guess I will try v0.71.

have you tried deleting the 3ds folder and the ropbin/otherapp bin files and setting up homebrew freshly?
 
  • Like
Reactions: Michierusama
Never even knew about BS Zelda, just looked it up and now I have to fire up my Hyperspin PC and check of out.

Also, to keep it on topic, great news about the boost to the sprite-heavy games, bubbles2k16. Looking forward to the next release.
The third quest version is patched so the timed events are triggered by triforce collecting. It gives a natural feel to it, I recommend that one.
 
  • Like
Reactions: BL4Z3D247
Quick question. Am I able to test this emulator on a New 3DS and get the same compatibility? I know I can use RetroArch, but I'd like to test Snes9x for a bit to see how it works and whatnot. Just wondering if the beefed up CPU would increase performance, or play it the same as old 3DS.
 
  • Like
Reactions: Michierusama
Quick question. Am I able to test this emulator on a New 3DS and get the same compatibility? I know I can use RetroArch, but I'd like to test Snes9x for a bit to see how it works and whatnot. Just wondering if the beefed up CPU would increase performance, or play it the same as old 3DS.
Yes, you get significantly better performance on N3DS. Games which would've needed frameskip on the old 3DS you can expect may have no frames skipped on New 3DS.
Mega Man X for example.
 
have you tried deleting the 3ds folder and the ropbin/otherapp bin files and setting up homebrew freshly?
@bubble2k16
Yes, I just did, and I have hax 2.8 beta. Now I get the SNES icon to appear after I put the snes folder in the 3DS folder and d/load the files to the snes folder, but when I click the icon, I get the yellow screen again. Like I mentioned before, BlargNES worked fine, but I tried v0.71 w/Soundhax so I'm not sure if my system is corrupted or something. Would getting a new system help, do you think?
 
@bubble2k16
Yes, I just did, and I have hax 2.8 beta. Now I get the SNES icon to appear after I put the snes folder in the 3DS folder and d/load the files to the snes folder, but when I click the icon, I get the yellow screen again. Like I mentioned before, BlargNES worked fine, but I tried v0.71 w/Soundhax so I'm not sure if my system is corrupted or something. Would getting a new system help, do you think?

it really makes no sense that its not just working, unless 3dsx version is simply broken for everyone?
i mean, it could be something wrong with the hardware, but there really shouldnt be anything unless you messed around with it in ancient times and got like, frankenfirmware?
have you ever considered getting cfw?
 

Site & Scene News

Popular threads in this forum