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

Doesn't work on big-endian architectures #468

Open
Heath123 opened this issue May 18, 2023 · 4 comments
Open

Doesn't work on big-endian architectures #468

Heath123 opened this issue May 18, 2023 · 4 comments
Labels
bug MAJOR BUG Breaks CEmu / completely wrong or unusable emulation...

Comments

@Heath123
Copy link

(Thanks for reporting an issue! Please make sure to fill out the blanks below.)

What's wrong, and with what software version?

Operating System: Debian for big-endian PowerPC emulated under qemu-user, or the Casio CG50 calculator
CEmu version: … (see in the About CEmu menu) I'm using the SDL GUI so there is no menu but it's the latest commit from GitHub
Describe your issue:
This happens:
[CEmu] NMI reset caused by writing to the stack limit at address 000000. Hint: Probably a stack overflow (aka too much recursion).
and I see a black screen

What are the steps to reproduce this issue?

  1. Modify the SDL build to actually print out the messages like this:
void gui_console_printf(const char *format, ...)
{
    va_list args;
    va_start(args, format);
    vprintf(format, args);
    va_end(args);
}

void gui_console_err_printf(const char *format, ...)
{
    va_list args;
    va_start(args, format);
    vfprintf(stderr, format, args);
    va_end(args);
}
  1. Compile it for a big-endian system
  2. Run it with cemu-sdl -r /ti-84ce.rom and see this

Any logs, error output, screenshot, other comments...?

[CEmu] NMI reset caused by writing to the stack limit at address 000000. Hint: Probably a stack overflow (aka too much recursion).
image

@adriweb adriweb added bug MAJOR BUG Breaks CEmu / completely wrong or unusable emulation... labels May 18, 2023
@Heath123
Copy link
Author

There seem to be a lot of unions and bitfields that assume a little-endian CPU

@Heath123
Copy link
Author

By putting __attribute__((scalar_storage_order("little-endian"))) everywhere I'm starting to get it working:
image

@Heath123
Copy link
Author

This is what I’m doing with it:
19153332-BEB8-4767-AEA8-5C3E5A5FBCA1

@HurricanePootis
Copy link

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug MAJOR BUG Breaks CEmu / completely wrong or unusable emulation...
Development

No branches or pull requests

3 participants