Homebrew SNES9x for Old 3DS

AtlasFontaine

Well-Known Member
Member
Joined
Jul 18, 2015
Messages
1,095
Trophies
0
Age
26
Location
Venezuela-Zulia.
XP
865
Country
Venezuela
I get slowdowns up to 57 fps on Charlie's stage and also with a few lv. 3 Ultras (just did a lv 3 Shoryureppa)

In wich situations you get the slowdowns? I take it you're using the cia version, aren't you?

I'm using the 3dsx, I get slowdowns pretty much in every battle, although those slowdowns aren't too often.
 

CrashMidnick

Well-Known Member
Member
Joined
Jul 22, 2015
Messages
730
Trophies
0
Age
41
XP
2,846
Country
France
Many Thanks Bubble2k16 for what you've done : you gave us a beautiful present ! I tested Starfox on a N3DS, it is too fast during gameplay lol.

Enjoy your time with your family !!
 

bubble2k16

Well-Known Member
OP
Member
Joined
Jul 25, 2016
Messages
467
Trophies
0
XP
2,118
Country
Senegal
@ootnes2 - Nope, don't think I'll be adding that anytime soon.

@CrashMidnick - Oops. :rofl2: It's the speed really too fast, or is it running at the correct speed but too fast for your like?

@Osakasan - On SFA2, I also experience frameskips (up to 10) per 60 frames. Are you sure you are not running on a new 3DS? ;)

Some small findings - I found the problem plaguing Chrono Trigger's problem where the background music no longer re-starts. This fix may fix some other games with sound issues, though not all of them.

And I also found and fixed another bug related to colors in Contra III's Mode 7 level (thought I fixed it before! :rofl2:)

Anyway, will publish a fix for these two soon, once I'm done doing some tests.
 
Last edited by bubble2k16,

CrashMidnick

Well-Known Member
Member
Joined
Jul 22, 2015
Messages
730
Trophies
0
Age
41
XP
2,846
Country
France
@bubble2k16 : In fact I am using the PAL version (NTSC Super FX games have glitches erverywhere on my side) : the speed is about 20-30% faster than the original game on a real SNES !!! Except in the screen where you select your way like many other emus on low power configs (my settings are default ones).

Anyway, this is the first emu on N3DS that can handle this game !
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,496
Country
United States
And I also found and fixed another bug related to colors in Contra III's Mode 7 level (thought I fixed it before! :rofl2:)

I imagine the color issue in Contra 3's Mode 7 levels are due to it using the BGEXT mode, where 7 bits are used for color (vs 8, so only 128 colors vs 256 colors), and the remaining 1 bit is for priority.

I'm sure I mentioned how sprites are done on the SNES. There's just so many pages in this thread, that I'm not really caring to search :P. Anyways, I'll explain blargSNES's approach.

blargSNES handles sprites by rendering them to their own cleared buffer first, going from last to first based on the sprite priority rotation set in 2102h/2103h (ex: if sprite #10 has priority, then start at #9 going backwards to #0, then from #127 to #10 so as to give #10 priority over all others). You're also writing depth data (where the depth corresponds to priority against backgrounds), but you're not doing a depth test as that would interfere with the sprite priority. Then you take the buffer, and render it in between the background layers, using the depth data to only write the pixels corresponding to that depth/priority.
 
  • Like
Reactions: bubble2k16

bubble2k16

Well-Known Member
OP
Member
Joined
Jul 25, 2016
Messages
467
Trophies
0
XP
2,118
Country
Senegal
@CrashMidnick - Did you check that your options for the frame rate is set to 'Depending on ROM's region' or '50 FPS'?

@DiscostewSM - Yes, the Mode 7 color problem is the additional priority bit. :) I had fixed it before, but I think I broke it when I fixed the Super Star Wars Empire Strikes Back Snowspeeder stage.

And yes, thank you for the advice on sprite layering! I had a look at BlargSNES a few days back and what you said is exactly how I imagined it should have been done. So what you say is a confirmation of what I understand now. I took my dense brain a really really long while before I finally understood the FirstSprite priority thingy! :rofl2:

But the graphic rendering in this Snes9x port were done from the beginning without ever truly understanding that sprites in the SNES were handled. Therefore I used the depth bit for color math. All pixels that participate in color math are written with depth = 0, and those that do not are written with depth = 1. Then when doing color math with fixed color / subscreen, I simply just apply it to pixels whose depth = 0. The vertex/geometry shaders have all been written for this purpose. And BG layers and sprites were simply layer by layer, priority by priority according to the known layering order of each mode. It works for BGs, but not for sprites that overlap on the screen.

So now that this port is written using depth for color math, that's why I'll have to think of how I can approach solving the sprite layering. And... it's going to take some time.
 
