1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#include <stddef.h>
#include "symbols.h"
const struct symbolname regiondefs[] = {
{ .symbol = 'A', .name = "ASIA PAL area" },
{ .symbol = 'B', .name = "BRAZIL" },
{ .symbol = 'E', .name = "EUROPE" },
{ .symbol = 'J', .name = "JAPAN" },
{ .symbol = 'K', .name = "KOREA" },
{ .symbol = 'L', .name = "LATIN AMERICA" },
{ .symbol = 'T', .name = "TAIWAN and PHILIPINES" },
{ .symbol = 'U', .name = "USA and CANADA" },
{ 0 }
};
const struct symbolname peripheraldefs[] = {
{ .symbol = 'A', .name = "Analog Controller" },
{ .symbol = 'C', .name = "Link Cable" },
{ .symbol = 'D', .name = "Modem" },
{ .symbol = 'E', .name = "3D Control Pad" },
{ .symbol = 'F', .name = "Floppy Drive" },
{ .symbol = 'G', .name = "Virtua Gun" },
{ .symbol = 'J', .name = "Control Pad" },
{ .symbol = 'K', .name = "Keyboard" },
{ .symbol = 'M', .name = "Mouse" },
{ .symbol = 'P', .name = "Video CD Card" },
{ .symbol = 'Q', .name = "Pachinko Controller" },
{ .symbol = 'R', .name = "ROM Catridge" },
{ .symbol = 'S', .name = "Steering Wheel" },
{ .symbol = 'T', .name = "Multi-Tap" },
{ .symbol = 'W', .name = "RAM Cartridge" },
{ .symbol = 'X', .name = "XBAND Modem" },
{ 0 }
};
const struct symbolname *find_symbol(const struct symbolname *symbols, char symbol)
{
for (; symbols->symbol; symbols++) {
if (symbols->symbol == symbol) {
return symbols;
}
}
return NULL;
}
|