Code segmentation guide: Difference between revisions
Added a note about which SDK will be used by the documentation
(Split filesystems / data compression into separate topics, use consistent case (title case) for all subtopic titles) |
(Added a note about which SDK will be used by the documentation) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1:
[[File:So_your_code_segment_is_over_1MB.png]]
You've been working hard on your Homebrew title, slowly adding in more content, when suddenly you realize that the game's having weird hanging issues related to any new assets that you've just added to your ROM. What gives?
== Why does the Code segment size matter? ==
Line 7:
When the console boots, the [[Initial Program Load]] which is contained in every ROM '''copies the first megabyte (1,048,576 bytes) of code to RAM and executes it'''. This means that if you've been linking your assets directly into your code segment, you can very quickly go past this 1MB limit.
Code by itself usually has a very small memory footprint (
== Where to go from here? ==
These pages are aimed at providing users who are new to embedded systems programming to work around this limitation. It is expected that you have '''a strong understanding of C'''.
Before you do anything, have a brief look over the code of the [https://github.com/n64brew/N64-Codesplit-Tutorial/tree/main/original original sample], as this is our "bad" starting ROM which we will improve upon. As soon as you've done that, look through the following pages (preferably in order):
* [[Splitting Assets from Code]]
Line 17 ⟶ 19:
* [[Data Compression]]
* [[Overlays]]
|