diff --git a/zsnes/src/Makefile.in b/zsnes/src/Makefile.in index f11d4d56..da62e2ad 100644 --- a/zsnes/src/Makefile.in +++ b/zsnes/src/Makefile.in @@ -59,21 +59,29 @@ MAINOBJ=cfgload.o endmem.o fixsin.o init.o ui.o vcache.o water.o OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${WINDOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${ZIPOBJ} ${MAINOBJ} +CFLAGS=@CFLAGS@ +ASM=@NASMPATH@ +ASMFLAGS=@NASMD@ +LIBS=@LIBS@ +CC=@CC@ +INSTALL=@INSTALL@ +prefix=@prefix@ + .SUFFIXES: .c .cpp .asm %.o: %.c - @CC@ @CFLAGS@ -o $@ -c $< + ${CC} ${CFLAGS} -o $@ -c $< %.o: %.cpp - @CPP@ @CFLAGS@ -o $@ -c $< + ${PP} ${CFLAGS} -o $@ -c $< %.o: %.asm - @NASMPATH@ @NFLAGS@ -o $@ $< + ${ASM} ${ASMFLAGS} -o $@ $< ALL: @ZSNESEXE@ @ZSNESEXE@: ${OBJS} - @CC@ -o @ZSNESEXE@ ${OBJS} @CFLAGS@ @LDFLAGS@ + ${CC} -o @ZSNESEXE@ ${OBJS} ${LIBS} ${ZIPDIR}/zpng.o: ${ZIPDIR}/zpng.c ${ZIPDIR}/zpng.h ${ZIPDIR}/unzip.o: ${ZIPDIR}/unzip.c ${ZIPDIR}/unzip.h @@ -171,8 +179,8 @@ endmem.o: endmem.asm macros.mac ${DOSDIR}/modemrtn.o: ${DOSDIR}/modemrtn.asm macros.mac install: - @INSTALL@ -m 0755 @ZSNESEXE@ @prefix@/bin - @INSTALL@ -m 0644 linux/zsnes.man @prefix@/man + @INSTALL@ -m 0755 @ZSNESEXE@ ${prefix}/bin + @INSTALL@ -m 0644 linux/zsnes.man ${prefix}/man clean: rm -f ${CHIPDIR}/*.o ${CPUDIR}/*.o ${VIDEODIR}/*.o ${GUIDIR}/*.o ${DOSDIR}/*.o ${WINDIR}/*.o ${ZIPDIR}/*.o *.o @ZSNESEXE@ diff --git a/zsnes/src/chips/dsp1emu.c b/zsnes/src/chips/dsp1emu.c index 3d09538f..316bf665 100644 --- a/zsnes/src/chips/dsp1emu.c +++ b/zsnes/src/chips/dsp1emu.c @@ -15,7 +15,7 @@ //along with this program; if not, write to the Free Software //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "../gblhdr.h" +#include //#define DebugDSP1 diff --git a/zsnes/src/configure b/zsnes/src/configure index 70e245b2..521329e0 100755 --- a/zsnes/src/configure +++ b/zsnes/src/configure @@ -25,6 +25,14 @@ ac_help="$ac_help --without-png Build without PNG screenshot support " ac_help="$ac_help --enable-debug Build GDB Friendly binary (zsnes-debug) " +ac_help="$ac_help + --enable-force-386 Force 386 Optimization" +ac_help="$ac_help + --enable-force-486 Force 486 Optimization" +ac_help="$ac_help + --enable-force-586 Force Pentium Optimization" +ac_help="$ac_help + --enable-force-686 Force PPro/P2 Optimization" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -536,11 +544,11 @@ fi echo -- Where is our compiler, and who are we compiling for? -CFLAGS="-pipe -I." +CFLAGS="-pipe" # 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:544: checking for $ac_word" >&5 +echo "configure:552: 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 @@ -570,7 +578,7 @@ if test -z "$CC"; then # 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:574: checking for $ac_word" >&5 +echo "configure:582: 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 @@ -621,7 +629,7 @@ fi # 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:625: checking for $ac_word" >&5 +echo "configure:633: 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 @@ -653,7 +661,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:657: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:665: 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. @@ -664,12 +672,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 668 "configure" +#line 676 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:681: \"$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 @@ -695,12 +703,12 @@ if test $ac_cv_prog_cc_works = no; then { 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:699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:707: 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:704: checking whether we are using GNU C" >&5 +echo "configure:712: 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 @@ -709,7 +717,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:713: \"$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:721: \"$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 @@ -728,7 +736,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:732: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:740: 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 @@ -762,7 +770,7 @@ fi # 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:766: checking for $ac_word" >&5 +echo "configure:774: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_NASMPATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -795,7 +803,7 @@ else echo "$ac_t""no" 1>&6 fi -NFLAGS="$NFLAGS -w-orphan-labels" +NASMD="$NASMD -w-orphan-labels" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -827,7 +835,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # 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:831: checking for a BSD compatible install" >&5 +echo "configure:839: 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 @@ -907,7 +915,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:911: checking host system type" >&5 +echo "configure:919: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -928,7 +936,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:932: checking target system type" >&5 +echo "configure:940: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -946,7 +954,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:950: checking build system type" >&5 +echo "configure:958: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -969,21 +977,16 @@ test "$host_alias" != "$target_alias" && program_prefix=${target_alias}- case "$target" in - *-*-linux*) + *-*-linux* | *-*-*bsd*) CFLAGS="$CFLAGS -D__LINUX__" - NFLAGS="$NFLAGS -D__LINUX__ -f elf" - ;; - *-*-*bsd*) - CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__" - NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -f elf" + NASMD="$NASMD -D__LINUX__ -f elf" ;; *-*-cygwin* | *-*-*ming*) CFLAGS="$CFLAGS -D__LINUX__" - NFLAGS="$NFLAGS -D__LINUX__ -f win32" + NASMD="$NASMD -D__LINUX__ -f win32" ZSNESEXE=".exe" ;; *) - { echo "configure: error: This Target is Not Supported" 1>&2; exit 1; } ;; esac @@ -991,7 +994,7 @@ esac echo -- Do we have X, and where is it? Needed for Mesa Checking echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:995: checking how to run the C preprocessor" >&5 +echo "configure:998: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1006,13 +1009,13 @@ else # 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:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1019: \"$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 : @@ -1023,13 +1026,13 @@ else 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:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1036: \"$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 : @@ -1040,13 +1043,13 @@ else 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:1050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1053: \"$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 : @@ -1075,7 +1078,7 @@ echo "$ac_t""$CPP" 1>&6 # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1079: checking for X" >&5 +echo "configure:1082: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1137,12 +1140,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1149: \"$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* @@ -1211,14 +1214,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1305,7 +1308,7 @@ else fi CFLAGS="$CFLAGS -I$x_includes" -LDFLAGS="$LDFLAGS -L$x_libraries" +LIBS="$LIBS -L$x_libraries" echo -- Where is libSDL and zlib, and do we want/have libPNG and OpenGL support? @@ -1351,7 +1354,7 @@ fi # 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:1355: checking for $ac_word" >&5 +echo "configure:1358: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1386,7 +1389,7 @@ fi min_sdl_version=1.2.0 echo $ac_n "checking for SDL - version >= $min_sdl_version""... $ac_c" 1>&6 -echo "configure:1390: checking for SDL - version >= $min_sdl_version" >&5 +echo "configure:1393: checking for SDL - version >= $min_sdl_version" >&5 no_sdl="" if test "$SDL_CONFIG" = "no" ; then no_sdl=yes @@ -1410,7 +1413,7 @@ echo "configure:1390: checking for SDL - version >= $min_sdl_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -1471,7 +1474,7 @@ int main (int argc, char *argv[]) EOF -if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1505,7 +1508,7 @@ fi CFLAGS="$CFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" cat > conftest.$ac_ext < @@ -1520,7 +1523,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" @@ -1554,13 +1557,13 @@ rm -f conftest* rm -f conf.sdltest CFLAGS="$CFLAGS $SDL_CFLAGS" -LDFLAGS="$LDFLAGS $SDL_LIBS" +LIBS="$LIBS $SDL_LIBS" echo $ac_n "checking for zlib""... $ac_c" 1>&6 -echo "configure:1561: checking for zlib" >&5 +echo "configure:1564: checking for zlib" >&5 with_zlib=no cat > conftest.$ac_ext < @@ -1571,7 +1574,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* with_zlib=yes @@ -1583,7 +1586,7 @@ fi rm -f conftest* if test x$with_zlib = xyes; then - LDFLAGS="$LDFLAGS -lz" + LIBS="$LIBS -lz" echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 @@ -1597,11 +1600,11 @@ if test "${with_opengl+set}" = set; then fi echo $ac_n "checking for OpenGL support""... $ac_c" 1>&6 -echo "configure:1601: checking for OpenGL support" >&5 +echo "configure:1604: checking for OpenGL support" >&5 if test x$with_opengl != xno; then with_opengl=no cat > conftest.$ac_ext < @@ -1612,7 +1615,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* with_opengl=yes @@ -1624,9 +1627,9 @@ fi rm -f conftest* echo "$ac_t""$with_opengl" 1>&6 if test x$with_opengl = xyes; then - LDFLAGS="$LDFLAGS -lGL" + LIBS="$LIBS -lGL" CFLAGS="$CFLAGS -D__OPENGL__" - NFLAGS="$NFLAGS -D__OPENGL__" + NASMD="$NASMD -D__OPENGL__" GL_DRAW="\${WINDIR}/gl_draw.o" fi else @@ -1640,11 +1643,11 @@ if test "${enable_png+set}" = set; then fi echo $ac_n "checking for libPNG support""... $ac_c" 1>&6 -echo "configure:1644: checking for libPNG support" >&5 +echo "configure:1647: checking for libPNG support" >&5 if test x$with_png != xno; then with_png=no cat > conftest.$ac_ext < @@ -1655,7 +1658,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* with_png=yes @@ -1667,7 +1670,7 @@ fi rm -f conftest* echo "$ac_t""$with_png" 1>&6 if test x$with_png = xyes; then - LDFLAGS="$LDFLAGS -lpng" + LIBS="$LIBS -lpng" fi else echo "$ac_t""disabled by user" 1>&6 @@ -1681,44 +1684,88 @@ if test "${enable_debug+set}" = set; then fi echo $ac_n "checking if you want gdb friendly executable""... $ac_c" 1>&6 -echo "configure:1685: checking if you want gdb friendly executable" >&5 +echo "configure:1688: checking if you want gdb friendly executable" >&5 if test x$debug = xyes; then echo "$ac_t""yes" 1>&6 CFLAGS="$CFLAGS -Wall -O0 -fno-omit-frame-pointer -ggdb3" - NFLAGS="$NFLAGS -g -s" + NASMD="$NASMD -g -s" ZSNESEXE="zsnes-debug$ZSNESEXE" else echo "$ac_t""no" 1>&6 - CFLAGS="$CFLAGS -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s" + CFLAGS="$CFLAGS -s -Os -ffast-math -fomit-frame-pointer -fschedule-insns2" ZSNESEXE="zsnes$ZSNESEXE" fi +# Check whether --enable-force-386 or --disable-force-386 was given. +if test "${enable_force_386+set}" = set; then + enableval="$enable_force_386" + wantforce=386 +fi + +# Check whether --enable-force-486 or --disable-force-486 was given. +if test "${enable_force_486+set}" = set; then + enableval="$enable_force_486" + wantforce=486 +fi + +# Check whether --enable-force-586 or --disable-force-586 was given. +if test "${enable_force_586+set}" = set; then + enableval="$enable_force_586" + wantforce=586 +fi + +# Check whether --enable-force-686 or --disable-force-686 was given. +if test "${enable_force_686+set}" = set; then + enableval="$enable_force_686" + wantforce=668 +fi + + echo $ac_n "checking which processor class to optimize for""... $ac_c" 1>&6 -echo "configure:1702: checking which processor class to optimize for" >&5 +echo "configure:1730: checking which processor class to optimize for" >&5 if test x$debug != xyes; then + case "$wantforce" in + 386) + echo "$ac_t""forced to 386" 1>&6 + CFLAGS="$CFLAGS -march=i386" + ;; + 486) + echo "$ac_t""forced to 486" 1>&6 + CFLAGS="$CFLAGS -march=i486" + ;; + 586) + echo "$ac_t""forced to Pentium" 1>&6 + CFLAGS="$CFLAGS -march=pentium" + ;; + 686) + echo "$ac_t""forced to PPro/P2" 1>&6 + CFLAGS="$CFLAGS -march=pentiumpro" + ;; + *) case "$target" in i486-*-*) CFLAGS="$CFLAGS -march=i486" - echo "$ac_t""486" 1>&6 + echo "$ac_t""detected 486" 1>&6 ;; i586-*-*) CFLAGS="$CFLAGS -march=pentium" - echo "$ac_t""Pentium" 1>&6 + echo "$ac_t""detected Pentium" 1>&6 ;; i686-*-*) CFLAGS="$CFLAGS -march=pentiumpro" - echo "$ac_t""PPro/P2" 1>&6 + echo "$ac_t""detected PPro/P2" 1>&6 ;; *) - echo "$ac_t""386" 1>&6 - echo "configure: warning: *** This is probably not what you want use --target" 1>&2 + echo "$ac_t""detected 386" 1>&6 + echo "configure: warning: *** This is probably not what you want use --enable-force-486/586/686" 1>&2 ;; esac - + ;; + esac else echo "$ac_t""no optimization because debug enabled" 1>&6 fi @@ -1728,12 +1775,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h 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:1732: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1779: 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> @@ -1741,7 +1788,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1766,7 +1813,7 @@ done # 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:1770: checking for opendir in -ldir" >&5 +echo "configure:1817: 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 @@ -1774,7 +1821,7 @@ else 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:1836: \"$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 @@ -1807,7 +1854,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1811: checking for opendir in -lx" >&5 +echo "configure:1858: 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 @@ -1815,7 +1862,7 @@ else 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:1877: \"$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 @@ -1849,12 +1896,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1853: checking for ANSI C header files" >&5 +echo "configure:1900: 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 @@ -1862,7 +1909,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1913: \"$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* @@ -1879,7 +1926,7 @@ rm -f conftest* 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 @@ -1897,7 +1944,7 @@ fi 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 @@ -1918,7 +1965,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1929,7 +1976,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1952,21 +1999,21 @@ EOF fi -for ac_hdr in fcntl.h limits.h malloc.h sys/ioctl.h unistd.h +for ac_hdr in fcntl.h limits.h malloc.h strings.h sys/ioctl.h sys/time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1960: checking for $ac_hdr" >&5 +echo "configure:2007: 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:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2017: \"$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* @@ -1994,12 +2041,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1998: checking for working const" >&5 +echo "configure:2045: 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:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2069,12 +2116,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2073: checking for size_t" >&5 +echo "configure:2120: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2102,12 +2149,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2106: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2153: 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 @@ -2116,7 +2163,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2136,39 +2183,239 @@ EOF fi -for ac_hdr in sys/time.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2144: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:2188: 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 +#include +int main() { +struct tm *tp; tp->tm_sec; +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2154: \"$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 +if { (eval echo configure:2201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + ac_cv_struct_tm=time.h else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cv_struct_tm=sys/time.h fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + +echo "$ac_t""$ac_cv_struct_tm" 1>&6 +if test $ac_cv_struct_tm = sys/time.h; then + cat >> confdefs.h <<\EOF +#define TM_IN_SYS_TIME 1 +EOF + +fi + + +echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 +echo "configure:2223: checking whether utime accepts a null argument" >&5 +if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata; > conftestdata +# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. +if test "$cross_compiling" = yes; then + ac_cv_func_utime_null=no +else + cat > conftest.$ac_ext < +#include +main() { +struct stat s, t; +exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0 +&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime +&& t.st_mtime - s.st_mtime < 120)); +} +EOF +if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_func_utime_null=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_utime_null=no +fi +rm -fr conftest* +fi + +rm -f core core.* *.core +fi + +echo "$ac_t""$ac_cv_func_utime_null" 1>&6 +if test $ac_cv_func_utime_null = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UTIME_NULL 1 +EOF + +fi + +echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +echo "configure:2268: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char vprintf(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_vprintf) || defined (__stub___vprintf) +choke me +#else +vprintf(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2296: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_vprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<\EOF +#define HAVE_VPRINTF 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +if test "$ac_cv_func_vprintf" != yes; then +echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +echo "configure:2320: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _doprnt(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__doprnt) || defined (__stub____doprnt) +choke me +#else +_doprnt(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2348: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func__doprnt=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_DOPRNT 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +for ac_func in getcwd gethostname mkdir mktime rmdir select socket +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2375: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2403: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <= 1.2.0 is required)]) CFLAGS="$CFLAGS $SDL_CFLAGS" -LDFLAGS="$LDFLAGS $SDL_LIBS" +LIBS="$LIBS $SDL_LIBS" AC_MSG_CHECKING(for zlib) with_zlib=no @@ -67,7 +62,7 @@ with_zlib=yes ]) if test x$with_zlib = xyes; then - LDFLAGS="$LDFLAGS -lz" + LIBS="$LIBS -lz" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -87,9 +82,9 @@ if test x$with_opengl != xno; then ]) AC_MSG_RESULT($with_opengl) if test x$with_opengl = xyes; then - LDFLAGS="$LDFLAGS -lGL" + LIBS="$LIBS -lGL" CFLAGS="$CFLAGS -D__OPENGL__" - NFLAGS="$NFLAGS -D__OPENGL__" + NASMD="$NASMD -D__OPENGL__" GL_DRAW="\${WINDIR}/gl_draw.o" fi else @@ -109,7 +104,7 @@ if test x$with_png != xno; then ]) AC_MSG_RESULT($with_png) if test x$with_png = xyes; then - LDFLAGS="$LDFLAGS -lpng" + LIBS="$LIBS -lpng" fi else AC_MSG_RESULT(disabled by user) @@ -125,7 +120,7 @@ if test x$debug = xyes; then dnl enabled. CFLAGS="$CFLAGS -Wall -O0 -fno-omit-frame-pointer -ggdb3" - NFLAGS="$NFLAGS -g -s" + NASMD="$NASMD -g -s" ZSNESEXE="zsnes-debug$ZSNESEXE" else AC_MSG_RESULT(no) @@ -135,31 +130,55 @@ else dnl zsnes more easily deal with small instruction caches, and more dnl effectivly use branch prediction. - CFLAGS="$CFLAGS -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s" + CFLAGS="$CFLAGS -s -Os -ffast-math -fomit-frame-pointer -fschedule-insns2" ZSNESEXE="zsnes$ZSNESEXE" fi +AC_ARG_ENABLE(force-386,[ --enable-force-386 Force 386 Optimization],wantforce=386) +AC_ARG_ENABLE(force-486,[ --enable-force-486 Force 486 Optimization],wantforce=486) +AC_ARG_ENABLE(force-586,[ --enable-force-586 Force Pentium Optimization],wantforce=586) +AC_ARG_ENABLE(force-686,[ --enable-force-686 Force PPro/P2 Optimization],wantforce=668) + AC_MSG_CHECKING(which processor class to optimize for) if test x$debug != xyes; then + case "$wantforce" in + 386) + AC_MSG_RESULT(forced to 386) + CFLAGS="$CFLAGS -march=i386" + ;; + 486) + AC_MSG_RESULT(forced to 486) + CFLAGS="$CFLAGS -march=i486" + ;; + 586) + AC_MSG_RESULT(forced to Pentium) + CFLAGS="$CFLAGS -march=pentium" + ;; + 686) + AC_MSG_RESULT(forced to PPro/P2) + CFLAGS="$CFLAGS -march=pentiumpro" + ;; + *) case "$target" in i486-*-*) CFLAGS="$CFLAGS -march=i486" - AC_MSG_RESULT(486) + AC_MSG_RESULT(detected 486) ;; i586-*-*) CFLAGS="$CFLAGS -march=pentium" - AC_MSG_RESULT(Pentium) + AC_MSG_RESULT(detected Pentium) ;; i686-*-*) CFLAGS="$CFLAGS -march=pentiumpro" - AC_MSG_RESULT(PPro/P2) + AC_MSG_RESULT(detected PPro/P2) ;; *) - AC_MSG_RESULT(386) - AC_MSG_WARN(*** This is probably not what you want use --target) + AC_MSG_RESULT(detected 386) + AC_MSG_WARN(*** This is probably not what you want use --enable-force-486/586/686) ;; esac - + ;; + esac else AC_MSG_RESULT(no optimization because debug enabled) fi @@ -167,18 +186,22 @@ fi dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h unistd.h) +AC_CHECK_HEADERS(fcntl.h limits.h malloc.h strings.h sys/ioctl.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME -AC_CHECK_HEADERS(sys/time.h) +AC_STRUCT_TM dnl Checks for library functions. +AC_FUNC_UTIME_NULL +AC_FUNC_VPRINTF +AC_CHECK_FUNCS(getcwd gethostname mkdir mktime rmdir select socket) +AC_SUBST(LIBS) +AC_SUBST(NASMD) AC_SUBST(ZSNESEXE) AC_SUBST(GL_DRAW) -AC_SUBST(NFLAGS) AC_OUTPUT(Makefile) echo echo You may now type gmake to compile $ZSNESEXE diff --git a/zsnes/src/dos/zfile.c b/zsnes/src/dos/zfile.c index 87a5d603..bd773c05 100644 --- a/zsnes/src/dos/zfile.c +++ b/zsnes/src/dos/zfile.c @@ -16,8 +16,13 @@ //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#include +#include +#include +#ifdef ZDOS +#include +#endif -#include "gblhdr.h" #define DWORD unsigned int #define BYTE unsigned char diff --git a/zsnes/src/dos/zloader.c b/zsnes/src/dos/zloader.c index 5f224c56..5a72a006 100644 --- a/zsnes/src/dos/zloader.c +++ b/zsnes/src/dos/zloader.c @@ -16,7 +16,8 @@ //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "gblhdr.h" +#include +#include extern void zstart(void); extern void DosExit(void); diff --git a/zsnes/src/makefile.dos b/zsnes/src/makefile.dos index a0d2c434..2a8e4da8 100644 --- a/zsnes/src/makefile.dos +++ b/zsnes/src/makefile.dos @@ -59,7 +59,7 @@ MAINOBJ=cfgload.o endmem.o fixsin.o init.o ui.o vcache.o water.o OBJS=${CHIPSOBJ} ${CPUOBJ} ${DOSOBJ} ${GUIOBJ} ${VIDEOBJ} ${PREOBJ} ${MAINOBJ} ${ZIPOBJ} LIBS=-lz -lgcc -lm -lpng -CFLAGS=-D__MSDOS__ -I. -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s +CFLAGS=-D__MSDOS__ -O2 ASM=nasm ASMFLAGS=-f coff -D__MSDOS__ CC=gcc diff --git a/zsnes/src/water.c b/zsnes/src/water.c index 9c8e78f4..a0800b07 100644 --- a/zsnes/src/water.c +++ b/zsnes/src/water.c @@ -15,7 +15,13 @@ //along with this program; if not, write to the Free Software //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "gblhdr.h" + +#include +#include +#include +#include +#include + #include "fixsin.h" extern char *vidbuffer; diff --git a/zsnes/src/win/zipxw.c b/zsnes/src/win/zipxw.c index 35996606..e7aee51b 100644 --- a/zsnes/src/win/zipxw.c +++ b/zsnes/src/win/zipxw.c @@ -16,7 +16,7 @@ //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "../gblhdr.h" +#include void ipx_init(){}; void sendpacket(){}; diff --git a/zsnes/src/win/zloaderw.c b/zsnes/src/win/zloaderw.c index 7ab22551..2d23e083 100644 --- a/zsnes/src/win/zloaderw.c +++ b/zsnes/src/win/zloaderw.c @@ -16,7 +16,14 @@ //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "../gblhdr.h" +#include +#include +#include +#include +#include + +#include +#include extern void ImportDirectX(void); diff --git a/zsnes/src/win/ztcp.c b/zsnes/src/win/ztcp.c index 21ed206a..f56fc440 100644 --- a/zsnes/src/win/ztcp.c +++ b/zsnes/src/win/ztcp.c @@ -80,7 +80,10 @@ // only be done if the requested packet is within the past 64 packets. // In-game chat will be moved to a separate packet in TCP/IP -#include "../gblhdr.h" +#include +#include +#include +#include int RecvPtr; int RecvPtr2;