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

decomp: shadow #681

Merged
merged 8 commits into from
Aug 9, 2021
Merged

decomp: shadow #681

merged 8 commits into from
Aug 9, 2021

Conversation

xTVaser
Copy link
Member

@xTVaser xTVaser commented Jul 7, 2021

No description provided.

@xTVaser xTVaser marked this pull request as draft July 7, 2021 02:17
@xTVaser xTVaser changed the title decomp: Almost finish shadow blocked on static inline-array decomp: shadow Jul 30, 2021
@xTVaser xTVaser marked this pull request as ready for review July 30, 2021 01:49

;; failed to figure out what this is:
(set!
(-> *part-id-table* 362)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there's a crash when this code is loaded. Maybe we haven't decompiled the file that creates *part-id-table* yet? You could try to find where it's defined and just add that part, or just comment this out for now (and maybe leave a comment near the top of the file so we don't forget this)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah we havn't. that's either sparticle or sparticle-launcher

@water111
Copy link
Collaborator

water111 commented Aug 3, 2021

In order to prevent the crash, you'll need the actual define, not just a define-extern. The define-extern just tells the compiler the type of *part-id-table*, but doesn't actually store anything in the symbol. The top-level code in shadow attempts to modify *part-id-table*, which crashes because nothing has defined that symbol. The default value of a symbol is 0, and in OpenGOAL, the first 1 MB of memory after 0x0 is intentionally unmapped so it crashes when trying to set a value in *part-id-table*.

You can add this to sparticle-launcher.gc and it should fix the crash:

(define *part-id-table* (new 'global 'boxed-array sparticle-launcher 3584))
(define *part-group-id-table* (new 'global 'boxed-array sparticle-launch-group 1024))

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1092496669

  • 1 of 6 (16.67%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.009%) to 68.109%

Changes Missing Coverage Covered Lines Changed/Added Lines %
decompiler/util/data_decompile.cpp 1 6 16.67%
Files with Coverage Reduction New Missed Lines %
goalc/listener/Listener.cpp 3 84.62%
Totals Coverage Status
Change from base Build 1092363797: -0.009%
Covered Lines: 39295
Relevant Lines: 57694

💛 - Coveralls

@water111 water111 merged commit f438ba4 into open-goal:master Aug 9, 2021
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

Successfully merging this pull request may close these issues.

3 participants