+int emu_swap_cd(const char *fname)\r
+{\r
+ cd_img_type cd_type;\r
+ int ret = -1;\r
+\r
+ cd_type = emu_cd_check(NULL, fname);\r
+ if (cd_type != CIT_NOT_CD)\r
+ ret = Insert_CD(fname, cd_type);\r
+ if (ret != 0) {\r
+ me_update_msg("Load failed, invalid CD image?");\r
+ return 0;\r
+ }\r
+\r
+ strncpy(rom_fname_loaded, fname, sizeof(rom_fname_loaded)-1);\r
+ rom_fname_loaded[sizeof(rom_fname_loaded)-1] = 0;\r
+ return 1;\r
+}\r
+\r