Register - Login
Views: 99378760
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-23-22 10:30:40 PM
Jul - SM64 Hacking (Archive) - Save file format info New poll - New thread - New reply
Next newer thread | Next older thread
MarIO0
Member
Level: 16


Posts: 1/43
EXP: 19155
For next: 1101

Since: 09-03-09


Since last post: 9.2 years
Last activity: 8.6 years

Posted on 09-03-09 02:25:13 PM (last edited by MarIO0 at 09-03-09 11:27 AM) Link | Quote
Probably not useful, but it may be interesting to test some things.




Structure of the EEPROM dump (512 bytes)
----------------------------------------
----------------------------------------
56 bytes - Save Data 1
56 bytes - Save Data 1 (backup)
56 bytes - Save Data 2
56 bytes - Save Data 2 (backup)
56 bytes - Save Data 3
56 bytes - Save Data 3 (backup)
56 bytes - Save Data 4
56 bytes - Save Data 4 (backup)
64 bytes - Padding / random data?

The game seems to check if the checksum of the main save data is valid, if it isn't, then it tries to load the backup, and if it's also invalid, it deletes the save data.

Save Data (56 bytes each)
-------------------------
-------------------------

Settings
--------
Byte 9 - Bit 1: Cap stolen by snowman
Byte 9 - Bit 2: Cap stolen by bird
Byte 9 - Bit 3: Cap stolen by monkey
Byte 9 - Bit 5: 3rd floor (50 star) door
Byte 10 - Bit 1: Unknown. Seems to be set when opening the DDR/BitFS room?
Byte 10 - Bit 2: Water level outside the castle
Byte 10 - Bit 3: Princess secret slide door
Byte 10 - Bit 4: Whomp's Fortress door
Byte 10 - Bit 5: Cool, Cool Mountain door
Byte 10 - Bit 6: Jolly Roger Bay door
Byte 10 - Bit 7: Bowser in the dark world (8 star) door
Byte 10 - Bit 8: Bowser in the fire sea (30 star) door
Byte 11 - Bit 1: Valid game (Game is empty otherwise)
Byte 11 - Bit 2: Wing cap switch
Byte 11 - Bit 3: Metal cap switch
Byte 11 - Bit 4: Vanish cap switch
Byte 11 - Bit 5: Bowser in the dark world key (disabled when the door is opened)
Byte 11 - Bit 6: Bowser in the fire sea key (disabled when the door is opened)
Byte 11 - Bit 7: Basement door open
Byte 11 - Bit 8: 2nd floor door open

Stars
-----
Byte n: Bit 1/2/3/4/5/6/7 - Stars 1/2/3/4/5/6/7
Byte n + 1: Bit 8 - Cannon

Bob-omb Battlefield: n = 12
Whomp's Fortress: n = 13
Jolly Roger Bay: n = 14
Cool, Cool mountain: n = 15
Big Boo's Haunt: n = 16
Hazy Maze Cave: n = 17
Lethal Lava Land: n = 18
Shifting Sand Land: n = 19
Dire, Dire Docks: n = 20
Slowman's Land: n = 21
Wet-Dry World: n = 22
Tall, Tall Mountain: n = 23
Tiny-Huge Island: n = 24
Tick Tock Clock: n = 25
Rainbow Ride: n = 26

Secret stars
------------
Byte 8: Bit 1 - Toad near Hazy Maze Cave
Byte 8: Bit 2 - Toad near Tall, Tall Mountain
Byte 8: Bit 3 - Toad near Tick Tock Clock
Byte 8: Bit 4 - MIPS 1
Byte 8: Bit 5 - MIPS 2
Byte 27: Bit 1 - Bowser in the dark world*
Byte 28: Bit 1 - Bowser in the fire sea
Byte 29: Bit 1 - Bowser in the sky
Byte 30: Bit 1 - Princess slide
Byte 30: Bit 2 - Princess slide 21'
Byte 31: Bit 1 - Metal cap star
Byte 32: Bit 1 - Wing cap star
Byte 33: Bit 1 - Vanish cap star
Byte 34: Bit 1 - Flying special level
Byte 35: Bit 8 - Flying special level (cannon)
Byte 35: Bit 1 - Aquarium

* = Uses the same byte as the Rainbow Ride cannon!

"Unused" stars
--------------
All the bytes of the stars (8 + 12 to 35), plus byte 36, can be used to store stars. The stars should be saved in the low 7 bits, and the high bit is used to store the cannon flag.

The maximum number of stars (in the save file) is 26 * 7 = 182.

Coins
-----
The coins are saved in:

Bob-omb Battlefield: Byte 37
Whomp's Fortress: Byte 38
Jolly Roger Bay: Byte 39
Cool, Cool mountain: Byte 40
Big Boo's Haunt: Byte 41
Hazy Maze Cave: Byte 42
Lethal Lava Land: Byte 43
Shifting Sand Land: Byte 44
Dire, Dire Docks: Byte 45
Slowman's Land: Byte 46
Wet-Dry World: Byte 47
Tall, Tall Mountain: Byte 48
Tiny-Huge Island: Byte 49
Tick Tock Clock: Byte 50
Rainbow Ride: Byte 51

Checksum
--------
52: 2 bytes - Always 0x4441?
54: 2 bytes - Checksum-16 (Sum of all bytes to a 16-bit integer) of the data (from 0 to 54).

Unknown or unused
-----------------
Bytes 0 to 7.
Some bits, probably unused.

Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 3339/12211
EXP: 99235331
For next: 638240

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 09-03-09 11:44:58 PM Link | Quote

Time/Date

09-03-09 05:44:58pm

Posts

3339

Days Here

793

Level

84
Metal_Man88
Local Moderator
Eh, save file data may be useful if people want to change what is saved/how things are saved/etc. so I figure it's useful.

If it wasn't, this topic would be in the trash. :p

____________________
Original Layout © Tobias Kelmandia
Next newer thread | Next older thread
Jul - SM64 Hacking (Archive) - Save file format info New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

