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

Swapped RGB channels on Big Endian 64bits #444

Open
5 tasks done
Link4Electronics opened this issue Nov 23, 2024 · 1 comment
Open
5 tasks done

Swapped RGB channels on Big Endian 64bits #444

Link4Electronics opened this issue Nov 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Link4Electronics
Copy link

Before opening this issue, I ensure that...

  • I have read the FAQ and confirmed my issue is not mentioned in it.
  • I have checked both open and closed issues and confirmed this bug has not already been reported.
  • I am not asking for tech support (e.g. game closing on startup, error when trying to build, etc).
  • I am not asking for modding support or reporting a bug in a specific mod; this bug either occurs without mods enabled or is directly related to the mod loader.
  • This bug is not related to any unofficial fork/port of the decompilation, and any issues with those should be kept in the appropriate repository.

Expected Behavior

render with corrected rgb channels

Actual Behavior

it seems they're swapped

Steps to Reproduce

I compiled the project on a PowerMac G5 running Linux Debian sid PPC64, using a AMD Radeon R5 230 Terascale 2 gpu Mesa 24.1.6 drivers with OpenGL 3.2 exposed, the game works but as the attached screenshots. The menu renders like some polygons spike artifacts. JOC, Sonic Mania renders correctly without issues.

Screenshots

Screenshot_2024-11-23_05-39-11
Screenshot_2024-11-23_05-40-12
Screenshot_2024-11-23_05-38-56

Log File

No response

Decompilation Version

Compiled the most current

Game

Sonic 2

Game Version

Mobile (Pre-Sega Forever)

Game Revision

No response

Platform

Linux PPC64

Additional Comments

Best regards,
Link.

@Link4Electronics Link4Electronics added the bug Something isn't working label Nov 23, 2024
@Link4Electronics
Copy link
Author

Link4Electronics commented Nov 26, 2024

Made some progress here, messing around with Palette.hpp
#define RGB888_TO_RGB5551(r, g, b) (((b) << 3) | ((g) >> 3) | ((r) >> 3 << 11) | 0)
#define RGB888_TO_RGB565(r, g, b) ((b) << 3) | ((g) >> 3) | ((r) >> 8)
gives this result
Screenshot_2024-11-26_00-43-36
Screenshot_2024-11-26_00-44-11
Looks like a red tint applied over and the 3D graphics menu still screwed over.

Best regards,
Link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant