Homebrew blargSnes -- SNES emulator for the 3DS (WIP)

Status
Not open for further replies.

MarkDarkness

Nocturnal
Member
Joined
Dec 17, 2009
Messages
1,403
Trophies
2
XP
3,206
Country
Poland
I believe I found the cause of "missing-tile syndrome" that seems to plague the hardware-renderer. Expect the fix in later builds.
Well... anyway. That's great news! I think that along with the sound timing issue this is a top request from users. It's really good to see you guys working on this project again.
 
  • Like
Reactions: Idaho

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,489
Country
United States
Damn. Well, hopefully it'll be fixed in the future.


Here's the thing. I believe, imo, I know what's going on here (and this is something StapleButter attempted to fix). With King of Dragons, it has what is known as Forced Blank enabled in regions where there is complete black rows. In-game, this area covers the entire top portion, and a little bit on the bottom (right after the stats). When Forced Blank is enabled, the system has full access to the VRAM, allowing to make changes by writing bytes and whatnot. So when this is not enabled, the only time the system has such access is during VBlank (or Vertical Blank, the area which isn't part of the visible viewing area of the screen). In that very small section at the bottom of the screen, the system had begun making changes that most games would not do until the VBlank. The hardware renderer set in place specifically waits until the VBlank begins to do any rendering, whereas the software render renders each scanline with exactly what is available at those scanlines, not what can be changed after. So, when the hardware renderer goes to work, it takes into account the changes already made in that small section of the Forced Blank. This results is graphical corruption on the player sprite for a single frame in between frame animations (because the changes to the sprite aren't done per screen frame).

I'd imagine that if we were to take into account when the Forced Blank is enabled and disabled, it would fix this issue and other games that utilize it. Although StapleButter has already tried it, I think he was also attempting to handle color palette changes as well (which the system has access to, no matter what's going on at those times as that is not in VRAM). since I have nothing else to work on atm, I think I'll give that Forced Blank issue a try.
 
  • Like
Reactions: SLiV3R

Arisotura

rise of melonism
OP
Member
Joined
Dec 5, 2009
Messages
839
Trophies
1
Age
30
Location
center of the Sun
Website
kuribo64.net
XP
2,498
Country
France
I had it working-ish, too, minus a couple issues. But the main issue was the performance drop this caused due to the tile caching mechanism which is mostly inefficient in these situations.

I haven't yet managed to come up with a more efficient caching method.
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,489
Country
United States
I had it working-ish, too, minus a couple issues. But the main issue was the performance drop this caused due to the tile caching mechanism which is mostly inefficient in these situations.

I haven't yet managed to come up with a more efficient caching method.

Yeah, your current method flags changes made in VRAM and CGRAM to indicate when the hardware rendered must do some reconverting, but with a Forced Blank and whatnot in between two viewing sections, it causes having to reconvert graphic cels every frame.

If only the GPU had support for what's considered an OpenGL ES Extension, that could use palette textures via glCompressedTexImage2D, like PALETTE4_RGBA8_OES. This specific type would have 16 color entries, with each being 32bit (8 bit per channel) stored like a header prior to the raw indexed data that makes up the texture.
 

Fatalanus

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
595
Trophies
0
Age
24
XP
410
Country
Romania
Yeah, your current method flags changes made in VRAM and CGRAM to indicate when the hardware rendered must do some reconverting, but with a Forced Blank and whatnot in between two viewing sections, it causes having to reconvert graphic cels every frame.

If only the GPU had support for what's considered an OpenGL ES Extension, that could use palette textures via glCompressedTexImage2D, like PALETTE4_RGBA8_OES. This specific type would have 16 color entries, with each being 32bit (8 bit per channel) stored like a header prior to the raw indexed data that makes up the texture.

Alleluyah! :D
 

SLiV3R

3DS Friend Code: 0473-9069-2206
Member
Joined
Jan 9, 2006
Messages
2,319
Trophies
2
Website
soundcloud.com
XP
1,847
Country
Just a small request: For Ninjhax users it would be cool to have a snes console image instead of the present bs one. It would look beautiful together with the NES & GBC console images :)
 

Mystic Shadow

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
143
Trophies
0
XP
848
Country
United States
Gotta say after I was so used to the PSP one for so long (snesytl?) Holy crap man. Super metroid feels so nice in my hand lmao. Great work guys can't wait for the next updates to come. Also will blarg have a version that's only for N3ds that uses the extra HW? I know its one step at a time but for the future release.
 
  • Like
Reactions: SLiV3R

jamieyello

Professional Dumbass
Member
Joined
Mar 11, 2013
Messages
385
Trophies
0
XP
556
Country
United States
I didn't understood a single word of this technical post, but it seems to be awesome!! :toot:

it has what is known as Forced Blank enabled in regions where there is complete black rows.

FBEIRWTICBR syndrome... a problem that plagues the programming community to this day.

We may have to donate spare motorcycle parts. You have my heavy duty drive chain.
 

SLiV3R

