ROM Hack Another Metroid Samus Returns Save Editor

Khaos-Void

Member
OP
Newcomer
Joined
Oct 31, 2017
Messages
10
Trophies
0
Location
Net Slum
XP
72
Country
United States
I've been a lurker on the forum for quite some time now, and after stumbling on the save editor by rog9001, I felt I could contribute by continuing the development for a save editor.

Based on the findings by BtEtta (thanks for the parsing of the [POST=7594961]format[/POST] and file viewer!), I will be creating a very graphically appealing save editor. All I'll say for now is, imagine what the inventory and save file screens look like ;)

This thread will be dedicated to the discussion of the save data. All block related information will be posted here.

Early Releases
SaveDataReaderProto v0.4: https://github.com/KhaosVoid/AMSRSE/releases/tag/SaveDataReaderProto-v0.4
sdrp-screenshot-v0.4.png

A proof of concept that works with the data in the common.bmssv inventory block. Currently supports all values found in the block. Will work fine for users just looking to tweak their loadout or toggle the baby metroid.
 
Last edited by Khaos-Void,

Khaos-Void

Member
OP
Newcomer
Joined
Oct 31, 2017
Messages
10
Trophies
0
Location
Net Slum
XP
72
Country
United States
Here's what's known (or hypothesized thus far):

