head 1.22; access; symbols pkgsrc-2013Q2:1.22.0.8 pkgsrc-2013Q2-base:1.22 pkgsrc-2012Q4:1.22.0.6 pkgsrc-2012Q4-base:1.22 pkgsrc-2011Q4:1.22.0.4 pkgsrc-2011Q4-base:1.22 pkgsrc-2011Q2:1.22.0.2 pkgsrc-2011Q2-base:1.22 pkgsrc-2010Q4:1.21.0.42 pkgsrc-2010Q4-base:1.21 pkgsrc-2010Q3:1.21.0.40 pkgsrc-2010Q3-base:1.21 pkgsrc-2010Q2:1.21.0.38 pkgsrc-2010Q2-base:1.21 pkgsrc-2010Q1:1.21.0.36 pkgsrc-2010Q1-base:1.21 pkgsrc-2009Q4:1.21.0.34 pkgsrc-2009Q4-base:1.21 pkgsrc-2009Q3:1.21.0.32 pkgsrc-2009Q3-base:1.21 pkgsrc-2009Q2:1.21.0.30 pkgsrc-2009Q2-base:1.21 pkgsrc-2009Q1:1.21.0.28 pkgsrc-2009Q1-base:1.21 pkgsrc-2008Q4:1.21.0.26 pkgsrc-2008Q4-base:1.21 pkgsrc-2008Q3:1.21.0.24 pkgsrc-2008Q3-base:1.21 cube-native-xorg:1.21.0.22 cube-native-xorg-base:1.21 pkgsrc-2008Q2:1.21.0.20 pkgsrc-2008Q2-base:1.21 cwrapper:1.21.0.18 pkgsrc-2008Q1:1.21.0.16 pkgsrc-2008Q1-base:1.21 pkgsrc-2007Q4:1.21.0.14 pkgsrc-2007Q4-base:1.21 pkgsrc-2007Q3:1.21.0.12 pkgsrc-2007Q3-base:1.21 pkgsrc-2007Q2:1.21.0.10 pkgsrc-2007Q2-base:1.21 pkgsrc-2007Q1:1.21.0.8 pkgsrc-2007Q1-base:1.21 pkgsrc-2006Q4:1.21.0.6 pkgsrc-2006Q4-base:1.21 pkgsrc-2006Q3:1.21.0.4 pkgsrc-2006Q3-base:1.21 pkgsrc-2006Q2:1.21.0.2 pkgsrc-2006Q2-base:1.21 pkgsrc-2006Q1:1.20.0.8 pkgsrc-2006Q1-base:1.20 pkgsrc-2005Q4:1.20.0.6 pkgsrc-2005Q4-base:1.20 pkgsrc-2005Q3:1.20.0.4 pkgsrc-2005Q3-base:1.20 pkgsrc-2005Q2:1.20.0.2 pkgsrc-2005Q2-base:1.20 pkgsrc-2005Q1:1.19.0.4 pkgsrc-2005Q1-base:1.19 pkgsrc-2004Q4:1.19.0.2 pkgsrc-2004Q4-base:1.19 pkgsrc-2004Q3:1.18.0.2 pkgsrc-2004Q3-base:1.18 pkgsrc-2004Q2:1.16.0.2 pkgsrc-2004Q2-base:1.16 pkgsrc-2004Q1:1.13.0.2 pkgsrc-2004Q1-base:1.13 pkgsrc-2003Q4:1.11.0.2 pkgsrc-2003Q4-base:1.11 netbsd-1-6:1.6.0.8 netbsd-1-6-RELEASE-base:1.6 pkgviews:1.6.0.4 pkgviews-base:1.6 buildlink2:1.6.0.2 buildlink2-base:1.6 netbsd-1-5-PATCH003:1.6 comdex-fall-1999:1.4 netbsd-1-4-PATCH001:1.4 netbsd-1-4-RELEASE:1.4 netbsd-1-3-PATCH003:1.4; locks; strict; comment @# @; 1.22 date 2011.02.06.05.00.58; author wiz; state dead; branches; next 1.21; 1.21 date 2006.06.15.11.40.00; author dillo; state Exp; branches; next 1.20; 1.20 date 2005.04.02.20.57.10; author kristerw; state Exp; branches; next 1.19; 1.19 date 2004.11.27.01.31.20; author kristerw; state Exp; branches; next 1.18; 1.18 date 2004.08.14.00.25.56; author kristerw; state dead; branches; next 1.17; 1.17 date 2004.07.26.18.45.09; author dillo; state Exp; branches; next 1.16; 1.16 date 2004.05.28.00.46.27; author dillo; state Exp; branches; next 1.15; 1.15 date 2004.04.16.21.27.01; author kristerw; state dead; branches; next 1.14; 1.14 date 2004.04.02.18.47.39; author kristerw; state Exp; branches; next 1.13; 1.13 date 2004.02.21.00.06.36; author kristerw; state dead; branches; next 1.12; 1.12 date 2004.02.19.19.28.29; author kristerw; state Exp; branches; next 1.11; 1.11 date 2003.08.16.18.50.08; author kristerw; state dead; branches; next 1.10; 1.10 date 2003.07.19.21.02.09; author kristerw; state Exp; branches; next 1.9; 1.9 date 2003.05.27.12.43.16; author kristerw; state dead; branches; next 1.8; 1.8 date 2003.03.20.19.03.28; author kristerw; state Exp; branches; next 1.7; 1.7 date 2002.12.14.15.14.27; author kristerw; state dead; branches; next 1.6; 1.6 date 2002.01.12.22.53.16; author kristerw; state Exp; branches; next 1.5; 1.5 date 99.11.10.07.58.37; author soren; state dead; branches; next 1.4; 1.4 date 98.08.29.19.42.00; author frueauf; state Exp; branches; next 1.3; 1.3 date 98.08.29.04.24.29; author mycroft; state Exp; branches; next 1.2; 1.2 date 98.08.07.10.40.37; author agc; state Exp; branches; next 1.1; 1.1 date 98.07.09.12.34.56; author mycroft; state Exp; branches; next ; desc @@ 1.22 log @Remove xmame und xmess -- use mame/mess instead. Ok kristerw @ text @$NetBSD: patch-ab,v 1.21 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.21 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.20 log @Update xmess 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.19 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.18 log @Update xmess 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.17 2004/07/26 18:45:09 dillo Exp $ d3 13 a15 10 --- 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" d17 2 a18 396 +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.17 log @USB joystick driver rewritten, will be in next xmame release. okayed by kristerw. PKGREVISION++ @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.26 2004/07/26 18:40:06 dillo Exp $ @ 1.16 log @actually add patch, pointed out by wiz. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.25 2004/05/26 09:34:17 dillo Exp $ 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.15 log @Update xmess 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.14 2004/04/02 18:47:39 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.14 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.13 log @Update xmess 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.12 2004/02/19 19:28:29 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.12 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.11 log @Update xmess 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.10 2003/07/19 21:02:09 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.10 log @Update xmess to 0.71.1. Changes since 0.70.1 includes: - Everything from MESS 0.71 @ text @d1 1 a1 1 $NetBSD$ @ 1.9 log @Update xmess to 0.69.1. Changes since 0.68.1 includes: - 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.8 2003/03/20 19:03:28 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.8 log @Update xmess to 0.66.2. Changes since 0.65.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.7 log @Update xmess to 0.62.1 (rc3) Changes since last packaged version are mainly that the emulation core is based on MAME 0.62, together with random bugfixes. @ text @d1 5 a5 18 $NetBSD: patch-ab,v 1.6 2002/01/12 22:53:16 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 d7 10 a16 1 ifdef EFENCE @ 1.6 log @Make xmess compile for new systems that have libusbhid.so instead of libusb.so. Remove mame.dk as master site, since it is awfully slow. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.13 2002/01/06 22:09:32 kristerw Exp $ @ 1.5 log @Xmess is now part of xmame. @ text @d1 18 a18 5 $NetBSD: patch-ab,v 1.4 1998/08/29 19:42:00 frueauf Exp $ --- src/unix/Makefile.orig Tue Aug 25 07:39:20 1998 +++ src/unix/Makefile Fri Aug 28 23:08:49 1998 @@@@ -16,6 +16,7 @@@@ d20 1 a20 6 $(TARGET): $(OBJS) ar -rcv $@@ $(OBJS) + ranlib $@@ $(OBJDIR)/%.o: %.c xmame.h sound.h $(CC) -I../../src/ $(CFLAGS) -o $@@ -c $< @ 1.4 log @Readd rcs ids again. @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Update to 0.2b4.1. @ text @d1 2 @ 1.2 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 Thu Jul 9 08:15:16 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.1 log @Initial port of the XMESS game console emulator. @ text @d1 2 @