Skip to content

Commit

Permalink
MK1A: differentiate between T and Y units
Browse files Browse the repository at this point in the history
Note that we don't support the Y unit variants currently.
  • Loading branch information
Preppy committed Dec 7, 2023
1 parent ecb166e commit 573d75a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 26 deletions.
8 changes: 7 additions & 1 deletion palmod/Game/Game_MK1_A.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ void CGame_MK1_A::SetSpecialRuleForFileName(std::wstring strFileName)
{
// these should be all lower case
{ L"l5_mortal_kombat_t-unit_uj12_game_rom.uj12", MK1ALoadingKey::V50Alt },
{ L"mkg-u112.rom", MK1ALoadingKey::V30Alt },
{ L"mkt-uj12.bin", MK1ALoadingKey::Base },
};

Expand All @@ -23,7 +24,7 @@ void CGame_MK1_A::SetSpecialRuleForFileName(std::wstring strFileName)
}
else
{
m_eVersionToLoad = MK1ALoadingKey::Base;
m_eVersionToLoad = MK1ALoadingKey::V30Alt;
}

return;
Expand All @@ -37,6 +38,9 @@ CGame_MK1_A::CGame_MK1_A(uint32_t nConfirmedROMSize)
default:
InitializeGame(nConfirmedROMSize, m_sCoreGameData_Base);
break;
case MK1ALoadingKey::V30Alt:
InitializeGame(nConfirmedROMSize, m_sCoreGameData_V30YAlt);
break;
case MK1ALoadingKey::V50Alt:
InitializeGame(nConfirmedROMSize, m_sCoreGameData_V50TAlt);
break;
Expand All @@ -50,6 +54,8 @@ sFileRule CGame_MK1_A::GetRule(uint32_t nRuleId)
case MK1ALoadingKey::Base:
default:
return CGameClassByDir::GetRule(nRuleId, m_sFileLoadingData_Base);
case MK1ALoadingKey::V30Alt:
return CGameClassByDir::GetRule(nRuleId, m_sFileLoadingData_V30YAlt);
case MK1ALoadingKey::V50Alt:
return CGameClassByDir::GetRule(nRuleId, m_sFileLoadingData_V50TAlt);
}
Expand Down
88 changes: 63 additions & 25 deletions palmod/Game/Game_MK1_A.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class CGame_MK1_A : public CGameClassByDir
enum class MK1ALoadingKey
{
Base,
V30Alt,
V50Alt,
};

Expand All @@ -17,43 +18,47 @@ class CGame_MK1_A : public CGameClassByDir
// For hardware, MK uses the Midway Y Unit (Versions until 4.0) and
// Midway T Unit (Versions 4.0-5.0)
//
// Revision details: https://tcrf.net/Mortal_Kombat_%28Arcade%29#Revision_Differences
//
// The checked revisions, and other file names that would differentiate them are:
// NiftyKombo666Hack
// kombo-u89.u89
// mortall_kombo_rom_u105-j4.u105.bin
// kombo-u89.u89
// mortall_kombo_rom_u105-j4.u105.bin
// NiftyKomboHack
// nifty.105
// nifty.89
// nifty.105
// nifty.89
// PrototypeRev4-07-14-92
// mkprot4.105
// mkprot4.89
// mkprot4.105
// mkprot4.89
// PrototypeRev8-07-21-92
// mkprot8.105
// mkprot8.89
// mkprot8.105
// mkprot8.89
// PrototypeRev9-07-28-92
// mkprot9.105
// mkprot9.89
// mkprot9.105
// mkprot9.89
// Rev1.0-08-09-92
// mkg-u105.la1
// mkg-u89.la1
// mkg-u105.la1
// mkg-u89.la1
// Rev2.0-08-18-02
// mkg-u105.la2
// mkg-u89.la2
// mkg-u105.la2
// mkg-u89.la2
// Rev3.0-08-31-92
// <different file names>
// Rev4.0-TUnit-02-11-93
// mkr4ug12.bin
// mkr4uj12.bin
// mkr4ug12.bin
// mkr4uj12.bin
// Rev5.0TUnit
// sl1_mortal_kombat_u12_sound_rom.u12
// sl1_mortal_kombat_u13_sound_rom.u13
// sl1_mortal_kombat_u3_sound_rom.u3
// sl1_mortal_kombat_u12_sound_rom.u12
// sl1_mortal_kombat_u13_sound_rom.u13
// sl1_mortal_kombat_u3_sound_rom.u3
// Fightcade's alternate Rev5.0TUnit zip:
// <different base filenames>
// <different base filenames>
// Turbo3.1-09-09-93Hack
// kombo-rom-u105.bin
// kombo-rom-u89.bin
// kombo-rom-u105.bin
// kombo-rom-u89.bin
// TurboNinjaTUnit-03-19-93Hack
// kombo-rom-ug-12.bin
// kombo-rom-uj-12.bin
// kombo-rom-ug-12.bin
// kombo-rom-uj-12.bin

