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

SGB border visual glitch #3191

Closed
chiascuro opened this issue Apr 18, 2024 · 9 comments
Closed

SGB border visual glitch #3191

chiascuro opened this issue Apr 18, 2024 · 9 comments
Labels
hardware:2D Issues in the 2D/pixel pipeline subsystem platform:GB/GBC Game Boy/Game Boy Color-related issues software:romhack Issues in ROM hacks
Milestone

Comments

@chiascuro
Copy link

chiascuro commented Apr 18, 2024

This was tested on mgba version 10.2, 10.3 and the latest development build (2024-04-17)
Game: Pokémon Crystal Clear (Romhack) link: https://shockslayer.com/crystal-clear/ (I included the patch files in the zip)
Patched here (official site) with SGB mode enabled https://inject.sigkill.tech/patch/cc
Tried both, Version 1.0 and 1.1 of Pokémon Crystal as the base

Video of the issue/how to replicate it
Basically, opening the Pokédex and closing it messes up the whole screen. Using the Pokédex, one can change the border color of the SGB Border (Cyan in the video), so it's probably just trying to update that. As seen in the video it can be fixed by switching party members as that also interacts with the SGB border.

This issue does not appear with the BGB emulator.

All other necessary information should be included in the automatically generated bug report zip file
bug report.zip

@endrift endrift added platform:GB/GBC Game Boy/Game Boy Color-related issues hardware:2D Issues in the 2D/pixel pipeline subsystem software:romhack Issues in ROM hacks labels Apr 18, 2024
@endrift endrift added this to the mGBA 0.10.4 milestone Apr 18, 2024
@endrift
Copy link
Member

endrift commented Apr 18, 2024

I thought I fixed this one already...it keeps coming back.

@endrift
Copy link
Member

endrift commented May 8, 2024

I remember now. This is actually a bug in Crystal Clear. I'm pretty sure it was fixed at some point. I backed out the patch that fixed it (8a87eaa) because it was clearly erroneous to include. It's not real hardware so there's no "well defined" way to do this, but it was special casing for one ROM hack so I didn't want to keep it. I guess bgb decided to leave that special casing in.

Please use an up-to-date version of Crystal Clear to confirm.

@endrift endrift added the blocked:needs retest Needs a retest to confirm if it's fixed label May 8, 2024
@chiascuro
Copy link
Author

I tried it with the latest patch (2.5.10), I didn't find the files for 2.5.9 so I couldn't try it with the older one. I tried both, the normal version and the color filter version. I tried it on my current mgba installation and on the latest development build. The bug still persists

@endrift endrift removed the blocked:needs retest Needs a retest to confirm if it's fixed label May 8, 2024
@endrift
Copy link
Member

endrift commented May 8, 2024

Hmm, alright, I'll take a closer look.

@endrift
Copy link
Member

endrift commented May 9, 2024

Reverting the reversion fixes it. Ugh. Looks like Crystal Clear still has the bug. I need to figure out if I work around their bug or pressure them to fix it instead.

@ShockSlayer
Copy link

No need for any pressure. I agree that mGBA should not have any special handling just for one hack. I thought I had fixed this on my end as of CC 2.5.3 by disabling OBJs when updating the border, but I've just checked both that version and the latest against mGBA 0.10.3 and I'm able to replicate this. I guess either I didn't properly fix this, or if I did, it was only partially, since updating the border seems to work correctly in most other places.

I've made a note of this, and I'll see if I can work it out before the next version. I apologize for any confusion and appreciate your insight into figuring this out.

@endrift
Copy link
Member

endrift commented May 21, 2024

Ah so I wasn't crazy! I didn't realize you had a GitHub account or I would have tagged you. I was discussing this with beware on the gbdev Discord and he said that the SGBC implementation in bgb is kind of ad hoc and not necessarily known to be well behaved, so we agreed to clean it up to make it more consistent. Hopefully it'll lead to it being caught before release if it regresses again.

@endrift endrift closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
@endrift
Copy link
Member

endrift commented May 23, 2024

@ShockSlayer While looking into this last night, beware noticed that you don't set BGP to $e4. Since this is a GBC-only game and that's a GB-only register that makes sense, but the SGB requires that for VRAM transfers to work properly. I don't think we're going to enforce that in SGBC, but it would be appreciated if you set it once on startup just for good measure, as that's what licensed titles that happen to upload borders in GBC mode do.

@ShockSlayer
Copy link

Cool. I'll make a note of that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardware:2D Issues in the 2D/pixel pipeline subsystem platform:GB/GBC Game Boy/Game Boy Color-related issues software:romhack Issues in ROM hacks
Projects
None yet
Development

No branches or pull requests

3 participants