-
Notifications
You must be signed in to change notification settings - Fork 44
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
Golden Sun sprite priority #38
Comments
That's really interesting behavior. To do that, we would need to seperate the color data from the priority/alpha data for the sprite drawing and save them seperatly until mixing. |
I did a quick shot with my emulator: if i allow updating prio and alpha even when the pixel is transparent, it works with the ice. I could implement that in the FPGA, too. However i'm not sure if it will break anything.... |
Paul, are you going it fix it or should i take a look? Just in case we don't do double work. |
I am not working on it currently so you can go ahead! |
fixed |
Can I get that hacked up bld demo ROM that's broken in mGBA, or a savestate of Golden Sun? |
Here is the bld_demo hack. I have added a screenshot with expected behavior: sprite behind the background, a small part on the left above the background and Semi-Transparency on mode 0 should not happen on that part. mGBA is only incorrect on the Semi-Transparency part. |
Reported here with the Japanese version: http://www.atari-forum.com/viewtopic.php?p=389976#p389976
Save file
This is some interesting behavior. The ice is BG1/2 with priority 2 and the player sprite is sprite 0 with priority 3.
However when the player should be on top of the ice then the game places normal sprites with transparent tiles with priority 2 on top of sprite 0 at sprite 2/3. This changes the priority of sprite 0 to priority 2.
I have (poorly) hacked bld_demo.gba with a hex editor to do the same thing and tested it on GBA hardware and got the same behavior.
Note that this also changes the Semi-Transparent pixels to normal pixels because the blending on the sprite in bld_demo.gba does not happen anymore when Special effects are disabled. mGBA almost has the correct behavior except for this part.
So in summary when a sprite overlaps a sprite with lower priority then the GBA overwrites the priority and Semi-Transparent bit but not the pixels if they are transparent.
The text was updated successfully, but these errors were encountered: