Back to Inindo

SRAM map

The following is the partial SRAM map from the SNES game "Inindo".

Significant portions of the data remain unknown. I have not checked for information available to ensure there are no known blocks of data marked unknown here. Available information from other sources is very sparse and mostly repeated.

Known unknowns:

  • Character locations
  • Generals lists
  • Dungeon chest flags (was taken)

Sub structs/enums:

// set struct packing by byte: pack(1)
#pragma pack(push)
#pragma pack(1)

struct date_t
{
	u08 year;
	u08 month;
	u08 day;
};

struct party_t
{
	u08 party_size;
	u08 member_id[3];
};

struct inventory_t
{
	item_id_t slot[15];
};

struct pawn_t
{
	u08 thousand_gold;
	item_id_t slot[31];
};

struct bingo_t
{
	u16 lowclass_chips;
	u16 highclass_chips;
};

struct character_status_t
{
	struct ai_status_t
	{
		ai_command_t command : 4;
		u08 unk_bits : 4;
	};
	u16 max_health;
	u16 health;
	u16 max_energy;
	u16 energy;
	u16 exp_needed;
	u08 level;
	u08 experience;
	u08 trust;
	u08 intelligence;
	u08 speed;
	u08 luck;
	// spell flags (one bit per spell known)
	u16 spells;
	u08 defense;
	u08 resist;
	u08 power;
	item_id_t equipped[5];
	u08 ai_data[3];
	ai_status_t ai_status;
	// static (ROM) character data
	// index for the next character
	u08 next_index;
	u08 unk;
};

struct province_t
{
	struct ai_status_t
	{
		u08 unk_bits : 5;
		u08 algorithm : 3;
	};
	u08 ruler;
	u08 daimyo;
	u16 gold;
	u16 rice;
	u16 soldiers;
	u08 arms;
	u08 training;
	u08 person[3];
	u08 trust[3];
	ai_status_t ai_status;
	u08 unk;
};

struct save_data_t
{
	u16 header;
	date_t date;
	u08 unk1[22];
	u16 gold;
	party_t party;
	u08 unk2[6];
	inventory_t inventory[3];
	pawn_t pawn;
	bingo_t bingo;
	u08 unk3[49];
	char name[12];
	u08 unk4;
	character_status_t status[63];
	u08 unk5[134];
	province_t province[30];
	u08 unk6[972];
	u08 game_flags[18];
	u08 unk7[2];
};

struct save_container_t
{
	save_data_t save_data;
	u16 checksum;
	char koei[4];
	u08 padding[226];
};

#pragma pack(pop)

SRAM format

This structure is repeated in the SRAM contiguously once for each save (2) like so:

save_container_t save[2];

Checksum

The checksum for each save is a literal 16 bit sum of the save_data struct which can be computed with the following code:

u16 compute_checksum(const void *pdata, const int length)
{
	const u08 *p = (const u08 *)pdata;
	u16 checksum = 0;
	for (int i = 0; i < length; i++) {
		checksum += p[i];
	}
	return checksum;
}