common.bmssv Data (Based on 100% save)
Block Manifest[FLOAT='right'](Length: 12 Blocks)[/FLOAT]
Code:
Block ID    Block Name                                               # Chunks
-----------------------------------------------------------------------------
D97207D2    Items Collected (By Area)                                      10
CB17C79F    <unknown>                                                      30
C72341EA    Misc Data (May contain collected items & totals)               73
68E39AC0    <unknown>                                                      41
1C421E97    Save / Spawn Location                                           5
6F49393E    Cutscenes / Tutorial Messages?                                 30
C1BED709    <unknown>                                                      28
BDBE58A1    <unknown>                                                      36
3814CFC7    Metroids Killed (By Type)                                       7
BC6C23CE    Teleport Stations Visited / Unlocked?                          24
63580F44    <unknown>                                                      63
FEBC51D5    Inventory                                                      34
Block: D97207D2 - Items Collected (By Area)[FLOAT='right'](Length: 10 Chunks)[/FLOAT]
Code:
Chunk ID    Data Type    Chunk Data    Value              Description
-----------------------------------------------------------------------------
C59C2CEE    0x75         D97207D2      D97207D2           Block ID
1F6E32DA    0x69         0E000000      14                 Surface
1DD4CC59    0x69         0E000000      14                 Area 1
9A3461E1    0x69         12000000      18                 Area 2
E7940589    0x69         15000000      21                 Area 3
D5F34B4B    0x69         15000000      21                 Area 4
2FB3829B    0x69         17000000      23                 Area 5
5213E6F3    0x69         0C000000      12                 Area 6
77DB0BAC    0x69         0D000000      13                 Area 7
DED6C283    0x69         0E000000      14                 Area 8
Block C72341EA - Misc Data (Still being mapped)[FLOAT='right'](Length: ? Chunks)[/FLOAT]
Code:
Chunk ID    Data Type    Chunk Data    Value         Description
-----------------------------------------------------------------------------
C59C2CEE    0x75         C72341EA      C72341EA      Block ID
A58344DF    0x66         0000C642      99            Max Energy Number?
CF1F63A9    0x66         0000FA43      500           Max Aeion Dropped?
02C9EFE3    0x66         0000F041      30            Large Energy Drop?
D48F6F4D    0x66         00002041      10            Small Energy Drop?
A0155E8F    0x69         02000000      2             Missile Drop?
0DD64AC8    0x62         01            1             Power Bomb Drop?
AC804A60    0x63         [string]      samus         Power Bomb Drop?
CD978BA7    0x69         00000000      0
8E60825E    0x69         E4CD0B00      773604
0E308714    0x63         [string]      [!#GUI_MI...  String Format for Load Screen? (Full string: [!:#GUI_MISC003] / 08:36:42 / 0%)
740158CE    0x63         [string]
1D484F69    0x66         2634F246      31002.074...  Mission Time (seconds)
D91DFDA0    0x62         01            1
6F73FBEA    0x62         01            1
BC1556C6    0x62         01            1
05EFDCBE    0x62         01            1
D281B2D7    0x62         01            1
C83950F4    0x62         01            1
C6834964    0x62         01            1
1F6E32DA    0x69         0E000000      14            Surface Collected Items
1DD4CC59    0x69         0E000000      14            Area 1 Collected Items
9A3461E1    0x69         12000000      18            Area 2 Collected Items
E7940589    0x69         15000000      21            Area 3 Collected Items
D5F34B4B    0x69         15000000      21            Area 4 Collected Items
2FB3829B    0x69         17000000      23            Area 5 Collected Items
5213E6F3    0x69         0C000000      12            Area 6 Collected Items
77DB0BAC    0x69         0D000000      13            Area 7 Collected Items
DED6C283    0x69         0E000000      14            Area 8 Collected Items
1A0AC730    0x62         01            1             Surface: Alpha Metroid?
A4EDC5C7    0x69         01000000      1             Surface: Metroid DNA?
40012D3D    0x63         [string]      LE_ChozoU...  Current Event? (Full string: LE_ChozoUnlockAreaDNA)
B7DF5468    0x63         [string]      s000_surface  Current Event Location?
Block: 3814CFC7 - Metroids Killed (By Type)[FLOAT='right'](Length: 7 Chunks)[/FLOAT]
Code:
Chunk ID    Data Type    Chunk Data    Value              Description
-----------------------------------------------------------------------------
C59C2CEE    0x75         3814CFC7      3814CFC7           Block ID
91E9DEEE    0x69         11000000      17                 Alpha Metroids
8A007DFA    0x69         0E000000      14                 Gamma Metroids
D22BF145    0x69         04000000      4                  Zeta Metroids
C14D2774    0x69         04000000      4                  Omega Metroids
7B7D796F    0x69         0A000000      10                 Normal Metroids
4164D39C    0x69         01000000      1                  Metroid Queen
Block BC6C23CE - Teleport Stations Visited / Unlocked?[FLOAT='right'](Length: 24 Chunks)[/FLOAT]
Code:
Chunk ID    Data Type    Chunk Data    Value              Description
-----------------------------------------------------------------------------
C59C2CEE    0x75         BC6C23CE      BC6C23CE           Block ID
2CF2329C    0x63         [string]      s000_surface
49958E24    0x63         [string]      s010_area1
A73A3B36    0x63         [string]      s028_area2c
1D6B32AF    0x63         [string]      s020_area2
28CE5146    0x63         [string]      s025_area2b
8B5B35D8    0x63         [string]      s020_area2
F0D5D046    0x63         [string]      s030_area3
C25D878E    0x63         [string]      s036_area3c
9AFE7998    0x63         [string]      s033_area3b
20AF7001    0x63         [string]      s033_area3b
7B655013    0x63         [string]      s040_area4
1E02ECAB    0x63         [string]      s050_area5
F915148F    0x63         [string]      s060_area6
9946D4F5    0x63         [string]      s067_area6c
296FB4C8    0x63         [string]      s065_area6b
43441D16    0x63         [string]      s060_area6
2F9BEC98    0x63         [string]      s070_area7
95CAE501    0x63         [string]      s070_area7
A6BD3AE1    0x63         [string]      s090_area9
1CEC3378    0x63         [string]      s090_area9
268A5B38    0x63         [string]      s100_area10
9CDB52A1    0x63         [string]      s100_area10
0BC34B3B    0x63         [string]      s000_surface
Block: FEBC51D5 - Inventory[FLOAT='right'](Length: 34 Chunks)[/FLOAT]
Code:
Chunk ID    Data Type    Chunk Data    Value         Description
-----------------------------------------------------------------------------
C59C2CEE    0x75         CB17C79F      CB17C79F      Block ID
09E50EEE    0x66         00004842      50            Total Metroids
55F1D6B6    0x66         00008443      264           Max Missiles
FE981519    0x66         00004842      50            Metroids Killed
70833890    0x66         00608944      1099          Max Energy
E9877735    0x66         0000A041      20            Max Power Bombs
CBA0FFDF    0x66         00000C42      35            Max Super Missiles
77561E39    0x66         0000803F      1             Ice Beam
9BD12C5A    0x66         00800945      2200          Max Aeion Energy
733C15CE    0x66         00608944      1099          Current Energy
42CED42A    0x66         00008443      264           Current Missiles
455A1D6A    0x66         00000C42      35            Current Super Missiles
B074A1EE    0x66         0000A041      20            Current Power Bombs
634DC541    0x66         0000803F      1             High Jump Boots
20046296    0x66         0000803F      1             Screw Attack
194F3BAA    0x66         0000803F      1             Space Jump
EA9E382B    0x66         0000803F      1             Morph Ball
576E4803    0x66         0000803F      1             Scan Pulse
B9805F37    0x66         00800945      2200          Current Aeion Energy
A9FB0778    0x66         0000803F      1             Spring Ball
462D2463    0x66         00000000      0             Current Metroid DNA
A34423D9    0x66         0000803F      1             Charge Beam
03FDA58A    0x66         0000803F      1             Morph Ball Bomb
06F58B9C    0x66         0000803F      1             Spider Ball
7D145810    0x66         0000803F      1             Lightning Armor
F7E06C74    0x66         0000803F      1             Varia Suit
8E7272BA    0x66         0000803F      1             Wave Beam
5CBD3A2B    0x66         0000803F      1             Beam Burst
CBB372C9    0x66         0000803F      1             Grapple Beam
CB790519    0x66         0000803F      1             Spazer Beam
4871DBB7    0x66         0000803F      1             Phase Drift
D55B9714    0x66         0000803F      1             Plasma Beam
999DACAD    0x66         0000803F      1             Gravity Suit
E6E8ECB4    0x66         0000803F      1             Baby Metroid

pkprfl.bmssv
[To be analysed]

samus.bmssv
Seems to be all of the game's event flags stored in a series of blocks. I would presume a chunk (or series of chunks) would represent different actions/accomplishments from the game (I.E. new game tutorial messages, cutscenes, gammas running away, drill bot progress, etc).
 
Last edited by Khaos-Void,
  • Like
Reactions: Magnus Hydra

BtEtta

Well-Known Member
Member
Joined
Apr 9, 2016
Messages
147
Trophies
0
XP
716
Country
samus.bmssv stores at a minimum data about the maps. For example block ID 0x7E673BEF appears to cover area 8 (I've only prodded far enough to identify one area, but the rest won't take long.)
Chunk 0x2909989D is a uint8 array that covers the map itself for the area.
From one of my files with wrapping added in the correct place:
Code:
000000000000000000000000000000000
000000000000000002222222222222200
000000000000000002222222222222200
000000000000000002222222222222200
000000000000000003333222222222200
000000000000000002223333333222200
000000000000000002222222223222200
000000000000000002222222233222200
000000000000000002222222233222200
000000000000000002222222233222200
000000000000000000000222233222000
000000000022222222222222233222000
000000000022222222222222333222000
000000000023222222222222333222000
000000000023322222222222333222000
000000022223333333333333333220000
000000022223322223322223333220000
000000022223322222222222233220000
000000022223333333333332222220000
000000022223333333333332222220000
000000022222232222232232222000000
000000022222233333333332222000000
000000022222233222222332222000000
000000022222233222222222222000000
000000000222233333332222220000000
000000000222233222322222220000000
000000000222222233333222000000000
000000000222222333333322000000000
000000000222222333333322220000000
000000000002222333333322220000000
000000000002222333333322220000000
000000000002222333333322220000000
000000000002222333333322220000000
000000000002222333333322220000000
000000000022222333333322220000000
000000000022222333333322222222200
000000000022233333333322222222200
000000222222233333322222222222200
000000222222233222333333322222220
000000222222233223333333333222220
000000222222233333222222233222220
002222233333333333333322233332220
002222333223333333333222222332220
002222332223333333322222222332220
002222332223322222222222222332220
002223332223322222222222222332220
002233222223333333333333333332220
002233322223333333223333333332220
002223322223322222222222222222220
002222322223322222222222222222220
002222333222222222222222222000000
002222333332222222222222222220000
002222222332222222222222222220000
002222222333333333222222222220000
002222222222222223333333222220000
000000000222222223333333322220000
000000000222222222222223332222200
000000000222222222222222333322200
000000000000000000002222233322200
000000000000000000002222233222200
000000000000000000000022233322200
000000000000000000000022222222200
000000000000000000000022222222200
000000000000000000000022222222200
000000000000000000000022222222200
0 = unscanned
2 = scanned, but not visited (in this case because they're all out of bounds)
3 = visited
Let's clean it up a little:
Code:
                 ..............
                 ..............
                 ..............
                 3333..........
                 ...3333333....
                 .........3....
                 ........33....
                 ........33....
                 ........33....
                     ....33... 
          ...............33... 
          ..............333... 
          .3............333... 
          .33...........333... 
       ....3333333333333333..  
       ....33....33....3333..  
       ....33............33..  
       ....333333333333......  
       ....333333333333......  
       ......3.....3..3....    
       ......3333333333....    
       ......33......33....    
       ......33............    
         ....3333333......     
         ....33...3.......     
         .......33333...       
         ......3333333..       
         ......3333333....     
           ....3333333....     
           ....3333333....     
           ....3333333....     
           ....3333333....     
           ....3333333....     
          .....3333333....     
          .....3333333.........
          ...333333333.........
      .......333333............
      .......33...3333333.......
      .......33..3333333333.....
      .......33333.......33.....
  .....333333333333333...3333...
  ....333..3333333333......33...
  ....33...33333333........33...
  ....33...33..............33...
  ...333...33..............33...
  ..33.....333333333333333333...
  ..333....3333333..333333333...
  ...33....33...................
  ....3....33...................
  ....333..................    
  ....33333..................  
  .......33..................  
  .......333333333...........  
  ...............3333333.....  
         ........33333333....  
         ..............333.....
         ...............3333...
                    .....333...
                    .....33....
                      ...333...
                      .........
                      .........
                      .........
                      .........
Now look at the map for area 8:
8.png

…and wait a second that doesn't match at all!
But if we just reverse the order of the map data…
Code:
                      .........
                      .........
                      .........
                      .........
                      ...333...
                    .....33....
                    .....333...
         ...............3333...
         ..............333.....
         ........33333333....  
  ...............3333333.....  
  .......333333333...........  
  .......33..................  
  ....33333..................  
  ....333..................    
  ....3....33...................
  ...33....33...................
  ..333....3333333..333333333...
  ..33.....333333333333333333...
  ...333...33..............33...
  ....33...33..............33...
  ....33...33333333........33...
  ....333..3333333333......33...
  .....333333333333333...3333...
      .......33333.......33.....
      .......33..3333333333.....
      .......33...3333333.......
      .......333333............
          ...333333333.........
          .....3333333.........
          .....3333333....     
           ....3333333....     
           ....3333333....     
           ....3333333....     
           ....3333333....     
           ....3333333....     
         ......3333333....     
         ......3333333..       
         .......33333...       
         ....33...3.......     
         ....3333333......     
       ......33............    
       ......33......33....    
       ......3333333333....    
       ......3.....3..3....    
       ....333333333333......  
       ....333333333333......  
       ....33............33..  
       ....33....33....3333..  
       ....3333333333333333..  
          .33...........333... 
          .3............333... 
          ..............333... 
          ...............33... 
                     ....33... 
                 ........33....
                 ........33....
                 ........33....
                 .........3....
                 ...3333333....
                 3333..........
                 ..............
                 ..............
                 ..............

Also I've uploaded a slightly newer version of my save viewer. It actually supports saving now — but since you can't edit anything it's more like a sanity check than anything since it's rebuilding the file from scratch and hopefully getting it byte-exact to the original. It also has a few other quality of life things to make keeping track of discoveries easier.
 
Last edited by BtEtta,
  • Like
Reactions: Khaos-Void

Khaos-Void

Member
OP
Newcomer
Joined
Oct 31, 2017
Messages
10
Trophies
0
Location
Net Slum
XP
72
Country
United States
Haha, so that's what those arrays are! Should have figured. The original metroid had its rooms allocated in memory in a similar fashion. (I'd post the image but I think my post count is too low).

Great find! Now we can have an 'all maps downloaded' option on the save editor. I'll also be trying to track down the remaining areas. Didn't get a whole lot of work in this weekend as my time has been consumed with my new toy...the HTC Vive, XD.

EDIT: I've just added what I've mapped so far in Misc Data. Going to be trying out those values that I think deal with the drop amounts for energy/ammo. (Could be very entertaining if I can drop 2000+ Aeion energy)
 
Last edited by Khaos-Void,
  • Like
Reactions: Magnus Hydra

Khaos-Void

Member
OP
Newcomer
Joined
Oct 31, 2017
Messages
10
Trophies
0
Location
Net Slum
XP
72
Country
United States
Sorry about the lack of updates. Been busy with work...

I've attached my first 'beta' build of AMSRSE. It can be found as an attachment on the [POST=7662218]first post[/POST]. This serves as a test build for the overall file interaction as well as a first run implementation of the UI. The design is based of of MSR's inventory screen. Text fields at the top control current/max for collectables. The icons in the middle are toggle buttons to enable/disable items. Aeion abilities and metroid info (including enabling the baby metroid) can be found in the bottom section.

I plan on adding to this with more functionality that will enable manipulation of more save file data (such as reserve tanks, gallery info, map info, etc.). And yes, as soon as I'm able, I will be migrating this to GitHub, just haven't gotten around to it yet.

Burnt through the night tweaking this. Please leave any feedback or questions and I'll be on later to check. Thanks!

EDIT: I've migrated the project to GitHub. Further information on the usage of SaveDataReaderProto can be found in the Wiki. I'm also currently in the process of adding all known information on the blocks/chunks for the save files to the Wiki. When finished, this will be a much more organized place to view information on the file format.
 
Last edited by Khaos-Void,
  • Like
Reactions: senkunmusashi

Karthiken

New Member
Newbie
Joined
Feb 27, 2020
Messages
2
Trophies
0
Age
42
XP
33
Country
France
Hello Khaos-Void, thanks for your job and your project seems to like more flexible and easy to use. However i want to know, where are your project actually ? The SaveDataReaderProto is it working now ? I saw in GitHub nothing special about it.

Thanks to reply me ASAP
 
  • Like
Reactions: zoogie

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    Last night I have gotten better at sleeping than usual.
  • Sicklyboy @ Sicklyboy:
    My insomnia has gotten a bit better since quitting my last job. Probably the reduction in stress
    +1
  • Sicklyboy @ Sicklyboy:
    I think I've discovered recently that even though caffeine doesn't have much of a noticeable effect on me, I think it does completely stop me from going to sleep if I drink any late enough. So I'm being a bit more cautious about that now
    +1
  • SylverReZ @ SylverReZ:
    My insomnia has to do with how my anxiety and stress worsened up in the past few weeks.
  • SylverReZ @ SylverReZ:
    I don't drink as much caffeine like I used to.
  • SylverReZ @ SylverReZ:
    There have been days where I feel refreshed, then a couple or so hours in, my mood starts to take a toll.
  • Sicklyboy @ Sicklyboy:
    I've had stuff like that happen to me from time to time. Shit sucks
    +1
  • SylverReZ @ SylverReZ:
    Damn yeah true
  • SylverReZ @ SylverReZ:
    It does suck a lot
  • ZeroT21 @ ZeroT21:
    Guess I'm not the only one suffering from insomnia
  • SylverReZ @ SylverReZ:
    One of the uncensored voice clips for Sailor Mouth leaked.
    +1
  • BakerMan @ BakerMan:
    krabs is a motherfucker?
    +1
  • AncientBoi @ AncientBoi:
    :huh::O:ohnoes: Stay Away ! :(:angry:
  • AncientBoi @ AncientBoi:
    🦀 🦀 BakerMan has 🦀 🦀 🦀 !
    +1
  • BakerMan @ BakerMan:
    wdym i have crabs?
  • BakerMan @ BakerMan:
    no i don't
  • BigOnYa @ BigOnYa:
    Sure... That's what anyone with them would say. "I'm clean baby, now get in bed."
    +1
  • BakerMan @ BakerMan:
    is that an std or smth?
    +1
  • BakerMan @ BakerMan:
    i'm a fucking virgin, how can i have an std, bitches?
  • BigOnYa @ BigOnYa:
    That's also what they all say. "I'm a virgin."
    +3
  • ZeroT21 @ ZeroT21:
    lies :glare:
    +1
    ZeroT21 @ ZeroT21: lies :glare: +1