From 573d75a9a0569fffd35a5af32ebd9c4828d93172 Mon Sep 17 00:00:00 2001 From: Zach Robinson Date: Thu, 7 Dec 2023 13:56:23 -0800 Subject: [PATCH] MK1A: differentiate between T and Y units Note that we don't support the Y unit variants currently. --- palmod/Game/Game_MK1_A.cpp | 8 +++- palmod/Game/Game_MK1_A.h | 88 +++++++++++++++++++++++++++----------- 2 files changed, 70 insertions(+), 26 deletions(-) diff --git a/palmod/Game/Game_MK1_A.cpp b/palmod/Game/Game_MK1_A.cpp index c5f59860..045037cd 100644 --- a/palmod/Game/Game_MK1_A.cpp +++ b/palmod/Game/Game_MK1_A.cpp @@ -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 }, }; @@ -23,7 +24,7 @@ void CGame_MK1_A::SetSpecialRuleForFileName(std::wstring strFileName) } else { - m_eVersionToLoad = MK1ALoadingKey::Base; + m_eVersionToLoad = MK1ALoadingKey::V30Alt; } return; @@ -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; @@ -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); } diff --git a/palmod/Game/Game_MK1_A.h b/palmod/Game/Game_MK1_A.h index 52de877c..8efa1150 100644 --- a/palmod/Game/Game_MK1_A.h +++ b/palmod/Game/Game_MK1_A.h @@ -8,6 +8,7 @@ class CGame_MK1_A : public CGameClassByDir enum class MK1ALoadingKey { Base, + V30Alt, V50Alt, }; @@ -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 + // // 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: - // + // // 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 = { @@ -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 = { { @@ -75,8 +92,9 @@ class CGame_MK1_A : public CGameClassByDir const std::vector 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 @@ -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)",