Emulator developer byuu demonstrates how DerKoun's HD Mode 7 SNES emulation works



Earlier this year, we saw the release of a fork of the bsnes emulator, which thanks to the efforts of DerKoun, allowed for HD upscaling of Mode 7 assets in Super Nintendo games. A few months later, the ability to emulate SNES games in widescreen would also be added, along with supersampling modes that could go up to 10x the original resolution. Eventually, byuu, developer of bsnes, decided to officially incorporate these additions into future builds of his emulator, with further betas of the bsnes-hd emulator offering slight bugfixes and improvements. For many, these phrases and ideas can be a little hard to understand, so byuu has decided to upload a YouTube video demonstrating the changes and improvements that the HD Mode 7 feature adds, while also explaining what some of these terms mean, and do for the end user. If you're interested, you can check out the 9-minute video, linked above.

In this video I demonstrate the recent HD mode 7 functionality in bsnes, which is courtesy of DerKoun. While explaining the origin of the feature and how it works, I demonstrate the effect in real-time in Pilotwings, The Legend of Zelda: A Link to the Past, and Dragon Quest III. I then walk through an explanation of how to use the various HD mode 7 settings present in bsnes.

Official bsnes releases can be downloaded here: https://bsnes.byuu.org/
Nightly builds and source code can be downloaded here: https://github.com/byuu/bsnes
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
37
Location
Dr. Wahwee's castle
XP
18,940
Country
United States
No worries, and thank you. Also, it was a very long time ago so you've probably forgotten, but just in case, my apologies for our first interaction back on my old forums. I was less friendly back then, and I don't think we've spoken since that time.

I still battle the "bsnes is too slow / difficult" stereotype that's plagued me since 2011, but I've made substantial efforts in the past year to change that, hence my reply.

bsnes can be configured to be higan with a user-friendly GUI, but in its default configuration, it's three times faster. I also wrote a third emulator, csnes, whose goal was to match the performance of Snes9X, and I did, but in the end I was unable to make an emulator that was both faster and more accurate than Snes9X, and I didn't see a point in further diluting the SNES emulation scene with it.

The way I look at it now: higan <> Mesen-S <> bsnes <> Snes9X
The left is more accurate, the right is more performant. There is no right answer, and people should use whatever they like.

I mean, in all fairness, the last time I tried it was on a lowly Core i5 3570, non-K model and well, it wasn't the fastest PC. But hey, I admit I wasn't all that friendly either, so no hard feelings and thank you for replying. I'm more than happy to give this a whirl, and report back :3 ^_^ Now that I have a GTX 1660 TI, 16 GB RAM and a Core i7 4770, 3 or 4 x resolution should run good I think. So, I should try the Bsnes build on the OP page, instead of Higan, is what you're saying? Sounds good, I'll do that. Is there a libretro core BTW?
 
  • Like
Reactions: Deleted User
D

Deleted User

Guest
Definitely use bsnes v110 over higan v106 if you try it, yeah. higan lacks all the ease of use, performance, and features.

Also, there is a libretro core that I manage upstream now. It's called bsnes HD in their updater, but that's likely to change soon since it conflicts with DerKoun's bsnes-hd fork on naming, and DerKoun wants to do a libretro port too.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
37
Location
Dr. Wahwee's castle
XP
18,940
Country
United States
Definitely use bsnes v110 over higan v106 if you try it, yeah. higan lacks all the ease of use, performance, and features.

Also, there is a libretro core that I manage upstream now. It's called bsnes HD in their updater, but that's likely to change soon since it conflicts with DerKoun's bsnes-hd fork on naming, and DerKoun wants to do a libretro port too.

Tried Secret of Mana at 3x scale and it runs extremely well. Only thing is I can't seem to find a way to turn on triple buffer or v-sync, as scrolling doesn't seem to be smooth for some reason. Is there a setting I'm missing? Just want to be sure :3 But as far as the games running they are indeed running at 60 fps 100% of the time, no frame drops, maybe I need to run it in exclusive full screen mode?


Edit: Okay, it's F11, but I'm noticing screen tearing in the OpenGL API, I use Direct3D instead maybe? IDK what I'm doing wrong, I'm seeing judder in scrolling sections, but again, it is full speed, and no audio crackling at all.
 
Last edited by the_randomizer,
  • Like
Reactions: Deleted User
D

Deleted User

Guest
You can try the Direct3D driver with the exclusive mode option checked.

Getting perfect video+audio requires one of two things: an adaptive sync monitor, or the dynamic rate control option. Adaptive sync is uncommon so let's go for dynamic rate control:

Make sure your monitor is set to 60hz.
Direct3D 9.0 driver with exclusive mode in fullscreen. Check the video synchronize box.
waveOut driver with the dynamic mode checked. Do not check the audio synchronize box.
You will want your audio latency to be around 128 or less if you can manage it, but try a bit more and a bit less and see what works.

I'm still struggling to get perfect video in windowed mode, but so are most emulators. I'd love some help if anyone here knows how to tame the Windows compositor.

Otherwise, I'm happy to hear the performance is okay! ^-^
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
37
Location
Dr. Wahwee's castle
XP
18,940
Country
United States
You can try the Direct3D driver with the exclusive mode option checked.

Getting perfect video+audio requires one of two things: an adaptive sync monitor, or the dynamic rate control option. Adaptive sync is uncommon so let's go for dynamic rate control:

Make sure your monitor is set to 60hz.
Direct3D 9.0 driver with exclusive mode in fullscreen. Check the video synchronize box.
waveOut driver with the dynamic mode checked. Do not check the audio synchronize box.
You will want your audio latency to be around 128 or less if you can manage it, but try a bit more and a bit less and see what works.

