-static const char *region_name(unsigned int code)\r
-{\r
- static const char *names[] = { "Auto", " Japan NTSC", " Japan PAL", " USA", " Europe" };\r
- static const char *names_short[] = { "", " JP", " JP", " US", " EU" };\r
- int u, i = 0;\r
- if (code) {\r
- code <<= 1;\r
- while((code >>= 1)) i++;\r
- if (i > 4) return "unknown";\r
- return names[i];\r
- } else {\r
- static char name[24];\r
- strcpy(name, "Auto:");\r
- for (u = 0; u < 3; u++) {\r
- i = 0; code = ((PicoAutoRgnOrder >> u*4) & 0xf) << 1;\r
- while((code >>= 1)) i++;\r
- strcat(name, names_short[i]);\r
- }\r
- return name;\r
- }\r
-}\r
-\r
-\r