[Tuxnes-devel] PATCH: dual joy and CVS.
Brought to you by:
tmmm
|
From: Mike M. <che...@ya...> - 2003-11-30 11:51:18
|
I fixed the Dual joy problem and started working on getting CVS fixed. I don't know how to change
RAM to emulator->RAM in emulator_x86.S. Any hints would be appreciated. The attached patch is
for CVS and is only the start. Hopefully emulator_x86.S is the last of the trouble makers.
Here is the patch to CVS -D "Mon Apr 16 12:57:01 2001 UTC".
diff -aur tuxnes-0.75/emu.c tuxnes-joy/emu.c
--- tuxnes-0.75/emu.c 2001-04-11 16:45:47.000000000 -0500
+++ tuxnes-joy/emu.c 2003-11-30 02:45:23.000000000 -0600
@@ -96,7 +96,8 @@
unsigned char js_mapsequence[JS_MAX_NES_BUTTONS] =
{ BUTTONA, BUTTONB, STARTBUTTON, SELECTBUTTON,
LEFT, RIGHT, UP, DOWN, PAUSEDISPLAY };
-unsigned char js_axismeso[JS_MAX_AXES] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+unsigned char js_axismeso[2][JS_MAX_AXES] = {{ 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0 }};
unsigned char js_usermapped2button[2][2] = {{0, 0}, {0, 0}};
#define USAGE "Usage: %s [--help] [options] filename\n"
diff -aur tuxnes-0.75/globals.h tuxnes-joy/globals.h
--- tuxnes-0.75/globals.h 2001-04-11 16:45:47.000000000 -0500
+++ tuxnes-joy/globals.h 2003-11-30 02:31:43.000000000 -0600
@@ -81,7 +81,7 @@
} axis[JS_MAX_AXES];
} js_nesmaps[2];
extern unsigned char js_mapoption[JS_MAX_NES_BUTTONS];
-extern unsigned char js_axismeso[JS_MAX_AXES];
+extern unsigned char js_axismeso[2][JS_MAX_AXES];
extern unsigned char js_usermapped2button[2][2];
/* Flags */
diff -aur tuxnes-0.75/x11.c tuxnes-joy/x11.c
--- tuxnes-0.75/x11.c 2001-04-11 16:45:48.000000000 -0500
+++ tuxnes-joy/x11.c 2003-11-30 02:30:11.000000000 -0600
@@ -882,22 +882,22 @@
case 2: /* axis report */
if (js.value < -JS_IGNORE)
{
- js_axismeso[js.number] = js_nesmaps[stick].axis[js.number].neg;
+ js_axismeso[stick][js.number] = js_nesmaps[stick].axis[js.number].neg;
controller[stick] &= ~js_nesmaps[stick].axis[js.number].pos;
}
else if (js.value > JS_IGNORE)
{
- js_axismeso[js.number] = js_nesmaps[stick].axis[js.number].pos;
+ js_axismeso[stick][js.number] = js_nesmaps[stick].axis[js.number].pos;
controller[stick] &= ~js_nesmaps[stick].axis[js.number].neg;
}
else
{
- js_axismeso[js.number] = 0;
+ js_axismeso[stick][js.number] = 0;
controller[stick] &= ~js_nesmaps[stick].axis[js.number].neg;
controller[stick] &= ~js_nesmaps[stick].axis[js.number].pos;
}
- for( axis_i = JS_MAX_AXES; --axis_i >= 0; )
- controller[stick] |= js_axismeso[axis_i];
+ for( axis_i = JS_MAX_AXES; --axis_i >= 0; )
+ controller[stick] |= js_axismeso[stick][axis_i];
break;
}
}
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/ |