void Free_ROM (void) { // Call BMemory_Save() only if Machine_Off() won't call it // FIXME: this is some crap hack, the whole machine thing need to be rewritten if (!(g_machine_flags & MACHINE_POWER_ON)) BMemory_Save(); Machine_OFF(); Machine_Remove_Cartridge(); g_machine_flags = 0; if (Game_ROM) { free (Game_ROM); Game_ROM = NULL; tsms.Size_ROM = 0; DB.current_entry = NULL; BIOS_Load(); } if (g_machine.driver_id != DRV_COLECO) g_machine.driver_id = DRV_SMS; Machine_Reset(); gamebox_rename_all(); Change_System_Misc(); // Clear filename data strcpy(g_env.Paths.MediaImageFile, ""); Filenames_Init_ROM(); }
void Load_ROM_Misc (int reset) { // Check for overdump Check_OverDump(); // Perform checksum and DB lookup Checksum_Perform (ROM, tsms.Size_ROM); // Automatic SMS-GG mode // This is because GoodTools kept putting SMS-mode GG games with a .GG extension // So the emulator is forced to look them up with a database ... if (DB.current_entry && (DB.current_entry->flags & DB_FLAG_SMSGG_MODE)) { // Why the test? Because we want the game to disfunction "properly" with a .SG/.COL extension // Of course, in the future, MEKA may could force ALL driver based on DB entry. // But this will cause a problem for Pit Pot secret screen in SG-1000 mode (and Hang On, etc...) // Then this will require advanced-user selectable machine. if (g_machine.driver_id == DRV_GG) g_machine.driver_id = DRV_SMS; } // Initialize patching system for this ROM and apply Patches_ROM_Initialize(); Patches_ROM_Apply(); // Set driver drv_set (g_machine.driver_id); // Do not system if old AND new driver is SF7000 (for disk change, this is slighty hacky) if (reset || g_machine.driver_id != DRV_SF7000) { Machine_Init(); g_machine_flags |= MACHINE_ROM_LOADED; Machine_Insert_Cartridge(); Machine_ON(); } if (g_machine.driver_id == DRV_SF7000) FDC765_Disk_Insert(0, ROM, tsms.Size_ROM); // FIXME: do not save Backed Memory in non-verbose mode // Read the full comment next to BMemory_Save() in Load_ROM() if (Loading_UserVerbose) BMemory_Load(); // Update game boxes gamebox_rename_all(); // Miscellaneous things to apply when machine type change Change_System_Misc(); // BIOS load/unload // FIXME: this is a mess if ((g_config.enable_BIOS) && (g_machine.driver_id == DRV_SMS) && (sms.Country == COUNTRY_EXPORT)) BIOS_Load(); else BIOS_Unload(); }
static void Lang_Set (t_menu_event *event) { Messages.Lang_Cur = (t_lang *)event->user_data; gui_menu_uncheck_all (menus_ID.languages); gui_menu_check (menus_ID.languages, event->menu_item_idx); Msg(MSGT_USER, Msg_Get(MSG_Language_Set), Messages.Lang_Cur->Name); Msg(MSGT_USER_BOX, "%s", Msg_Get(MSG_Language_Set_Warning)); // Post-process // FIXME: Rebuild menus gamebox_rename_all(); gui_relayout_all(); }