VisualBoyAdvance 1.8

This commit is contained in:
Adrián Arroyo Calle
2013-12-15 02:06:13 +00:00
parent 7ea3f2cd2d
commit 172ab570e9
6 changed files with 199 additions and 44 deletions

View File

@@ -0,0 +1,91 @@
diff --git a/src/sdl/Makefile.am b/src/sdl/Makefile.am
index bcc9f92..ba6db7a 100644
--- a/src/sdl/Makefile.am
+++ b/src/sdl/Makefile.am
@@ -1,7 +1,5 @@
bin_PROGRAMS = VisualBoyAdvance
-noinst_PROGRAMS = TestEmu
-
VisualBoyAdvance_SOURCES = \
SDL.cpp \
debugger.cpp \
@@ -79,78 +77,6 @@ VisualBoyAdvance_LDADD = @VBA_LIBS@ @SDL_LIBS@
VisualBoyAdvance_DEPENDENCIES = @VBA_LIBS@
-TestEmu_SOURCES = \
- TestEmu.cpp \
- debugger.cpp \
- debugger.h \
- ../2xSaI.cpp \
- ../AutoBuild.h \
- ../Cheats.cpp \
- ../Cheats.h \
- ../EEprom.cpp \
- ../EEprom.h \
- ../Flash.cpp \
- ../Flash.h \
- ../GBA.cpp \
- ../GBA.h \
- ../GBAinline.h \
- ../Gfx.cpp \
- ../Gfx.h \
- ../Globals.cpp \
- ../Globals.h \
- ../Mode0.cpp \
- ../Mode1.cpp \
- ../Mode2.cpp \
- ../Mode3.cpp \
- ../Mode4.cpp \
- ../Mode5.cpp \
- ../NLS.h \
- ../Port.h \
- ../RTC.cpp \
- ../RTC.h \
- ../Sound.cpp \
- ../Sound.h \
- ../Sram.cpp \
- ../Sram.h \
- ../System.h \
- ../Text.cpp \
- ../Text.h \
- ../Util.cpp \
- ../Util.h \
- ../admame.cpp \
- ../agbprint.cpp \
- ../agbprint.h \
- ../arm-new.h \
- ../armdis.cpp \
- ../armdis.h \
- ../bios.cpp \
- ../bios.h \
- ../elf.cpp \
- ../elf.h \
- ../expr-lex.cpp \
- ../expr.cpp \
- ../expr.cpp.h \
- ../exprNode.cpp \
- ../exprNode.h \
- ../hq2x.cpp \
- ../hq2x.h \
- ../interp.h \
- ../lq2x.h \
- ../memgzio.c \
- ../memgzio.h \
- ../motionblur.cpp \
- ../pixel.cpp \
- ../remote.cpp \
- ../scanline.cpp \
- ../simple2x.cpp \
- ../thumb.h \
- ../unzip.cpp \
- ../unzip.h
-
-TestEmu_LDADD = @VBA_LIBS@ @SDL_LIBS@
-
-TestEmu_DEPENDENCIES = @VBA_LIBS@
-
AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-DSDL \

View File

@@ -0,0 +1,26 @@
diff --git a/src/Util.cpp b/src/Util.cpp
index 9e3b7d9..6ab1614 100644
--- a/src/Util.cpp
+++ b/src/Util.cpp
@@ -86,8 +86,12 @@ bool utilWritePNGFile(const char *fileName, int w, int h, u8 *pix)
fclose(fp);
return false;
}
+#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
+#else
if(setjmp(png_ptr->jmpbuf)) {
+#endif
+ if(setjmp(png_jmpbuf(png_ptr))) {
png_destroy_write_struct(&png_ptr,NULL);
fclose(fp);
return false;
@@ -992,7 +996,7 @@ void utilWriteData(gzFile gzFile, variable_desc *data)
gzFile utilGzOpen(const char *file, const char *mode)
{
- utilGzWriteFunc = (int (ZEXPORT *)(void *,void * const, unsigned int))gzwrite;
+ utilGzWriteFunc = (int (ZEXPORT *)(gzFile,const voidp, unsigned int))gzwrite;
utilGzReadFunc = gzread;
utilGzCloseFunc = gzclose;

View File

@@ -0,0 +1,12 @@
diff --git a/configure.in b/configure.in
index 159bf87..1ad2fac 100644
--- a/configure.in
+++ b/configure.in
@@ -64,6 +64,7 @@ dnl Checks for libraries.
AC_CHECK_LIB(z, gzopen,
, AC_MSG_ERROR([*** Cannot compile without zlib.]))
AC_CHECK_LIB(pthread, pthread_yield)
+AC_CHECK_LIB(network, socket)
PKG_CHECK_MODULES(LIBPNG, libpng)
CPPFLAGS="$CPPFLAGS $LIBPNG_CFLAGS"

View File

@@ -1,11 +0,0 @@
diff -Naur VisualBoyAdvance-1.7.2/configure.in VisualBoyAdvance-1.7.2-haiku/configure.in
--- VisualBoyAdvance-1.7.2/configure.in 2004-05-13 21:38:35.039583744 +0000
+++ VisualBoyAdvance-1.7.2-haiku/configure.in 2010-05-01 03:37:15.941621248 +0000
@@ -66,6 +66,7 @@
AC_CHECK_LIB(png, png_create_write_struct,
, AC_MSG_ERROR([*** Cannot compile without libpng.]), [-lz])
AC_CHECK_LIB(pthread, pthread_yield)
+AC_CHECK_LIB(network, socket)
dnl Checks for header files.
AC_PATH_X

View File

@@ -1,33 +0,0 @@
DESCRIPTION="VisualBoyAdvance"
HOMEPAGE="http://vba.ngemu.com"
SRC_URI="http://sourceforge.net/projects/vba/files/VisualBoyAdvance/1.7.2/VisualBoyAdvance-src-1.7.2.tar.gz"
CHECKSUM_MD5="cc02339e3fd8efd9f23121b0a2f81fd8"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-lang/nasm >= 2.03.01
media-libs/libsdl >= 1.2.14
media-libs/sdl-mixer >= 1.2.11"
BUILD()
{
cd VisualBoyAdvance-1.7.2
libtoolize --force --copy --install
autoreconf -i
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--enable-c-core --disable-profiling --without-mmx
make
}
INSTALL()
{
cd VisualBoyAdvance-1.7.2/src
GAMEDIR=`finddir B_APPS_DIRECTORY`/Visualboyadvance
mkdir -p ${DESTDIR}/${GAMEDIR}
cp -af VisualBoyAdvance.cfg ${DESTDIR}/${GAMEDIR}
cd sdl
cp -af TestEmu ${DESTDIR}/${GAMEDIR}
cp -af VisualBoyAdvance ${DESTDIR}/${GAMEDIR}
}
LICENSE="GNU GPL v2"
COPYRIGHT="2002 Forgotten"

View File

@@ -0,0 +1,70 @@
SUMMARY="VisualBoyAdvance, a GBA Emulator"
DESCRIPTION="VisualBoyAdvance is a Game Boy Advance emulator which runs your prefered ROMS"
HOMEPAGE="http://vba.ngemu.com"
SRC_URI="git://git.debian.org/git/pkg-games/visualboyadvance"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2002-2004 Forgotten"
ARCHITECTURES="x86 ?x86_64"
if [ $effectiveArchitecture != x86_gcc2 ]; then
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86 ?x86_64"
PROVIDES="
visualboyadvance$secondaryArchSuffix = $portVersion
app:visualboyadvance$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libsdl$secondaryArchSuffix
lib:libsdl_mixer$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libpng$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libsdl$secondaryArchSuffix
devel:libsdl_mixer$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:nasm$secondaryArchSuffix
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:autoconf
cmd:aclocal
cmd:pkg_config
"
SOURCE_DIR="VisualBoyAdvance-1.8"
PATCHES="
Util.patch
Makefile.am.patch
configure.in.patch
"
BUILD()
{
libtoolize --force --copy --install
autoreconf -i
runConfigure ./configure --enable-c-core --disable-profilling --without-mmx
make
}
INSTALL()
{
cd src
GAMEDIR=$appsDir/Visualboyadvance
mkdir -p ${GAMEDIR}
cp VisualBoyAdvance.cfg ${GAMEDIR}
cp sdl/VisualBoyAdvance ${GAMEDIR}
addAppDeskbarSymlink ${GAMEDIR}/VisualBoyAdvance
}