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
|
diff -Nru base0113s/src/emu/info.c w0113/src/emu/info.c
--- base0113s/src/emu/info.c 2007-02-12 16:43:00.000000000 +1300
+++ w0113/src/emu/info.c 2007-03-06 10:40:09.000000000 +1300
@@ -36,6 +36,7 @@
static void print_game_switch(FILE* out, const game_driver* game)
{
const input_port_entry* input;
+ int port = -1;
begin_resource_tracking();
@@ -43,6 +44,9 @@
while (input->type != IPT_END)
{
+ if(input->start.tag != NULL)
+ port++;
+
if (input->type==IPT_DIPSWITCH_NAME)
{
int def = input->default_value;
@@ -50,6 +54,8 @@
fprintf(out, "\t\t<dipswitch");
fprintf(out, " name=\"%s\"", xml_normalize_string(input->name));
+ fprintf(out, " mask=\"%i\"", input->mask);
+ fprintf(out, " port=\"%i\"", port);
++input;
fprintf(out, ">\n");
@@ -58,6 +64,7 @@
{
fprintf(out, "\t\t\t<dipvalue");
fprintf(out, " name=\"%s\"", xml_normalize_string(input->name));
+ fprintf(out, " value=\"%i\"", input->default_value);
if (def == input->default_value)
fprintf(out, " default=\"yes\"");
|