forked from bsnes-emu/bsnes
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libretro: Complete overhaul of video output code
- Vertical overscan masking is now adjustable. 0, 8, 12, or 16 pixels may be masked from both the top and bottom of the video output. - Aspect ratios are now calculated correctly, and the proper pixel aspect ratio will now be applied regardless of overscan settings. The 4:3 option will just use a 4:3 display aspect ratio regardless of overscan settings. - Base sizes have been adjusted to reflect the ideal base sizes rather than the doubled sizes used internally. This makes the initial window size what one would reasonably expect instead of being doubled. - Masking off the Super Game Boy border now works as it should. The aspect ratios chosen for general usage will apply to the masked SGB video output. The NTSC filter will now also work properly with this mode active. Additionally, this setting is now independent from the general overscan masking setting.
- Loading branch information
Showing
4 changed files
with
81 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this @carmiker! Does this mean we can use shaders with the accurate bsnes ppu option without the distortion?
Currently accurate ppu doubles the resolution.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, but this paves the way. The internal rendering needs to be changed for the shader issue to be resolved, but I do know what the problem is and how to fix it -- the question is free time ;).
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, amazing man!! And thank you for all you've done thus far! 👍👊
Hopefully it'll get sorted, this is awesome news!! It's one of those little annoying quirks about bsnes.
I prefer accurate ppu but not distorted shaders lol.
You should merge most your changes into bsnes from jge. I love what you've done with the jge core. It's almost a complete overhaul. 😁
I added a request for bsnes/mainline retroarch to re-add support for powerfest 94 and campus challenge 1992. Near removed multi bin/track support after Higan v106. Would it be hard to re-add that back?
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bsnes-jg will eventually be ported to libretro, but first its internal API needs to be cleaned up to make the porting process clean.
The competition boards are complicated. They've been on my list for awhile, but it requires the right kind of motivation. One day, though.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last oddity I meant to mention regarding the competition carts.
Powerfest 94 works perfectly in the bsnes-mercury core on retroarch, but campus challenge 92 does not. I've never been able to get it to work, just a black screen.
In theory if powerfest works correctly, I don't know why campus challenge doesn't. I wonder if it something related to the bml file?
Both use 4 bin files loaded in succession from a bml file. Both use the scoring system. I've noticed that the bml file differs greatly between both.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the code from where both competition carts worked, just have to translate it to the modern codebase when I have the energy.
Staying on topic here, I have followed this commit up with two small commits that should fix the shader problem.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @carmiker!
Thanks for all you do and for taking the time to correspond on these issues.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @carmiker , I didn't want to clog this up any further but I had a question I'd figured I'd ask you since you're fixing bsnes libretro video code.
Does the fast PPU on bsnes libretro have some issue with shaders and games like trials of Mana where the resolutions switch?
When using the crt-geom deluxe shader on fast PPU the screen goes from blurry to sharp when transitioning from text screens back to gameplay.
Funny thing is, when using this exact same shader on the bsnes libretro accurate PPU it works perfectly and also on SNES9x libretro with no issues at all.
Now that you fixed it where shaders work on the accurate PPU core I was able to test this out. 😁
Is the bsnes fast PPU core not accounting for vertical resolutions correctly or something like the accurate ppu is? In theory I figured it'd work on both PPU settings but it seems something is different.
I opened an issue on this but figured I'd also seek help on the issue.
Apparently other emulators have had this issue. Here is one example:
agg23/openfpga-SNES#11
https://retropie.org.uk/forum/topic/18381/secret-of-mana-2-very-strange-blurry-to-sharp-problem
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joepogo the "fast" PPU adjusts the resolution such that the shader needs to adapt in the way you're describing. This is actually correct behaviour given what the base resolution is. Remember, the real SNES was never meant to run at such resolutions and you are going to get strange behaviour when using such hacks.
For the case of Seiken Densetsu 3, this is because the dialog boxes use double horizontal resolution. The SNES can switch video modes mid-frame, this is an example of it doing that, and it is also why dialog boxes in that game take up the full screen width. This game is actually one of the test cases I used when working on the video code, for this very reason. This is also why it makes sense for bsnes to always render at double horizontal resolution -- so that it can mix scanlines that are 256 pixels wide with ones that are 512 pixels wide without trouble. In cases where they are 256 wide, you just draw every pixel twice. The frontend handles the rest.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carmiker I wasn't sure where to post this but wow!! Thanks for bringing bsnes jge to libretro!! I'm keeping my eye out for the core to become to available through the online updater but I don't see it just yet.
One question, is it possible to backport a few of your commits to the libretro bsnes as well like the two campus challenge and powerfest games?
I can't wait to give bsnes jge a go once it becomes available! Does your jge build have an accurate and performance ppu?
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joepogo the bsnes-jg libretro core should become available in the next day or two.
It is possible to bring better support for the competition carts to the non-jg bsnes core, all it requires is to update the BML databases and add some routines to handle multi-ROM .sfc files. The codebase has significantly changed though, so doing the file loading details in the nall-based bsnes might be challenging.
bsnes-jg only has the accurate PPU. This is by design, as I want my fork to focus on accuracy and maintainability. It offers the original SNES/SFC experience with the only enhancement being sinc interpolation for the SPC700 (which is mostly accurate to real hardware, though this is another topic). Think of it as a low fat version of bsnes -- I was nearly tempted to call it bsnes-lophat ;).
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thank you as always for your responses and time @carmiker !
It's awesome to see your lophat :p build, it sounds like exactly what I'm looking for. 👊 Thank you for bringing it to libretro!
Yea, it'd still be cool to see some of your backports to the mainline branch of libretro bsnes too. Hopefully it won't be too much to do so, especially the challenge carts.
It's also easy to merge these with whatever gets added to the actual mainline branch of just bsnes.
I hope they figure out the wolverine/controller polling issue as well.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @carmiker , just making sure I'm not doing something wrong.
The jge core now shows up for you to download in the updater but trying to load the core fails and when I try to load any snes game there's no option to load it with jge.
I was gonna try to load the bml file for the two competition carts but there's no option to load it with jge either.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joepogo you will need to update the .info file. It may come tomorrow, as that was merged this morning. Maybe it's already there if you try to force an update. Just use a concatenated ROM with bsnes-jg, it has no support for rom folders or loading .bml manifests.
e285c58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll keep trying to update it. Whenever I try to load a zipped snes file it only gives me the options to load it on the other snes cores.
I was trying to initially load the folders that I had the competition carts but I found the zipped versions.
Will bsnes jge ever have the ability to load msu1 games as well?
Sorry for all the questions, just learning how to work through all of this. Appreciate your patience and time. :)