Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libretro: Support blargg's NTSC filter #294

Merged
merged 1 commit into from
Aug 6, 2023
Merged

libretro: Support blargg's NTSC filter #294

merged 1 commit into from
Aug 6, 2023

Conversation

carmiker
Copy link
Contributor

@carmiker carmiker commented Aug 5, 2023

This adds support for all four of blargg's NTSC filter options to the libretro port of bsnes.

As a consequence of using the filter functionality, the pixel format has been changed to XRGB8888 (preferable to the awkward 0RGB1555 when considering cross-platform compatibility and it is seemingly deprecated anyway). It also now builds on musl-libc without patches.

Closes #289

@joepogo
Copy link

joepogo commented Aug 5, 2023

Wow!! Thank you so much @carmiker !!! 😁 I guess it'll take a little bit to get this committed and then it'll need to be merged with libretro right? I'm wondering I'm the meantime if it's possible to try to compile the dll myself to test this out on retroarch. Thank you so much man! It's great to be able to have these built in and make the classics really shine!!

Hmm..edit. tried to compile this and getting compile errors. :(

@carmiker
Copy link
Contributor Author

carmiker commented Aug 5, 2023

If you post the errors, perhaps the problem can be solved. There is nothing in this commit that should break the build.

@greenchili2
Copy link

Retroarch libretro BSNES Git is here.. https://github.com/libretro/bsnes-libretro/tree/master/bsnes and although bsnes-emu/bsnes is the master the Retroarch Libretro git is 99 commits ahead and 1 commit behind here.

https://github.com/libretro/bsnes-libretro/blob/master/bsnes/target-libretro/libretro.cpp
https://github.com/libretro/bsnes-libretro/blob/master/bsnes/target-libretro/program.cpp

There are numerous changes as well as changes in the names of the retropad defines, etc. ( and who knows what else ).

@Screwtapello
Copy link
Contributor

I can't easily test this myself, since I don't use RetroArch. I was a little worried that the code seemed to be adding calls to blargg's filtering code but not actually adding the filtering code to the build system... but apparently it has always linked the filtering code even though nothing has ever used it before? Weird, but as long as it works, I guess.

@Screwtapello Screwtapello merged commit 18afbc3 into bsnes-emu:master Aug 6, 2023
8 checks passed
@greenchili2
Copy link

I can't easily test this myself, since I don't use RetroArch. I was a little worried that the code seemed to be adding calls to blargg's filtering code but not actually adding the filtering code to the build system... but apparently it has always linked the filtering code even though nothing has ever used it before? Weird, but as long as it works, I guess.

That is what it looked like to me as well. That it was linked but some of the code that selects the filter used was removed and it defaulted to none?

@carmiker
Copy link
Contributor Author

carmiker commented Aug 6, 2023

The filter was never actually used at all, it was just using the raw pixel buffer directly out of the PPU. The "None" filter type merely converts the pixel buffer to a 32-bit format from 16-bit. Why was it being built? I'm not really sure either, but it appears the libretro build is piggybacking on other parts of the build system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Please add Blarggs NTSC SNES filters
4 participants