Last edited by bubble2k16,

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,496
Country
United States
@bubble2k16

Yeah, there's a bit more to it when it comes to combining the use of priority and those affected by color math. They are technically mixed into the depth data with blargSNES, using 4 possible values for priority (0x00, 0x10, 0x20, 0x30), and then adding 0x40 depending on if color math is in use for them (based on palette id). When the sprite buffer is used for rendering, the alpha is adjusted to either be a full 0xFF with full replace or half at 0x80 with modulation (in PPU_HardRenderOBJLayer in ppu_hard.c). Depth testing is done at this point, first on one based on just the priority, then another with 0x40 added for the color match section, should there be any color math going on within a stretch of scanlines. Then when the main/sub screens are blended together, this alpha is examined based on the color effects for a stretch of scanlines (in PPU_BlendScreens in ppu_soft.c)
 

kane159

Well-Known Member
Member
Joined
May 28, 2013
Messages
215
Trophies
1
Age
35
XP
1,244
Country
Taiwan
hey! just wanna ask can the game Far East of Eden Zero been support? it's a very grate game using PLGS system, the game runs in real time :D
it's supported since Snes9x EX+ 1.5.8 ,so maybe can add support in this 3ds version?

sorry my english is very poor...
 

9thSage

Well-Known Member
Member
Joined
Aug 8, 2008
Messages
457
Trophies
0
XP
587
Country
United States
I was wondering what you meant about Yoshi's Island not running well, but then I remembered I'm on a New 3DS and Luma3DS is forcing the clock speed up to New 3DS speeds. It does run quite well that way, haha. At least in the first level and tutorial, haven't played much farther than that yet...it's certainly better than 'old' 3DS speed (I turned off that Luma feature just to test it out).

Thanks for implementing support for the Psudeo hi-res mode btw. Now Rudra no Hihou is playable!
 
Last edited by 9thSage,

DeslotlCL

GBAtemp's scalie trash
Member
Joined
Oct 28, 2015
Messages
2,847
Trophies
0
XP
2,755
Country
United States
I was wondering what you meant about Yoshi's Island not running well, but then I remembered I'm on a New 3DS and Luma3DS is forcing the clock speed up to New 3DS speeds. It does run quite well that way, haha. At least in the first level and tutorial, haven't played much farther than that yet...it's certainly better than 'old' 3DS speed (I turned off that Luma feature just to test it out).

Thanks for implementing support for the Psudeo hi-res mode btw. Now Rudra no Hihou is playable!
Hey, it isn't that bad. It runs at 60 fps with frame skip on in the tutorial level, but then the frames drop to 50-45 on the first level. It still playable and impressive for the old 3ds, considering it's emulating the chip fx too.
 

9thSage

Well-Known Member
Member
Joined
Aug 8, 2008
Messages
457
Trophies
0
XP
587
Country
United States
Hey, it isn't that bad. It runs at 60 fps with frame skip on in the tutorial level, but then the frames drop to 50-45 on the first level. It still playable and impressive for the old 3ds, considering it's emulating the chip fx too.
oh no, it was playable...it really is quite a bit smoother with that New 3DS speed boost though (no frame skipping on the first level that I could see). Please don't take it as an insult, my comment was more about it saying the game was slow on the first post and me being really confused as to why it clearly wasn't slow at all for me before I remembered Luma tweaking the CPU speed.
 

DeslotlCL

GBAtemp's scalie trash
Member
Joined
Oct 28, 2015
Messages
2,847
Trophies
0
XP
2,755
Country
United States
oh no, it was playable...it really is quite a bit smoother with that New 3DS speed boost though (no frame skipping on the first level that I could see). Please don't take it as an insult, my comment was more about it saying the game was slow on the first post and me being really confused as to why it clearly wasn't slow at all for me before I remembered Luma tweaking the CPU speed.
Oh no, i said that in a positive way. Never tried to sound rude :)
 
  • Like
Reactions: 9thSage

ironmaster49

Well-Known Member
Member
Joined
Aug 9, 2015
Messages
764
Trophies
0
XP
254
Country
Is it possible to remove that text on the bottom screen and turn off the bottom screen fully and make snes rom injects with this emulator? SNES 9x VC?
 

Clydefrosch

Well-Known Member
Member
Joined
Jan 2, 2009
Messages
6,024
Trophies
2
XP
4,629
Country
Germany
Is it possible to remove that text on the bottom screen and turn off the bottom screen fully and make snes rom injects with this emulator? SNES 9x VC?
of course its possible and it has been asked multiple times already, but till now, it has not been implemented and most likely wont be for quite some time.
the true question remains though, why do you all want fake vc titles that are inconventiently spread over the homemenu, when you can have all your games in a conventient list?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=KYZD7ykz9aQ