void Machine_Set_Mapper(void) { if (DB.current_entry != NULL && DB.current_entry->emu_mapper != -1) { g_machine.mapper = DB.current_entry->emu_mapper; return; } // Select default mapper per driver switch (g_machine.driver_id) { case DRV_SC3000: if (tsms.Size_ROM <= 32*1024) g_machine.mapper = MAPPER_32kRAM; // FIXME: Not technically correct. Should be enabled for BASIC. else g_machine.mapper = MAPPER_SG1000; if (DB.current_entry == NULL && tsms.Size_ROM >= 0x200000) if (memcmp(ROM+0x1F8004, "SC-3000 SURVIVORS MULTICART BOOT MENU", 38) == 0) g_machine.mapper = MAPPER_SC3000_Survivors_Multicart; return; case DRV_COLECO: g_machine.mapper = MAPPER_ColecoVision; return; case DRV_SG1000: g_machine.mapper = MAPPER_SG1000; return; case DRV_SF7000: g_machine.mapper = MAPPER_SF7000; return; case DRV_SMS: case DRV_GG: if (tsms.Size_ROM <= 48*1024) g_machine.mapper = MAPPER_SMS_NoMapper; else g_machine.mapper = MAPPER_Standard; if (DB.current_entry == NULL) // Detect mapper for unknown ROM { const int m = Mapper_Autodetect(); if (m != MAPPER_Auto) g_machine.mapper = m; } return; default: // All Others (which ?) g_machine.mapper = MAPPER_Standard; return; } }
void Machine_Set_Mapper (void) { if (DB_CurrentEntry != NULL && DB_CurrentEntry->emu_mapper != -1) { cur_machine.mapper = DB_CurrentEntry->emu_mapper; return; } // Select default mapper per driver switch (cur_machine.driver_id) { case DRV_SC3000: cur_machine.mapper = MAPPER_32kRAM; return; case DRV_COLECO: cur_machine.mapper = MAPPER_ColecoVision; return; case DRV_SG1000: cur_machine.mapper = MAPPER_SG1000; return; case DRV_SF7000: cur_machine.mapper = MAPPER_SF7000; return; // case DRV_MSX: // cur_machine.mapper = MAPPER_Msx; // return; case DRV_SMS: case DRV_GG: cur_machine.mapper = MAPPER_Standard; if (DB_CurrentEntry == NULL) // Detect mapper for unknown ROM { const int m = Mapper_Autodetect(); if (m != MAPPER_Auto) cur_machine.mapper = m; } return; default: // All Others (which ?) cur_machine.mapper = MAPPER_Standard; return; } }