3DS Friend Code: 0473-9069-2206
Member
Joined
Jan 9, 2006
Messages
2,319
Trophies
2
Website
soundcloud.com
XP
1,847
Country
I love you StapleButter & DiscostewSM! It's OK that compatibility isn't 100 %. There are soooo many games to play in the meantime. last days I have been playing Super ghost n Goblins. It's freaking difficult. But I LOVE it! :)

Many Thanx for your fantastic emulator :)
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,489
Country
United States
I love you StapleButter & DiscostewSM! It's OK that compatibility isn't 100 %. There are soooo many games to play in the meantime. last days I have been playing Super ghost n Goblins. It's freaking difficult. But I LOVE it! :)

Many Thanx for your fantastic emulator :)


If I may, have you noticed any graphical glitches with SGnG? I ask because while we got the "black screen" issue fixed, I hadn't tested beyond lvl 2, mainly because I'm very rusty with the game. :P
 

SLiV3R

3DS Friend Code: 0473-9069-2206
Member
Joined
Jan 9, 2006
Messages
2,319
Trophies
2
Website
soundcloud.com
XP
1,847
Country
If I may, have you noticed any graphical glitches with SGnG? I ask because while we got the "black screen" issue fixed, I hadn't tested beyond lvl 2, mainly because I'm very rusty with the game. :P

I have come to level 5. I will beat it one day though :)

Yes, there are small graphical glitches in some stages. Don't remember which ones. But I wouldn't thought about those glitches if you hadn't told about them. They reminds of those glitches you mentioned earlier. But I can't tell for sure they are the same. I think these glitches are more sublime than the ones in for example Pop n twinbees second stage. I will play more tomorrow and do some report.

You should play to stage 4. It's very cool use of Mode7 effects :)
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,489
Country
United States
I have come to level 5. I will beat it one day though :)

Yes, there are small graphical glitches in some stages. Don't remember which ones. But I wouldn't thought about those glitches if you hadn't told about them. They reminds of those glitches you mentioned earlier. But I can't tell for sure they are the same. I think these glitches are more sublime than the ones in for example Pop n twinbees second stage. I will play more tomorrow and do some report.

You should play to stage 4. It's very cool use of Mode7 effects :)


I'm sure those glitches will be cleared up if they are related to the same thing I mentioned.

Is that stage (4) a bit laggy? I think it uses the ExtBG feature to separate the Mode7 layer into 2 layers, so it may be a bit slower. Just wonderin'.
 
  • Like
Reactions: Gelbird and Idaho

SLiV3R

3DS Friend Code: 0473-9069-2206
Member
Joined
Jan 9, 2006
Messages
2,319
Trophies
2
Website
soundcloud.com
XP
1,847
Country
I'm sure those glitches will be cleared up if they are related to the same thing I mentioned.

Is that stage (4) a bit laggy? I think it uses the ExtBG feature to separate the Mode7 layer into 2 layers, so it may be a bit slower. Just wonderin'.
I played to the Lava level (Level 3). There were no glitches so far. But if I remember correctly there were some of those glitches during stage 3-2 (A tower level. I'm most certain there must be some Mode7 trick to make the towers scroll like they do when you go round and round upwards).

I didn't notice any lag at level 4. But there were two other things on that level that wasn't before.
1. During the stage scrolls with Mode7 the sound gets distorted in a new kind of way. Nothing big though.
2. When you get a hit on level 4 you won't 'flicker' like otherwise. You'll get invisible instead.

I just love this game. Too bad my 3DS battery died :P
 

DiscostewSM

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
5,484
Trophies
2
Location
Sacramento, California
Website
lazerlight.x10.mx
XP
5,489
Country
United States
Figure now is a good time as any.

--------------

Hardware-assisted Mode 7 - Under various circumstances, the GPU will go and render Mode 7 sections instead of handling them with software rendering. This means that in many cases where graphic fps would drop may not anymore. Perspective Mode7 won't see much of a change because of changes per scanline, but expect others to demonstrate an improvement, even up to 60fps. Still messing around with it as some cases are shown to be slower, so it is set as a WIP.

Fix to tile flicking - A problem with the vertex data alignment was causing an issue where in some cases, various background and sprite tiles would flicker. this has been corrected (as far as I can tell).

Mid-frame Color 0 rendering - I think this needs a visual to help explain it.
7NUHPmE.png


This is not the same as StapleButter's attempt at mid-frame palette changes under hardware rendering. This only affects Color 0, which no tile uses as it is not just the transparency color, but is also the backdrop color. So, in this example, any tiles that were showing up as black before will still be black, but if the backdrop shows color changes, you'll notice it.

And of course, this is currently working with the latest ctrulib build. No official release has been made at this time.
 
D

Deleted User

Guest
BlargSNES work perfectly fine on my 3DS XL, but when i try to open it on my little brother's 3DS i only get a black screen. What's wrong?
 

Idaho

Well-Known Member
Member
Joined
Oct 3, 2013
Messages
884
Trophies
1
Age
29
XP
1,409
Country
France
Curious about how better will the next official build will be compared to the previous one.

Emulation on the 3DS is really starting to get to the top :yaynds:
 
  • Like
Reactions: SLiV3R
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Well start walking towards them +1