diff -Naur gngeo-0.5.9/NEWS gngeo-0.5.9a/NEWS --- gngeo-0.5.9/NEWS Fri May 9 09:20:14 2003 +++ gngeo-0.5.9a/NEWS Sat May 31 10:49:03 2003 @@ -1,3 +1,12 @@ + change int 0.5.9a: + . Correct a stupid bug in the opengl code (+ minor speedup) + . Fix Twinkle Star Sprites + . You can now take a screenshot with F2 (screenshots are save in BMP under your + home) + . Add forcepc option to force the startup PC to a correct value. Use it if you + have a game that seem to freeze after loading. + . Add --disable-i386asm option to the configure script + change in 0.5.9: . The romrc file is now installed in $prefix/share/gngeo/ after a make install This directory is now the default path for romset and romrc @@ -18,7 +27,7 @@ . Fix a dependencie bug in generator68k . Fix a bug in the rom loading code (prevent some crash) . better support for crypted rom (bankswitching and char drawing) - aggain, only mslug3n have a driver and is reported to work (freeze sometimes :( + again, only mslug3n have a driver and is reported to work (freeze sometimes :( (Update your romrc). . Initial save state support (functionnal, but some game have minor graphic/sound glitch, and you can't use a save state create under a little endian machine on a big endian one) diff -Naur gngeo-0.5.9/configure gngeo-0.5.9a/configure --- gngeo-0.5.9/configure Sun Apr 27 08:07:41 2003 +++ gngeo-0.5.9a/configure Thu May 29 08:28:11 2003 @@ -19,6 +19,8 @@ --enable-raze use raze as z80 emu (need nasm, i386 only)" ac_help="$ac_help --enable-mamez80 use mamez80 as z80 emu (portable C)" +ac_help="$ac_help + --disable-i386asm disable the use of i386 optimisation" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -576,7 +578,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:580: checking host system type" >&5 +echo "configure:582: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -597,7 +599,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:601: checking target system type" >&5 +echo "configure:603: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -615,7 +617,7 @@ echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:619: checking build system type" >&5 +echo "configure:621: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -652,7 +654,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:656: checking for a BSD compatible install" >&5 +echo "configure:658: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -705,7 +707,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:709: checking whether build environment is sane" >&5 +echo "configure:711: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -762,7 +764,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:766: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:768: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -791,7 +793,7 @@ PACKAGE=gngeo -VERSION=0.5.9 +VERSION=0.5.9a if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -808,7 +810,7 @@ missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:812: checking for working aclocal" >&5 +echo "configure:814: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -821,7 +823,7 @@ fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:825: checking for working autoconf" >&5 +echo "configure:827: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -834,7 +836,7 @@ fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:838: checking for working automake" >&5 +echo "configure:840: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -847,7 +849,7 @@ fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:851: checking for working autoheader" >&5 +echo "configure:853: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -860,7 +862,7 @@ fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:864: checking for working makeinfo" >&5 +echo "configure:866: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -878,7 +880,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:882: checking for $ac_word" >&5 +echo "configure:884: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -908,7 +910,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:912: checking for $ac_word" >&5 +echo "configure:914: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -959,7 +961,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:963: checking for $ac_word" >&5 +echo "configure:965: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -991,7 +993,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:995: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1002,12 +1004,12 @@ cat > conftest.$ac_ext << EOF -#line 1006 "configure" +#line 1008 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1033,12 +1035,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1037: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1042: checking whether we are using GNU C" >&5 +echo "configure:1044: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1047,7 +1049,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1066,7 +1068,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1070: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1100,7 +1102,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1104: checking for $ac_word" >&5 +echo "configure:1106: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1131,7 +1133,7 @@ # Checks for libraries. echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6 -echo "configure:1135: checking for acos in -lm" >&5 +echo "configure:1137: checking for acos in -lm" >&5 ac_lib_var=`echo m'_'acos | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1139,7 +1141,7 @@ ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1178,7 +1180,7 @@ fi echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6 -echo "configure:1182: checking for gzopen in -lz" >&5 +echo "configure:1184: checking for gzopen in -lz" >&5 ac_lib_var=`echo z'_'gzopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1186,7 +1188,7 @@ ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1229,7 +1231,7 @@ # Extract the first word of "sdl-config", so it can be a program name with args. set dummy sdl-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1233: checking for $ac_word" >&5 +echo "configure:1235: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_SDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1260,7 +1262,7 @@ CFLAGS="$CFLAGS `sdl-config --cflags`"; LIBS="$LIBS `sdl-config --libs`"; echo $ac_n "checking for SDL_Init in -lSDL""... $ac_c" 1>&6 -echo "configure:1264: checking for SDL_Init in -lSDL" >&5 +echo "configure:1266: checking for SDL_Init in -lSDL" >&5 ac_lib_var=`echo SDL'_'SDL_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1268,7 +1270,7 @@ ac_save_LIBS="$LIBS" LIBS="-lSDL $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1314,12 +1316,12 @@ for ac_func in getopt_long do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1318: checking for $ac_func" >&5 +echo "configure:1320: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1417,10 +1419,20 @@ #echo "CPUZ80 MAMEZ80 = $use_mamez80 $choice_68k" # TODO: check mmx support -# Extract the first word of "nasm", so it can be a program name with args. +# Check whether --enable-i386asm or --disable-i386asm was given. +if test "${enable_i386asm+set}" = set; then + enableval="$enable_i386asm" + enablei386asm=$enableval +else + enablei386asm=yes +fi + + +if test "$enablei386asm" = yes ; then + # Extract the first word of "nasm", so it can be a program name with args. set dummy nasm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1424: checking for $ac_word" >&5 +echo "configure:1436: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NASM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1447,6 +1459,10 @@ echo "$ac_t""no" 1>&6 fi +else + NASM=no +fi + if test "$NASM" = yes ; then CFLAGS="$CFLAGS -DI386_ASM" have_nasm=true @@ -1456,6 +1472,7 @@ if test "$choice_z80" = ko ; then use_raze=true fi + echo "Enable i386 optimisation" else have_nasm=false if test "$choice_68k" = ko ; then @@ -1464,19 +1481,24 @@ if test "$choice_z80" = ko ; then use_mamez80=true fi + echo "Disable i386 optimisation" fi if test "$use_starscream" = true ; then CFLAGS="$CFLAGS -DUSE_STARSCREAM" + echo "Use Starscream as 68000 core" fi if test "$use_generator68k" = true ; then CFLAGS="$CFLAGS -DUSE_GENERATOR68K" + echo "Use Generator68k as 68000 core" fi if test "$use_raze" = true ; then CFLAGS="$CFLAGS -DUSE_RAZE" + echo "Use Raze as Z80 core" fi if test "$use_mamez80" = true ; then CFLAGS="$CFLAGS -DUSE_MAMEZ80" + echo "Use MameZ80 as Z80 core" fi @@ -1531,12 +1553,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1535: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1557: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1544,7 +1566,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1569,7 +1591,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1573: checking for opendir in -ldir" >&5 +echo "configure:1595: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1577,7 +1599,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1610,7 +1632,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1614: checking for opendir in -lx" >&5 +echo "configure:1636: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1618,7 +1640,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1652,7 +1674,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1656: checking how to run the C preprocessor" >&5 +echo "configure:1678: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1667,13 +1689,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1684,13 +1706,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1701,13 +1723,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1732,12 +1754,12 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1736: checking for ANSI C header files" >&5 +echo "configure:1758: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1745,7 +1767,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1762,7 +1784,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1780,7 +1802,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1801,7 +1823,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1812,7 +1834,7 @@ exit (0); } EOF -if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1839,17 +1861,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1843: checking for $ac_hdr" >&5 +echo "configure:1865: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1878,12 +1900,12 @@ # Checks for typedefs, structures, and compiler characteristics. echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1882: checking for working const" >&5 +echo "configure:1904: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1953,21 +1975,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1957: checking for inline" >&5 +echo "configure:1979: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1993,12 +2015,12 @@ esac echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1997: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2019: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2007,7 +2029,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2028,12 +2050,12 @@ fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2032: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2054: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2041,7 +2063,7 @@ struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2062,14 +2084,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2066: checking whether byte ordering is bigendian" >&5 +echo "configure:2088: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -2080,11 +2102,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:2084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -2095,7 +2117,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2115,7 +2137,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2154,12 +2176,12 @@ # Checks for library functions. echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2158: checking for vprintf" >&5 +echo "configure:2180: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2206,12 +2228,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2210: checking for _doprnt" >&5 +echo "configure:2232: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2261,12 +2283,12 @@ for ac_func in atexit floor gettimeofday memset mkdir pow strchr strstr strtoul do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2265: checking for $ac_func" >&5 +echo "configure:2287: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff -Naur gngeo-0.5.9/configure.in gngeo-0.5.9a/configure.in --- gngeo-0.5.9/configure.in Sun Apr 27 08:06:56 2003 +++ gngeo-0.5.9a/configure.in Thu May 29 08:28:05 2003 @@ -3,7 +3,7 @@ AC_INIT(src/emu.c) AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(gngeo,0.5.9) +AM_INIT_AUTOMAKE(gngeo,0.5.9a) # Checks for programs. AC_PROG_CC @@ -54,7 +54,15 @@ #echo "CPUZ80 MAMEZ80 = $use_mamez80 $choice_68k" # TODO: check mmx support -AC_CHECK_PROG(NASM, nasm, yes,no) +AC_ARG_ENABLE(i386asm, [ --disable-i386asm disable the use of i386 optimisation], + [enablei386asm=$enableval],[enablei386asm=yes]) + +if test "$enablei386asm" = yes ; then + AC_CHECK_PROG(NASM, nasm, yes,no) +else + NASM=no +fi + if test "$NASM" = yes ; then CFLAGS="$CFLAGS -DI386_ASM" have_nasm=true @@ -64,6 +72,7 @@ if test "$choice_z80" = ko ; then use_raze=true fi + echo "Enable i386 optimisation" else have_nasm=false if test "$choice_68k" = ko ; then @@ -72,19 +81,24 @@ if test "$choice_z80" = ko ; then use_mamez80=true fi + echo "Disable i386 optimisation" fi if test "$use_starscream" = true ; then CFLAGS="$CFLAGS -DUSE_STARSCREAM" + echo "Use Starscream as 68000 core" fi if test "$use_generator68k" = true ; then CFLAGS="$CFLAGS -DUSE_GENERATOR68K" + echo "Use Generator68k as 68000 core" fi if test "$use_raze" = true ; then CFLAGS="$CFLAGS -DUSE_RAZE" + echo "Use Raze as Z80 core" fi if test "$use_mamez80" = true ; then CFLAGS="$CFLAGS -DUSE_MAMEZ80" + echo "Use MameZ80 as Z80 core" fi AM_CONDITIONAL(HAVE_NASM,$have_nasm) diff -Naur gngeo-0.5.9/src/blitter/opengl.c gngeo-0.5.9a/src/blitter/opengl.c --- gngeo-0.5.9/src/blitter/opengl.c Fri May 9 08:01:05 2003 +++ gngeo-0.5.9a/src/blitter/opengl.c Sat May 31 10:45:03 2003 @@ -61,18 +61,19 @@ } - if (conf.res_x==304 && conf.res_y==224) { - if (scale < 2) { - width *=effect[neffect].x_ratio; - height*=effect[neffect].y_ratio; +// if (conf.res_x==304 && conf.res_y==224) { + if (scale < 2) { + width *=effect[neffect].x_ratio; + height*=effect[neffect].y_ratio; } - width *= scale; - height *= scale; - } else { - width = conf.res_x; - height=conf.res_y; - } - + width *= scale; + height *= scale; +/* + } else { + width = conf.res_x; + height=conf.res_y; + } +*/ video_opengl = SDL_SetVideoMode(width, height, 16, sdl_flags); @@ -148,7 +149,8 @@ #define VALA .57894736842105263157 /* 240.0f*2.0f/304.0f - 1.0f */ #define VALB .0625 /* 16.0f/256.0f */ #define VALC .9375 /* 240.0f/256.0f */ -#define VALD .25 /* 64.0f/256.0f */ +//#define VALD .25 /* 64.0f/256.0f */ +#define VALD 1.0 if (neffect == 0) { pglTexImage2D(GL_TEXTURE_2D, 0, 3, 256, 256, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, buffer->pixels); @@ -168,7 +170,7 @@ pglVertex2f (-1.0f, -1.0f); pglEnd(); - pglTexImage2D(GL_TEXTURE_2D, 0, 3, 256, 256, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, buffer->pixels + 512); + pglTexImage2D(GL_TEXTURE_2D, 0, 3, 64, 256, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, buffer->pixels + 512); pglBegin(GL_QUADS); pglTexCoord2f(0.0f, VALB); pglVertex2f (VALA, 1.0f); diff -Naur gngeo-0.5.9/src/conf.c gngeo-0.5.9a/src/conf.c --- gngeo-0.5.9/src/conf.c Thu May 8 08:34:40 2003 +++ gngeo-0.5.9a/src/conf.c Thu May 29 08:03:13 2003 @@ -140,6 +140,7 @@ { CONF_ITEM *t; + cf_create_bool_item("forcepc","Force the PC to a correct value at startup",0,SDL_FALSE); cf_create_bool_item("fullscreen","Start gngeo in fullscreen",'f',SDL_FALSE); cf_create_bool_item("interpolation","Merge the last frame and the current",'I',SDL_FALSE); cf_create_bool_item("raster","Enable the raster interrupt",'r',SDL_FALSE); diff -Naur gngeo-0.5.9/src/emu.c gngeo-0.5.9a/src/emu.c --- gngeo-0.5.9/src/emu.c Fri May 9 09:09:28 2003 +++ gngeo-0.5.9a/src/emu.c Sat May 31 10:46:16 2003 @@ -24,6 +24,7 @@ #include #include +#include #include "emu.h" #include "memory.h" @@ -41,6 +42,7 @@ #include "neocrypt.h" #include "conf.h" + int frame; int nb_interlace = 256; int current_line; @@ -98,7 +100,10 @@ (!strcmp(name, "bjourney")) || (!strcmp(name, "maglord")) || (!strcmp(name, "mosyougi")) || - (!strcmp(name, "whp")) || conf.rom_type == MGD2) { + (!strcmp(name, "twinspri")) || + (!strcmp(name, "whp")) || + (conf.rom_type == MGD2) || + (CF_BOOL(cf_get_item_by_name("forcepc"))) ) { unsigned char *RAM = memory.cpu; WRITE_WORD_ROM(&RAM[4], 0x00c0); WRITE_WORD_ROM(&RAM[6], 0x0402); @@ -206,6 +211,29 @@ cpu_68k_reset(); } +static void take_screenshot(void) { + time_t ltime; + struct tm *today; + char buf[256]; + char date_str[101]; + static SDL_Rect buf_rect = {16, 16, 304, 224}; + static SDL_Rect screen_rect = { 0, 0, 304, 224}; + static SDL_Surface *shoot; + + if (shoot==NULL) + shoot=SDL_CreateRGBSurface(SDL_SWSURFACE,304, 224, 16, 0xF800, 0x7E0, 0x1F, 0); + + time(<ime); + today = localtime(<ime); + strftime (date_str,100,"%a_%b_%d_%T_%Y",today); + snprintf(buf,255,"%s/%s_%s.bmp",getenv("HOME"),conf.game,date_str); + printf("save to %s\n",buf); + + SDL_BlitSurface(buffer, &buf_rect, shoot, &screen_rect); + SDL_SaveBMP(shoot,buf); +} + + static inline int neo_interrupt(void) { static int fc; @@ -549,6 +577,10 @@ draw_message("Reset"); //neogeo_init(); cpu_68k_reset(); + break; + case SDLK_F2: + take_screenshot(); + draw_message("Screenshot saved"); break; case SDLK_F3: draw_message("Test Switch ON"); diff -Naur gngeo-0.5.9/src/main.c gngeo-0.5.9a/src/main.c --- gngeo-0.5.9/src/main.c Sat Apr 19 17:33:49 2003 +++ gngeo-0.5.9a/src/main.c Sat May 31 10:46:45 2003 @@ -159,8 +159,10 @@ exit(0); } - if (!rom_name) + if (!rom_name) { cf_print_help(); + exit(0); + } /* open transpack if need */ trans_pack_open(CF_STR(cf_get_item_by_name("transpack")));