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

Status
Not open for further replies.

Saudi Polandball

New Member
Newbie
Joined
Dec 1, 2014
Messages
2
Trophies
0
Age
43
XP
53
Country
Saudi Arabia
I cannot exit the emulator on 2DS. I have to hard reset the device. Is there anyway to do that? I tried pressing every single button but nothing worked. Is it really the only way? :|
 

dronesplitter

Well-Known Member
Member
Joined
Sep 30, 2007
Messages
595
Trophies
0
XP
421
Country
United States
I cannot exit the emulator on 2DS. I have to hard reset the device. Is there anyway to do that? I tried pressing every single button but nothing worked. Is it really the only way? :|

You just pause the game you're playing by tapping the touchscreen, press select to get to the file browser, and then click that little X on the touchscreen's top right corner, and that will close you out to the loader.
 

MarkDarkness

Nocturnal
Member
Joined
Dec 17, 2009
Messages
1,403
Trophies
2
XP
3,214
Country
Poland
StapleButter, really nice job getting version 1.2 out the door. The improvements from last version really show through!

Small feature request: would it be possible to make the lower screen less... obtrusive, I guess?GameYob does this well by giving you a lot of options about what to do with it. Just displaying a system clock on a corner would be my option of choice, for example.
 

weatMod

Well-Known Member
Member
Joined
Aug 24, 2013
Messages
3,305
Trophies
2
Age
47
XP
3,351
Country
United States
hey i wonder if you could build the settings menu so that we can access it by just taping the screen then the red x , right now you have to press select and go to the rom loading menu and exit the game to switch between full,cropped,border
 

G.M.M.

New Member
Newbie
Joined
Nov 30, 2014
Messages
4
Trophies
0
Age
25
XP
77
Country
United States
hey i wonder if you could build the settings menu so that we can access it by just taping the screen then the red x , right now you have to press select and go to the rom loading menu and exit the game to switch between full,cropped,border


When you tap the screen while in a game, hit start, then you should be able to get to the settings. After you save, it will go right back to the game.
 
  • Like
Reactions: weatMod

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
DiscostewSM hah, thanks! Judging from what Fullsnes says, though, your fix doesn't seem quite right, but you may be onto something there. I need to look into that shit more closely.

Blarg, those windows again. They're complex. In particular, the disable/inside/outside settings are per-layer, so checking for cases where not all windows are enabled isn't straightforward.


Yeah. It's only going to get more complex from here on out. :P