I'm still struggling to get perfect video in windowed mode, but so are most emulators. I'd love some help if anyone here knows how to tame the Windows compositor.

Otherwise, I'm happy to hear the performance is okay! ^-^

Holy crap, it worked! :blink: No tearing, no audio popping, daaaaaayum :D

So to test it, I ran Chrono Trigger's intro, no frame drops or skipping whatsoever However, I do have two concerns about full screen mode.

1 - Is there a way to open the ROM loading dialog from there so I don't have to hit F11 to exit full screen?
2- Is there a way to filter instances where the Snes uses the hi res 512 x 224, etc modes? I'm using the NTSC composite filter, and noticed the hi res modes are unfiltered.
Not a dealbreaker in any way at all, mostly curious :P


Edit: Again, games are working full speed, just wondering about those two things, thanks :3
 
Last edited by the_randomizer,
D

Deleted User

Guest
It would be possible to add a hotkey to open the ROM load dialog when not in exclusive mode (I'll add it to the next release), but unfortunately exclusive mode takes over the Windows compositor and so you can't use Win32 elements. A rather extreme thing would be to display a raster-based load ROM dialog but, lots of work ...

The snes_ntsc filter should be applied to hires modes as well, but the higher resolution likely makes it more subtle: https://github.com/byuu/bsnes/blob/master/bsnes/target-bsnes/program/filter.cpp#L76

Does this look different in Snes9X for you? If you have comparison screenshots, maybe I can troubleshoot and see if there's a bug.

Well in any case, thanks for giving it a try ^-^
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
37
Location
Dr. Wahwee's castle
XP
18,940
Country
United States
It would be possible to add a hotkey to open the ROM load dialog when not in exclusive mode (I'll add it to the next release), but unfortunately exclusive mode takes over the Windows compositor and so you can't use Win32 elements. A rather extreme thing would be to display a raster-based load ROM dialog but, lots of work ...

The snes_ntsc filter should be applied to hires modes as well, but the higher resolution likely makes it more subtle: https://github.com/byuu/bsnes/blob/master/bsnes/target-bsnes/program/filter.cpp#L76

Does this look different in Snes9X for you? If you have comparison screenshots, maybe I can troubleshoot and see if there's a bug.

Well in any case, thanks for giving it a try ^-^

Is it because I'm using 720p scaling for mode 7? I know Chrono Trigger uses it in a few instances, it's weird because at the title screen, when the logo waves by, it shows more pixellation. However, as the music starts, the filter seems to be running. Maybe I shouldn't be stretching the aspect ratio to fill the screen and keep it at 4:3 or 8:7? No, in Snes9x, I don't notice any anomalies with 256 or 512 graphics modes. I can record a video and upload it to a site to show what I mean.

But yeah, I can upload some screenshots real quick.


Edit: @byuu screens uploaded. It's weird, right before the full logo shows up, with the C, it is unfiltered, but after the rest, the filter kicks in

If these are hard to see, I can upload a video


Edit 2:

When the cymbals are heard and the choir starts, is when it goes from unfiltered to filtered with the NTSC filter
 

Attachments

  • Bsnes before logo.png
    Bsnes before logo.png
    81.7 KB · Views: 143
  • Bsnes after logo.png
    Bsnes after logo.png
    374.6 KB · Views: 139
Last edited by the_randomizer,
  • Like
Reactions: Deleted User
D

Deleted User

Guest
Is it because I'm using 720p scaling for mode 7?

Oh yes, that would indeed be it! The title screen starts in mode 7 with the rotating clock, and then snaps to mode 2 in order to do the wavey letters. Okay, cool.

Edit: @byuu screens uploaded.

Thank you for that!

Hate to be that guy but would it run on Android with Snapdragon 855 CPU?

You can do 720p HD mode 7 at 3x speed on the Galaxy 10 and iPhone 11 phones.

If the phones are older than that, it's probably pushing it.

Will have to be done through RetroArch as well, no native bsnes port to phones.

This is so cool!

Yay for fullspeed :D
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
37
Location
Dr. Wahwee's castle
XP
18,940
Country
United States
Oh yes, that would indeed be it! The title screen starts in mode 7 with the rotating clock, and then snaps to mode 2 in order to do the wavey letters. Okay, cool.



Thank you for that!



You can do 720p HD mode 7 at 3x speed on the Galaxy 10 and iPhone 11 phones.

If the phones are older than that, it's probably pushing it.

Will have to be done through RetroArch as well, no native bsnes port to phones.



Yay for fullspeed :D

So, it is intentional for it to look unfiltered when rendering the mode 7, and then when it's not? Maybe I'm just weird, and I do apologize if it stresses you out :(
 
  • Like
Reactions: Deleted User
D

Deleted User

Guest
So, it is intentional for it to look unfiltered when rendering the mode 7, and then when it's not? Maybe I'm just weird, and I do apologize if it stresses you out :(

It's a valid concern but it's not really solvable that I can see =(

So imagine you have HQ2x: it takes a 256x240 image and makes it 512x480.

But what happens if you are in HD mode 7 3840x2160? HQ2x would make it 7680x4320 which would be absolutely impossible. Even if you did that, and then scaled it back down to fit into the window, the scaling down would crush the effect and the image would just look blurry, not HQ2x'ed.

If I take say a 768x720 image and apply the HQ2x "as if" it were 256x240, all the extra details would be erased and you will have in effect canceled out the HD mode 7 effect.

I'm open to ideas from other developers, but I don't see a way we can solve this =(
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    K3N1 @ K3N1: https://youtube.com/shorts/PArWUK0WyDQ?feature=share