Documentation:Magical Starsign

From Kovopedia, the Magical Vacation wiki
Jump to navigation Jump to search

This page contains technical documentation for Magical Starsign.

Save Data

This section is incomplete. You can help Kovopedia by expanding it.
No reason provided.

A Magical Starsign save file contains data for three file slots. This page will follow the convention of using $ as a prefix for addresses, and 0x as a prefix for values.

Overview

The SRAM is divided into banks of data. There are three types of banks:

  • Header Bank (0x1000 bytes). Holds data general for all three save slots.
  • Amigo Bank (0x3000 bytes). Holds data shared across the three save slots.
  • Save Slot Banks (0x4000 bytes each). Holds data for each specific slot.

All banks that are in use begin with the 6-byte header 01 00 4D 56 32 20. This stands for "MV2 " in ASCII. Data is stored in Little-Endian format, as is the case for all Nintendo DS games. All banks are duplicated and stored contiguously. A general breakdown of a save file is as follows:

Address Function
$0000-$0FFF Header Bank
$1000-$1FFF Header Bank duplicate
$2000-$4FFF Amigo Bank
$5000-$7FFF Amigo Bank duplicate
$8000-$BFFF Slot 1 Bank
$C000-$FFFF Slot 1 Bank duplicate
$10000-$13FFF Slot 2 Bank
$14000-$17FFF Slot 2 Bank duplicate
$18000-$1BFFF Slot 3 Bank
$1C000-$1FFFF Slot 3 Bank duplicate

Checksums

Each bank that's in use has a 2-byte checksum complement, that take into account all of the other data in the bank (including the header). This is stored at the 7th and 8th byte (right after the header) for Amigo and Save Slot Banks, and at the offset $01EC for the Header Bank.

The checksum is calculated by summing each 2-byte value in the bank (not including the checksum itself), and the complementing it with 0xFFFF. If any checksum is incorrect, the game will delete the corresponding save data.

Header Bank ($0000-$0FFF)

This bank contains general overhead data, particularly that accessible from the start menus or otherwise relevant to Amigo functions:

Address Function
0000-0006 (006) Standard header
0006-000B (006) Unclassified data
000C-000F (004) Slot 1 current play time. Should be in sync with the info at Slot Bank 1.
0010-0013 (004) Slot 1 current Bira. Should be in sync with the info at Slot Bank 1.
0014-0015 (002) Unclassified data
0016-0017 (002) Slot 1 current location ID. Should be in sync with the info at Slot Bank 1.
0018-0019 (002) Unclassified data
001A-001F (006) Slot 1 current party Formation. Should be in sync with the info at Slot Bank 1.
0020-0021 (002) Slot 1 Amigo ID.
0022-002B (00A) Unclassified data
002C-002C (001) Slot 1 Main Character Name ID (0x1= Male, 0x2 = Female)
002D-002D (001) Slot 1 Main Character Portrait ID (0x1= Male, 0x2 = Female)
002E-003D (010) Slot 1 Main Character Name
003E-003F (002) Unclassified data
0040-0047 (008) Slot 1 Region
0048-0057 (010) Unused data
0058-005B (004) Slot 1 is used (end of Slot 1. Only takes values 0x0 or 0x1)
0048-0057 (010) Unused data
006C-00AB (050) Slot 2 Data
00AC-00FB (050) Slot 3 Data

Amigo ID

When you start a new playthrough, a secret ID is associated with your character. This ID is used when tagging in Amigo Mode to recognize previously tagged/untagged Amigos.

Play time

The play time is stored as an unsigned int representing the number of frames elapsed. Each frame is approximately 1/60th of a second; hence, where we use integer division instead of real division,

  • Hours = total frames / 216000
  • Minutes = (total frames / 3600) % 60
  • Seconds = (total frames / 60) % 60

Amigo Bank ($2000-$4FFF )

Conains data for own letter and all received letters. Notice that this is shared for all the three save slots in a file.

Save Slot 1 Bank ($8000-$BFFF)

This bank contains all of the data for Save Slot 1:

Address Function
0008-000B (004) Unclassified data
000C-0011 (006) Current party Formation
0013-001F (00C) Current party X coordinates
0020-002A (00C) Current party Y coordinates
002C-0037 (00C) Current party orientations
0038-003F (008) Current Battle Formation
0040-010F (0D0) Character Names
0110-0113 (004) Current play time
0114-0117 (004) Current Bira
011A-049D (384) Inventory Status
0518-0519 (002) Time/Hour of day (Day/Night)
051C-053F (024) Planet's orbit position
0780-07ED (06E) Bestiary Flags
056E-0574 (007) Encyclopedia Flags
0574-057A (007) Diary Flags
057B-058A (010) Map Flags
05BB-05BC (002) Egg Unlocked Flags
0BC0-0B2F (070) Egg Status