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

SGDK game freezes with umapped write on BlastEm depending on resources #32

Open
lucaspcamargo opened this issue Nov 28, 2022 · 5 comments

Comments

@lucaspcamargo
Copy link

I am writing a game using SGDK and marsdev. The issue is, when I compile with marsdev, if I uncomment all of my resources, the game crashes at launch or when loading the first level. The exact error varies, but it can be an illegal instruction, or unmapped access error. The same does not happen when using the Windows toolchain provided by SGDK, everything works fine. Same code, same resource files, same SGDK version, everything.

I have seen cases like this, in which it looks like the resource got corrupted somehow: (then it crashes)
Screenshot_20221124_183958

In that specific instance, if the sfx_fuse resource is commented out, the game loads as normal:
Screenshot_20221124_183837

In all cases, the ROM never gets larger than 1MB.

@lucaspcamargo lucaspcamargo changed the title SGDK game freezes with umapped write on BlastEm SGDK game freezes with umapped write on BlastEm depending on resources Nov 28, 2022
@andwn
Copy link
Owner

andwn commented Nov 28, 2022

Not entirely sure what is going on here. Maybe an optimization flag in my makelib messed something up because it works in a debug build but not release.

@lucaspcamargo
Copy link
Author

Oh, didn't think of doing a debug build of the lib. For now debug mode is ok, as I want to continue using marsdev, at least for development. If there is anything specific I can do to help debug this issue, I'll be glad to help.

@HTV04
Copy link

HTV04 commented Jun 5, 2023

Hey, just though I'd bump this issue, because I appear to be running into the same issue regardless of my optimization settings. I have no idea how to work around this. Could it be an issue with rescomp?

@andwn
Copy link
Owner

andwn commented Jun 6, 2023

There is a work in progress new version of Marsdev in the 'opt' branch that wraps SGDK rather than re-implementing it in a custom way. It may resolve the issue if it is not reproducible using vanilla SGDK, but it still needs a proper migration guide.

@HTV04
Copy link

HTV04 commented Jun 6, 2023

That fixed it, thanks!

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

3 participants