There is one small change to the code I posted earlier (but it won't do those cases you described). Seems that code kinda broke Contra 3's Barrier effect, making the circle, but then made everything underneath display the color effect. Removing the portion that has "(!Win12 && !Win34)" in that if statement fixes this, and doesn't mess with the box-like effects in MMX and FFIV.

On an unrelated note, the layer that has some buildings and the ground burning up (after the plane) aren't showing up under hardware in 1.2, but do under software (and the ground was showing up under hardware in 1.1.9, but not the buildings on the same layer above it).

yM6x9ON.png
 

dronesplitter

Well-Known Member
Member
Joined
Sep 30, 2007
Messages
595
Trophies
0
XP
421
Country
United States
When you get to the second level of Contra III, though, the mode 7 level is weird looking, I think. I also got a lot of stuff to flow out on the touchscreen with a code about MODE7 and something else...getfx, maybe?
XIZQdbJ.jpg
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
When you get to the second level of Contra III, though, the mode 7 level is weird looking, I think. I also got a lot of stuff to flow out on the touchscreen with a code about MODE7 and something else...getfx, maybe?
XIZQdbJ.jpg


Yeah, that's broken, it definitely uses Mode 7 for those levels. But no rush at all, it'll be fixed in due time :P
 

dronesplitter

Well-Known Member
Member
Joined
Sep 30, 2007
Messages
595
Trophies
0
XP
421
Country
United States
The speed in Contra III is phenomenal, and I think StapleButter mentioned that Mode 7 support wasn't all there yet anyway, so no worries :)
Tried some Demon's Crest and that uses Mode 7 to fly around and swoop down to villages. Everything graphically seemed alright there, I think. There were some spots it wouldn't let me into when I tried to land but that may be me just forgetting how to play the game (maybe you're not supposed to go there yet).
 

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
When you get to the second level of Contra III, though, the mode 7 level is weird looking, I think. I also got a lot of stuff to flow out on the touchscreen with a code about MODE7 and something else...getfx, maybe?
XIZQdbJ.jpg

The reason why it looks weird is because it is using 1 extra bit for coloring. See, everyone knows about Mode 7, but what most don't know is that there are 2 types of Mode 7. The first is the normal version. The second utilizes EXTBG, making use of BG2, and uses the same data as BG1 does, but has some differences. In normal Mode 7, graphical cels are 8bpp to utilize up to 256 colors. With EXTBG, the 8th bit is a priority bit. When not set, the BG layer pixel is below certain sprites (probably all). On the other hand, if it is set, the BG layer pixel is above various sprites (but not all). The remaining 7 bits of the graphic cels are used for color reference (2^7 = 128), so it is limited to 128 colors. I built the latest commit and made a slight adjustment to the existing Mode 7 code (when accessing the palette, and added "& 0x7F" to limit it to the first 128 colors), and after a LOT of attempt (I'll explain later), I was finally able to get to Level 2, and this is what it shows.

1mMwAeP.png


As you can see, it is correctly colored, because it should only use the first 128 colors. If you look at your screenshot right near the bridge where the paths intersect, you'll see that above and below the overpass, the colors are correct. This is because Bit8 for the pixels on for graphic cels aren't set. Everything else is set, but the current implementation interprets that 8th bit as part of color reference, so the result is incorrect coloring. But, as you can see by my images, priority is not in use for the graphic cels, so everything is displayed above it. What does this all mean? It's simple. The capability is not implemented yet, so it is processing everything as it believes it should with what it has, which is why it looks odd.

Now, about why it took a lot of attempts. I guess StapleButter is working on some things regarding the DSP, but unfortunately when trying to try out Contra 3, when a piece of music isn't loaded/played, the system locks up in a way where the game still runs, but it never progresses. Most of the time, I'd be stuck at the wall where the first boss should comes out but doesn't (with audio becoming mute for everything, including sfx), but still able to move around and shoot, use bombs, etc. So, because of this, I recommend no one build the current commits because you'll likely have problems playing anything.

Regarding the previous post involving missing stuff like the ground burning on Level 1 between software and hardware in v1.2, I caught this.

kLQhQj3.png


It appears that it's there when I'd use a bomb from way above, but it clips at that distance from the bottom edge of the bomb effect, up until it reaches the top area of the burning ground, to which the fire becomes visible (and cropped correctly by the bomb effect and it expands into it). Once the bomb effect fades, so does the burning ground. It's got to do with how the hardware version of computing windows effects is done.
 

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
DiscostewSM Is there any way to have a workaround so that particular variant of Mode 7 and the missing flame effects could be emulated or would that compromise speed and possibly break other parts of the code?


The flame effect was working in the unofficial 1.19 build, so it's a matter of getting the windowing to behave correctly. With that Mode7 variant, it would have to check if EXTBG was enabled for each scanline, and process them based on that. Both layers work off of the same inputs for Mode 7 (like positioning, rotation/scale, etc), and as other modes can use a layer for the sub screen instead of the main screen for effects (not talking about the 3DS top and bottom displays), so can Mode7 with regard to this BG1 and BG2. Currently, Mode7 is done via software. StapleButter plans on implementing Mode 7 in hardware (when the conditions are fine for it like when it is not zoomed out so far), but this may complicate things, as now it would have to deal with converting and storing tiles of 8-bit and 7-bit.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
The flame effect was working in the unofficial 1.19 build, so it's a matter of getting the windowing to behave correctly. With that Mode7 variant, it would have to check if EXTBG was enabled for each scanline, and process them based on that. Both layers work off of the same inputs for Mode 7 (like positioning, rotation/scale, etc), and as other modes can use a layer for the sub screen instead of the main screen for effects (not talking about the 3DS top and bottom displays), so can Mode7 with regard to this BG1 and BG2. Currently, Mode7 is done via software. StapleButter plans on implementing Mode 7 in hardware (when the conditions are fine for it like when it is not zoomed out so far), but this may complicate things, as now it would have to deal with converting and storing tiles of 8-bit and 7-bit.


Ah well, okay, thanks for the explanation, I actually like learning about how the Snes displayed the different BGs, Mode 7, what has to be done and so forth. All I know is that it's shaping out to be a very good emulator :P
 
  • Like
Reactions: dronesplitter

dronesplitter

Well-Known Member
Member
Joined
Sep 30, 2007
Messages
595
Trophies
0
XP
421
Country
United States
Something I noticed that may have been happening in other games is this shifting of sprites as I move left or right.

Two screenshots from Soul Blazer that show it in action:

Nm1Rh1c.jpg
ZxjDuA3.jpg
As I move left in the first image, the woman's sprite is drawn scooted over to the right as the screen scrolls. I move right, she's scooted over to the left. I stop moving and she's centered.
Any ideas on that, Discostew?
 

AndrewPH

Active Member
Newcomer
Joined
Nov 18, 2014
Messages
36
Trophies
0
Website
www.classicube.net
XP
83
Country
United States
Something I noticed that may have been happening in other games is this shifting of sprites as I move left or right.

Two screenshots from Soul Blazer that show it in action:

Nm1Rh1c.jpg
ZxjDuA3.jpg
As I move left in the first image, the woman's sprite is drawn scooted over to the right as the screen scrolls. I move right, she's scooted over to the left. I stop moving and she's centered.
Any ideas on that, Discostew?


<layman speculation> It might be updating other sprites a frame after the camera moves, instead of during the same frame.

And I think pokemon gen 1 had the same issue, but not gen 2.

</layman speculation>
 

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
Something I noticed that may have been happening in other games is this shifting of sprites as I move left or right.

Two screenshots from Soul Blazer that show it in action:

Nm1Rh1c.jpg
ZxjDuA3.jpg
As I move left in the first image, the woman's sprite is drawn scooted over to the right as the screen scrolls. I move right, she's scooted over to the left. I stop moving and she's centered.
Any ideas on that, Discostew?

I tried the game myself on both BlargSNES, and Snes9x on my PC. What I'm seeing is that it runs at a lower frame rate (in that particular area vs other areas) on BlargSNES compared to the 60fps on Snes9x. If at some point it improves to 60fps there, it may fix the problem. Might simply be the way the game was designed, being intolerable to anything less than 60fps, as I can attest to that when I tried to make MM2 PTC with Petit Computer and having it run under 60fps, as I got similar results. All I can say is wait.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BigOnYa @ BigOnYa: Ok good chatting, I'm off to the bar, to shoot some pool, nighty night.