Hello community, here is the log from the commit of package aranym for openSUSE:Factory checked in at 2013-04-17 06:59:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/aranym (Old) and /work/SRC/openSUSE:Factory/.aranym.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "aranym", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/aranym/aranym.changes 2013-03-01 13:56:08.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.aranym.new/aranym.changes 2013-04-17 06:59:48.000000000 +0200 @@ -1,0 +2,24 @@ +Mon Apr 15 17:54:42 UTC 2013 - sch...@linux-m68k.org + +- Update to aranym 0.9.15 + + The main new feature of this release is the seamless mouse integration mode: + + o Mouse input handling is improved a lot. Now ARAnyM has a seamless mouse + integration when new Clocky (2013/04/15) is loaded. + o There is no need to manually ungrab or grab the mouse. + o Also mouse grab on left button click now reacts on the first button + click everytime (previously only if you had window focus) and the + host and mouse cursor positions are synced. + o And if you ungrab the mouse intentionally then it's not automatically + grabbed when the host mouse pointer returns to ARAnyM window. + o At last, the annoying "resetting weird mouse packet" error is gone, too. + + Bugs fixed: + + o Native Features were missing proper memory overflow checks and bugs + in NatFeat drivers could kill the ARAnyM. + o NFVDI had a bug (a race condition) in resolution switching. + o build date of EmuTOS was decoded improperly + +------------------------------------------------------------------- Old: ---- aranym-0.9.14.tar.gz New: ---- aranym-0.9.15.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aranym.spec ++++++ --- /var/tmp/diff_new_pack.ISPtiZ/_old 2013-04-17 06:59:51.000000000 +0200 +++ /var/tmp/diff_new_pack.ISPtiZ/_new 2013-04-17 06:59:51.000000000 +0200 @@ -30,7 +30,7 @@ Summary: Atari Running on Any Machine License: GPL-2.0+ and LGPL-2.1+ Group: System/Emulators/Other -Version: 0.9.14 +Version: 0.9.15 Release: 0 Source: %{name}-%{version}.tar.gz Source1: afros-0.9.6-1.zip ++++++ aranym-0.9.14.tar.gz -> aranym-0.9.15.tar.gz ++++++ ++++ 4196 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/ChangeLog new/aranym-0.9.15/ChangeLog --- old/aranym-0.9.14/ChangeLog 2012-09-20 09:37:47.000000000 +0200 +++ new/aranym-0.9.15/ChangeLog 2013-04-15 12:11:14.000000000 +0200 @@ -1,3 +1,65 @@ +*** CVS tagged as ARANYM_0_9_15 + +2013/04/15 - Petr +- input.cpp: fixed click to grab input, added proper host<->Atari mouse sync +- ikbd.cpp: fixed SendMouseMotion() and MergeMousePacket() +- include/aradata.h: added setAtariMousePosition() + + +2013/01/23 - Petr +- natfeat/nfvdi.cpp: fixes a bug (sort of a race condition) in NFVDI. + When fVDI switches to 32-bit display in VdiDriver::setResolution(), + a new HostSurface is created immediately for the VDI driver. + Then the video mode change is applied to the host window only on next VBL, + in HostScreen::refreshSurface(). + But in VdiDriver::expandArea(), there was a bogus test: + if (host->video->getBpp() == 8) { + This was wrong, because the VDI made a test on the host window surface, + which would only be correct on next VBL. Found and fixed by Vincent Riviere. + +- bootos_emutos.cpp: fix for now correct BCD date format in EmuTOS by Vincent. + + +2013/01/14 - Petr +- include/natfeats.h: added proper check for end of memory block that + is to be copied between host and guest using the LIBC memcpy(). + Re-enabled NATFEAT_LIBC_MEMCPY fast copying in NatFeats because + I believe it's relatively safe now when there are checks for + begin and end of the Atari memory block. Atari memory is contiguous + so when both begin and end of the block is readable/writeable + the whole block should be OK to copy by LIBC memcpy. + + +2013/01/13 - Petr +- input.cpp: "Reseting weird mouse packet" error message changed to + "Resetting suspicious mouse packet" debug message thus it'll no longer + annoy you. Thanks to Helmut Karlowski for pointing it out. + +- include/natfeats.h: added switch for previously default and dangerous + direct LIBC memcpy() to/from guest provided memory pointer. Now it is + disabled by default and byte by byte copying routine is used instead + (guest programs should no longer be able to kill the whole ARAnyM). + It might affect the NatFeats performance negatively so if required + set the newly introduced NATFEAT_LIBC_MEMCPY define to 1. + + In addition the direct LIBC memcpy() is now guarded by proper pointer check + so even if you enable it for speed reasons you should still be relatively + safe. Thanks to Thorsten Glaser for providing simple linux user program + that was able to kill ARAnyM by issuing NF_NAME NatFeat. + +- natfeat/nf_basicset.cpp, natfeat/ethernet.cpp: removed incorrect ValidAddr + checks. + + +2012/09/24 - Philipp +- Xcode 4.5 project/build system: fixes for building with OS X 10.8, changed + packaging DMG to include README_ethernet.rtf instead of TunTap description, + adjusted detection of aclocal and makedepend to support usage of MacPorts + +- Disabled loading of WMIcon on MacAranym as the correct icon is already bundled + with the application. + + *** CVS tagged as ARANYM_0_9_14 2012/09/20 - Petr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/NEWS new/aranym-0.9.15/NEWS --- old/aranym-0.9.14/NEWS 2012-09-20 09:34:58.000000000 +0200 +++ new/aranym-0.9.15/NEWS 2013-04-15 12:08:49.000000000 +0200 @@ -1,3 +1,25 @@ +2013/04/15 - version 0.9.15 released + + The main new feature of this release is the seamless mouse integration mode: + + o Mouse input handling is improved a lot. Now ARAnyM has a seamless mouse + integration when new Clocky (2013/04/15) is loaded. + o There is no need to manually ungrab or grab the mouse. + o Also mouse grab on left button click now reacts on the first button + click everytime (previously only if you had window focus) and the + host and mouse cursor positions are synced. + o And if you ungrab the mouse intentionally then it's not automatically + grabbed when the host mouse pointer returns to ARAnyM window. + o At last, the annoying "resetting weird mouse packet" error is gone, too. + + Bugs fixed: + + o Native Features were missing proper memory overflow checks and bugs + in NatFeat drivers could kill the ARAnyM. + o NFVDI had a bug (a race condition) in resolution switching. + o build date of EmuTOS was decoded improperly + + 2012/09/20 - version 0.9.14 released Mac users: check out the new bridged ethernet (see README_ethernet.rtf). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/README new/aranym-0.9.15/README --- old/aranym-0.9.14/README 2012-09-20 09:34:58.000000000 +0200 +++ new/aranym-0.9.15/README 2013-04-15 12:04:25.000000000 +0200 @@ -1,6 +1,6 @@ ARAnyM (Atari Running on Any Machine) - version 0.9.14 released on 2012/09/20 + version 0.9.15 released on 2013/04/15 1) License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/aranym.spec new/aranym-0.9.15/aranym.spec --- old/aranym-0.9.14/aranym.spec 2012-09-20 09:36:35.000000000 +0200 +++ new/aranym-0.9.15/aranym.spec 2013-04-15 12:08:49.000000000 +0200 @@ -1,6 +1,6 @@ # generic defines used by all distributions. # -%define ver 0.9.14 +%define ver 0.9.15 # # @@ -377,6 +377,9 @@ %changelog +* Mon Apr 15 2013 Petr Stehlik <psteh...@sophics.cz> 0.9.15 +New ARAnyM release. + * Fri Mar 23 2012 Petr Stehlik <psteh...@sophics.cz> 0.9.13 New ARAnyM release. Make use of two new desktop files. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/configure.ac new/aranym-0.9.15/configure.ac --- old/aranym-0.9.14/configure.ac 2012-07-27 20:51:58.000000000 +0200 +++ new/aranym-0.9.15/configure.ac 2012-09-24 21:40:49.000000000 +0200 @@ -229,7 +229,7 @@ case "$host_os" in darwin8* | darwin9* ) ISYSROOT="-mmacosx-version-min=10.4 -isysroot $DEVELOPER_SDK_DIR/MacOSX10.4u.sdk";; darwin10* ) ISYSROOT="-mmacosx-version-min=10.4 -isysroot $DEVELOPER_SDK_DIR/MacOSX10.5.sdk";; - darwin11* ) ISYSROOT="-mmacosx-version-min=10.5";; + darwin11* | darwin12* ) ISYSROOT="-mmacosx-version-min=10.5";; *) AC_MSG_ERROR([Sorry, unknown Darwin version: $host_os]) ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/Unix/MacOSX/MacAranym.xcodeproj/project.pbxproj new/aranym-0.9.15/src/Unix/MacOSX/MacAranym.xcodeproj/project.pbxproj --- old/aranym-0.9.14/src/Unix/MacOSX/MacAranym.xcodeproj/project.pbxproj 2012-07-27 20:51:58.000000000 +0200 +++ new/aranym-0.9.15/src/Unix/MacOSX/MacAranym.xcodeproj/project.pbxproj 2012-09-24 21:40:49.000000000 +0200 @@ -43,6 +43,7 @@ 171B2BD60C4017C9007D8975 /* dlgVideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 171B2BD40C4017C9007D8975 /* dlgVideo.cpp */; }; 171B2BD70C4017C9007D8975 /* dlgOs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 171B2BD30C4017C9007D8975 /* dlgOs.cpp */; }; 171B2BD80C4017C9007D8975 /* dlgVideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 171B2BD40C4017C9007D8975 /* dlgVideo.cpp */; }; + 1730EDFD160F9BDF002EC84E /* README_ethernet.rtf in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17E78DBF15AA3E0B006C560E /* README_ethernet.rtf */; }; 1732BC82124540FF00272489 /* scc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1732BC81124540FF00272489 /* scc.cpp */; }; 1732BC83124540FF00272489 /* scc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1732BC81124540FF00272489 /* scc.cpp */; }; 1732BC84124540FF00272489 /* scc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1732BC81124540FF00272489 /* scc.cpp */; }; @@ -516,9 +517,6 @@ B471E7C10D2A88750021DFA7 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = B471E7C00D2A88750021DFA7 /* adler32.c */; }; B471E7C20D2A88750021DFA7 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = B471E7C00D2A88750021DFA7 /* adler32.c */; }; B471E7C30D2A88750021DFA7 /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = B471E7C00D2A88750021DFA7 /* adler32.c */; }; - B47270890C6BB5D600A1379D /* aratapif.sh in CopyFiles */ = {isa = PBXBuildFile; fileRef = B47270880C6BB5D600A1379D /* aratapif.sh */; }; - B47270910C6BB62700A1379D /* README_ethernet.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = B47270900C6BB62700A1379D /* README_ethernet.txt */; }; - B47272CA0C6BBF1300A1379D /* README_ethernet.txt in CopyFiles */ = {isa = PBXBuildFile; fileRef = B47270900C6BB62700A1379D /* README_ethernet.txt */; }; B475E5A70D4FA41500C8607E /* dlgPartition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B475E5A60D4FA41500C8607E /* dlgPartition.cpp */; }; B475E5A80D4FA41500C8607E /* dlgPartition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B475E5A60D4FA41500C8607E /* dlgPartition.cpp */; }; B475E5A90D4FA41500C8607E /* dlgPartition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B475E5A60D4FA41500C8607E /* dlgPartition.cpp */; }; @@ -701,7 +699,6 @@ 17BCD8BF0B21004100432CE1 /* TODO in CopyFiles */, 17BCD8C90B21010C00432CE1 /* config in CopyFiles */, 17398E120B21048100A9B4DB /* README.rtf in CopyFiles */, - B47270910C6BB62700A1379D /* README_ethernet.txt in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -723,8 +720,7 @@ dstPath = "aranym-xxx-macosx"; dstSubfolderSpec = 16; files = ( - B47272CA0C6BBF1300A1379D /* README_ethernet.txt in CopyFiles */, - B47270890C6BB5D600A1379D /* aratapif.sh in CopyFiles */, + 1730EDFD160F9BDF002EC84E /* README_ethernet.rtf in CopyFiles */, B4E213CE0C5BA74600138A7F /* MacAranym MMU.app in CopyFiles */, B4E213CF0C5BA74600138A7F /* MacAranym.app in CopyFiles */, 17B1146E151E6A4500E4EB0F /* MacAranym JIT.app in CopyFiles */, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/Unix/MacOSX/parameters_MacOSX.cpp new/aranym-0.9.15/src/Unix/MacOSX/parameters_MacOSX.cpp --- old/aranym-0.9.14/src/Unix/MacOSX/parameters_MacOSX.cpp 2008-01-30 20:12:39.000000000 +0100 +++ new/aranym-0.9.15/src/Unix/MacOSX/parameters_MacOSX.cpp 2012-09-24 21:40:49.000000000 +0200 @@ -43,13 +43,13 @@ char *HostFilesys::getDataFolder(char *buffer, unsigned int bufsize) { - CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFURLGetFileSystemRepresentation(url, true, (UInt8 *)buffer, bufsize); + UInt8 main_bundle_loc[MAXPATHLEN]; + CFURLRef url = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle()); + CFURLGetFileSystemRepresentation(url, true, main_bundle_loc, sizeof(main_bundle_loc)); CFRelease(url); - - //printf("Data folder ---------> %s\n", gAranymFilesDirectory); - return buffer; -// return safe_strncpy(buffer, gAranymFilesDirectory, bufsize); + + //printf("Data folder ---------> %s\n", main_bundle_loc); + return safe_strncpy(buffer, (char*)main_bundle_loc, bufsize); } int HostFilesys::makeDir(char *filename, int perm) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/Unix/MacOSX/scripts/configure.sh new/aranym-0.9.15/src/Unix/MacOSX/scripts/configure.sh --- old/aranym-0.9.14/src/Unix/MacOSX/scripts/configure.sh 2012-07-27 20:51:58.000000000 +0200 +++ new/aranym-0.9.15/src/Unix/MacOSX/scripts/configure.sh 2012-09-24 21:40:49.000000000 +0200 @@ -53,7 +53,12 @@ fi # Make sure makedepend can be found -export PATH="$PATH:/usr/X11R6/bin" +if [ -d /usr/X11R6/bin ]; then + export PATH="$PATH:/usr/X11R6/bin" +fi +if [ -d /usr/X11/bin ]; then + export PATH="$PATH:/usr/X11/bin" +fi # Make sure autoconf can be found ( autoconf --version ) > /dev/null 2>&1 || { @@ -63,7 +68,16 @@ # Make sure SDL.m4 can be found -export ACLOCAL_FLAGS="-I $PROJECT_DIR/../darwin -I /usr/X11/share/aclocal" +export ACLOCAL_FLAGS="-I $PROJECT_DIR/../darwin" + +# Make sure other AC macros can be found +if [ -d /usr/X11/share/aclocal ]; then + export ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I /usr/X11/share/aclocal" +fi +if [ -d /opt/share/aclocal ]; then + export ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I /opt/share/aclocal" +fi + # Make sure SDL.framework can be found export LDFLAGS="-F$PROJECT_DIR" @@ -95,8 +109,7 @@ CPU_TYPE=$(eval echo $(echo \$CPU_TYPE_$ARCH)) COMPILE_DEFS=$(eval echo $(echo \$COMPILE_DEFS_$ARCH)) echo ; echo "Running configure for architecture $ARCH / $CPU_TYPE" - echo "COMPILE_DEFS=$COMPILE_DEFS" - echo $PWD + echo "Current COMPILE_DEFS=$COMPILE_DEFS" ./configure $CONFIGURE_OPTIONS --host=$ARCH-apple-$OSTYPE || exit 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/bootos_emutos.cpp new/aranym-0.9.15/src/bootos_emutos.cpp --- old/aranym-0.9.14/src/bootos_emutos.cpp 2006-08-29 21:00:32.000000000 +0200 +++ new/aranym-0.9.15/src/bootos_emutos.cpp 2013-01-23 07:55:54.000000000 +0100 @@ -36,8 +36,8 @@ load(bx_options.emutos_path); infoprint("EmuTOS %02x%02x/%02x/%02x loading from '%s'... [OK]", - ROMBaseHost[0x18], ROMBaseHost[0x19], ROMBaseHost[0x1a], ROMBaseHost[0x1b], + ROMBaseHost[0x18], ROMBaseHost[0x19], bx_options.emutos_path ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/ikbd.cpp new/aranym-0.9.15/src/ikbd.cpp --- old/aranym-0.9.14/src/ikbd.cpp 2009-01-03 07:30:11.000000000 +0100 +++ new/aranym-0.9.15/src/ikbd.cpp 2013-04-15 12:00:41.000000000 +0200 @@ -1,7 +1,7 @@ /* * ikbd.cpp - IKBD 6301 emulation code * - * Copyright (c) 2001-2009 Petr Stehlik of ARAnyM dev team (see AUTHORS) + * Copyright (c) 2001-2013 Petr Stehlik of ARAnyM dev team (see AUTHORS) * * This file is part of the ARAnyM project which builds a new and powerful * TOS/FreeMiNT compatible virtual machine running on almost any hardware. @@ -35,6 +35,7 @@ #define DEFAULT_INBUFFERLEN (1<<6) #define DEFAULT_OUTBUFFERLEN (1<<4) +#define MOUSE_DELTA_MAX 63 #define JOYSTICK_THRESHOLD 16384 /*--- Constructor/destructor of the IKBD class ---*/ @@ -337,31 +338,18 @@ if (!mouse_enabled) return; - /* Generate several mouse packets if motion too long */ + if (abs(relx) > 2048 || abs(rely) > 2048) { + panicbug("IKBD: ignoring insane mouse motion: [%d, %d]", relx, rely); + return; + } + + // Generate several mouse packets if motion is too long do { - int movex, movey; - - movex = relx; - if (movex<-128) { - movex=-128; - relx += 128; - } else if (movex>127) { - movex=127; - relx -= 127; - } else { - relx = 0; - } + int movex = (abs(relx) > MOUSE_DELTA_MAX) ? ( (relx > 0) ? MOUSE_DELTA_MAX : -MOUSE_DELTA_MAX ) : relx; + relx -= movex; - movey = rely; - if (movey<-128) { - movey=-128; - rely += 128; - } else if (movey>127) { - movey=127; - rely -= 127; - } else { - rely = 0; - } + int movey = (abs(rely) > MOUSE_DELTA_MAX) ? ( (rely > 0) ? MOUSE_DELTA_MAX : -MOUSE_DELTA_MAX ) : rely; + rely -= movey; /* Merge with the previous mouse packet ? */ MergeMousePacket(&movex, &movey, buttons); @@ -371,8 +359,9 @@ send(0xf8 | (buttons & 3)); send(movex); send(yaxis_reversed ? -movey : movey); + // panicbug("IKBD: creating mouse packet [%d (%d), %d (%d), %d]", movex, relx, (yaxis_reversed ? -movey : movey), rely, buttons & 3); - } while (relx && rely); + } while (relx || rely); } void IKBD::MergeMousePacket(int *relx, int *rely, int buttons) @@ -407,11 +396,11 @@ /* Check if distances are not too far */ distx = *relx + inbuffer[(mouse_inwrite+1) & (inbufferlen-1)]; - if ((distx<-128) || (distx>127)) + if (abs(distx) > MOUSE_DELTA_MAX) return; disty = *rely + inbuffer[(mouse_inwrite+2) & (inbufferlen-1)]; - if ((disty<-128) || (disty>127)) + if (abs(disty) > MOUSE_DELTA_MAX) return; /* Replace previous packet */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/include/aradata.h new/aranym-0.9.15/src/include/aradata.h --- old/aranym-0.9.14/src/include/aradata.h 2004-02-14 02:37:31.000000000 +0100 +++ new/aranym-0.9.15/src/include/aradata.h 2013-04-15 12:00:10.000000000 +0200 @@ -38,5 +38,6 @@ bool isAtariMouseDriver() { return mouseDriver; } int getAtariMouseX() { return mouse_x; } int getAtariMouseY() { return mouse_y; } + void setAtariMousePosition(int x, int y) { mouse_x = x; mouse_y = y; } }; #endif /* _ARADATA */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/include/natfeats.h new/aranym-0.9.15/src/include/natfeats.h --- old/aranym-0.9.14/src/include/natfeats.h 2007-11-29 19:00:21.000000000 +0100 +++ new/aranym-0.9.15/src/include/natfeats.h 2013-01-14 20:32:32.000000000 +0100 @@ -1,3 +1,26 @@ +/* + * natfeats.h - common functions for all NatFeats + * + * Copyright (c) 2001-2013 Petr Stehlik of ARAnyM dev team (see AUTHORS) + * + * This file is part of the ARAnyM project which builds a new and powerful + * TOS/FreeMiNT compatible virtual machine running on almost any hardware. + * + * ARAnyM is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * ARAnyM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ARAnyM; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + #ifndef _NATFEATS_H #define _NATFEATS_H @@ -14,6 +37,9 @@ // should NatFeats work with physical (not MMU mapped) addresses #define NATFEAT_PHYS_ADDR 1 +// should NatFeats use direct memcpy() to/from guest provided pointer (fast but less safe) +#define NATFEAT_LIBC_MEMCPY 1 + #if NATFEAT_PHYS_ADDR # define ReadNFInt8 ReadAtariInt8 # define ReadNFInt16 ReadAtariInt16 @@ -30,53 +56,77 @@ # define WriteNFInt32 WriteInt32 #endif -static inline void Atari2Host_memcpy(void *dst, memptr src, size_t n) +static inline void Atari2Host_memcpy(void *_dst, memptr src, size_t count) { -#if NATFEAT_PHYS_ADDR - memcpy(dst, Atari2HostAddr(src), n); +#if NATFEAT_LIBC_MEMCPY && NATFEAT_PHYS_ADDR + memptr src_end = src + count - 1; + if (! ValidAtariAddr(src, false, 1)) + BUS_ERROR(src); + if (! ValidAtariAddr(src_end, false, 1)) + BUS_ERROR(src_end); + + memcpy(_dst, Atari2HostAddr(src), count); #else - uint8 *dest = (uint8 *)dst; - while ( n-- ) - *dest++ = (char)ReadInt8( (uint32)src++ ); + uint8 *dst = (uint8 *)_dst; + while ( count-- ) + *dst++ = (char)ReadNFInt8( src++ ); #endif } -static inline void Host2Atari_memcpy(memptr dest, const void *src, size_t n) +static inline void Host2Atari_memcpy(memptr dst, const void *_src, size_t count) { -#if NATFEAT_PHYS_ADDR - memcpy(Atari2HostAddr(dest), src, n); +#if NATFEAT_LIBC_MEMCPY && NATFEAT_PHYS_ADDR + memptr dst_end = dst + count - 1; + if (! ValidAtariAddr(dst, true, 1)) + BUS_ERROR(dst); + if (! ValidAtariAddr(dst_end, true, 1)) + BUS_ERROR(dst_end); + + memcpy(Atari2HostAddr(dst), _src, count); #else - uint8 *source = (uint8 *)src; - while ( n-- ) - WriteInt8( dest++, *source++ ); + uint8 *src = (uint8 *)_src; + while ( count-- ) + WriteNFInt8( dst++, *src++ ); #endif } -static inline void Atari2HostSafeStrncpy( char *dest, memptr source, size_t count ) +static inline void Atari2HostSafeStrncpy(char *dst, memptr src, size_t count) { -#if NATFEAT_PHYS_ADDR - safe_strncpy(dest, (const char*)Atari2HostAddr(source), count); +#if NATFEAT_LIBC_MEMCPY && NATFEAT_PHYS_ADDR + memptr src_end = src + count - 1; + if (! ValidAtariAddr(src, false, 1)) + BUS_ERROR(src); + if (! ValidAtariAddr(src_end, false, 1)) + BUS_ERROR(src_end); + + safe_strncpy(dst, (const char*)Atari2HostAddr(src), count); #else - while ( count > 1 && (*dest = (char)ReadInt8( source++ )) != 0 ) { + while ( count > 1 && (*dst = (char)ReadNFInt8( src++ )) != 0 ) { count--; - dest++; + dst++; } if (count > 0) - *dest = '\0'; + *dst = '\0'; #endif } -static inline void Host2AtariSafeStrncpy( memptr dest, const char *source, size_t count ) +static inline void Host2AtariSafeStrncpy(memptr dst, const char *src, size_t count) { -#if NATFEAT_PHYS_ADDR - safe_strncpy((char *)Atari2HostAddr(dest), source, count); +#if NATFEAT_LIBC_MEMCPY && NATFEAT_PHYS_ADDR + memptr dst_end = dst + count - 1; + if (! ValidAtariAddr(dst, true, 1)) + BUS_ERROR(dst); + if (! ValidAtariAddr(dst_end, true, 1)) + BUS_ERROR(dst_end); + + safe_strncpy((char *)Atari2HostAddr(dst), src, count); #else - while ( count > 1 && *source ) { - WriteInt8( dest++, (uint8)*source++ ); + while ( count > 1 && *src ) { + WriteNFInt8( dst++, (uint8)*src++ ); count--; } if (count > 0) - WriteInt8( dest, 0 ); + WriteNFInt8( dst, 0 ); #endif } #endif /* _NATFEATS_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/include/version.h new/aranym-0.9.15/src/include/version.h --- old/aranym-0.9.14/src/include/version.h 2012-09-20 10:34:05.000000000 +0200 +++ new/aranym-0.9.15/src/include/version.h 2013-04-15 12:00:20.000000000 +0200 @@ -28,11 +28,11 @@ #define VER_MAJOR 0 #define VER_MINOR 9 -#define VER_MICRO 14 +#define VER_MICRO 15 #ifndef VER_STATUS -//#define VER_STATUS #define VER_STATUS +//#define VER_STATUS "+" CVS_DATE //#define VER_STATUS "alpha" //#define VER_STATUS "beta" //#define VER_STATUS "beta+" CVS_DATE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/input.cpp new/aranym-0.9.15/src/input.cpp --- old/aranym-0.9.14/src/input.cpp 2012-08-29 15:36:49.000000000 +0200 +++ new/aranym-0.9.15/src/input.cpp 2013-04-15 12:03:13.000000000 +0200 @@ -1,7 +1,7 @@ /* * input.cpp - handling of keyboard/mouse input * - * Copyright (c) 2001-2009 Petr Stehlik of ARAnyM dev team (see AUTHORS) + * Copyright (c) 2001-2013 Petr Stehlik of ARAnyM dev team (see AUTHORS) * * This file is part of the ARAnyM project which builds a new and powerful * TOS/FreeMiNT compatible virtual machine running on almost any hardware. @@ -98,6 +98,7 @@ static bool grabbedMouse = false; static bool hiddenMouse = false; +static bool canGrabMouseAgain = false; static bool capslockState = false; static bool ignoreMouseMotionEvent = false; static SDL_Cursor *aranym_cursor = NULL; @@ -241,12 +242,42 @@ SDL_FreeCursor(aranym_cursor); } +static int atari_mouse_xpos = -1; +static int atari_mouse_ypos = -1; +// remember the current Atari mouse cursor position +void RememberAtariMouseCursorPosition() +{ + if (getARADATA()->isAtariMouseDriver()) { + atari_mouse_xpos = getARADATA()->getAtariMouseX(); + atari_mouse_ypos = getARADATA()->getAtariMouseY(); + D(bug("Atari mouse cursor pointer left at [%d, %d]", atari_mouse_xpos, atari_mouse_ypos)); + } +} + +// reposition the Atari mouse cursor to match the host mouse cursor position +void RestoreAtariMouseCursorPosition() +{ + int xpos, ypos; + SDL_GetMouseState(&xpos, &ypos); + if (atari_mouse_xpos >=0 && atari_mouse_ypos >= 0) { + D(bug("Restoring mouse cursor pointer to [%d, %d]", xpos, ypos)); + getARADATA()->setAtariMousePosition(xpos, ypos); + int delta_x = xpos - atari_mouse_xpos; + int delta_y = ypos - atari_mouse_ypos; + if (delta_x || delta_y) { + D(bug("Moving Atari mouse by [%d, %d]", delta_x, delta_y)); + getIKBD()->SendMouseMotion(delta_x, delta_y, 0); + } + } +} + bool grabMouse(bool grab) { int current = SDL_WM_GrabInput(SDL_GRAB_QUERY); if (grab && current != SDL_GRAB_ON) { SDL_WM_GrabInput(SDL_GRAB_ON); grabbedMouse = true; + canGrabMouseAgain = true; hideMouse(true); ignoreMouseMotionEvent = true; } @@ -255,6 +286,19 @@ grabbedMouse = false; hideMouse(false); } + + // show hint in the window caption + if (SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GRAB_ON) { + char buf[128]; + char key[80]; + displayKeysym(bx_options.hotkeys.ungrab, key); + snprintf(buf, sizeof(buf), "press [%s] or middle mouse button to release input grab", key); + SDL_WM_SetCaption(buf, "ARAnyM"); + } + else { + SDL_WM_SetCaption("ARAnyM: no input grab", "ARAnyM"); + } + return (current == SDL_GRAB_ON); } @@ -264,16 +308,11 @@ #if DEBUG int x,y; SDL_GetMouseState(&x, &y); - D(bug("Mouse grab at window position [%d,%d]", x, y)); + D(bug("grabTheMouse: mouse grab at window position [%d,%d]", x, y)); #endif + RestoreAtariMouseCursorPosition(); hideMouse(true); - if (false) { // are we able to sync TOS and host mice? - // sync the position of ST mouse with the host mouse cursor position - } - else { - // we got to grab the mouse completely, otherwise they'd be out of sync - grabMouse(true); - } + grabMouse(true); } void releaseTheMouse() @@ -282,31 +321,8 @@ grabMouse(false); // release mouse hideMouse(false); // show it if (getARADATA()->isAtariMouseDriver()) { - int x = getARADATA()->getAtariMouseX(); - int y = getARADATA()->getAtariMouseY(); - D(bug("Mouse left our window at [%d,%d]", x, y)); - - // set the host mouse pointer to the expected place - // but move it in the original direction by 1 pixel - // to avoid an immediate and very annoying autograb... - - // Update 20090827: the code below causes troubles on Windows - // and Mac OSX. Apparently asking the SDL to position mouse - // at a negative offset is not supported across all architectures. - // Anyway, since there is no autograb this code can be disabled. -/* - if (x == 0) { - x = -1; - } - else if (y == 0) { - y = -1; - } - else { - x++; - y++; - } -*/ - SDL_WarpMouse(x, y); + RememberAtariMouseCursorPosition(); + SDL_WarpMouse(atari_mouse_xpos, atari_mouse_ypos); } } @@ -577,7 +593,6 @@ * Input event checking *********************************************************************/ static bool pendingQuit = false; -static bool canGrabMouseAgain = true; static int but = 0; static bool mouseOut = false; @@ -826,7 +841,7 @@ #endif /* SDL_GUI */ if (!grabbedMouse) { - if (event.type == SDL_MOUSEBUTTONDOWN && event.button.button == SDL_BUTTON_LEFT) { + if ((event.type == SDL_MOUSEBUTTONDOWN || event.type == SDL_MOUSEBUTTONUP) && event.button.button == SDL_BUTTON_LEFT) { D(bug("Left mouse click in our window => grab the mouse")); grabTheMouse(); } @@ -962,8 +977,8 @@ if (xrel || yrel || lastbut != but) { #if 1 if (xrel < -250 || xrel > 250 || yrel < -250 || yrel > 250) { - bug("Reseting weird mouse packet: %d, %d, %d", xrel, yrel, but); - xrel = yrel = 0; // reset the values otherwise ikbd gets crazy + D(bug("Resetting suspicious mouse packet: position %dx%d, buttons %d", xrel, yrel, but)); + xrel = yrel = 0; // reset the values otherwise ikbd goes crazy } #endif getIKBD()->SendMouseMotion(xrel, yrel, but); @@ -1012,20 +1027,24 @@ if (allowMouseGrab) { // if we can grab the mouse automatically // and if the Atari mouse driver works + D(bug("Proceed only if AtariMouseDriver is working")); if (getARADATA()->isAtariMouseDriver()) { // if the mouse pointer is leaving our window if (!event.active.gain) { // allow grabbing it when it will be returning - canGrabMouseAgain = true; + D(bug("Host mouse is indeed leaving us")); + if (canGrabMouseAgain) { + // RememberAtariMouseCursorPosition(); + } } // if the mouse pointer is entering our window else { + D(bug("Host mouse is returning!")); // if grabbing the mouse is allowed if (canGrabMouseAgain) { + D(bug("canGrabMouseAgain allows autograb")); // then grab it - /// TODO FIXME - /// disabled until proper appl_tplay mouse position syncing is implemented - /// grabTheMouse(); + grabTheMouse(); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/main.cpp new/aranym-0.9.15/src/main.cpp --- old/aranym-0.9.14/src/main.cpp 2010-07-17 21:16:29.000000000 +0200 +++ new/aranym-0.9.15/src/main.cpp 2012-09-24 21:40:49.000000000 +0200 @@ -462,7 +462,9 @@ } atexit(SDL_Quit); +#ifndef OS_darwin SetWMIcon(); +#endif // set preferred window position const char *wpos = bx_options.video.window_pos; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/natfeat/ethernet.cpp new/aranym-0.9.15/src/natfeat/ethernet.cpp --- old/aranym-0.9.14/src/natfeat/ethernet.cpp 2012-07-27 20:51:58.000000000 +0200 +++ new/aranym-0.9.15/src/natfeat/ethernet.cpp 2013-01-13 23:04:42.000000000 +0100 @@ -99,9 +99,6 @@ uint32 buf_size = getParameter(2); // buffer size D(bug("Ethernet: getMAC(%d, %p, %d", ethX, buf_ptr, buf_size)); - if (! ValidAddr(buf_ptr, true, buf_size)) - BUS_ERROR(buf_ptr); - // default MAC Address is just made up uint8 mac_addr[6] = {'\0','A','E','T','H', '0'+ethX }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/natfeat/nf_basicset.cpp new/aranym-0.9.15/src/natfeat/nf_basicset.cpp --- old/aranym-0.9.14/src/natfeat/nf_basicset.cpp 2008-08-15 19:23:07.000000000 +0200 +++ new/aranym-0.9.15/src/natfeat/nf_basicset.cpp 2013-01-13 23:04:42.000000000 +0100 @@ -34,11 +34,6 @@ uint32 name_maxlen = getParameter(1); D(bug("NF_Name(%p, %d)", name_ptr, name_maxlen)); - // maybe the ValidAddr check is no longer necessary - // hopefully the host2AtariSafeStrncpy would throw the bus error? - if (! ValidAddr(name_ptr, true, name_maxlen)) - BUS_ERROR(name_ptr); - const char *text; switch(fncode) { case 0:/* get_pure_name(char *name, uint32 max_len) */ @@ -84,11 +79,6 @@ memptr str_ptr = getParameter(0); D(bug("NF_StdErr(%d, %p)", fncode, str_ptr)); - // maybe the ValidAddr check is no longer necessary - // hopefully the atari2HostSafeStrncpy would throw the bus error? - if (! ValidAddr(str_ptr, false, 1)) - BUS_ERROR(str_ptr); - Atari2HostSafeStrncpy(buffer, str_ptr, sizeof(buffer)); fputs(buffer, output); fflush(output); // ensure immediate data output diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/natfeat/nfvdi.cpp new/aranym-0.9.15/src/natfeat/nfvdi.cpp --- old/aranym-0.9.14/src/natfeat/nfvdi.cpp 2012-03-18 00:27:46.000000000 +0100 +++ new/aranym-0.9.15/src/natfeat/nfvdi.cpp 2013-01-23 07:55:22.000000000 +0100 @@ -782,7 +782,7 @@ return 1; } - if (host->video->getBpp() == 8) { + if (getBpp() == 8) { fgColor &= 0xff; bgColor &= 0xff; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/src/natfeat/nfvdi_opengl.cpp new/aranym-0.9.15/src/natfeat/nfvdi_opengl.cpp --- old/aranym-0.9.14/src/natfeat/nfvdi_opengl.cpp 2007-12-01 21:07:06.000000000 +0100 +++ new/aranym-0.9.15/src/natfeat/nfvdi_opengl.cpp 2013-01-14 20:33:11.000000000 +0100 @@ -1247,9 +1247,8 @@ } } - int sx, sy, w, h; + int sx, w, h; sx = 0; - sy = 0; w = ch_w * length; h = ch_h; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/tools/export new/aranym-0.9.15/tools/export --- old/aranym-0.9.14/tools/export 2012-09-20 09:36:09.000000000 +0200 +++ new/aranym-0.9.15/tools/export 2013-04-15 12:08:49.000000000 +0200 @@ -3,7 +3,7 @@ VER_MAJOR=0 VER_MINOR=9 -VER_MICRO=14 +VER_MICRO=15 VER_STATUS= # VERSION=$VER_MAJOR"."$VER_MINOR"."$VER_MICRO @@ -58,5 +58,5 @@ cd aranym ./autogen.sh make distclean -cd .. && mv aranym $FOLDER && GZIP=--best tar chozf $FNAME --exclude=autogen.sh --exclude=CVS --exclude=.cvsignore $FOLDER +cd .. && mv aranym $FOLDER && GZIP=--best tar chzf $FNAME --exclude=autogen.sh --exclude=CVS --exclude=.cvsignore $FOLDER diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/aranym-0.9.14/version_date.h new/aranym-0.9.15/version_date.h --- old/aranym-0.9.14/version_date.h 2012-09-20 09:59:52.000000000 +0200 +++ new/aranym-0.9.15/version_date.h 2013-04-15 12:13:23.000000000 +0200 @@ -1,2 +1,2 @@ /* generated from ChangeLog */ -#define VERSION_DATE "2012/09/20" +#define VERSION_DATE "2013/04/15" -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org