(*region == 8 ? "EU" : "JAP") : "USA");\r
}\r
\r
+ // look for MSU.MD rom file. XXX another extension list? ugh...\r
+ static const char *md_exts[] = { "gen", "smd", "md", "32x" };\r
+ char *ext = strrchr(cd_fname, '.');\r
+ int extpos = ext ? ext-cd_fname : strlen(cd_fname);\r
+ strcpy(static_buff, cd_fname);\r
+ static_buff[extpos++] = '.';\r
+ for (i = 0; i < ARRAY_SIZE(md_exts); i++) {\r
+ strcpy(static_buff+extpos, md_exts[i]);\r
+ if (access(static_buff, R_OK) == 0) {\r
+ printf("found MSU rom: %s\n",static_buff);\r
+ return static_buff;\r
+ }\r
+ }\r
+\r
+ // locate BIOS file\r
if (*region == 4) { // US\r
files = biosfiles_us;\r
count = sizeof(biosfiles_us) / sizeof(char *);\r
int i, count;
FILE *f = NULL;
+ // look for MSU.MD rom file. XXX another extension list? ugh...
+ static const char *md_exts[] = { "gen", "smd", "md", "32x" };
+ char *ext = strrchr(cd_fname, '.');
+ int extpos = ext ? ext-cd_fname : strlen(cd_fname);
+ strcpy(path, cd_fname);
+ path[extpos++] = '.';
+ for (i = 0; i < ARRAY_SIZE(md_exts); i++) {
+ strcpy(path+extpos, md_exts[i]);
+ f = fopen(path, "rb");
+ if (f != NULL) {
+ log_cb(RETRO_LOG_INFO, "found MSU rom: %s\n", path);
+ fclose(f);
+ return path;
+ }
+ }
+
if (*region == 4) { // US
files = biosfiles_us;
count = sizeof(biosfiles_us) / sizeof(char *);