On Sun, Mar 11, 2012 at 02:37:29AM +0000, Edd Barrett wrote: > New version of dgen. UI improvements, m68k debugger.
Looks good Ed. ok @i386-current oh...your patch left garbage in patches/patch-md-phil_cpp, i cleared it out and the package as a result worked fine ;) > > OK? > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/emulators/dgen-sdl/Makefile,v > retrieving revision 1.3 > diff -u -p -r1.3 Makefile > --- Makefile 29 Feb 2012 21:38:31 -0000 1.3 > +++ Makefile 11 Mar 2012 02:29:13 -0000 > @@ -1,18 +1,22 @@ > # $OpenBSD: Makefile,v 1.3 2012/02/29 21:38:31 edd Exp $ > > COMMENT = Sega Megadrive/Genesis emulator > -DISTNAME = dgen-sdl-1.29 > -REVISION = 0 > +DISTNAME = dgen-sdl-1.30 > CATEGORIES = emulators games > HOMEPAGE = http://dgen.sourceforge.net/ > MAINTAINER = Edd Barrett <e...@openbsd.org> > > +FLAVORS = debugger > +FLAVOR ?= > + > # Various parts of dgen are under different licenses > # Mainly a 3 clause BSD license, but also: > # - musa non-commercial license > # - starscream non-commercial license > # - mz80 non-commercial license > # - cz80 non-commercial license > +# - scale2x GPLv2 > +# - hqx LGPL > PERMIT_PACKAGE_CDROM = No > PERMIT_PACKAGE_FTP = Yes > PERMIT_DISTFILES_CDROM =No > @@ -38,6 +42,11 @@ LIB_DEPENDS = devel/sdl \ > > CONFIGURE_STYLE = gnu > CONFIGURE_ENV += LDFLAGS="-L${LOCALBASE}/lib" > + > +# m68k debugger, at a slight performance cost > +.if ${FLAVOR:Mdebugger} > +CONFIGURE_ARGS += --enable-debugger > +.endif > > SAMPLEDIR = ${PREFIX}/share/examples/dgen-sdl/ > DOCDIR = ${PREFIX}/share/doc/dgen-sdl/ > Index: distinfo > =================================================================== > RCS file: /cvs/ports/emulators/dgen-sdl/distinfo,v > retrieving revision 1.2 > diff -u -p -r1.2 distinfo > --- distinfo 18 Feb 2012 01:16:08 -0000 1.2 > +++ distinfo 11 Mar 2012 02:29:13 -0000 > @@ -1,5 +1,5 @@ > -MD5 (dgen-sdl-1.29.tar.gz) = S2NJadpHS6Ji97JctP1G/g== > -RMD160 (dgen-sdl-1.29.tar.gz) = R/Lx8Mg6G7Xpbec5ajPtFdpRAZs= > -SHA1 (dgen-sdl-1.29.tar.gz) = kQTa+robkLRa0kMS6hPXbX1FeTc= > -SHA256 (dgen-sdl-1.29.tar.gz) = vwGEFPP4MYES5O+JdJiT9yIcNCKlwLB6yjlMkOXCD+E= > -SIZE (dgen-sdl-1.29.tar.gz) = 508039 > +MD5 (dgen-sdl-1.30.tar.gz) = 32Py8aoxf4v2gqGlUZIKmg== > +RMD160 (dgen-sdl-1.30.tar.gz) = Zimp6WZQAgqlloIryC7rSMZCUro= > +SHA1 (dgen-sdl-1.30.tar.gz) = ZQx7rci/YMYEK/+S1xmahlDlvZc= > +SHA256 (dgen-sdl-1.30.tar.gz) = Ls02T/ZNS6dZtxWdc+G7jyifbVpLffoCHUq1y8ZEO4Y= > +SIZE (dgen-sdl-1.30.tar.gz) = 608549 > Index: patches/patch-md-phil_cpp > =================================================================== > RCS file: patches/patch-md-phil_cpp > diff -N patches/patch-md-phil_cpp > --- patches/patch-md-phil_cpp 29 Feb 2012 21:38:31 -0000 1.3 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,38 +0,0 @@ > -$OpenBSD: patch-md-phil_cpp,v 1.3 2012/02/29 21:38:31 edd Exp $ > - > -Fix joystick when not /dev/uhid0 > - > ---- md-phil.cpp.orig Sun Jan 29 20:58:52 2012 > -+++ md-phil.cpp Wed Feb 29 20:45:29 2012 > -@@ -168,11 +168,12 @@ void md::read_joysticks() > - #include <SDL_joystick.h> > - > - static SDL_Joystick *js_handle[2] = { NULL, NULL }; > -+int js_index[2] = { -1, -1 }; > - > - void md::init_joysticks(int js1, int js2) { > - // Initialize the joystick support > - // Thanks to Cameron Moore <came...@unbeatenpath.net> > -- if(SDL_Init(SDL_INIT_JOYSTICK) < 0) > -+ if(SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) > - { > - fprintf(stderr, "joystick: Unable to initialize joystick system\n"); > - return; > -@@ -191,9 +192,15 @@ void md::init_joysticks(int js1, int js2) { > - > - // Print the joystick names > - printf("joystick: Using "); > -- if(js_handle[0]) printf("%s (#%d) as pad1 ", SDL_JoystickName(js1), js1); > -+ if(js_handle[0]) { > -+ printf("%s (#%d) as pad1 ", SDL_JoystickName(js1), js1); > -+ js_index[0] = js1; > -+ } > - if(js_handle[0] && js_handle[1]) printf("and "); > -- if(js_handle[1]) printf("%s (#%d) as pad2 ", SDL_JoystickName(js2), js2); > -+ if(js_handle[1]) { > -+ printf("%s (#%d) as pad2 ", SDL_JoystickName(js2), js2); > -+ js_index[1] = js2; > -+ } > - printf("\n"); > - > - // Enable joystick events > Index: patches/patch-sdl_sdl_cpp > =================================================================== > RCS file: patches/patch-sdl_sdl_cpp > diff -N patches/patch-sdl_sdl_cpp > --- patches/patch-sdl_sdl_cpp 29 Feb 2012 21:38:31 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,119 +0,0 @@ > -$OpenBSD: patch-sdl_sdl_cpp,v 1.1 2012/02/29 21:38:31 edd Exp $ > - > -Fix joystick when not /dev/uhid0 > - > ---- sdl/sdl.cpp.orig Sun Jan 29 20:58:52 2012 > -+++ sdl/sdl.cpp Wed Feb 29 20:45:29 2012 > -@@ -1822,56 +1822,62 @@ int pd_handle_events(md &megad) > - switch(event.type) > - { > - #ifdef WITH_SDL_JOYSTICK > -- case SDL_JOYAXISMOTION: > -- // x-axis > -- if(event.jaxis.axis == 0) > -- { > -- if(event.jaxis.value < -16384) > -- { > -- megad.pad[event.jaxis.which] &= ~0x04; > -- megad.pad[event.jaxis.which] |= 0x08; > -- break; > -- } > -- if(event.jaxis.value > 16384) > -- { > -- megad.pad[event.jaxis.which] |= 0x04; > -- megad.pad[event.jaxis.which] &= ~0x08; > -- break; > -- } > -- megad.pad[event.jaxis.which] |= 0xC; > -- break; > -- } > -- // y-axis > -- if(event.jaxis.axis == 1) > -- { > -- if(event.jaxis.value < -16384) > -- { > -- megad.pad[event.jaxis.which] &= ~0x01; > -- megad.pad[event.jaxis.which] |= 0x02; > -- break; > -- } > -- if(event.jaxis.value > 16384) > -- { > -- megad.pad[event.jaxis.which] |= 0x01; > -- megad.pad[event.jaxis.which] &= ~0x02; > -- break; > -- } > -- megad.pad[event.jaxis.which] |= 0x3; > -- break; > -- } > -- break; > -- case SDL_JOYBUTTONDOWN: > -- // Ignore more than 16 buttons (a reasonable limit :) > -- if(event.jbutton.button > 15) break; > -- megad.pad[event.jbutton.which] &= > ~js_map_button[event.jbutton.which] > -- > [event.jbutton.button]; > -- break; > -- case SDL_JOYBUTTONUP: > -- // Ignore more than 16 buttons (a reasonable limit :) > -- if(event.jbutton.button > 15) break; > -- megad.pad[event.jbutton.which] |= > js_map_button[event.jbutton.which] > -- > [event.jbutton.button]; > -- break; > -+ extern int js_index[2]; > -+ int pad; > -+ > -+ case SDL_JOYAXISMOTION: > -+ if ((pad = 0, event.jaxis.which != js_index[pad]) && > -+ (pad = 1, event.jaxis.which != js_index[pad])) > -+ break; > -+ // x-axis > -+ if (event.jaxis.axis == 0) { > -+ if (event.jaxis.value < -16384) { > -+ megad.pad[pad] &= ~0x04; > -+ megad.pad[pad] |= 0x08; > -+ break; > -+ } > -+ if (event.jaxis.value > 16384) { > -+ megad.pad[pad] |= 0x04; > -+ megad.pad[pad] &= ~0x08; > -+ break; > -+ } > -+ megad.pad[pad] |= 0xc; > -+ break; > -+ } > -+ // y-axis > -+ else if (event.jaxis.axis == 1) { > -+ if (event.jaxis.value < -16384) { > -+ megad.pad[pad] &= ~0x01; > -+ megad.pad[pad] |= 0x02; > -+ break; > -+ } > -+ if (event.jaxis.value > 16384) { > -+ megad.pad[pad] |= 0x01; > -+ megad.pad[pad] &= ~0x02; > -+ break; > -+ } > -+ megad.pad[pad] |= 0x3; > -+ break; > -+ } > -+ break; > -+ case SDL_JOYBUTTONDOWN: > -+ // Ignore more than 16 buttons (a reasonable limit :) > -+ if (event.jbutton.button > 15) > -+ break; > -+ if ((pad = 0, event.jaxis.which != js_index[pad]) && > -+ (pad = 1, event.jaxis.which != js_index[pad])) > -+ break; > -+ megad.pad[pad] &= ~js_map_button[pad][event.jbutton.button]; > -+ break; > -+ case SDL_JOYBUTTONUP: > -+ // Ignore more than 16 buttons (a reasonable limit :) > -+ if (event.jbutton.button > 15) > -+ break; > -+ if ((pad = 0, event.jaxis.which != js_index[pad]) && > -+ (pad = 1, event.jaxis.which != js_index[pad])) > -+ break; > -+ megad.pad[pad] |= js_map_button[pad][event.jbutton.button]; > -+ break; > - #endif // WITH_SDL_JOYSTICK > - case SDL_KEYDOWN: > - ksym = event.key.keysym.sym; > > -- > Best Regards > Edd Barrett > > http://www.theunixzoo.co.uk >