-
Notifications
You must be signed in to change notification settings - Fork 54
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
Green swap support #235
Comments
Ah - is that the undocumented mode in DISPCNT? Not sure how hard that would be to implement - can't speak for David but I might have a look at some point out of curiosity - although ultimately it's probably a bit far down the priority list given there's still issues with commercial games to resolve! Will keep you updated here tho. |
Yeah I am aware of this bit, however since no commercial games used it I did not bother :D |
I use it quite a bit, usually to mimic a short full screen blur:
|
Cool! Will give it a look! It might require some work since gpsp tries really hard to optimize stuff like palette writes and conversion (for speed) and there's palette calculations all over the place :D |
Isn't it just a full screen effect after the final image has been composed? According to gbatek, green swap "appears to be applied to the final picture (ie. after mixing the separate BG and OBJ layers)." Anyway, thanks a lot for looking at it. |
Ah right! For some reason I recalled it being like mosaic (with BG/OBJ bits), but it's just a full effect at the end! |
Hey @GValiente, I just opened draft PRs that implement Green Swap - PR #260 and PR #261. I used the mgba implementation as a guide. Looks pretty straightforward but any chance you can build and test it for me? It looks correct to me when I try the test ROM you gave in the first message but my eyes aren't what they used to be!!! @davidgfnet I added the code to video.cc rather than in post-processing in libretro.c - as this is a native effect rather an emulation feature this seemed more correct? |
Screen.Recording.2024-08-25.221816.mp4Just me pressing A at random times on your demo to toggle between AA on/off. Think it seems to be working ok? |
@GValiente I think I've fixed it - needed to use RGB565 values but also a dumb error on my part with overwriting the previous pixel value before getting the next green channel to swap. Please try testing again? Thanks! Screen.Recording.2024-08-26.143425.mp4 |
The new video looks better, yeah. Here's a test ROM, if you want to compare it against a real GBA and other emulators: green_swap.zip EDIT: I already posted it in the first post xD |
Thanks - yes I used green_swap.gba primarily to compare gpsp to mgba and Nanoboy when troubleshooting intially. The results are now pretty much identical since my latest commit to the PR. |
Thanks for your work on this core, compatibility is much better than I expected!
Most of Butano games and examples work without issues.
Would it be too hard to add support for the green swap effect?
I know that it's a niche thing and no commercial games used it, but it would be cool to see it on this core too.
Here's a test ROM and a couple of screenshots:
Test ROM
The text was updated successfully, but these errors were encountered: