Skip to content

Commit

Permalink
SCUMM: MANIAC: Add resource mapping for US prototype.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmegone committed Sep 8, 2024
1 parent 75c8e67 commit 108976e
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 5 deletions.
2 changes: 1 addition & 1 deletion engines/scumm/detection_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "maniac", "Maniac Mansion (G).prg", kGenUnchanged, Common::DE_DEU, Common::kPlatformNES, "NES" },
{ "maniac", "Maniac Mansion (I).prg", kGenUnchanged, Common::IT_ITA, Common::kPlatformNES, "NES" },
{ "maniac", "Maniac Mansion (Sp).prg", kGenUnchanged, Common::ES_ESP, Common::kPlatformNES, "NES" },

{ "maniac", "Maniac Mansion (Prototype).prg", kGenUnchanged, Common::EN_USA, Common::kPlatformNES, "NES" },
{ "zak", "%02d.LFL", kGenRoomNum, UNK_LANG, UNK, 0 },
{ "zak", "zak1.d64", kGenUnchanged, UNK_LANG, Common::kPlatformC64, "V1" }, // ... and zak2.d64

Expand Down
124 changes: 120 additions & 4 deletions engines/scumm/file_nes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ static const ScummNESFile::Resource res_roomgfx_ita[40] = {
{ 0x117AF, 0x0437 }, { 0x11BE6, 0x0863 }, { 0x12449, 0x0199 }, { 0x125E2, 0x0947 }, { 0x12F29, 0x037A }
};

static const ScummNESFile::Resource res_roomgfx_pro[40] = {
{0x04001, 0x03C9}, {0x043CA, 0x069E}, {0x04A68, 0x0327}, {0x04D8F, 0x053B}, {0x052CA, 0x06BE},
{0x05988, 0x0682}, {0x0600A, 0x0778}, {0x06782, 0x0517}, {0x06C99, 0x07FB}, {0x07494, 0x07BE},
{0x08001, 0x07A5}, {0x087A6, 0x06DD}, {0x08E83, 0x04EA}, {0x0936D, 0x0846}, {0x09BB3, 0x08C8},
{0x0A47B, 0x0844}, {0x0ACBF, 0x0515}, {0x0B1D4, 0x0799}, {0x0B96D, 0x04B8}, {0x07C52, 0x0319},
{0x0C001, 0x0464}, {0x0C465, 0x076D}, {0x0CBD2, 0x0827}, {0x0D3F9, 0x0515}, {0x0D90E, 0x064E},
{0x0DF5C, 0x0775}, {0x0E6D1, 0x06DD}, {0x0EDAE, 0x0376}, {0x0F124, 0x05F7}, {0x0F71B, 0x0787},
{0x10001, 0x02D6}, {0x102D7, 0x06A3}, {0x1097A, 0x099F}, {0x11319, 0x0361}, {0x1167A, 0x0489},
{0x11B03, 0x0437}, {0x11F3A, 0x084D}, {0x0BE25, 0x0199}, {0x12787, 0x09A7}, {0x1312E, 0x037A}
};

const ScummNESFile::ResourceGroup res_roomgfx = {
ScummNESFile::NES_ROOMGFX,
{
Expand All @@ -126,6 +137,7 @@ const ScummNESFile::ResourceGroup res_roomgfx = {
res_roomgfx_ger,
res_roomgfx_esp,
res_roomgfx_ita,
res_roomgfx_pro,
}
};

Expand All @@ -136,6 +148,7 @@ static const ScummNESFile::Resource res_costumegfx_fra[2] = { { 0x30001, 0x0EB8
static const ScummNESFile::Resource res_costumegfx_ger[2] = { { 0x30001, 0x0EB8 }, { 0x2F4CE, 0x0340 } };
static const ScummNESFile::Resource res_costumegfx_esp[2] = { { 0x30001, 0x0EB8 }, { 0x2F0F6, 0x0340 } };
static const ScummNESFile::Resource res_costumegfx_ita[2] = { { 0x30001, 0x0EB8 }, { 0x2F4A0, 0x0340 } };
static const ScummNESFile::Resource res_costumegfx_pro[2] = {{0x30001, 0x0eb8}, {0x2f9f1, 0x0340}};

const ScummNESFile::ResourceGroup res_costumegfx = {
ScummNESFile::NES_COSTUMEGFX,
Expand All @@ -147,6 +160,7 @@ const ScummNESFile::ResourceGroup res_costumegfx = {
res_costumegfx_ger,
res_costumegfx_esp,
res_costumegfx_ita,
res_costumegfx_pro,
}
};

Expand Down Expand Up @@ -241,7 +255,19 @@ static const ScummNESFile::Resource res_rooms_ita[55] = {
{ 0x28DDF, 0x05DF }, { 0x27AC9, 0x0201 }, { 0x2A8A3, 0x0325 }, { 0x27D6F, 0x01FC }, { 0x2AE66, 0x02A9 },
{ 0x2B10F, 0x02E7 }, { 0x2B4F9, 0x03DE }, { 0x2BA31, 0x0206 }, { 0x2C001, 0x0168 }, { 0x17DC0, 0x0169 }
};

static const ScummNESFile::Resource res_rooms_pro[55] = {
{0x00000, 0x0000}, {0x14001, 0x0D11}, {0x134A8, 0x04B3}, {0x1539E, 0x0849}, {0x15C6F, 0x0685},
{0x16388, 0x0715}, {0x1395B, 0x04E7}, {0x16CC7, 0x0AC0}, {0x18001, 0x06E4}, {0x17ACC, 0x03CB},
{0x18C11, 0x0663}, {0x192D0, 0x0580}, {0x19A6E, 0x0443}, {0x1A130, 0x056F}, {0x1A69F, 0x0446},
{0x1AAE5, 0x03A7}, {0x1AE8C, 0x07E3}, {0x1B6CF, 0x0692}, {0x1C001, 0x0B49}, {0x1CD09, 0x04C6},
{0x1D4A1, 0x05AD}, {0x1DF90, 0x0514}, {0x1E911, 0x05D1}, {0x1EF9F, 0x0389}, {0x1F600, 0x0726},
{0x20001, 0x04AC}, {0x20523, 0x04F8}, {0x21678, 0x05CB}, {0x21DE8, 0x046B}, {0x22302, 0x0460},
{0x227C8, 0x0909}, {0x24001, 0x0366}, {0x23BF8, 0x03D0}, {0x247DB, 0x050D}, {0x25ACF, 0x0346},
{0x1BDF3, 0x01CA}, {0x25E15, 0x0457}, {0x2626C, 0x0547}, {0x267B3, 0x064A}, {0x1FD91, 0x024B},
{0x2739A, 0x01FA}, {0x2766D, 0x0219}, {0x28001, 0x02F4}, {0x284D6, 0x045C}, {0x289A3, 0x09CF},
{0x293C6, 0x05A0}, {0x27B65, 0x0201}, {0x2ADD1, 0x0325}, {0x2B339, 0x01FC}, {0x2B535, 0x02A9},
{0x2B7DE, 0x02DE}, {0x2C001, 0x03CE}, {0x2BBC0, 0x0205}, {0x2C53A, 0x0170}, {0x13E42, 0x0169},
};
const ScummNESFile::ResourceGroup res_rooms = {
ScummNESFile::NES_ROOM,
{
Expand All @@ -252,6 +278,7 @@ const ScummNESFile::ResourceGroup res_rooms = {
res_rooms_ger,
res_rooms_esp,
res_rooms_ita,
res_rooms_pro,
}
};

Expand Down Expand Up @@ -521,6 +548,45 @@ static const ScummNESFile::Resource res_scripts_ita[179] = {
{ 0x2A752, 0x0005 }, { 0x2A757, 0x0005 }, { 0x2A75C, 0x0005 }, { 0x2A761, 0x0005 }, { 0x216E5, 0x0033 },
{ 0x2A766, 0x0005 }, { 0x00000, 0x0000 }, { 0x2A76B, 0x009C }, { 0x2A807, 0x009C }
};
static const ScummNESFile::Resource res_scripts_pro[179] = {
{0x00000, 0x0000}, {0x29966, 0x044D}, {0x29DB3, 0x0207}, {0x29FBA, 0x009F}, {0x2A059, 0x03F4},
{0x2A44D, 0x01A1}, {0x00000, 0x0000}, {0x2A5EE, 0x004A}, {0x00000, 0x0000}, {0x2A638, 0x0005},
{0x2C6AA, 0x000D}, {0x2C6B7, 0x000D}, {0x186E5, 0x0040}, {0x18725, 0x0016}, {0x1B66F, 0x0046},
{0x1EEE2, 0x00BD}, {0x21C43, 0x0055}, {0x17787, 0x0027}, {0x1FD26, 0x0027}, {0x1FD4D, 0x0027},
{0x1BD61, 0x0022}, {0x15BE7, 0x0088}, {0x22253, 0x0020}, {0x22273, 0x008F}, {0x19274, 0x002B},
{0x1CB4A, 0x0061}, {0x1CBAB, 0x003C}, {0x1CBE7, 0x0042}, {0x1CC29, 0x004F}, {0x204AD, 0x0076},
{0x16A9D, 0x0035}, {0x16AD2, 0x001C}, {0x16AEE, 0x0014}, {0x16B02, 0x001C}, {0x16B1E, 0x0027},
{0x16B45, 0x0182}, {0x1D1CF, 0x0096}, {0x1D265, 0x00ED}, {0x1D352, 0x001C}, {0x1D36E, 0x0056},
{0x1D3C4, 0x0072}, {0x1E4A4, 0x0028}, {0x1E4CC, 0x0170}, {0x1E63C, 0x0229}, {0x28932, 0x0071},
{0x17E97, 0x004D}, {0x162F4, 0x0039}, {0x1873B, 0x028B}, {0x189C6, 0x00BB}, {0x18A81, 0x018B},
{0x00000, 0x0000}, {0x19EB1, 0x00ED}, {0x21C98, 0x00F6}, {0x1E865, 0x009B}, {0x21D8E, 0x0047},
{0x2C6C4, 0x004D}, {0x1632D, 0x0024}, {0x14D12, 0x0014}, {0x177AE, 0x0059}, {0x17807, 0x0109},
{0x17910, 0x0009}, {0x14D26, 0x01B6}, {0x2B0F6, 0x0243}, {0x230D1, 0x0686}, {0x2C711, 0x001C},
{0x2C72D, 0x001A}, {0x2C747, 0x0021}, {0x2C768, 0x0024}, {0x2C78C, 0x0017}, {0x2C7A3, 0x0017},
{0x2C7BA, 0x0014}, {0x2C7CE, 0x0024}, {0x00000, 0x0000}, {0x2C7F2, 0x0011}, {0x17919, 0x009D},
{0x22762, 0x0066}, {0x14EDC, 0x0075}, {0x1F328, 0x0120}, {0x1FD74, 0x001D}, {0x1F448, 0x008F},
{0x1F4D7, 0x0097}, {0x179B6, 0x006A}, {0x17A20, 0x0030}, {0x1F56E, 0x0092}, {0x2C803, 0x00CC},
{0x2C8CF, 0x00BA}, {0x2C989, 0x0088}, {0x20A1B, 0x01B0}, {0x20BCB, 0x0168}, {0x20D33, 0x006C},
{0x20D9F, 0x0037}, {0x20DD6, 0x00E4}, {0x20EBA, 0x0045}, {0x20EFF, 0x00E1}, {0x20FE0, 0x00F6},
{0x210D6, 0x0141}, {0x21217, 0x0183}, {0x2139A, 0x0034}, {0x213CE, 0x00A9}, {0x24367, 0x011B},
{0x1BD83, 0x0070}, {0x1CC78, 0x0091}, {0x29372, 0x0054}, {0x19F9E, 0x00CE}, {0x1A06C, 0x0077},
{0x14F51, 0x0057}, {0x27886, 0x02DF}, {0x1DA4E, 0x0219}, {0x1DC67, 0x00F9}, {0x1DD60, 0x0056},
{0x1DDB6, 0x01C2}, {0x14FA8, 0x004D}, {0x27594, 0x00D9}, {0x21DD5, 0x0013}, {0x2A63D, 0x00F0},
{0x24482, 0x00E7}, {0x21477, 0x00F2}, {0x24569, 0x002B}, {0x2C3CF, 0x010F}, {0x24594, 0x00AA},
{0x24CE8, 0x0DAB}, {0x1B6B5, 0x000D}, {0x1B6C2, 0x000D}, {0x23757, 0x017C}, {0x282F5, 0x01E1},
{0x238D3, 0x0153}, {0x23A26, 0x019C}, {0x23BC2, 0x0016}, {0x2C4DE, 0x005C}, {0x23BD8, 0x0020},
{0x27D66, 0x00A5}, {0x2A72D, 0x034D}, {0x14FF5, 0x00E3}, {0x2BABC, 0x005F}, {0x00000, 0x0000},
{0x25A93, 0x003C}, {0x1E900, 0x0011}, {0x16351, 0x0018}, {0x26DFD, 0x001F}, {0x26E1C, 0x0054},
{0x26E70, 0x0149}, {0x26FB9, 0x004B}, {0x27004, 0x017D}, {0x27181, 0x0027}, {0x271A8, 0x0041},
{0x271E9, 0x01B1}, {0x16369, 0x001F}, {0x2463E, 0x002A}, {0x150D8, 0x01A0}, {0x1929F, 0x0031},
{0x17A50, 0x007C}, {0x21569, 0x00DC}, {0x1D436, 0x0018}, {0x1D44E, 0x0053}, {0x18C0C, 0x0005},
{0x15278, 0x011B}, {0x15393, 0x000B}, {0x24668, 0x0138}, {0x247A0, 0x0014}, {0x1DF78, 0x0018},
{0x247B4, 0x0027}, {0x1A0E3, 0x004D}, {0x00000, 0x0000}, {0x2BB1B, 0x00A5}, {0x2AA7A, 0x00C1},
{0x2AB3B, 0x0140}, {0x19850, 0x00BF}, {0x1990F, 0x014D}, {0x19A5C, 0x0012}, {0x2AC7B, 0x0005},
{0x2AC80, 0x0005}, {0x2AC85, 0x0005}, {0x2AC8A, 0x0005}, {0x2AC8F, 0x0005}, {0x21645, 0x0033},
{0x2AC94, 0x0005}, {0x00000, 0x0000}, {0x2AC99, 0x009C}, {0x2AD35, 0x009C}

};

const ScummNESFile::ResourceGroup res_scripts = {
ScummNESFile::NES_SCRIPT,
Expand All @@ -532,6 +598,7 @@ const ScummNESFile::ResourceGroup res_scripts = {
res_scripts_ger,
res_scripts_esp,
res_scripts_ita,
res_scripts_pro,
}
};

Expand Down Expand Up @@ -668,7 +735,25 @@ static const ScummNESFile::Resource res_sounds_ita[82] = {
{ 0x36320, 0x0E56 }, { 0x37176, 0x0C70 }, { 0x38001, 0x0DEC }, { 0x38DED, 0x0B77 }, { 0x39964, 0x042F },
{ 0x39D93, 0x0AC5 }, { 0x3A858, 0x0BE4 }
};

static const ScummNESFile::Resource res_sounds_pro[82] = {
{ 0x0FFE8, 0x0011 }, { 0x30ECA, 0x0832 }, { 0x30ECA, 0x0832 }, { 0x30ECA, 0x0832 }, { 0x30ECA, 0x0832 },
{ 0x30ECA, 0x0832 }, { 0x0FFE8, 0x0011 }, { 0x27E8C, 0x0073 }, { 0x17FE4, 0x0011 }, { 0x1FFDC, 0x0011 },
{ 0x27EFF, 0x0056 }, { 0x23FC8, 0x001F }, { 0x1FFED, 0x0011 }, { 0x17FF5, 0x000A }, { 0x23FE7, 0x000A },
{ 0x27F55, 0x0019 }, { 0x27F6E, 0x004B }, { 0x23FF1, 0x000A }, { 0x27FB9, 0x000F }, { 0x27FC8, 0x001D },
{ 0x2FD42, 0x0045 }, { 0x27FE5, 0x000F }, { 0x2FD42, 0x0045 }, { 0x2FDA2, 0x0033 }, { 0x2FDD5, 0x0011 },
{ 0x2BFEF, 0x000F }, { 0x2FDE6, 0x0075 }, { 0x2FE5B, 0x0014 }, { 0x0FFE8, 0x0011 }, { 0x2FE6F, 0x00FF },
{ 0x2FF6E, 0x000F }, { 0x2FF7D, 0x000F }, { 0x316FC, 0x0092 }, { 0x316FC, 0x0092 }, { 0x2FF8C, 0x002D },
{ 0x316FC, 0x0092 }, { 0x2FFB9, 0x0016 }, { 0x2FFCF, 0x0011 }, { 0x31886, 0x004B }, { 0x2FFE0, 0x0011 },
{ 0x318D1, 0x003B }, { 0x3190C, 0x008A }, { 0x31996, 0x0011 }, { 0x319A7, 0x000F }, { 0x319B6, 0x00A2 },
{ 0x31A58, 0x00D3 }, { 0x31B2B, 0x0097 }, { 0x2BFEF, 0x000F }, { 0x319B6, 0x00A2 }, { 0x31BC2, 0x05D1 },
{ 0x31BC2, 0x05D1 }, { 0x32193, 0x0011 }, { 0x0FFE8, 0x0011 }, { 0x2FDE6, 0x0075 }, { 0x23FC8, 0x001F },
{ 0x321A4, 0x098E }, { 0x31886, 0x004B }, { 0x32B32, 0x0011 }, { 0x30ECA, 0x0832 }, { 0x32B43, 0x000F },
{ 0x32B52, 0x002F }, { 0x32B81, 0x001D }, { 0x32B9E, 0x0018 }, { 0x32BB6, 0x0016 }, { 0x32BCC, 0x001B },
{ 0x32BE7, 0x0088 }, { 0x32CD4, 0x0065 }, { 0x32C6F, 0x0065 }, { 0x32D39, 0x0073 }, { 0x32DAC, 0x00F9 },
{ 0x32EA5, 0x049E }, { 0x34001, 0x0EA8 }, { 0x33343, 0x0B18 }, { 0x34EA9, 0x0B9C }, { 0x35A45, 0x0C6B },
{ 0x366B0, 0x0E56 }, { 0x38001, 0x0C70 }, { 0x38C71, 0x0DEC }, { 0x39A5D, 0x0B77 }, { 0x37506, 0x042F },
{ 0x3A5D4, 0x0AC5 }, { 0x3B099, 0x0BE4 }
};
const ScummNESFile::ResourceGroup res_sounds = {
ScummNESFile::NES_SOUND,
{
Expand All @@ -679,6 +764,7 @@ const ScummNESFile::ResourceGroup res_sounds = {
res_sounds_ger,
res_sounds_esp,
res_sounds_ita,
res_sounds_pro,
}
};

Expand Down Expand Up @@ -731,6 +817,13 @@ static const ScummNESFile::Resource res_costumes_ita[25] = {
{ 0x0FEEB, 0x0055 }, { 0x17F29, 0x003B }, { 0x0FEEB, 0x0055 }, { 0x1BE76, 0x0045 }, { 0x1BEBB, 0x0040 },
{ 0x1BEFB, 0x003C }, { 0x13F1D, 0x003A }, { 0x13F1D, 0x003A }, { 0x0FEEB, 0x0055 }, { 0x13ED2, 0x004B }
};
static const ScummNESFile::Resource res_costumes_pro[25] = {
{ 0x17EE4, 0x0055 }, { 0x17EE4, 0x0055 }, { 0x17EE4, 0x0055 }, { 0x17EE4, 0x0055 }, { 0x17EE4, 0x0055 },
{ 0x17EE4, 0x0055 }, { 0x17EE4, 0x0055 }, { 0x17EE4, 0x0055 }, { 0x13FAB, 0x004B }, { 0x17EE4, 0x0055 },
{ 0x17EE4, 0x0055 }, { 0x17EE4, 0x0055 }, { 0x17F39, 0x0036 }, { 0x17F6F, 0x003A }, { 0x17F6F, 0x003A },
{ 0x17EE4, 0x0055 }, { 0x17FA9, 0x003B }, { 0x17EE4, 0x0055 }, { 0x27E0B, 0x0045 }, { 0x1BFBD, 0x0040 },
{ 0x27E50, 0x003C }, { 0x17F6F, 0x003A }, { 0x17F6F, 0x003A }, { 0x17EE4, 0x0055 }, { 0x13FAB, 0x004B }
};

const ScummNESFile::ResourceGroup res_costumes = {
ScummNESFile::NES_COSTUME,
Expand All @@ -742,6 +835,7 @@ const ScummNESFile::ResourceGroup res_costumes = {
res_costumes_ger,
res_costumes_esp,
res_costumes_ita,
res_costumes_pro,
}
};

Expand All @@ -752,6 +846,7 @@ static const ScummNESFile::Resource res_globdata_fra[1] = { { 0x2C628, 0x0307 }
static const ScummNESFile::Resource res_globdata_ger[1] = { { 0x2C4EE, 0x0307 } };
static const ScummNESFile::Resource res_globdata_esp[1] = { { 0x2C001, 0x0307 } };
static const ScummNESFile::Resource res_globdata_ita[1] = { { 0x2C4C0, 0x0307 } };
static const ScummNESFile::Resource res_globdata_pro[1] = { { 0x2cA11, 0x0307 } };

const ScummNESFile::ResourceGroup res_globdata = {
ScummNESFile::NES_GLOBDATA,
Expand All @@ -763,6 +858,7 @@ const ScummNESFile::ResourceGroup res_globdata = {
res_globdata_ger,
res_globdata_esp,
res_globdata_ita,
res_globdata_pro,
}
};

Expand All @@ -774,6 +870,7 @@ static const ScummNESFile::Resource res_sprpals_fra[2] = { { 0x07ED8, 0x0010 },
static const ScummNESFile::Resource res_sprpals_ger[2] = { { 0x07F6B, 0x0010 }, { 0x0BF17, 0x0010 } };
static const ScummNESFile::Resource res_sprpals_esp[2] = { { 0x0BF15, 0x0010 }, { 0x0BF25, 0x0010 } };
static const ScummNESFile::Resource res_sprpals_ita[2] = { { 0x07F54, 0x0010 }, { 0x07F64, 0x0010 } };
static const ScummNESFile::Resource res_sprpals_pro[2] = { { 0x0BFBE, 0x0010 }, { 0x0BFCE, 0x0010 } };

const ScummNESFile::ResourceGroup res_sprpals = {
ScummNESFile::NES_SPRPALS,
Expand All @@ -785,6 +882,7 @@ const ScummNESFile::ResourceGroup res_sprpals = {
res_sprpals_ger,
res_sprpals_esp,
res_sprpals_ita,
res_sprpals_pro
}
};

Expand All @@ -796,6 +894,7 @@ static const ScummNESFile::Resource res_sprdesc_fra[2] = { { 0x07EF8, 0x0031 },
static const ScummNESFile::Resource res_sprdesc_ger[2] = { { 0x0BF27, 0x0031 }, { 0x0BF58, 0x0009 } };
static const ScummNESFile::Resource res_sprdesc_esp[2] = { { 0x0BF35, 0x0031 }, { 0x0BF66, 0x0009 } };
static const ScummNESFile::Resource res_sprdesc_ita[2] = { { 0x0BF17, 0x0031 }, { 0x07F74, 0x0009 } };
static const ScummNESFile::Resource res_sprdesc_pro[2] = { { 0x0FFB7, 0x0031 }, { 0x0BFDE, 0x0009 } };

const ScummNESFile::ResourceGroup res_sprdesc = {
ScummNESFile::NES_SPRDESC,
Expand All @@ -807,6 +906,7 @@ const ScummNESFile::ResourceGroup res_sprdesc = {
res_sprdesc_ger,
res_sprdesc_esp,
res_sprdesc_ita,
res_sprdesc_pro,
}
};

Expand All @@ -818,6 +918,7 @@ static const ScummNESFile::Resource res_sprlens_fra[2] = { { 0x0FE61, 0x0115 },
static const ScummNESFile::Resource res_sprlens_ger[2] = { { 0x2BE1A, 0x0115 }, { 0x07F65, 0x0006 } };
static const ScummNESFile::Resource res_sprlens_esp[2] = { { 0x2EFE1, 0x0115 }, { 0x07F7A, 0x0006 } };
static const ScummNESFile::Resource res_sprlens_ita[2] = { { 0x23DE9, 0x0115 }, { 0x07F4E, 0x0006 } };
static const ScummNESFile::Resource res_sprlens_pro[2] = { { 0x0FEA2, 0x0115}, { 0x07FF5, 0x0006 } };

const ScummNESFile::ResourceGroup res_sprlens = {
ScummNESFile::NES_SPRLENS,
Expand All @@ -829,6 +930,7 @@ const ScummNESFile::ResourceGroup res_sprlens = {
res_sprlens_ger,
res_sprlens_esp,
res_sprlens_ita,
res_sprlens_pro
}
};

Expand All @@ -840,6 +942,7 @@ static const ScummNESFile::Resource res_sproffs_fra[2] = { { 0x2F959, 0x022A },
static const ScummNESFile::Resource res_sproffs_ger[2] = { { 0x2F81F, 0x022A }, { 0x0BF61, 0x000C } };
static const ScummNESFile::Resource res_sproffs_esp[2] = { { 0x2F447, 0x022A }, { 0x0BF6F, 0x000C } };
static const ScummNESFile::Resource res_sproffs_ita[2] = { { 0x2BC37, 0x022A }, { 0x0BF48, 0x000C } };
static const ScummNESFile::Resource res_sproffs_pro[2] = { { 0x2BDC5, 0x022A }, { 0x0BFE7, 0x000C } };

const ScummNESFile::ResourceGroup res_sproffs = {
ScummNESFile::NES_SPROFFS,
Expand All @@ -851,6 +954,7 @@ const ScummNESFile::ResourceGroup res_sproffs = {
res_sproffs_ger,
res_sproffs_esp,
res_sproffs_ita,
res_sproffs_pro,
}
};

Expand All @@ -862,6 +966,7 @@ static const ScummNESFile::Resource res_sprdata_fra[2] = { { 0x2CA28, 0x2BE0 },
static const ScummNESFile::Resource res_sprdata_ger[2] = { { 0x2C8EE, 0x2BE0 }, { 0x0FE61, 0x008A } };
static const ScummNESFile::Resource res_sprdata_esp[2] = { { 0x2C401, 0x2BE0 }, { 0x0FE67, 0x008A } };
static const ScummNESFile::Resource res_sprdata_ita[2] = { { 0x2C8C0, 0x2BE0 }, { 0x0FE61, 0x008A } };
static const ScummNESFile::Resource res_sprdata_pro[2] = { { 0x2CE11, 0x2BE0 }, { 0x07F6B, 0x008A } };

const ScummNESFile::ResourceGroup res_sprdata = {
ScummNESFile::NES_SPRDATA,
Expand All @@ -873,6 +978,7 @@ const ScummNESFile::ResourceGroup res_sprdata = {
res_sprdata_ger,
res_sprdata_esp,
res_sprdata_ita,
res_sprdata_pro,
}
};

Expand All @@ -883,6 +989,7 @@ static const ScummNESFile::Resource res_charset_fra[1] = { { 0x3F739, 0x0090 } }
static const ScummNESFile::Resource res_charset_ger[1] = { { 0x3F739, 0x0090 } };
static const ScummNESFile::Resource res_charset_esp[1] = { { 0x3F739, 0x0090 } };
static const ScummNESFile::Resource res_charset_ita[1] = { { 0x3F739, 0x0090 } };
static const ScummNESFile::Resource res_charset_pro[1] = { { 0x3f6EE, 0x0090 } };

const ScummNESFile::ResourceGroup res_charset = {
ScummNESFile::NES_CHARSET,
Expand All @@ -894,6 +1001,7 @@ const ScummNESFile::ResourceGroup res_charset = {
res_charset_ger,
res_charset_esp,
res_charset_ita,
res_charset_pro,
}
};

Expand All @@ -904,6 +1012,7 @@ static const ScummNESFile::Resource res_preplist_fra[1] = { { 0x3FBAF, 0x0010 }
static const ScummNESFile::Resource res_preplist_ger[1] = { { 0x3FBAB, 0x000F } };
static const ScummNESFile::Resource res_preplist_esp[1] = { { 0x3FBAE, 0x000F } };
static const ScummNESFile::Resource res_preplist_ita[1] = { { 0x3FBAA, 0x0010 } };
static const ScummNESFile::Resource res_preplist_pro[1] = { { 0x3FB5A, 0x000E } };

const ScummNESFile::ResourceGroup res_preplist = {
ScummNESFile::NES_PREPLIST,
Expand All @@ -915,6 +1024,7 @@ const ScummNESFile::ResourceGroup res_preplist = {
res_preplist_ger,
res_preplist_esp,
res_preplist_ita,
res_preplist_pro,
}
};

Expand All @@ -925,6 +1035,8 @@ static const ScummNESFile::Resource res_titles_fra[2] = { {0x02701, 0x0B8C}, {0x
static const ScummNESFile::Resource res_titles_ger[2] = { {0x02701, 0x0B8C}, {0x0320F, 0x091F} };
static const ScummNESFile::Resource res_titles_esp[2] = { {0x02701, 0x0B8C}, {0x0320F, 0x091F} };
static const ScummNESFile::Resource res_titles_ita[2] = { {0x02701, 0x0B8C}, {0x0320F, 0x091F} };
static const ScummNESFile::Resource res_titles_pro[2] = { {0x02701, 0x0B4C}, {0x0325B, 0x091F} };


const ScummNESFile::ResourceGroup res_titles = {
ScummNESFile::NES_TITLES,
Expand All @@ -936,6 +1048,7 @@ const ScummNESFile::ResourceGroup res_titles = {
res_titles_ger,
res_titles_esp,
res_titles_ita,
res_titles_pro,
}
};

Expand Down Expand Up @@ -1066,10 +1179,10 @@ uint16 ScummNESFile::extractResource(Common::WriteStream *output, const Resource
}
}
} else
error("extract_resource - unknown sound type %d/%d detected",val,cnt);
error("extract_resource - unknown sound type %d/%d detected: offset: %d length: %d",val,cnt,res->offset,res->length);

if (_baseStream->pos() - res->offset != res->length)
error("extract_resource - length mismatch while extracting sound resource (was %04X, should be %04X)", (int32)_baseStream->pos() - res->offset, res->length);
debug("extract_resource - length mismatch while extracting sound resource (was %04X, should be %04X) offset: %d length: %d", (int32)_baseStream->pos() - res->offset, res->length, res->offset, res->length);

break;

Expand Down Expand Up @@ -1449,6 +1562,9 @@ bool ScummNESFile::open(const Common::Path &filename) {
} else if (md5str == "54a68a5f5e3c86da42b7ca5f51e79b1d") {
_ROMset = kROMsetItaly;
debug(2, "ROM contents verified as Maniac Mansion (Italy)");
} else if (md5str == "bc78cb176b6bd1eb6eea2c50069a9699") {
_ROMset = kROMsetPro;
debug(2, "ROM contents verified as Maniac Mansion (Prototype)");
} else {
error("Unsupported Maniac Mansion ROM, md5: %s", md5str.c_str());
return false;
Expand Down
1 change: 1 addition & 0 deletions engines/scumm/file_nes.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class ScummNESFile : public BaseScummFile {
kROMsetGermany,
kROMsetSpain,
kROMsetItaly,
kROMsetPro,
kROMsetNum
};

Expand Down

0 comments on commit 108976e

Please sign in to comment.