29 database queries.
Query execution time:  0.100022 seconds
Script execution time:  0.012690 seconds
Total render time:  0.112712 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 2 column 300 - Warning: unescaped & or unknown entity "&page"
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 192 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 177 column 101 - Warning: unescaped & or unknown entity "&postid"
line 304 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 306 column 9 - Warning: missing <tr>
line 324 column 13 - Warning: missing <tr>
line 325 column 101 - Warning: unescaped & or unknown entity "&postid"
line 327 column 74 - Warning: <style> isn't allowed in <td> elements
line 327 column 9 - Info: <td> previously mentioned
line 327 column 961 - Error: <z> is not recognized!
line 327 column 961 - Warning: discarding unexpected <z>
line 327 column 983 - Warning: discarding unexpected </z>
line 327 column 1009 - Error: <z> is not recognized!
line 327 column 1009 - Warning: discarding unexpected <z>
line 327 column 1016 - Warning: discarding unexpected </z>
line 327 column 1046 - Error: <z> is not recognized!
line 327 column 1046 - Warning: discarding unexpected <z>
line 327 column 1052 - Warning: discarding unexpected </z>
line 327 column 1078 - Error: <z> is not recognized!
line 327 column 1078 - Warning: discarding unexpected <z>
line 327 column 1083 - Warning: discarding unexpected </z>
line 332 column 17 - Warning: missing <tr>
line 332 column 17 - Warning: discarding unexpected <table>
line 335 column 35 - Warning: missing <tr>
line 335 column 50 - Warning: missing </font> before </td>
line 335 column 91 - Warning: missing </font> before </table>
line 337 column 35 - Warning: missing <tr>
line 337 column 50 - Warning: missing </font> before </td>
line 338 column 37 - Warning: unescaped & or unknown entity "&id"
line 337 column 192 - Warning: missing </font> before </table>
line 339 column 17 - Warning: discarding unexpected </textarea>
line 339 column 28 - Warning: discarding unexpected </form>
line 339 column 35 - Warning: discarding unexpected </embed>
line 339 column 43 - Warning: discarding unexpected </noembed>
line 339 column 53 - Warning: discarding unexpected </noscript>
line 339 column 64 - Warning: discarding unexpected </noembed>
line 339 column 74 - Warning: discarding unexpected </embed>
line 339 column 82 - Warning: discarding unexpected </table>
line 339 column 90 - Warning: discarding unexpected </table>
line 341 column 9 - Warning: missing </font> before <table>
line 353 column 25 - Warning: discarding unexpected </font>
line 362 column 37 - Warning: discarding unexpected </font>
line 340 column 1 - Warning: missing </center>
line 120 column 63 - Warning: <img> lacks "alt" attribute
line 125 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 125 column 93 - Warning: <img> lacks "alt" attribute
line 141 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 141 column 98 - Warning: <img> lacks "alt" attribute
line 148 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 245 - Warning: <img> proprietary attribute value "absmiddle"
line 161 column 22 - Warning: <img> lacks "alt" attribute
line 161 column 63 - Warning: <img> lacks "alt" attribute
line 161 column 112 - Warning: <img> lacks "alt" attribute
line 161 column 162 - Warning: <img> lacks "alt" attribute
line 172 column 15 - Warning: <img> lacks "alt" attribute
line 308 column 17 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 17 - Warning: <img> lacks "alt" attribute
line 308 column 60 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 60 - Warning: <img> lacks "alt" attribute
line 308 column 103 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 103 - Warning: <img> lacks "alt" attribute
line 308 column 146 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 146 - Warning: <img> lacks "alt" attribute
line 308 column 189 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 189 - Warning: <img> lacks "alt" attribute
line 308 column 232 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 232 - Warning: <img> lacks "alt" attribute
line 308 column 275 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 275 - Warning: <img> lacks "alt" attribute
line 308 column 318 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 318 - Warning: <img> lacks "alt" attribute
line 308 column 361 - Warning: <img> proprietary attribute value "absmiddle"
line 308 column 361 - Warning: <img> lacks "alt" attribute
line 309 column 23 - Warning: <img> lacks "alt" attribute
line 309 column 64 - Warning: <img> lacks "alt" attribute
line 309 column 113 - Warning: <img> lacks "alt" attribute
line 309 column 163 - Warning: <img> lacks "alt" attribute
line 310 column 11 - Warning: <img> lacks "alt" attribute
line 320 column 15 - Warning: <img> lacks "alt" attribute
line 327 column 1516 - Warning: <img> lacks "alt" attribute
line 327 column 1726 - Warning: <img> lacks "alt" attribute
line 327 column 1814 - Warning: <img> lacks "alt" attribute
line 327 column 2058 - Warning: <img> lacks "alt" attribute
line 329 column 2505 - Warning: <img> lacks "alt" attribute
line 329 column 2694 - Warning: <img> lacks "alt" attribute
line 338 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 338 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 338 column 245 - Warning: <img> proprietary attribute value "absmiddle"
line 347 column 25 - Warning: <img> lacks "alt" attribute
line 352 column 267 - Warning: <img> lacks "alt" attribute
line 149 column 50 - Warning: trimming empty <font>
line 332 column 17 - Warning: trimming empty <tr>
line 335 column 50 - Warning: trimming empty <font>
line 125 column 68 - Warning: <nobr> is not approved by W3C
line 141 column 68 - Warning: <nobr> is not approved by W3C
line 177 column 27 - Warning: <nobr> is not approved by W3C
line 325 column 27 - Warning: <nobr> is not approved by W3C
line 327 column 1595 - Warning: <td> proprietary attribute "background"
line 327 column 1895 - Warning: <td> proprietary attribute "background"
line 327 column 2148 - Warning: <table> proprietary attribute "height"
line 329 column 2586 - Warning: <td> proprietary attribute "background"
Info: Document content looks like HTML5
Info: No system identifier in emitted doctype
Tidy found 113 warnings and 4 errors!

The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md