Splitting Assets from Code: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (Fixed pointer types) |
(Added sample ROM link) |
||
Line 126: | Line 126: | ||
You can use this, for instance, to load your assets right after the code segment by loading them into the address at <code>_codeSegmentRomEnd</code>. You don't ''need'' to create an object file with your buffer as you can just write to any RAM address you seem fit (for instance, you can just define <code>u8* buffer = 0x80000400</code> globally, and then treat it as a buffer) but it sure helps as the compiler/linker can potentially catch buffer overflows and/or segment overlapping. |
You can use this, for instance, to load your assets right after the code segment by loading them into the address at <code>_codeSegmentRomEnd</code>. You don't ''need'' to create an object file with your buffer as you can just write to any RAM address you seem fit (for instance, you can just define <code>u8* buffer = 0x80000400</code> globally, and then treat it as a buffer) but it sure helps as the compiler/linker can potentially catch buffer overflows and/or segment overlapping. |
||
You can see an implementation of this buffer method |
You can see an implementation of this buffer method [https://github.com/n64brew/N64-Codesplit-Tutorial/tree/main/splitdata-binram here]. |
||
== Finalizing the code == |
== Finalizing the code == |