static inline const sDirectoryLoadingData m_sFileLoadingData_Base =
{
Expand All @@ -64,6 +69,18 @@ class CGame_MK1_A : public CGameClassByDir
FileReadType::Interleaved_2FileSets,
};

static inline const sDirectoryLoadingData m_sFileLoadingData_V30YAlt =
{
{
// We do not know where the colors for this version are stored:
// this version is not currently supported and as such is not
// exposed in the File Open dialog.
{ L"mkg-u111.rom", 0x80000 },
{ L"mkg-u112.rom", 0x80000 },
},
FileReadType::Interleaved_2FileSets ,
};

static inline const sDirectoryLoadingData m_sFileLoadingData_V50TAlt =
{
{
Expand All @@ -75,8 +92,9 @@ class CGame_MK1_A : public CGameClassByDir

const std::vector<sCRC32ValueSet> m_rgCRC32Data =
{
{ L"Mortal Kombat (rev 5.0 T-Unit 03/19/93)", L"l5_mortal_kombat_t-unit_uj12_game_rom.uj12", 0xf4990bf2, 0 },
{ L"Mortal Kombat (Midway Arcade)", L"mkt-uj12.bin", 0xf4990bf2, 0 },
{ L"Mortal Kombat (rev 3.0 Y-Unit 08/31/92)", L"mkg-u111.rom", 0, 0 },
{ L"Mortal Kombat (rev 5.0 T-Unit 03/19/93)", L"l5_mortal_kombat_t-unit_uj12_game_rom.uj12", 0xf4990bf2, 0 },
};

const sCoreGameData m_sCoreGameData_Base
Expand All @@ -99,6 +117,26 @@ class CGame_MK1_A : public CGameClassByDir
0x907ce, // Lowest known location used for palettes
};

const sCoreGameData m_sCoreGameData_V30YAlt
{
L"Mortal Kombat (rev 3.0 Y-Unit 08/31/92)",
MK1_A,
IMGDAT_SECTION_OTHER,
MK1_A_IMGIDS_USED,
{ NO_SPECIAL_OPTIONS, PALWriteOutputOptions::WRITE_MAX },
eImageOutputSpriteDisplay::DISPLAY_SPRITES_LEFTTORIGHT,
DEF_BUTTONLABEL_2,
AlphaMode::GameDoesNotUseAlpha,
ColMode::COLMODE_RGB555_BE,
m_sFileLoadingData_V30YAlt,
m_rgCRC32Data,
MK1_A_UNITS,
ARRAYSIZE(MK1_A_UNITS),
L"MK1_A_E.txt", // Extra filename
31, // Count of palettes listed in the header
0x907ce, // Lowest known location used for palettes
};

const sCoreGameData m_sCoreGameData_V50TAlt
{
L"Mortal Kombat (rev 5.0 T-Unit 03/19/93)",
Expand Down

0 comments on commit 573d75a

Please sign in to comment.