diff --git a/core/hw/naomi/m4cartridge.h b/core/hw/naomi/m4cartridge.h index b2c3947b6..52b5dd031 100644 --- a/core/hw/naomi/m4cartridge.h +++ b/core/hw/naomi/m4cartridge.h @@ -62,7 +62,7 @@ private: static const u8 k_sboxes[4][16]; u16 m4id; - u8 *m_key_data; // 2048 bytes + u8 *m_key_data = NULL; // 2048 bytes u16 subkey1, subkey2; u16 one_round[0x10000]; diff --git a/core/hw/naomi/naomi_cart.cpp b/core/hw/naomi/naomi_cart.cpp index aea8b5e39..f91324d62 100644 --- a/core/hw/naomi/naomi_cart.cpp +++ b/core/hw/naomi/naomi_cart.cpp @@ -164,7 +164,19 @@ static bool naomi_cart_LoadZip(char *filename) } struct Game *game = &Games[gameid]; - +#if DC_PLATFORM == DC_PLATFORM_NAOMI + if (game->cart_type == AW) + { + msgboxf("Atomiswave cartridges are not supported by NAOMI", 0); + return false; + } +#else + if (game->cart_type != AW) + { + msgboxf("NAOMI cartridges are not supported by Atomiswave", 0); + return false; + } +#endif Archive *archive = OpenArchive(filename); if (archive != NULL) printf("Opened %s\n", filename);