-
Notifications
You must be signed in to change notification settings - Fork 14
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
Research the cause(s) of major issues preventing 1.5.2, and therefor BTWCE, from running on ARM64 macOS machines. #45
Comments
Potential method for testing the first bullet-point would be to create a hello world program that uses LWJGL2 and the deprecated If the colors do invert in the former but not the latter, then we have the culprit. However, a fix in that case would be a really big project, as it'd involve porting the 1.5.2 client window code to use a somewhat more modern class, instead of the Applet class. |
This if statement seems to set the colors according to ByteOrder, might be worth investigating, I think you can fix the issue there. My guess is that ByteOrder reports an incorrect endianness for the colorspace in windowed. |
Ill try it in a second, thanks. |
@SimonMeskens yeah i'm not entirely sure thats the right spot, but it goes give me a lead! I did manage to get the colors of biome-colored block textures (grass for instance) and particles to look correct with a bit of tinkering in that class; this confirmed that the main color-in-window-space issue is because Apple's Metal-GL Driver seems to take color bytes in a different order than what the Applet window seems to supply them; seemingly as |
if it renders correctly in windowed, just check whether you are windowed or fullscreen and adapt accordingly? |
Thing is, that'll break compat with non Apple ARM64 machines; and is a rather large bodge if you ask me; and fails to fix the other core issues with ARM64 macOS rn. I'm going to look into the now-deprecated Applet class and see if its possible to redistribute a version of that class which fixes the bugs present, maybe? That's almost certainly the easiest fix that doesn't break any existing compatibility hopefully. |
Update: Applet doesn't seem to be the direct source of the bugs; resize softlock seems to occur specifically when the game tries to change the "internal" resolution in order to use space more efficiently I think? |
lwjgl: https://github.com/craftycodie/MineOnline/raw/main/src/main/resources/libraries/org/lwjgl/lwjgl-mac-m1/2.9.3/lwjgl-mac-m1-2.9.3.jar Can someone with a Mac M1 try these two libraries and see if that fixes the issue? |
MultiMC installation guide, could use confirmation it works: https://gist.github.com/SimonMeskens/9ddc16cb4fe6f20a74c191e7868e7978 |
Unless those binaries are different than other ones that are compiled for Apple Silicon support, that wont work |
@SimonMeskens Confirmed to not fix the issue. Native binaries actually make it slightly worse, somehow |
Note that afaik the binaries you linked are pretty much the same as any other LWJGL2 binaries which were compiled for macOS on Apple SIlicon, and none of those have made it work, either. |
MinecraftMachina/ManyMC#39 this is good news: While the issue isn't fixed fully, the ManyMC launcher makes it possible to run Minecraft 1.5.2 with normal rendering behaviors in fullscreen mode only on Apple Silicon Macs running macOS. Best course of action is probably to add documentation about this to various places people can download BTW:CE. |
Even more good news! betacraftuk/legacyfix#1 |
Closing as fixed since it has been for a while. For posterity, the issue was with certain AWT and Canvas related classes, which required backporting the 1.6.x+ style of applet drawing to 1.5.2 to fix. |
The issues are:
When not in fullscreen, the red and blue color bytes rendered to the screen invert. This does not occur due to an issue with render code; as screenshots show the correct colors. Possibly related to the now-deprecated
java.applet.Applet
class?When the game is not in fullscreen mode, resizing the game window often causes the rendering process of the game to hang, though the rest of the game seems to continue running. Almost certainly caused by an interaction between
java.applet.Applet
and this bug https://bugs.openjdk.java.net/browse/JDK-8221261 in openjfx.When in fullscreen, the game only renders fully in the bottom left fourth of the screen. The skybox color will render in the unused space when actually in-game. I have no clue as to why this happens, though if I had to bet, it's probably something to do with
java.applet.Applet
orjava.awt.*
?If anyone wants to help dig into this, and they have a Apple Silicon device to test stuff on, please let me know.
The text was updated successfully, but these errors were encountered: