Update to 0.98.13:

Additional patch from dillo@:
Fix display and sync on sound.  Ignore NoWaiting and the rest for now.

Changes since 0.98.12:
	SDL:  Fixed button configuration when using joystick hats.  Thanks to
	ShaolinMan for pointing out the code errors.

	Readded checks in ines.c for some common bad dumps and non-working hacked
	games.

	Sprite hit emulation is more precise(as it was in 0.97.5).

	Fixed mapper 185 emulation to work properly with the Japanese
	version of "Spy vs Spy", and hopefully with the GOOD dump
	of Banana(I don't think one exists).

	Added per-game hacks for Shougi Meikan '92 and Shougi Meikan '93.

	Fixed a bug in SetupCartMirroring() that could cause some games to have corrupted
	mirroring if loaded in a certain order.  This was a rather major, long-standing
	bug. :/

	Added many iNES header corrections.

	Fixed emulation of the "ISB" and "DCP" invalid opcodes.

	Optimized the PPU background drawing code with inline assembly.  Older/some(?) versions
	of gcc may produce bad code(from previous experience with inline
	assembly in gcc), but 3.4.1 seems to do ok.

	Optimized some of the low-quality sound emulation code.

	Added a command-line option to the configure script to enable the FCE Ultra
	debugger(disabled by default).  It reduces executable size, and may increase speed
	of execution slightly.

	In unix-netplay.c, replaced the ioctl() on a socket to read the number of bytes available to read
	with a select().  I've also added some "BEOS" #ifdefs.  I don't know if they will
	work properly.

	Replaced archaic include of "malloc.h" in unix-netplay.c with "stdlib.h".
	Also in unix-netplay.c, I've added:

		#ifndef SOL_TCP
		#define SOL_TCP IPPROTO_TCP
		#endif

	Fixed a bug in sdl-sound.c that would prevent FCE Ultra from being compiled
	on certain platforms(Mac OS X).

	Fixed variable declarations in the following files to be compatible
	with C compilers that don't adhere to C99(or was it C98...):
		movie.c
		drivers/sexyal/convertgen.c and drivers/sexyal/convert.inc
		drivers/pc/unix-netplay.c
This commit is contained in:
wiz 2005-10-30 11:47:56 +00:00
parent f2087486df
commit 000f1e220b
8 changed files with 119 additions and 6467 deletions

View file

@ -1,15 +1,14 @@
# $NetBSD: Makefile,v 1.7 2005/04/11 21:45:43 tv Exp $
# $NetBSD: Makefile,v 1.8 2005/10/30 11:47:56 wiz Exp $
#
DISTNAME= fceu-0.98.12.src
DISTNAME= fceu-0.98.13.src
PKGNAME= ${DISTNAME:S/.src//}
PKGREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://fceultra.sourceforge.net/releases/
MASTER_SITES= http://pdaxrom.theinternet.nl/fceu/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= wiz@NetBSD.org
HOMEPAGE= http://fceultra.sourceforge.net/
HOMEPAGE= http://pdaxrom.theinternet.nl/fceu/
COMMENT= Portable NES and Famicom emulator
WRKSRC= ${WRKDIR}/fceu

View file

@ -1,10 +1,9 @@
$NetBSD: distinfo,v 1.7 2005/02/23 18:49:18 agc Exp $
$NetBSD: distinfo,v 1.8 2005/10/30 11:47:56 wiz Exp $
SHA1 (fceu-0.98.12.src.tar.bz2) = 713faaad9f7d4b5e8dd1cb8a172e2f1ced85c1ec
RMD160 (fceu-0.98.12.src.tar.bz2) = e405a459196d2e5e9d630c8699157ec4df0f0210
Size (fceu-0.98.12.src.tar.bz2) = 559571 bytes
SHA1 (patch-aa) = df9e098102d4c22c2699d5c5bdec79d72b8bac0c
SHA1 (patch-ab) = 593c40bfe03e8ae8835113972a58a1cf46e882a9
SHA1 (fceu-0.98.13.src.tar.bz2) = fed37a9858aa8b149472f964b2ca652168e9f29a
RMD160 (fceu-0.98.13.src.tar.bz2) = fc736006ed1e9aa564de817622ed575f246bad48
Size (fceu-0.98.13.src.tar.bz2) = 570842 bytes
SHA1 (patch-aa) = 31ce24167b8f76df2961ce902d42f45b5278e451
SHA1 (patch-ac) = 8a5297b11484c6eaf5d70a391bb486ff58475f35
SHA1 (patch-ad) = 2a253539f9103b75a09f31d51427e8849a3b0249
SHA1 (patch-ae) = d088b473376460ce29b17abd5dc4521513c55057
SHA1 (patch-af) = a2b55359d65c60ecb7e7d79390ef872873c0eba1
SHA1 (patch-ah) = cc48e36406b6d9e4cf88179510824135507aa6f9

View file

@ -1,11 +1,11 @@
$NetBSD: patch-aa,v 1.2 2004/07/26 18:00:17 dillo Exp $
$NetBSD: patch-aa,v 1.3 2005/10/30 11:47:56 wiz Exp $
Make default keys match documentation.
Also, add settings for joystick.
--- src/drivers/pc/input.c.orig 2004-05-17 01:48:26.000000000 +0200
--- src/drivers/pc/input.c.orig 2004-09-11 10:04:33.000000000 +0200
+++ src/drivers/pc/input.c
@@ -278,6 +278,10 @@ static void KeyboardCommands(void)
@@ -276,6 +276,10 @@ static void KeyboardCommands(void)
#define MK(x) {{BUTTC_KEYBOARD},{0},{MKK(x)},1}
#define MK2(x1,x2) {{BUTTC_KEYBOARD},{0},{MKK(x1),MKK(x2)},2}
@ -16,13 +16,13 @@ Also, add settings for joystick.
#define MKZ() {{0},{0},{0},0}
@@ -286,8 +290,13 @@ static void KeyboardCommands(void)
@@ -284,8 +288,13 @@ static void KeyboardCommands(void)
ButtConfig GamePadConfig[4][10]={
/* Gamepad 1 */
{
- MK(KP3), MK(KP2), MK(TAB), MK(ENTER), MK(W),MK(Z),
- MK(A), MK(S), MKZ(), MKZ()
+ MKJB(LEFTALT, 0), MKJB(LEFTCONTROL, 1), MKJB(TAB, 5), MKJB(ENTER, 7),
+ MKJB(LEFTALT, 2), MKJB(LEFTCONTROL, 0), MKJB(TAB, 5), MKJB(ENTER, 7),
+ MKJA(CURSORUP, 1, 1), MKJA(CURSORDOWN, 1, 0),
+ MKJA(CURSORLEFT, 0, 1), MKJA(CURSORRIGHT, 0, 0), MKZ(), MKZ()
+#if 0

View file

@ -1,24 +0,0 @@
$NetBSD: patch-ab,v 1.2 2004/07/24 01:11:41 kristerw Exp $
SOL_TCP is 6, the same as IPPROTO_TCP and ISOPROTO_TCP on NetBSD.
--- src/drivers/pc/unix-netplay.c.orig Mon May 17 07:28:06 2004
+++ src/drivers/pc/unix-netplay.c Sat Jul 24 03:01:36 2004
@@ -76,6 +76,7 @@
unsigned long hadr;
int TSocket;
int netdivisor;
+ int tcpopt = 1;
if(!netplayhost) return(0);
@@ -85,8 +86,7 @@
FCEUD_NetworkClose();
return(0);
}
- int tcpopt = 1;
- if(setsockopt(TSocket, SOL_TCP, TCP_NODELAY, &tcpopt, sizeof(int)))
+ if(setsockopt(TSocket, 6, TCP_NODELAY, &tcpopt, sizeof(int)))
puts("Nodelay fail");
memset(&sockin,0,sizeof(sockin));

File diff suppressed because it is too large Load diff

View file

@ -1,21 +0,0 @@
$NetBSD: patch-ae,v 1.3 2004/11/22 22:54:44 wiz Exp $
--- src/movie.c.orig 2004-11-13 13:41:55.000000000 +0000
+++ src/movie.c 2004-11-13 13:42:39.000000000 +0000
@@ -154,7 +154,7 @@
void FCEUMOV_AddJoy(uint8 *js)
{
- int x,y;
+ int x,y,tmpfix;
if(!current) return; /* Not playback nor recording. */
@@ -191,7 +191,7 @@
tmp &= 0x3;
ti=0;
- int tmpfix = tmp;
+ tmpfix = tmp;
while(tmp--) { nextts |= fgetc(slots[-1 - current]) << (ti * 8); ti++; }
// This fixes a bug in movies recorded before version 0.98.11

View file

@ -0,0 +1,44 @@
$NetBSD: patch-af,v 1.1 2005/10/30 11:47:56 wiz Exp $
Fix display and sync on sound. Ignore NoWaiting and the rest for now.
--- src/drivers/pc/main.c.orig 2004-09-16 04:55:00.000000000 +0200
+++ src/drivers/pc/main.c
@@ -466,14 +466,26 @@ void FCEUD_Update(uint8 *XBuf, int32 *Bu
if(can > Count) can=Count;
else uflow=0;
- WriteSound(Buffer,can);
+ while (Count > 0) {
+ WriteSound(Buffer,can);
+ Count -= can;
+ Buffer += can;
+ if (Count == 0)
+ break;
+ SDL_Delay(1);
+ can = GetWriteSound();
+ if(can > Count) can=Count;
+ }
+ if(XBuf && (inited&4) && !(NoWaiting & 2))
+ BlitScreen(XBuf);
+ else
+ printf("skipped\n");
+#if 0
//if(uflow) puts("Underflow");
tmpcan = GetWriteSound();
if((tmpcan < Count*0.90) && !uflow)
{
- if(XBuf && (inited&4) && !(NoWaiting & 2))
- BlitScreen(XBuf);
Buffer+=can;
Count-=can;
if(Count)
@@ -499,6 +511,7 @@ void FCEUD_Update(uint8 *XBuf, int32 *Bu
}
#endif
+#endif
}
else
{

View file

@ -0,0 +1,59 @@
$NetBSD: patch-ah,v 1.1 2005/10/30 11:47:56 wiz Exp $
--- configure.orig 2004-09-16 05:31:55.000000000 +0200
+++ configure
@@ -308,7 +308,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CPP CCAS CCASFLAGS CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP WIN32_TRUE WIN32_FALSE UNIX_TRUE UNIX_FALSE USE_SEXYAL_TRUE USE_SEXYAL_FALSE NATIVEWIN32_TRUE NATIVEWIN32_FALSE OPENGL_TRUE OPENGL_FALSE HAVE_GTK_TRUE HAVE_GTK_FALSE EGREP SDL_CONFIG SDL_CFLAGS SDL_LIBS C80x86_TRUE C80x86_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CPP CCAS CCASFLAGS CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CXXCPP WIN32_TRUE WIN32_FALSE UNIX_TRUE UNIX_FALSE USE_SEXYAL_TRUE USE_SEXYAL_FALSE NATIVEWIN32_TRUE NATIVEWIN32_FALSE OPENGL_TRUE OPENGL_FALSE HAVE_GTK_TRUE HAVE_GTK_FALSE EGREP SDL_CONFIG SDL_CFLAGS SDL_LIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -5130,21 +5130,13 @@ _ACEOF
fi
-if expr match "$target_cpu" 'i.86' > /dev/null; then
+if echo ${target_cpu} | grep -q 'i.86' > /dev/null; then
cat >>confdefs.h <<\_ACEOF
#define C80x86 1
_ACEOF
-if true; then
- C80x86_TRUE=
- C80x86_FALSE='#'
-else
- C80x86_TRUE='#'
- C80x86_FALSE=
-fi
-
fi
echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
@@ -5589,13 +5581,6 @@ echo "$as_me: error: conditional \"OPENG
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${C80x86_TRUE}" && test -z "${C80x86_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"C80x86\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"C80x86\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -6188,8 +6173,6 @@ s,@EGREP@,$EGREP,;t t
s,@SDL_CONFIG@,$SDL_CONFIG,;t t
s,@SDL_CFLAGS@,$SDL_CFLAGS,;t t
s,@SDL_LIBS@,$SDL_LIBS,;t t
-s,@C80x86_TRUE@,$C80x86_TRUE,;t t
-s,@C80x86_FALSE@,$C80x86_FALSE,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF