head 1.33; access; symbols pkgsrc-2013Q2:1.33.0.8 pkgsrc-2013Q2-base:1.33 pkgsrc-2012Q4:1.33.0.6 pkgsrc-2012Q4-base:1.33 pkgsrc-2011Q4:1.33.0.4 pkgsrc-2011Q4-base:1.33 pkgsrc-2011Q2:1.33.0.2 pkgsrc-2011Q2-base:1.33 pkgsrc-2010Q4:1.32.0.42 pkgsrc-2010Q4-base:1.32 pkgsrc-2010Q3:1.32.0.40 pkgsrc-2010Q3-base:1.32 pkgsrc-2010Q2:1.32.0.38 pkgsrc-2010Q2-base:1.32 pkgsrc-2010Q1:1.32.0.36 pkgsrc-2010Q1-base:1.32 pkgsrc-2009Q4:1.32.0.34 pkgsrc-2009Q4-base:1.32 pkgsrc-2009Q3:1.32.0.32 pkgsrc-2009Q3-base:1.32 pkgsrc-2009Q2:1.32.0.30 pkgsrc-2009Q2-base:1.32 pkgsrc-2009Q1:1.32.0.28 pkgsrc-2009Q1-base:1.32 pkgsrc-2008Q4:1.32.0.26 pkgsrc-2008Q4-base:1.32 pkgsrc-2008Q3:1.32.0.24 pkgsrc-2008Q3-base:1.32 cube-native-xorg:1.32.0.22 cube-native-xorg-base:1.32 pkgsrc-2008Q2:1.32.0.20 pkgsrc-2008Q2-base:1.32 cwrapper:1.32.0.18 pkgsrc-2008Q1:1.32.0.16 pkgsrc-2008Q1-base:1.32 pkgsrc-2007Q4:1.32.0.14 pkgsrc-2007Q4-base:1.32 pkgsrc-2007Q3:1.32.0.12 pkgsrc-2007Q3-base:1.32 pkgsrc-2007Q2:1.32.0.10 pkgsrc-2007Q2-base:1.32 pkgsrc-2007Q1:1.32.0.8 pkgsrc-2007Q1-base:1.32 pkgsrc-2006Q4:1.32.0.6 pkgsrc-2006Q4-base:1.32 pkgsrc-2006Q3:1.32.0.4 pkgsrc-2006Q3-base:1.32 pkgsrc-2006Q2:1.32.0.2 pkgsrc-2006Q2-base:1.32 pkgsrc-2006Q1:1.31.0.8 pkgsrc-2006Q1-base:1.31 pkgsrc-2005Q4:1.31.0.6 pkgsrc-2005Q4-base:1.31 pkgsrc-2005Q3:1.31.0.4 pkgsrc-2005Q3-base:1.31 pkgsrc-2005Q2:1.31.0.2 pkgsrc-2005Q2-base:1.31 pkgsrc-2005Q1:1.30.0.4 pkgsrc-2005Q1-base:1.30 pkgsrc-2004Q4:1.30.0.2 pkgsrc-2004Q4-base:1.30 pkgsrc-2004Q3:1.29.0.2 pkgsrc-2004Q3-base:1.29 pkgsrc-2004Q2:1.25.0.2 pkgsrc-2004Q2-base:1.25 pkgsrc-2004Q1:1.22.0.2 pkgsrc-2004Q1-base:1.22 pkgsrc-2003Q4:1.20.0.2 pkgsrc-2003Q4-base:1.20 buildlink2-base:1.14 netbsd-1-5-PATCH001:1.7 netbsd-1-3-PATCH003:1.5 netbsd-1-3-PATCH002:1.1; locks; strict; comment @# @; 1.33 date 2011.02.06.05.00.57; author wiz; state dead; branches; next 1.32; 1.32 date 2006.06.15.11.40.00; author dillo; state Exp; branches; next 1.31; 1.31 date 2005.04.02.20.56.28; author kristerw; state Exp; branches; next 1.30; 1.30 date 2004.11.27.01.30.40; author kristerw; state Exp; branches; next 1.29; 1.29 date 2004.09.05.20.40.26; author kristerw; state dead; branches; next 1.28; 1.28 date 2004.08.25.01.20.11; author wiz; state Exp; branches; next 1.27; 1.27 date 2004.08.14.00.25.13; author kristerw; state dead; branches; next 1.26; 1.26 date 2004.07.26.18.40.06; author dillo; state Exp; branches; next 1.25; 1.25 date 2004.05.26.09.34.17; author dillo; state Exp; branches; next 1.24; 1.24 date 2004.04.16.20.44.54; author kristerw; state dead; branches; next 1.23; 1.23 date 2004.04.02.17.45.51; author kristerw; state Exp; branches; next 1.22; 1.22 date 2004.02.21.00.08.00; author kristerw; state dead; branches; next 1.21; 1.21 date 2004.02.19.19.16.57; author kristerw; state Exp; branches; next 1.20; 1.20 date 2003.08.16.18.50.29; author kristerw; state dead; branches; next 1.19; 1.19 date 2003.07.19.21.02.33; author kristerw; state Exp; branches; next 1.18; 1.18 date 2003.05.27.12.42.40; author kristerw; state dead; branches; next 1.17; 1.17 date 2003.03.20.19.01.56; author kristerw; state Exp; branches; next 1.16; 1.16 date 2002.12.14.14.59.38; author kristerw; state dead; branches; next 1.15; 1.15 date 2002.12.08.13.09.46; author kristerw; state Exp; branches; next 1.14; 1.14 date 2002.03.27.20.44.33; author kristerw; state dead; branches; next 1.13; 1.13 date 2002.01.06.22.09.32; author kristerw; state Exp; branches; next 1.12; 1.12 date 2001.12.04.05.52.23; author jlam; state dead; branches; next 1.11; 1.11 date 2001.11.01.14.45.39; author tron; state Exp; branches; next 1.10; 1.10 date 2001.09.05.21.45.22; author kristerw; state dead; branches; next 1.9; 1.9 date 2001.09.02.22.07.40; author kristerw; state Exp; branches; next 1.8; 1.8 date 2001.05.23.21.52.55; author kristerw; state dead; branches; next 1.7; 1.7 date 2001.03.31.18.59.30; author kristerw; state Exp; branches; next 1.6; 1.6 date 99.04.03.21.45.16; author mycroft; state dead; branches; next 1.5; 1.5 date 98.08.29.19.41.59; author frueauf; state Exp; branches; next 1.4; 1.4 date 98.08.29.04.08.13; author mycroft; state Exp; branches; next 1.3; 1.3 date 98.08.07.10.40.37; author agc; state Exp; branches; next 1.2; 1.2 date 98.07.04.12.05.07; author mycroft; state Exp; branches; next 1.1; 1.1 date 98.02.14.22.06.12; author tron; state Exp; branches; next ; desc @@ 1.33 log @Remove xmame und xmess -- use mame/mess instead. Ok kristerw @ text @$NetBSD: patch-ab,v 1.32 2006/06/15 11:40:00 dillo Exp $ --- src/unix/unix.mak.orig 2006-05-26 06:52:07.000000000 +0200 +++ src/unix/unix.mak @@@@ -242,7 +242,7 @@@@ CFLAGS += $(IL) $(CFLAGS.$(MY_CPU)) \ $(COREDEFS) $(SOUNDDEFS) $(CPUDEFS) $(ASMDEFS) \ $(INCLUDES) $(INCLUDE_PATH) -LIBS += $(LIBS.$(ARCH)) $(LIBS.$(DISPLAY_METHOD)) +LIBS += $(LIBS.$(ARCH)) $(LIBS.$(DISPLAY_METHOD)) -lexpat ifdef DEBUG CFLAGS += -DMAME_DEBUG @@@@ -559,15 +559,15 @@@@ xlistdev: src/unix/contrib/tools/xlistde romcmp: $(OBJ)/romcmp.o $(OBJ)/unzip.o $(ZLIB) @@echo 'Linking $@@...' - $(LD) $(LDFLAGS) $^ $(LIBS) -o $@@ + $(LD) $(LDFLAGS) $^ -lz -o $@@ chdman: $(OBJ)/chdman.o $(OBJ)/chd.o $(OBJ)/chdcd.o $(OBJ)/cdrom.o $(OBJ)/md5.o $(OBJ)/sha1.o $(OBJ)/version.o $(ZLIB) $(OSTOOLOBJS) @@echo 'Linking $@@...' - $(LD) $(LDFLAGS) $^ $(LIBS) -o $@@ + $(LD) $(LDFLAGS) $^ -lz -o $@@ xml2info: $(OBJ)/xml2info.o $(EXPAT) @@echo 'Linking $@@...' - $(LD) $(LDFLAGS) $^ $(LIBS) -o $@@ + $(LD) $(LDFLAGS) $^ -lexpat -lz -o $@@ jedutil: $(OBJ)/jedutil.o $(OBJ)/jedparse.o $(OSDBGOBJS) @@echo 'Linking $@@...' @ 1.32 log @Update xmame and xmess to 0.106: 0.106: - Everything from MAME 0.106 and MESS 0.106 - Fixed a link error for messtest. (Arnaud G. Gibert) - Fixed an alignment bug in the OpenGL driver which caused Defender, and possibly other 16bpp games, to be skewed. - The mouse is no longer automatically grabbed in fullscreen mode. Bugzilla bug 877. - Replaced fuzzy game name comparison with the method used by MAME for Windows, which lists approximate matches when an exact match isn't found. - A BadMatch error should no longer occur for the OpenGL target in some cases, such as when 16bpp mode is used with recent releases of the binary NVIDIA driver. 0.105: - Everything from MAME 0.105 and MESS 0.105. - Fixed "-frames_to_run/-ftr" so that it works the same as on Windows. - Fixed a memory leak in the plugin manager shutdown found by Valgrind. Bugzilla bug 850. - The output of "-listroms (-lr)" now shows the correct driver name when it's run for all ROMs. - Fixed a potential buffer overflow in the standard joystick driver. Bugzill bug 821. (Pierre Riteau) @ text @d1 1 a1 1 $NetBSD$ @ 1.31 log @Update xmame to 0.95. Changes since 0.90 includes: - Everything from MAME 0.95 (http://x.mame.net/changes-mame.html) and MESS 0.95 (http://x.mame.net/changes-mess.html). - Forcing Xv to use YV12 ("-force-yuv 2") no longer causes rotated games to segfault. Fixes Bugzilla bug 679. - Fixed the aspect ratio of the MESS SuperVision driver so that it's quadratic. (PeT) - Fixed several problems with the front-end "-list" commands: The MESS commands could segfault, some commands' headers were misaligned, and "-listpalettesize" was causing the ROM list to print. - Worked around or fixed a double-free on exit in xmess. - Fixed a segfault on startup that occurred when four or more joysticks devices were found. - The SDL joystick driver now works with multiple joysticks attached. - The SDL sound driver should produce much better output. Also fixed a potential deadlock. @ text @d3 3 a5 3 --- src/unix/unix.mak.orig 2005-04-02 20:38:46.000000000 +0200 +++ src/unix/unix.mak 2005-04-02 20:50:17.000000000 +0200 @@@@ -258,7 +258,7 @@@@ d9 2 a10 2 -MY_LIBS = $(LIBS) $(LIBS.$(ARCH)) $(LIBS.$(DISPLAY_METHOD)) -lz +MY_LIBS = $(LIBS.$(ARCH)) $(LIBS.$(DISPLAY_METHOD)) -lz -lexpat d12 3 a14 3 ifdef SEPARATE_LIBM MY_LIBS += -lm @@@@ -578,15 +578,15 @@@@ d17 8 a24 8 $(CC_COMMENT) @@echo 'Linking $@@...' - $(CC_COMPILE) $(LD) $(LDFLAGS) $^ $(LIBS) -o $@@ + $(CC_COMPILE) $(LD) $(LDFLAGS) $^ -lz -o $@@ chdman: $(OBJ)/chdman.o $(OBJ)/chd.o $(OBJ)/chdcd.o $(OBJ)/cdrom.o $(OBJ)/md5.o $(OBJ)/sha1.o $(OBJ)/version.o $(ZLIB) $(CC_COMMENT) @@echo 'Linking $@@...' - $(CC_COMPILE) $(LD) $(LDFLAGS) $^ $(LIBS) -o $@@ + $(CC_COMPILE) $(LD) $(LDFLAGS) $^ -lz -o $@@ d27 3 a29 3 $(CC_COMMENT) @@echo 'Linking $@@...' - $(CC_COMPILE) $(LD) $(LDFLAGS) $^ $(LIBS) -o $@@ + $(CC_COMPILE) $(LD) $(LDFLAGS) $^ -lexpat -lz -o $@@ d31 2 a32 2 dat2html: $(DAT2HTML_OBJS) $(CC_COMMENT) @@echo 'Compiling $@@...' @ 1.30 log @Update xmame/xmess to 0.88. Changes since 0.87 include: - Everything from MAME 0.88 (http://x.mame.net/changes-mame.html) and MESS 0.88 (http://x.mame.net/changes-mess.html). - Big update of the video code (bugfixes/speedup/new functionality) @ text @d3 12 a14 3 --- src/unix/unix.mak.orig Mon Nov 22 00:09:03 2004 +++ src/unix/unix.mak Mon Nov 22 00:12:39 2004 @@@@ -545,11 +545,11 @@@@ d19 1 a19 1 + $(CC_COMPILE) $(LD) $(LDFLAGS) $^ -lz $(LIBS) -o $@@ d21 1 a21 1 chdman: $(OBJ)/chdman.o $(OBJ)/chd.o $(OBJ)/chdcd.o $(OBJ)/md5.o $(OBJ)/sha1.o $(OBJ)/version.o $(ZLIB) d24 1 a24 1 + $(CC_COMPILE) $(LD) $(LDFLAGS) $^ -lz $(LIBS) -o $@@ d28 5 @ 1.29 log @Update xmame to 0.86. Changes since 0.85 include: - Everything from MAME 0.86 (http://x.mame.net/changes-mame.html) and MESS 0.86 (http://x.mame.net/changes-mess.html). - Fixed buffer overruns in the effects and rotation code that caused a segfault on exit for some games with artwork enabled. - Fixed memory leaks in the effects and rotation code that occurred when the display settings changed. - XInput was probably limited to two controllers in 0.85, but should again support up to four. - When "-norotate(-nr)" is specified, the UI is no longer rotated relative to the game. (Hans de Goede) - Did major cleanup of the blit core (Hans de Goede): * Rotation should be a bit faster. * Defining DEST is no longer optional; targets that don't define it will need to be fixed. * Removed a bunch of obsolete #defines and special cases. * Added support for vector clipping, which fixes mhavoc. * Removed fixed Y scaling, since the arbitrary Y scaling is not noticeably slower. * Removed LOW_MEM from the makefile; blit.h is now so small, it should no longer be needed. - The C version of the 6-tap filter rotates pointers now instead of using memcpy, which should give a small speed boost. It also no longer reallocates a rotation buffer. (Hans de Goede) - Adjusted a few tests to make sure that every combination of compiling in XIL, MITSHM, and Xv will work and that the fallback order is Xv -> MITSHM -> normal X11. (Hans de Goede) - The Xv driver no longer uses "-geometry", since this requires users to know the aspect ratio of a game. It instead uses "-widthscale" and "-heightscale". (Hans de Goede) - Added "-perfect-yv12", which uses perfect Xv YV12 scaling instead of the widthscale == 2 && heightscale == 2 hack. (Hans de Goede) - Added support for displaying 32bpp bitmaps on a 16bpp X11 or 3Dfx display by down-sampling. (Hans de Goede) - Added rotation for Xv YV12 displays. (Hans de Goede) - Sometimes Xv Image creation succeeds, but the first XvShmPutImage to a mapped window fails with a BadAlloc error; also, sometimes it can create an Image smaller than the requested size. In such cases, the code now falls back to another Image type instead of crashing later. (Hans de Goede) - Fixed problems in the X11 display target (Hans de Goede): * Free cursors on close. * Call close when display creation fails to clean up after us. * Comment out sleep calls, which shouldn't be necessary since XSync should only exit after everything has been processed. * Removed x11_window_put_image in favor of x11_window_refresh_screen since dirty rectangles are no longer supported. * Worked around an X11 bug that caused keys to get stuck when fullscreen DGA mode was exited. - The display should no longer open twice for artwork games: The setup code wasn't rounding the display bounds as it should have. - Effects now use CORRECTED_DEST_WIDTH and *may* work with PACKEDPIXEL modes. (Hans de Goede) - Adjusted the display bounds rounding so that the resulting rectangle is at least as large as the original. This prevents the cutoff on the right side of the intro screen for, e.g., pacman with artwork. - Fixed problems with aspect ratio calculation (Hans de Goede): * Fixed problems with SVGAlib, DGA, and possibly other display targets when arbitrary Y scaling was used. * Games whose bitmap isn't 4:3, such as pacman and moo, no longer show black borders with Xv. * Added correct aspect ratio calculation to Xv when games have double width or double height pixels; for example, blstroid. * The Xv aspect ratio honors "-displayaspectratio". * Removed the "-widescreen" option in favor of "-displayaspectratio 1.77". * Pixel width and height doubling is now correct when "-[auto]ro{r|l}" is used. - The "-bpp" option now only supports 15 or 32. (Hans de Goede) - Joystick buttons are no longer always registered as "button 9" in the configuration menu. Fixes Bugzilla bug 587. (Thomas Klausner) @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.28 2004/08/25 01:20:11 wiz Exp $ d3 16 a18 11 --- src/unix/devices.c.orig 2004-08-13 06:30:14.000000000 +0200 +++ src/unix/devices.c @@@@ -971,7 +971,7 @@@@ static void init_joycodes(void) } for (button = 0; button < JOY_BUTTONS; button++) { - snprintf(tempname, JOY_NAME_LEN, "Joy %d button %d", stick + 1 , axis + 1); + snprintf(tempname, JOY_NAME_LEN, "Joy %d button %d", stick + 1 , button + 1); add_joylist_entry(tempname, JOYCODE(stick, CODETYPE_BUTTON, button), CODE_OTHER_DIGITAL); } } @ 1.28 log @Fix names for joystick buttons in GUI. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.27 log @Update xmame to 0.85. Changes since 0.84.1nb1: - Everything from MAME 0.85 (http://x.mame.net/changes-mame.html) and MESS 0.85 (http://x.mame.net/changes-mess.html). - Added a 2x sinc-based 6-tap filter effect with scanlines, enabled via "-effect 8" or "-ef 8". (Richard Goedeken) - Reworked the input code so that it more closely resembles its Windows counterpart. This adds support for "-steadykey", "-a2d_deadzone" and "-digital". - Increased the maximum number of joysticks from 6 to 8 and the maximum number of buttons per joystick from 16 to 32. - Mouse buttons may not have been working in recent releases for games such as Missile Command; they should work now. - Network support is broken for the time being because of the core input changes, so please disable XMAME_NET in your makefile. If you're interested in fixing this, have a look at src/unix/network.c and the XMAME_NET sections of an older src/inptport.c. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.26 2004/07/26 18:40:06 dillo Exp $ d3 11 a13 407 --- src/unix/joystick-drivers/joy_usb.c.orig 2004-07-02 19:09:36.000000000 +0200 +++ src/unix/joystick-drivers/joy_usb.c @@@@ -2,12 +2,18 @@@@ * X-Mame USB HID joystick driver for NetBSD. * * Written by Krister Walfridsson + * Improved by Dieter Baron */ #include "xmame.h" #include "devices.h" +static int calibrate=0; + struct rc_option joy_usb_opts[] = { /* name, shortname, type, dest, deflt, min, max, func, help */ + { "joyusb-calibrate", NULL, rc_bool, &calibrate, + "0", 0, 0, NULL, + "Manually calibrate USB joysticks" }, { NULL, NULL, rc_end, NULL, NULL, 0, 0, NULL, NULL } @@@@ -16,8 +22,7 @@@@ struct rc_option joy_usb_opts[] = { #ifdef USB_JOYSTICK #if !defined(__ARCH_netbsd) && !defined(__ARCH_freebsd) -#error "USB joysticks are only supported under NetBSD and FreeBSD. " - "Patches to support other archs are welcome ;)" +#error "USB joysticks are only supported under NetBSD and FreeBSD. Patches to support other archs are welcome ;)" #endif #if defined(HAVE_USBHID_H) || defined(HAVE_LIBUSBHID_H) @@@@ -44,14 +49,26 @@@@ struct rc_option joy_usb_opts[] = { #include #include +int axis_usage[] = { + HUG_X, HUG_Y, HUG_Z, + HUG_RX, HUG_RY, HUG_RZ, + HUG_SLIDER, +}; + +int axis_max = sizeof(axis_usage)/sizeof(axis_usage[0]); + struct priv_joydata_struct { - struct hid_item *hids; int dlen; int offset; char *data_buf; + struct hid_item *axis_item[JOY_AXIS]; + struct hid_item *button_item[JOY_BUTTONS]; + struct hid_item *hat_item; + int hat_axis; } priv_joy_data[JOY]; +static struct hid_item *itemdup(struct hid_item *s); static int joy_initialize_hid(int i); static void joy_usb_poll(void); static int joy_read(int fd, int i); @@@@ -88,7 +105,10 @@@@ static int joy_initialize_hid(int i) int size, is_joystick, report_id = 0; struct hid_data *d; struct hid_item h; + struct hid_item *axis_item[axis_max]; report_desc_t rd; + int got_something; + int j, n; if ((rd = hid_get_report_desc(joy_data[i].fd)) == 0) { @@@@ -96,8 +116,6 @@@@ static int joy_initialize_hid(int i) return FALSE; } - priv_joy_data[i].hids = NULL; - #if defined(HAVE_USBHID_H) || defined(HAVE_LIBUSBHID_H) #if defined(__ARCH_netbsd) || (defined(__ARCH_freebsd) && __FreeBSD_version > 500000) if (ioctl(joy_data[i].fd, USB_GET_REPORT_ID, &report_id) < 0) @@@@ -121,7 +139,16 @@@@ static int joy_initialize_hid(int i) } priv_joy_data[i].dlen = size; + for (j=0; j 0) && (usage <= JOY_BUTTONS); - - if (interesting_hid && usage > joy_data[i].num_buttons) - joy_data[i].num_buttons = usage; - } - - if (interesting_hid) - { - h.next = priv_joy_data[i].hids; - priv_joy_data[i].hids = malloc(sizeof *(priv_joy_data[i].hids)); - if (priv_joy_data[i].hids == NULL) + if ((usage > 0) && (usage <= JOY_BUTTONS)) { - fprintf(stderr_file, "error: Not enough memory for joystick. " - "Your joystick may fail to work correctly.\n"); - break; + got_something = 1; + if (priv_joy_data[i].button_item[usage-1] == NULL) + priv_joy_data[i].button_item[usage-1] = itemdup(&h); + if (usage > joy_data[i].num_buttons) + joy_data[i].num_buttons = usage; } - *(priv_joy_data[i].hids) = h; } } hid_end_parse(d); - if (priv_joy_data[i].hids != NULL) + if (!got_something) { - /* We'll approximate the center with the current joystick value if - * that can be read (some HID devices returns no data if the state - * has not changed since the last time it was read.) */ - if (joy_read(joy_data[i].fd, i)) - { - joy_data[i].axis[0].center = joy_data[i].axis[0].val; - joy_data[i].axis[1].center = joy_data[i].axis[1].val; - joy_data[i].axis[2].center = joy_data[i].axis[2].val; + free(priv_joy_data[i].data_buf); + return 0; + } + + + for (j=0; jlogical_minimum; + joy_data[i].axis[n].max + = priv_joy_data[i].axis_item[n]->logical_maximum; + joy_data[i].axis[n].center + = ((joy_data[i].axis[n].max-joy_data[i].axis[n].min+1)/2 + + joy_data[i].axis[n].min); + joy_data[i].axis[n].val = joy_data[i].axis[n].center; + } + } + + if (priv_joy_data[i].hat_item) + { + if (joy_data[i].num_axis < JOY_AXIS-2) + { + n = joy_data[i].num_axis; + joy_data[i].num_axis += 2; + priv_joy_data[i].hat_axis = n; + for (j=0; j<2; j++) + { + joy_data[i].axis[n+j].min = -1; + joy_data[i].axis[n+j].max = 1; + joy_data[i].axis[n+j].center = 0; + joy_data[i].axis[n+j].val = 0; + } } else - { - /* Assume that the joystick is positioned in the center. - * This is needed, or else the system will think that the - * joystick is in position left/up (or something) until it - * is moved the first time. */ - joy_data[i].axis[0].val = joy_data[i].axis[0].center; - joy_data[i].axis[1].val = joy_data[i].axis[1].center; - joy_data[i].axis[2].val = joy_data[i].axis[2].center; + { + /* too many axes to support hat */ + free(priv_joy_data[i].hat_item); + priv_joy_data[i].hat_item = NULL; } - - /* Approximate min/max values. Observe that we cannot use the - * max/min values that the HID reports, since that is theoretical - * values that may be wrong for analogs joystics (especially if - * you have a joystick -> USB adaptor.) We cannot use greater delta - * values than +/- 1, since it is OK for a gamepad (or my USB TAC 2) - * to reports directions as center +/- 1. */ - joy_data[i].axis[0].min = joy_data[i].axis[0].center - 1; - joy_data[i].axis[1].min = joy_data[i].axis[1].center - 1; - joy_data[i].axis[2].min = joy_data[i].axis[2].center - 1; - joy_data[i].axis[0].max = joy_data[i].axis[0].center + 1; - joy_data[i].axis[1].max = joy_data[i].axis[1].center + 1; - joy_data[i].axis[2].max = joy_data[i].axis[2].center + 1; } - return (priv_joy_data[i].hids != NULL); + if (calibrate) + { + int got_values; + + /* + The values returned in the HID report may be wrong. However, + it works for most joysticks and krister's method requires + moving the joystick about when starting xmame to calibrate, + which is annoying. + + For such joysticks, calibration can be enabled with the + -joyusb-calibrate command line option. + + We'll approximate the center with the current joystick value + if that can be read (some HID devices returns no data if the + state has not changed since the last time it was read.) + */ + + got_values = joy_read(joy_data[i].fd, i); + + for (j=0; j USB adaptor.) We + cannot use greater delta values than +/- 1, since it is OK + for a gamepad (or my USB TAC 2) to reports directions as + center +/- 1. + */ + + joy_data[i].axis[j].min = joy_data[i].axis[j].center - 1; + joy_data[i].axis[j].max = joy_data[i].axis[j].center + 1; + } + } + + return 1; } @@@@ -255,37 +325,76 @@@@ static void joy_usb_poll(void) static int joy_read(int fd, int i) { - int len, axis, usage, page, d; - struct hid_item *h; - - len = read(fd, priv_joy_data[i].data_buf, priv_joy_data[i].dlen); - if (len != priv_joy_data[i].dlen) + /* 0 1 2 3 4 5 6 7 */ + /* u ru r rd d ld l lu */ + const int hat_x[] = { + 0, 1, 1, 1, 0, -1, -1, -1 + }; + const int hat_y[] = { + -1, -1, 0, 1, 1, 1, 0, -1 + }; + + int len, new, d, j; + char *p; + + new = 0; + while ((len=read(fd, priv_joy_data[i].data_buf, priv_joy_data[i].dlen)) + == priv_joy_data[i].dlen) + new = 1; + if (!new) return FALSE; - for (h = priv_joy_data[i].hids; h; h = h->next) - { - d = hid_get_data(priv_joy_data[i].data_buf + priv_joy_data[i].offset, h); - - page = HID_PAGE(h->usage); - usage = HID_USAGE(h->usage); + p = priv_joy_data[i].data_buf + priv_joy_data[i].offset; - if (page == HUP_GENERIC_DESKTOP) - { - if (usage == HUG_X || usage == HUG_RX) - axis = 0; - else if (usage == HUG_Y || usage == HUG_RY) - axis = 1; - else - axis = 2; + for (j=0; jlogical_minimum; + j = priv_joy_data[i].hat_axis; + if (d < 0 || d >= 8) + { + joy_data[i].axis[j].val = 0; + joy_data[i].axis[j+1].val = 0; } - else if (page == HUP_BUTTON) - { - joy_data[i].buttons[usage - 1] = (d == h->logical_maximum); + else + { + joy_data[i].axis[j].val = hat_x[d]; + joy_data[i].axis[j+1].val = hat_y[d]; } } + for (j=0; jlogical_maximum); + } + return TRUE; } + +static struct hid_item *itemdup(struct hid_item *s) +{ + struct hid_item *t; + + t = malloc(sizeof(*t)); + if (t == NULL) + { + fprintf(stderr_file, "error: Not enough memory for joystick. " + "Your joystick may fail to work correctly.\n"); + return NULL; + } + + memcpy(t, s, sizeof(*t)); + + return t; +} + #endif @ 1.26 log @USB joystick driver rewritten, will be in next xmame release. okayed by kristerw. PKGREVISION++ @ text @d1 1 a1 1 $NetBSD$ @ 1.25 log @Fix usb joystick driver for talkative joysticks: read all available reports and use the newest one. Bump PKGREVISION. @ text @d3 1 a3 1 --- src/unix/joystick-drivers/joy_usb.c.orig Sun Mar 7 01:01:12 2004 d5 306 a310 1 @@@@ -255,11 +255,14 @@@@ static void joy_usb_poll(void) d315 2 a316 3 + int len, new, axis, usage, page, d; struct hid_item *h; d319 12 d338 72 a409 1 for (h = priv_joy_data[i].hids; h; h = h->next) @ 1.24 log @Update xmame to 0.81.1. Changes since 0.80.1nb1: - Everything from MAME 0.81 (http://x.mame.net/changes-mame.html) and MESS 0.81 (http://x.mame.net/changes-mess.html). - Fixed a problem with the lightgun offscreen reloading that caused a random shot every fourth or fifth shot. (Joe Inkenbrandt) @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.23 2004/04/02 17:45:51 kristerw Exp $ d3 20 a22 13 --- src/unix/video-drivers/x11_window.c.orig 2004-03-27 02:15:43.000000000 +0100 +++ src/unix/video-drivers/x11_window.c 2004-03-27 02:17:58.000000000 +0100 @@@@ -912,8 +912,8 @@@@ /* else we have failed clean up before retrying without MITSHM */ shmdt ((char *) scaled_buffer_ptr); scaled_buffer_ptr = NULL; - XDestroyImage (image); - image = NULL; + XFree(xvimage); + xvimage = NULL; } } fprintf (stderr_file, "Failed\nReverting to normal XPutImage() mode\n"); @ 1.23 log @Make the package realize that amd64 is a LP64 architecture. Prevent crash when the requested display mode cannot be used. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.22 log @Update xmame to 0.79.1 Changes since 0.78.1 includes: - Everything from MAME 0.79 (http://x.mame.net/changes-mame.html) and MESS 0.79 (http://x.mame.net/changes-mess.html). - Updated the ALSA DSP module to use the ALSA 1.0 API. (Shyouzou Sugitani) - Paths now allow a literal "$" if it's preceded by "\". (Andre Majorel) - Fixed a segfault that occurred when "-debug" was used with a rotated game. - The debugger window should no longer be blank for 32bpp games. - Fixed a bug in fix-comments.c that was causing it to mangle src/drivers/vendetta.c. - When XINPUT is defined in the makefile but no XInput devices are configured, the mouse is treated as a trackball. (Gerd Sussner) - The Xv YUV code should now work on big-endian platforms. (Maciej J. Woloszyk) - The trigger for the ACT LABS TV light gun now works; reloading now requires only one offscreen shot instead of two. (Joe) @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.21 2004/02/19 19:16:57 kristerw Exp $ d3 13 a15 148 --- src/unix/config.c.orig 2003-12-26 16:29:16.000000000 -0700 +++ src/unix/config.c 2004-01-21 22:08:24.000000000 -0700 @@@@ -56,6 +56,13 @@@@ static int specify_ram(struct rc_option *option, const char *arg, int priority); #endif +/* OpenVMS doesn't support paths with a leading '.' character. */ +#if defined(__DECC) && defined(VMS) +# define PATH_LEADER +#else +# define PATH_LEADER "." +#endif + /* struct definitions */ static struct rc_option opts[] = { /* name, shortname, type, dest, deflt, min, max, func, help */ @@@@ -275,39 +282,39 @@@@ return OSD_NOT_OK; /* check that the required dirs exist, and create them if necessary */ - snprintf(buffer, BUF_SIZE, "%s/.%s", home_dir, NAME); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s", home_dir, NAME); if (check_and_create_dir(buffer)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "cfg"); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s", home_dir, NAME, "cfg"); if (check_and_create_dir(buffer)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "mem"); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s", home_dir, NAME, "mem"); if (check_and_create_dir(buffer)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "sta"); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s", home_dir, NAME, "sta"); if (check_and_create_dir(buffer)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "nvram"); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s", home_dir, NAME, "nvram"); if (check_and_create_dir(buffer)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "diff"); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s", home_dir, NAME, "diff"); if (check_and_create_dir(buffer)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "rc"); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s", home_dir, NAME, "rc"); if (check_and_create_dir(buffer)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "hi"); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s", home_dir, NAME, "hi"); if (check_and_create_dir(buffer)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s", home_dir, NAME, "inp"); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s", home_dir, NAME, "inp"); if (check_and_create_dir(buffer)) return OSD_NOT_OK; @@@@ -322,13 +329,13 @@@@ snprintf(buffer, BUF_SIZE, "%s/%src", XMAMEROOT, NAME); if(rc_load(rc, buffer, 1, 1)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%src", home_dir, NAME, NAME); + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%src", home_dir, NAME, NAME); if(rc_load(rc, buffer, 1, 1)) return OSD_NOT_OK; snprintf(buffer, BUF_SIZE, "%s/%s-%src", XMAMEROOT, NAME, DISPLAY_METHOD); if(rc_load(rc, buffer, 1, 1)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/%s-%src", home_dir, NAME, NAME, + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/%s-%src", home_dir, NAME, NAME, DISPLAY_METHOD); if(rc_load(rc, buffer, 1, 1)) return OSD_NOT_OK; @@@@ -536,7 +543,7 @@@@ drivers[game_index]->name); if(rc_load(rc, buffer, 1, 1)) return OSD_NOT_OK; - snprintf(buffer, BUF_SIZE, "%s/.%s/rc/%src", home_dir, NAME, + snprintf(buffer, BUF_SIZE, "%s/"PATH_LEADER"%s/rc/%src", home_dir, NAME, drivers[game_index]->name); if(rc_load(rc, buffer, 1, 1)) return OSD_NOT_OK; @@@@ -737,21 +744,49 @@@@ #endif -/*============================================================ */ -/* logerror */ -/*============================================================ */ +/*============================================================*/ +/* vlogerror */ +/*============================================================*/ extern FILE *errorlog; -void logerror(const char *text, ...) +static void vlogerror(const char *text, va_list arg) { - va_list arg; - if (errorlog) { - va_start(arg, text); vfprintf(errorlog, text, arg); - va_end(arg); fflush(errorlog); } } + + +/*============================================================*/ +/* logerror */ +/*============================================================*/ + +void logerror(const char *text,...) +{ + va_list arg; + + /* standard vfprintf stuff here */ + va_start(arg, text); + vlogerror(text, arg); + va_end(arg); +} + + +/*============================================================*/ +/* osd_die */ +/*============================================================*/ + +void osd_die(const char *text,...) +{ + va_list arg; + + /* standard vfprintf stuff here */ + va_start(arg, text); + vlogerror(text, arg); + va_end(arg); + + exit(-1); +} @ 1.21 log @Make this package compile on non-i386 machines too, by applying a patch from Lawrence Gold on the xmame mailing-list. @ text @d1 1 a1 1 $NetBSD$ @ 1.20 log @Update xmame to 0.72.1. Changes since 0.71.1 include: - Everything from MAME 0.72 and MESS 0.72. - The various effects enabled by -effect now work with rotation enabled. (Shyouzou Sugitani) - The Xv target supports more effects. (Shyouzou Sugitani) - The rc parsing code displays more compact and readable error messages. (Andre Majorel) - Xv windowed mode is now enabled with "-x11-mode 2" or "-x11 2", and Xv fullscreen mode is enabled with "-x11-mode 3" or "-x11 3". The "-[no]xv" and "-fullscreen" switches are no longer available. - Added hotkey switching for Xv windowed mode via ALT + DEL and Xv fullscreen mode via ALT + END. - Added -widescreen for Xv. This shrinks the width of the output for display on a widescreen TV. (Per Wigren) @ text @d1 150 a150 38 $NetBSD: patch-ab,v 1.19 2003/07/19 21:02:33 kristerw Exp $ --- src/vidhrdw/gaiden.c.orig Sat Jul 19 21:01:17 2003 +++ src/vidhrdw/gaiden.c Sat Jul 19 21:03:44 2003 @@@@ -378,22 +378,25 @@@@ if (attributes & 0x04) { + UINT32 priority, flipx, flipy, color, sizex, sizey, number; + int ypos, xpos; + if (!blend_support && (attributes & 0x20) && (cpu_getcurrentframe() & 1)) goto skip_sprite; - UINT32 priority = (attributes >> 6) & 3; - UINT32 flipx = (attributes & 1); - UINT32 flipy = (attributes & 2); + priority = (attributes >> 6) & 3; + flipx = (attributes & 1); + flipy = (attributes & 2); - UINT32 color = source[2]; - UINT32 sizex = 1 << ((color >> 0) & 3); /* 1,2,4,8 */ - UINT32 sizey = 1 << ((color >> gaiden_sprite_sizey) & 3); /* 1,2,4,8 */ + color = source[2]; + sizex = 1 << ((color >> 0) & 3); /* 1,2,4,8 */ + sizey = 1 << ((color >> gaiden_sprite_sizey) & 3); /* 1,2,4,8 */ /* raiga needs something like this */ - UINT32 number = (source[1] & (sizex > 2 ? 0x7ff8 : 0x7ffc)); + number = (source[1] & (sizex > 2 ? 0x7ff8 : 0x7ffc)); - int ypos = source[3] & 0x01ff; - int xpos = source[4] & 0x01ff; + ypos = source[3] & 0x01ff; + xpos = source[4] & 0x01ff; color = (color >> 4) & 0x0f; @ 1.19 log @Update xmame to 0.71.1. Changes since 0.70.1 includes: - Everything from MAME 0.71 and MESS 0.71. - The man page xmame.6 is much more up-to-date. (Andrew Burton) @ text @d1 1 a1 1 $NetBSD$ @ 1.18 log @Update xmame to 0.69.1. Changes since 0.68.1 includes: - Almost everything from MAME 0.69. - Re-added Ben Collins' core change that adds support for extra mice. - Reverted to using the original fronthlp.c (from 0.67.2) modified to work with the 0.69 core. - Fixed a logic bug in the XInput devices button-handling. (Ben Collins) - Made a tiny fix in fileio.c that allows specifying direct paths to roms to work again; e.g., ./xmame.x11 ./moo.zip @ text @d1 38 a38 16 $NetBSD: patch-ab,v 1.17 2003/03/20 19:01:56 kristerw Exp $ --- src/unix/Makefile.orig Thu Mar 20 19:26:45 2003 +++ src/unix/Makefile Thu Mar 20 19:29:35 2003 @@@@ -133,9 +133,12 @@@@ $(OBJDIR)/effect.o: effect.h $(VID_DIR)/x11_window.o: video-drivers/blit.h video-drivers/blit_core.h effect.h + $(CC_COMPILE) $(CC) $(MY_CFLAGS) -O -o $@@ -c video-drivers/x11_window.c $(VID_DIR)/svgalib.o: video-drivers/blit.h video-drivers/blit_core.h video-drivers/twkmodes.h video-drivers/twkuser.c effect.h $(VID_DIR)/xf86_dga1.o: video-drivers/xf86_dga1.c video-drivers/blit.h video-drivers/blit_core.h effect.h + $(CC_COMPILE) $(CC) $(MY_CFLAGS) -O -o $@@ -c video-drivers/xf86_dga1.c $(VID_DIR)/xf86_dga2.o: video-drivers/xf86_dga2.c video-drivers/blit.h video-drivers/blit_core.h effect.h + $(CC_COMPILE) $(CC) $(MY_CFLAGS) -O -o $@@ -c video-drivers/xf86_dga2.c $(VID_DIR)/SDL.o: video-drivers/blit.h video-drivers/blit_core.h effect.h $(VID_DIR)/xinput.o: video-drivers/xkeyboard.h video-drivers/glmame.h $(VID_DIR)/xinput.o: video-drivers/xkeyboard.h video-drivers/glmame.h @ 1.17 log @Update xmame to 0.66.2. Changes since 0.61.1 include: - Amost everything from MAME 0.66 and MESS CVS. - The Barath frameskipper is now enabled by default. (suggested by Christopher Stone) - Rotation has been moved to the blit core and should be a lot faster. (Shyouzou Sugitani) - Analog controls work again, and the analog code is now synced up with the Windows code. (Sebastien Devaux) - The "-joydev" switch now allows a full device name, such as /dev/input/js0, to be specified. - Added makecd_mame2.pl to contrib tools; this script aids with burning CDs with ROMs, flyers, and cabinets. (Luc Saillard) - Renamed "-gamma-correction" to "-gamma" to be consistent with the Win32 version. It should also work now. - An Xv-enabled build should no longer report 0 bits per pixel and stop on a display that doesn't support the Xv extension. (Alexander Miller) - The "-brightness" switch now works as in Windows. Removed obsolete brightness and gamma code from sysdep_palette. - Idle sleeping is now disabled while the onscreen configuration menu is displayed. This works around a problem with key and button presses not registering when setting input preferences. - The "-record" and "-playback" switches now work as in the Win32 version. Also, the "inp" directory is now created on startup if it is missing. - MAME's disassemblers are no longer built by default. This avoids having to make some ugly little patches to the core. (Christopher Stone) - Removed the obsolete 8bpp update functions from most of the targets. This should speed compilation and produce a smaller binary. @ text @d1 1 a1 1 $NetBSD$ @ 1.16 log @Update xmame to 0.62.1 rc3 and bump PKGREVISION to 3. Changes since PKGREVISION 2 include: - All path and directory options in fileio.c now support expansion of environment variables such as $HOME. @ text @d1 16 a16 158 $NetBSD: patch-ab,v 1.15 2002/12/08 13:09:46 kristerw Exp $ --- src/unix/video.c.orig 2002-12-01 11:26:42.000000000 -0700 +++ src/unix/video.c 2002-12-07 15:08:00.000000000 -0700 @@@@ -48,6 +48,10 @@@@ static int video_ror = 0; static int video_rol = 0; +static int video_width; +static int video_height; +static int video_depth; + static struct mame_bitmap *adjusted_bitmap = NULL; @@@@ -351,7 +355,7 @@@@ options.use_artwork = ARTWORK_USE_NONE; } -void orient_rect(struct rectangle *rect, struct mame_bitmap *bitmap) +void orient_rect(struct rectangle *rect) { int temp; @@@@ -370,16 +374,16 @@@@ /* apply X flip */ if (blit_flipx) { - temp = bitmap->width - rect->min_x - 1; - rect->min_x = bitmap->width - rect->max_x - 1; + temp = video_width - rect->min_x - 1; + rect->min_x = video_width - rect->max_x - 1; rect->max_x = temp; } /* apply Y flip */ if (blit_flipy) { - temp = bitmap->height - rect->min_y - 1; - rect->min_y = bitmap->height - rect->max_y - 1; + temp = video_height - rect->min_y - 1; + rect->min_y = video_height - rect->max_y - 1; rect->max_y = temp; } } @@@@ -417,17 +421,18 @@@@ normal_widthscale *= 2; } } - + if (blit_swapxy) { - visual_width = params->height; - visual_height = params->width; + visual_width = video_width = params->height; + visual_height = video_height = params->width; } else { - visual_width = params->width; - visual_height = params->height; + visual_width = video_width = params->width; + visual_height = video_height = params->height; } + video_depth = params->depth; if (!blit_swapxy) aspect_ratio = (double)params->aspect_x @@@@ -524,9 +529,8 @@@@ if (blit_flipx || blit_flipy || blit_swapxy) { - bitmap_free(adjusted_bitmap); - adjusted_bitmap = bitmap_alloc_depth(visual_width, - visual_height, params->depth); + adjusted_bitmap = bitmap_alloc_depth(video_width, + video_height, video_depth); if (!adjusted_bitmap) return -1; } @@@@ -626,21 +630,21 @@@@ static void update_visible_area(struct mame_display *display) { + normal_visual = display->game_visible_area; + if (blit_swapxy) { - normal_visual.min_x = display->game_visible_area.min_y; - normal_visual.max_x = display->game_visible_area.max_y; - normal_visual.min_y = display->game_visible_area.min_x; - normal_visual.max_y = display->game_visible_area.max_x; + video_width = display->game_bitmap->height; + video_height = display->game_bitmap->width; } else { - normal_visual.min_x = display->game_visible_area.min_x; - normal_visual.max_x = display->game_visible_area.max_x; - normal_visual.min_y = display->game_visible_area.min_y; - normal_visual.max_y = display->game_visible_area.max_y; + video_width = display->game_bitmap->width; + video_height = display->game_bitmap->height; } + orient_rect(&normal_visual); + /* * round to 8, since the new dirty code works with 8x8 blocks, * and we need to round to sizeof(long) for the long copies anyway @@@@ -656,6 +660,17 @@@@ display->game_visible_area.min_y, display->game_visible_area.max_x, display->game_visible_area.max_y); + + /* + * Allocate a new destination bitmap for the code that handles + * rotation/flipping. + */ + if (blit_flipx || blit_flipy || blit_swapxy) + { + bitmap_free(adjusted_bitmap); + adjusted_bitmap = bitmap_alloc_depth(video_width, + video_height, video_depth); + } } static void update_palette(struct mame_display *display, int force_dirty) @@@@ -692,7 +707,6 @@@@ static void update_debug_display(struct mame_display *display) { struct sysdep_palette_struct *backup_palette = current_palette; - struct rectangle backup_updatebounds = updatebounds; if (!debug_palette) { @@@@ -714,10 +728,8 @@@@ } current_palette = debug_palette; - updatebounds = debug_visual; sysdep_update_display(display->debug_bitmap); current_palette = backup_palette; - updatebounds = backup_updatebounds; } static void osd_free_colors(void) @@@@ -988,8 +1000,8 @@@@ { int x, y; int bx1, bx2, by1, by2; - - orient_rect(&bounds, destbitmap); + + orient_rect(&bounds); bx1 = bounds.min_x; bx2 = bounds.max_x; @ 1.15 log @Fix a bug that caused the display to be truncated for some games. PKGREVISION++ @ text @d1 1 a1 1 $NetBSD$ @ 1.14 log @Update xmame to version 0.59.1. Changes since xmame-0.58.3 include: - Everything from MAME 0.59. - Set some more sensible defaults for the various path settings in fileio.c (e.g., XMAMEROOT/samples for samplepath). - Fixed a segfault in psikyosh games. (David Haywood) @ text @d1 6 a6 18 $NetBSD: patch-ab,v 1.13 2002/01/06 22:09:32 kristerw Exp $ --- src/unix/unix.mak.orig Sun Jan 6 03:44:58 2002 +++ src/unix/unix.mak Sun Jan 6 19:01:36 2002 @@@@ -214,7 +214,16 @@@@ endif ifdef JOY_USB CONFIG += -DUSB_JOYSTICK +ifeq ($(ARCH), netbsd) +ifeq ($(shell test -f /usr/include/usbhid.h && echo have_usbhid), have_usbhid) +CONFIG += -DHAVE_USBHID_H +MY_LIBS += -lusbhid +else MY_LIBS += -lusb +endif +else +MY_LIBS += -lusb +endif endif d8 151 a158 1 ifdef EFENCE @ 1.13 log @Make xmame compile for new systems that have libusbhid.so instead of libusb.so. Noted by Rui-Xiang Guo in a mail to tech-pkg. @ text @d1 1 a1 1 $NetBSD$ @ 1.12 log @* Strongly buildlink'ify. * Reduce the number of patches needed by passing flags down to the make(1) process instead of patching the Makefiles and sources in unnecessary ways. * Remove unnecessary endian.sh script as the computation is down directly in the package Makefile. * Preliminary support for platforms other than NetBSD. * Generalize the package Makefile enough to make it usable if/when xmess compiles again on UNIX platforms * Use the general INSTALL scripts to manage the spool directory during installation/deinstallation. Approved by kristerw@@netbsd.org. @ text @d1 18 a18 7 $NetBSD: patch-ab,v 1.11 2001/11/01 14:45:39 tron Exp $ --- src/unix/Makefile.orig Mon Sep 17 01:52:00 2001 +++ src/unix/Makefile Thu Nov 1 15:04:47 2001 @@@@ -153,3 +153,6 @@@@ video-drivers/glxtool.h $(VID_DIR)/gltool.h: video-drivers/gl-disp-var.h video-drivers/glu-disp-var.h d20 1 a20 3 +$(JOY_DIR)/joy_usb.o: joystick-drivers/joy_usb.c xmame.h + $(CC_COMMENT) @@echo 'Compiling src/unix/$< ...' + $(CC_COMPILE) $(CC) -I/usr/include $(MY_CFLAGS) -o $@@ -c $< @ 1.11 log @Fix build problems if the "libusb" package is installed. @ text @d1 1 a1 1 $NetBSD$ @ 1.10 log @Update xmame to 0.54.2 Changes since 0.54.1 include: - Applied a fix for the Bubble Bobble driver. (Haze) - Applied a fix for Konami games. (Aaron Giles) - Using -debug no longer results in a segfault. - Applied a patch for the ES550x that fixes the runaway voices in Puzzle Bobble 3 and might fix other games with problems. (Aaron Giles) - Added -samplepath/-sp and -artworkpath/-ap command line options. @ text @d1 7 a7 11 $NetBSD: patch-ab,v 1.9 2001/09/02 22:07:40 kristerw Exp $ --- src/machine/bublbobl.c.orig Sat Aug 25 21:53:18 2001 +++ src/machine/bublbobl.c Sun Sep 2 23:31:52 2001 @@@@ -131,7 +131,7 @@@@ else cpu_set_irq_line(3,0,ASSERT_LINE); - return 0; + return ignore_interrupt(); } d9 3 @ 1.9 log @Upgrade xmame to 0.54.1nb1 after doing the following changes: - Made Bubbl Bobble work again - Removed a warning from the xmamerc file. @ text @d1 1 a1 1 $NetBSD$ @ 1.8 log @Update xmame to 0.37b14.2. This contains everything from MAME 0.37b14 except for 'steadykey' support. The Unix-specific changes that affect NetBSD are: - The sound device is now released when the emulation is paused. (Shyouzou Sugitani) - Added -hotrod for HotRod and HotRod SE support. Set it to 1 for HotRod, 2 for HotRod SE. - Fixed a bug in logerror() that could cause a crash. (Pete French) @ text @d1 6 a6 4 $NetBSD: patch-ab,v 1.7 2001/03/31 18:59:30 kristerw Exp $ --- src/drawgfx.c.orig Wed Mar 28 07:30:13 2001 +++ src/drawgfx.c Fri Mar 30 23:26:46 2001 @@@@ -2,6 +2,9 @@@@ d8 3 a10 1 #include "driver.h" a11 3 +/* The heavy use of INLINE in this file causes memory explosion in egcs. */ +#undef INLINE +#define INLINE static a12 11 #ifdef LSB_FIRST #define SHIFT0 0 @@@@ -34,7 +37,7 @@@@ return (*((UINT8 *)address ) << SHIFT0) + (*((UINT8 *)address+1) << SHIFT1) + (*((UINT8 *)address+2) << SHIFT2) + - (*((UINT8 *)address+3) << SHIFT3) ); + (*((UINT8 *)address+3) << SHIFT3); } else return *(UINT32 *)address; @ 1.7 log @Update xmame to 0.37b13.1. Changes since 0.37b12.1 - Everything from MAME 0.37b13. - Numerous updates to the OpenGL target. (Sven Goethel) - Added Photon2 display support for the QNX target. (Travis Coady) - You can now run "make clean68k" before building with a different 68k core. (Mike Coates) - Applied a patch from StretchMAME that prevents a bunch of games from segfaulting on startup. (Shyouzou Sugitani) - A fix for the sprites in CVS games. (Nicola Salmoria) @ text @d1 1 a1 1 $NetBSD$ @ 1.6 log @0.35b8.1 @ text @d1 4 a4 5 $NetBSD: patch-ab,v 1.5 1998/08/29 19:41:59 frueauf Exp $ --- src/unix/Makefile.orig Sun Aug 23 17:31:13 1998 +++ src/unix/Makefile Fri Aug 28 23:37:29 1998 @@@@ -16,6 +16,7 @@@@ d6 1 a6 3 $(TARGET): $(OBJS) ar -rcv $@@ $(OBJS) + ranlib $@@ d8 15 a22 2 $(OBJDIR)/%.o: %.c xmame.h sound.h $(CC) -I../../src/ $(CFLAGS) -o $@@ -c $< @ 1.5 log @Readd rcs ids again. @ text @d1 1 a1 1 $NetBSD$ @ 1.4 log @Update to 0.34b1.1. @ text @d1 2 @ 1.3 log @Add NetBSD RCS Ids. @ text @d1 3 a3 5 $NetBSD$ --- src/unix/Makefile.orig Fri Jun 5 07:32:04 1998 +++ src/unix/Makefile Sat Jul 4 07:37:41 1998 @@@@ -25,6 +25,7 @@@@ d5 2 a6 2 $(TRG): $(ALLOBJS) ar -rcv $@@ $(UOBJS) d9 2 a10 11 $(OBJDIR)/%.o: %.c xmame.h $(CC) $(DEFS) -I../../src/ $(MS) $(JS) $(CFLAGS) -o $@@ -c $< @@@@ -42,7 +43,7 @@@@ $(OBJDIR)/irix.o: irix.c xmame.h sound.h $(OBJDIR)/hpux.o: hpux.c xmame.h sound.h $(OBJDIR)/aix.o: aix.c xmame.h sound.h -$(OBJDIR)/netbsd_i386.o: netbsd_i386.c xmame.h sound.h +$(OBJDIR)/netbsd.o: netbsd.c xmame.h sound.h $(OBJDIR)/sndserver.o: sndserver.c xmame.h $(OBJDIR)/svgalib.o: svgalib.c linux.c xmame.h sound.h $(OBJDIR)/ultrix.c: ultrix.c xmame.h sound.h @ 1.2 log @Update to 0.33b6.1. @ text @d1 2 @ 1.1 log @Initial import of "xmame-0.30.1" package based on work by Tim Rightnour. @ text @d1 3 a3 5 --- src/unix/Makefile.orig Thu Jan 1 18:31:14 1998 +++ src/unix/Makefile Fri Feb 13 08:12:11 1998 @@@@ -1,2 +1,2 @@@@ -OBJDIR = ../../obj.$(ARCH)/unix +OBJDIR = ../../obj.$(OPSYS)/unix d5 1 a5 6 @@@@ -8,3 +8,3 @@@@ UOBJS = $(OBJDIR)/main.o $(OBJDIR)/sound.o $(OBJDIR)/xdep.o \ - $(OBJDIR)/update_dsp.o $(OBJDIR)/$(ARCH).o $(OBJDIR)/lin2ulaw.o \ + $(OBJDIR)/update_dsp.o $(OBJDIR)/$(OPSYS).o $(OBJDIR)/lin2ulaw.o \ $(OBJDIR)/keyboard.o $(OBJDIR)/devices.o @@@@ -24,2 +24,3 @@@@ d9 5 a13 1 @@@@ -41,3 +42,3 @@@@ d16 1 a16 1 +$(OBJDIR)/$(OPSYS).o: $(OPSYS).c xmame.h sound.h d18 2 @