1 /*
2 console.c - console support for uCON64
3 
4 Copyright (c) 2006 NoisyB
5 
6 
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21 #ifdef  HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24 #include "console/console.h"
25 
26 
27 const st_getopt2_t unknown_console_usage[] =
28   {
29     {
30       NULL, 0, 0, 0,
31       NULL, "Unknown console",
32       NULL
33     },
34     {NULL, 0, 0, 0, NULL, NULL, NULL}
35   };
36 
37 
38 int
unknown_console_init(st_ucon64_nfo_t * rominfo)39 unknown_console_init (st_ucon64_nfo_t *rominfo)
40 {
41   ucon64.nfo = rominfo;
42   ucon64.dat = NULL;
43 #ifdef  USE_DISCMAGE
44   ucon64.image = NULL;
45 #endif
46 
47   return 0;
48 }
49 
50 
51 static st_ucon64_obj_t gc_obj[] =
52   {
53     {UCON64_GC, WF_SWITCH}
54   };
55 
56 const st_getopt2_t gc_usage[] =
57   {
58     {
59       NULL, 0, 0, 0,
60       NULL, "Nintendo Game Cube/Panasonic Gamecube Q"
61       /*"2001/2002 Nintendo http://www.nintendo.com"*/,
62       NULL
63     },
64     {
65       UCON64_GC_S, 0, 0, UCON64_GC,
66       NULL, "force recognition",
67       &gc_obj[0]
68     },
69     {NULL, 0, 0, 0, NULL, NULL, NULL}
70   };
71 
72 
73 static st_ucon64_obj_t s16_obj[] =
74   {
75     {UCON64_S16, WF_SWITCH}
76   };
77 
78 const st_getopt2_t s16_usage[] =
79   {
80     {
81       NULL, 0, 0, 0,
82       NULL, "Sega System 16(A/B)/Sega System 18/dual 68000"
83       /*"1987/19XX/19XX SEGA http://www.sega.com"*/,
84       NULL
85     },
86     {
87       UCON64_S16_S, 0, 0, UCON64_S16,
88       NULL, "force recognition",
89       &s16_obj[0]
90     },
91     {NULL, 0, 0, 0, NULL, NULL, NULL}
92   };
93 
94 
95 static st_ucon64_obj_t vectrex_obj[] =
96   {
97     {UCON64_VEC, WF_SWITCH}
98   };
99 
100 const st_getopt2_t vectrex_usage[] =
101   {
102     {
103       NULL, 0, 0, 0,
104       NULL, "Vectrex"
105       /*"1982"*/,
106       NULL
107     },
108     {
109       UCON64_VEC_S, 0, 0, UCON64_VEC,
110       NULL, "force recognition",
111       &vectrex_obj[0]
112     },
113     {NULL, 0, 0, 0, NULL, NULL, NULL}
114   };
115 
116 
117 static st_ucon64_obj_t intelli_obj[] =
118   {
119     {UCON64_INTELLI, WF_SWITCH}
120   };
121 
122 const st_getopt2_t intelli_usage[] =
123   {
124     {
125       NULL, 0, 0, 0,
126       NULL, "Intellivision"
127       /*"1979 Mattel"*/,
128       NULL
129     },
130     {
131       UCON64_INTELLI_S, 0, 0, UCON64_INTELLI,
132       NULL, "force recognition",
133       &intelli_obj[0]
134     },
135     {NULL, 0, 0, 0, NULL, NULL, NULL}
136   };
137 
138 
139 static st_ucon64_obj_t gp32_obj[] =
140   {
141     {UCON64_GP32, WF_SWITCH}
142   };
143 
144 const st_getopt2_t gp32_usage[] =
145   {
146     {
147       NULL, 0, 0, 0,
148       NULL, "GP32 Game System/GPX2 - F100"
149       /*"2001 Gamepark http://www.gamepark.co.kr"*/,
150       NULL
151     },
152     {
153       UCON64_GP32_S, 0, 0, UCON64_GP32,
154       NULL, "force recognition",
155       &gp32_obj[0]
156     },
157     {NULL, 0, 0, 0, NULL, NULL, NULL}
158   };
159 
160 
161 static st_ucon64_obj_t ps2_obj[] =
162   {
163     {UCON64_PS2, WF_SWITCH}
164   };
165 
166 const st_getopt2_t ps2_usage[] =
167   {
168     {
169       NULL, 0, 0, 0,
170       NULL, "Playstation 2"
171       /*"2000 Sony http://www.playstation.com"*/,
172       NULL
173     },
174     {
175       UCON64_PS2_S, 0, 0, UCON64_PS2,
176       NULL, "force recognition",
177       &ps2_obj[0]
178     },
179     {NULL, 0, 0, 0, NULL, NULL, NULL}
180   };
181 
182 
183 static st_ucon64_obj_t xbox_obj[] =
184   {
185     {UCON64_XBOX, WF_SWITCH}
186   };
187 
188 const st_getopt2_t xbox_usage[] =
189   {
190     {
191       NULL, 0, 0, 0,
192       NULL, "Xbox"
193       /*"2001 Microsoft http://www.xbox.com"*/,
194       NULL
195     },
196     {
197       UCON64_XBOX_S, 0, 0, UCON64_XBOX,
198       NULL, "force recognition",
199       &xbox_obj[0]
200     },
201     {NULL, 0, 0, 0, NULL, NULL, NULL}
202   };
203 
204 
205 static st_ucon64_obj_t sat_obj[] =
206   {
207     {UCON64_SAT, WF_SWITCH}
208   };
209 
210 const st_getopt2_t sat_usage[] =
211   {
212     {
213       NULL, 0, 0, 0,
214       NULL, "Saturn"
215       /*"1994 SEGA http://www.sega.com"*/,
216       NULL
217     },
218     {
219       UCON64_SAT_S, 0, 0, UCON64_SAT,
220       NULL, "force recognition",
221       &sat_obj[0]
222     },
223     {NULL, 0, 0, 0, NULL, NULL, NULL}
224   };
225 
226 
227 static st_ucon64_obj_t real3do_obj[] =
228   {
229     {UCON64_3DO, WF_SWITCH}
230   };
231 
232 const st_getopt2_t real3do_usage[] =
233   {
234     {
235       NULL, 0, 0, 0,
236       NULL, "Real3DO"
237       /*"1993 Panasonic/Goldstar/Philips"*/,
238       NULL
239     },
240     {
241       UCON64_3DO_S, 0, 0, UCON64_3DO,
242       NULL, "force recognition",
243       &real3do_obj[0]
244     },
245     {NULL, 0, 0, 0, NULL, NULL, NULL}
246   };
247 
248 
249 static st_ucon64_obj_t cd32_obj[] =
250   {
251     {UCON64_CD32, WF_SWITCH}
252   };
253 
254 const st_getopt2_t cd32_usage[] =
255   {
256     {
257       NULL, 0, 0, 0,
258       NULL, "CD32"
259       /*"1993 Commodore"*/,
260       NULL
261     },
262     {
263       UCON64_CD32_S, 0, 0, UCON64_CD32,
264       NULL, "force recognition",
265       &cd32_obj[0]
266     },
267     {NULL, 0, 0, 0, NULL, NULL, NULL}
268   };
269 
270 
271 static st_ucon64_obj_t cdi_obj[] =
272   {
273     {UCON64_CDI, WF_SWITCH}
274   };
275 
276 const st_getopt2_t cdi_usage[] =
277   {
278     {
279       NULL, 0, 0, 0,
280       NULL, "CD-i"
281       /*"1991 Philips"*/,
282       NULL
283     },
284     {
285       UCON64_CDI_S, 0, 0, UCON64_CDI,
286       NULL, "force recognition",
287       &cdi_obj[0]
288     },
289     {NULL, 0, 0, 0, NULL, NULL, NULL}
290   };
291 
292 const st_getopt2_t vc4000_usage[] =
293   {
294     {
295       NULL, 0, 0, 0,
296       NULL, "Interton VC4000"
297       /*"~1980"*/,
298       NULL
299     },
300     {NULL, 0, 0, 0, NULL, NULL, NULL}
301   };
302 
303 const st_getopt2_t odyssey2_usage[] =
304   {
305     {
306       NULL, 0, 0, 0,
307       NULL, "G7400+/Odyssey2"
308       /*"1978"*/,
309       NULL
310     },
311     {NULL, 0, 0, 0, NULL, NULL, NULL}
312   };
313 
314 const st_getopt2_t channelf_usage[] =
315   {
316     {
317       NULL, 0, 0, 0,
318       NULL, "FC Channel F"
319       /*"1976"*/,
320       NULL
321     },
322     {NULL, 0, 0, 0, NULL, NULL, NULL}
323   };
324 
325 const st_getopt2_t odyssey_usage[] =
326   {
327     {
328       NULL, 0, 0, 0,
329       NULL, "Magnavox Odyssey"
330       /*"1972 Ralph Baer (USA)"*/,
331       NULL
332     },
333     {NULL, 0, 0, 0, NULL, NULL, NULL}
334   };
335 
336 const st_getopt2_t gamecom_usage[] =
337   {
338     {
339       NULL, 0, 0, 0,
340       NULL, "Game.com"
341       /*"1997 Tiger Electronics"*/,
342       NULL
343     },
344     {NULL, 0, 0, 0, NULL, NULL, NULL}
345   };
346 
347 const st_getopt2_t arcade_usage[] =
348   {
349     {
350       NULL, 0, 0, 0,
351       NULL, "Arcade Machines/M.A.M.E. (Multiple Arcade Machine Emulator)",
352       NULL
353     },
354     {NULL, 0, 0, 0, NULL, NULL, NULL}
355   };
356 #if 0
357 Nintendo Revolution 2006
358 Xbox 360
359 PS3
360 Microvision (Handheld)/1979 MB
361 Supervision/1991 Hartung
362 Pokemon Mini/200X Nintendo http://www.nintendo.com
363 N-Gage/2003 Nokia http://www.n-gage.com
364 PSP (Playstation Portable)/2005 Sony http://www.playstation.com
365 Adv. Vision
366 Arcadia
367 Astrocade
368 Indrema
369 Nuon
370 RCA Studio 2
371 RDI Halcyon
372 Telstar
373 XE System
374 #endif
375 
376 
377 // _publisher_ strings for SNES, GB, GBC and GBA games
378 const char *nintendo_maker[NINTENDO_MAKER_LEN] =
379   {
380     NULL, "Nintendo", "Rocket Games/Ajinomoto", "Imagineer-Zoom", "Gray Matter",
381     "Zamuse", "Falcom", NULL, "Capcom", "Hot B Co.",
382     "Jaleco", "Coconuts Japan", "Coconuts Japan/G.X.Media",
383       "Micronet", "Technos",
384     "Mebio Software", "Shouei System", "Starfish", NULL, "Mitsui Fudosan/Dentsu",
385     NULL, "Warashi Inc.", NULL, "Nowpro", NULL,
386     "Game Village", NULL, NULL, NULL, NULL,
387     NULL, NULL, NULL, NULL, NULL,
388     NULL,                                       // 0Z
389     NULL, "Starfish", "Infocom", "Electronic Arts Japan", NULL,
390     "Cobra Team", "Human/Field", "KOEI", "Hudson Soft", "S.C.P./Game Village",
391     "Yanoman", NULL, "Tecmo Products", "Japan Glary Business", "Forum/OpenSystem",
392     "Virgin Games (Japan)", "SMDE", NULL, NULL, "Daikokudenki",
393     NULL, NULL, NULL, NULL, NULL,
394     "Creatures Inc.", "TDK Deep Impresion", NULL, NULL, NULL,
395     NULL, NULL, NULL, NULL, NULL,
396     NULL,                                       // 1Z
397     "Destination Software/KSS", "Sunsoft/Tokai Engineering",
398       "POW (Planning Office Wada)/VR 1 Japan", "Micro World", NULL,
399     "San-X", "Enix", "Loriciel/Electro Brain", "Kemco Japan", "Seta Co., Ltd.",
400     "Culture Brain", NULL, "Palsoft", "Visit Co., Ltd.", "Intec",
401     "System Sacom", "Poppo", "Ubisoft Japan", NULL, "Media Works",
402     "NEC InterChannel", "Tam", "Gajin/Jordan", "Smilesoft", NULL,
403     NULL, "Mediakite", NULL, NULL, NULL,
404     NULL, NULL, NULL, NULL, NULL,
405     NULL,                                       // 2Z
406     "Viacom", "Carrozzeria", "Dynamic", NULL, "Magifact",
407     "Hect", "Codemasters", "Taito/GAGA Communications", "Laguna",
408       "Telstar Fun & Games/Event/Taito",
409     NULL, "Arcade Zone Ltd.", "Entertainment International/Empire Software", "Loriciel",
410       "Gremlin Graphics",
411     NULL, NULL, NULL, NULL, NULL,
412     NULL, NULL, NULL, NULL, NULL,
413     NULL, NULL, NULL, NULL, NULL,
414     NULL, NULL, NULL, NULL, NULL,
415     NULL,                                       // 3Z
416     "Seika Corp.", "UBI SOFT Entertainment Software", "Sunsoft US", NULL, "Life Fitness",
417     NULL, "System 3", "Spectrum Holobyte", NULL, "IREM",
418     NULL, "Raya Systems", "Renovation Products", "Malibu Games", NULL,
419     "Eidos/U.S. Gold", "Playmates Interactive", NULL, NULL, "Fox Interactive",
420     "Time Warner Interactive", NULL, NULL, NULL, NULL,
421     NULL, "Disney Interactive", NULL, "Black Pearl", NULL,
422     "Advanced Productions", NULL, NULL, "GT Interactive", "RARE",
423     "Crave Entertainment",                      // 4Z
424     "Absolute Entertainment", "Acclaim", "Activision", "American Sammy", "Take 2/GameTek",
425     "Hi Tech", "LJN Ltd.", NULL, "Mattel", NULL,
426     "Mindscape/Red Orb Entertainment", "Romstar", "Taxan", "Midway/Tradewest", NULL,
427     "American Softworks Corp.", "Majesco Sales Inc.", "3DO", NULL, NULL,
428     "Hasbro", "NewKidCo", "Telegames", "Metro3D", NULL,
429     "Vatical Entertainment", "LEGO Media", NULL, "Xicat Interactive", "Cryo Interactive",
430     NULL, NULL, "Red Storm Entertainment", "Microids", NULL,
431     "Conspiracy/Swing",                         // 5Z
432     "Titus", "Virgin Interactive", "Maxis", NULL, "LucasArts Entertainment",
433     NULL, NULL, "Ocean", NULL, "Electronic Arts",
434     NULL, "Laser Beam", NULL, NULL, "Elite Systems",
435     "Electro Brain", "The Learning Company", "BBC", NULL, "Software 2000",
436     NULL, "BAM! Entertainment", "Studio 3", NULL, NULL,
437     NULL, "Classified Games", NULL, "TDK Mediactive", NULL,
438     "DreamCatcher", "JoWood Produtions", "SEGA", "Wannado Edition",
439       "LSP (Light & Shadow Prod.)",
440     "ITE Media",                                // 6Z
441     "Infogrames", "Interplay", "JVC (US)", "Parker Brothers", NULL,
442     "SCI (Sales Curve Interactive)/Storm", NULL, NULL, "THQ Software", "Accolade Inc.",
443     "Triffix Entertainment", NULL, "Microprose Software",
444       "Universal Interactive/Sierra/Simon & Schuster", NULL,
445     "Kemco", "Rage Software", "Encore", NULL, "Zoo",
446     "BVM", "Simon & Schuster Interactive", "Asmik Ace Entertainment Inc./AIA",
447       "Empire Interactive", NULL,
448     NULL, "Jester Interactive", NULL, NULL, "Scholastic",
449     "Ignition Entertainment", NULL, "Stadlbauer", NULL, NULL,
450     NULL,                                       // 7Z
451     "Misawa", "Teichiku", "Namco Ltd.", "LOZC", "KOEI",
452     NULL, "Tokuma Shoten Intermedia", "Tsukuda Original", "DATAM-Polystar", NULL,
453     NULL, "Bulletproof Software", "Vic Tokai Inc.", NULL, "Character Soft",
454     "I'Max", "Saurus", NULL, NULL, "General Entertainment",
455     NULL, NULL, "I'Max", "Success", NULL,
456     "SEGA Japan", NULL, NULL, NULL, NULL,
457     NULL, NULL, NULL, NULL, NULL,
458     NULL,                                       // 8Z
459     "Takara", "Chun Soft", "Video System Co., Ltd./McO'River", "BEC", NULL,
460     "Varie", "Yonezawa/S'pal", "Kaneko", NULL, "Victor Interactive Software/Pack in Video",
461     "Nichibutsu/Nihon Bussan", "Tecmo", "Imagineer", NULL, NULL,
462     "Nova", "Den'Z", "Bottom Up", NULL, "TGL (Technical Group Laboratory)",
463     NULL, "Hasbro Japan", NULL, "Marvelous Entertainment", NULL,
464     "Keynet Inc.", "Hands-On Entertainment", NULL, NULL, NULL,
465     NULL, NULL, NULL, NULL, NULL,
466     NULL,                                       // 9Z
467     "Telenet", "Hori", NULL, NULL, "Konami",
468     "K.Amusement Leasing Co.", "Kawada", "Takara", NULL, "Technos Japan Corp.",
469     "JVC (Europe/Japan)/Victor Musical Industries", NULL, "Toei Animation", "Toho", NULL,
470     "Namco", "Media Rings Corp.", "J-Wing", NULL, "Pioneer LDC",
471     "KID", "Mediafactory", NULL, NULL, NULL,
472     "Infogrames Hudson", NULL, NULL, NULL, NULL,
473     NULL, NULL, NULL, NULL, NULL,
474     NULL,                                       // AZ
475     "Acclaim Japan", "ASCII Co./Nexoft" /* Activision */, "Bandai", NULL, "Enix",
476     NULL, "HAL Laboratory/Halken", "SNK", NULL, "Pony Canyon Hanbai",
477     "Culture Brain", "Sunsoft", "Toshiba EMI", "Sony Imagesoft", NULL,
478     "Sammy", "Magical", "Visco", NULL, "Compile",
479     NULL, "MTO Inc.", NULL, "Sunrise Interactive", NULL,
480     "Global A Entertainment", "Fuuki", NULL, NULL, NULL,
481     NULL, NULL, NULL, NULL, NULL,
482     NULL,                                       // BZ
483     "Taito", NULL, "Kemco", "Square", "Tokuma Shoten",
484     "Data East", "Tonkin House", NULL, "KOEI", NULL,
485     "Konami/Ultra/Palcom", "NTVIC/VAP", "Use Co., Ltd.", "Meldac",
486       "Pony Canyon (Japan)/FCI (US)",
487     "Angel/Sotsu Agency/Sunrise", "Yumedia/Aroma Co., Ltd.", NULL, NULL, "Boss",
488     "Axela/Crea-Tech", "Sekaibunka-Sha/Sumire kobo/Marigul Management Inc.",
489       "Konami Computer Entertainment Osaka", NULL, NULL,
490     "Enterbrain", NULL, NULL, NULL, NULL,
491     NULL, NULL, NULL, NULL, NULL,
492     NULL,                                       // CZ
493     "Taito/Disco", "Sofel", "Quest Corp.", "Sigma", "Ask Kodansha",
494     NULL, "Naxat", "Copya System", "Capcom Co., Ltd.", "Banpresto",
495     "TOMY", "Acclaim/LJN Japan", NULL, "NCS", "Human Entertainment",
496     "Altron", "Jaleco", "Gaps Inc.", NULL, NULL,
497     NULL, NULL, NULL, "Elf", NULL,
498     NULL, NULL, NULL, NULL, NULL,
499     NULL, NULL, NULL, NULL, NULL,
500     NULL,                                       // DZ
501     "Jaleco", NULL, "Yutaka", "Varie", "T&ESoft",
502     "Epoch Co., Ltd.", NULL, "Athena", "Asmik", "Natsume",
503     "King Records", "Atlus", "Epic/Sony Records (Japan)", NULL,
504       "IGS (Information Global Service)",
505     NULL, "Chatnoir", "Right Stuff", NULL, NULL,
506     NULL, "Spike", "Konami Computer Entertainment Tokyo", "Alphadream Corp.", NULL,
507     NULL, NULL, NULL, NULL, NULL,
508     NULL, NULL, NULL, NULL, NULL,
509     NULL,                                       // EZ
510     "A Wave", "Motown Software", "Left Field Entertainment", "Extreme Ent. Grp.",
511       "TecMagik",
512     NULL, NULL, NULL, NULL, "Cybersoft",
513     NULL, "Psygnosis", NULL, NULL, "Davidson/Western Tech.",
514     NULL, NULL, NULL, NULL, NULL,
515     NULL, NULL, NULL, NULL, NULL,
516     NULL, NULL, NULL, NULL, NULL,
517     NULL, NULL, NULL, NULL, NULL,
518     NULL,                                       // FZ
519     NULL, "PCCW Japan", NULL, NULL, "KiKi Co. Ltd.",
520     "Open Sesame Inc.", "Sims", "Broccoli", "Avex", NULL,
521     NULL, NULL, NULL, NULL, NULL,
522     NULL, NULL, NULL, NULL, NULL,
523     NULL, NULL, NULL, NULL, NULL,
524     NULL, NULL, NULL, NULL, NULL,
525     NULL, NULL, NULL, NULL, NULL,
526     NULL,                                       // GZ
527     NULL, NULL, NULL, NULL, NULL,
528     NULL, NULL, NULL, NULL, NULL,
529     NULL, NULL, NULL, NULL, NULL,
530     NULL, NULL, NULL, NULL, NULL,
531     NULL, NULL, NULL, NULL, NULL,
532     NULL, NULL, NULL, NULL, NULL,
533     NULL, NULL, NULL, NULL, NULL,
534     NULL,                                       // HZ
535     NULL, NULL, NULL, NULL, NULL,
536     NULL, NULL, NULL, NULL, NULL,
537     NULL, NULL, NULL, NULL, NULL,
538     NULL, NULL, "Yojigen", NULL, NULL,
539     NULL, NULL, NULL, NULL, NULL,
540     NULL, NULL, NULL, NULL, NULL,
541     NULL, NULL, NULL, NULL, NULL,
542     NULL                                        // IZ
543   };
544