From 59695c3df2ba6bacac5dc202d1eb732df61b91fc Mon Sep 17 00:00:00 2001 From: Hiram Anderson <37224753+hjk321@users.noreply.github.com> Date: Tue, 6 Apr 2021 17:45:09 -0500 Subject: GHG Credit --- Extra-save-space-with-two-lines-of-code.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Extra-save-space-with-two-lines-of-code.md') diff --git a/Extra-save-space-with-two-lines-of-code.md b/Extra-save-space-with-two-lines-of-code.md index 19b0b13..4ae99bd 100644 --- a/Extra-save-space-with-two-lines-of-code.md +++ b/Extra-save-space-with-two-lines-of-code.md @@ -41,4 +41,7 @@ struct SaveSection So, we have the `data` array which is the game data itself. Everything else is the footer data we were talking about, which pertains to the save sector itself. But, wait a minute... That's only 12 bytes of footer data, not 128! Also, there's `0xFF4` (4084) bytes of data in `data`, when we saw with the two constants above that only 3968 of those bytes are being written to! That's a difference of **116** bytes in the sector that is completely unused! -All this two line fix is doing is taking the unused bytes from the footer and writing game data to it instead. 116 bytes is not a huge amount, but remember that these bytes are being saved in *all 32 sectors*, which adds up to a combined 3.6 kilobytes of extra space. Not too shabby! \ No newline at end of file +All this two line fix is doing is taking the unused bytes from the footer and writing game data to it instead. 116 bytes is not a huge amount, but remember that these bytes are being saved in *all 32 sectors*, which adds up to a combined 3.6 kilobytes of extra space. Not too shabby! + +*** +Tutorial by [GHG](https://github.com/great-hacking-group) \ No newline at end of file -- cgit v1.2.3