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

big-endian host support #75

Open
Exzap opened this issue Jun 15, 2023 · 2 comments
Open

big-endian host support #75

Exzap opened this issue Jun 15, 2023 · 2 comments

Comments

@Exzap
Copy link

Exzap commented Jun 15, 2023

I'm trying to port Boxedwine to a big-endian 32bit PowerPC platform, and I ran into a crash in the elf loader due to it assuming little-endian native types. If I were to fix this, would I run into other issues further down the line?

There are traces of the intent to support arbitrary host endianness in the code (e.g. via setting UNALIGNED_MEMORY macro). But I can't tell if it's implemented everywhere and if not, what the scope of the missing support is?

Granted, big-endian is pretty much dead so I would understand if this is just not something this project wants to bother with.

@danoon2
Copy link
Owner

danoon2 commented Jun 15, 2023

I would think there is a good chance that the normal cpu emulation with no JIT might work on PPC. I have never run on a big-endian system, but the normal cpu emulation is based on Dosbox which does support that. It does work with WASM/Emscripten which is what uses that UNALIGNED_MEMORY define. It's not big endian but it did have limits on how memory can be accessed.

I did a search for (U32*) casting and only found a couple suspicious places. One is my native icon reading for Boxedwine UI. Another is drawing pixels to the screen.

Overall, I don't see any obvious issues with big endian except for the possibility of pixel color issues which would be easy for fix if you get that far.

@Exzap
Copy link
Author

Exzap commented Jun 15, 2023

Thanks for the response! I will see how far I can get and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants