Update to gambatte-r532.

ok landry@
This commit is contained in:
bentley 2013-05-31 15:34:55 +00:00
parent 3de9758da8
commit 6503ffbd58
9 changed files with 81 additions and 56 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.5 2013/03/11 11:06:04 espie Exp $
# $OpenBSD: Makefile,v 1.6 2013/05/31 15:34:55 bentley Exp $
COMMENT = highly accurate Game Boy Color emulator
V = 0.5.0
DISTNAME = gambatte_src-${V}-wip2v2
PKGNAME = gambatte-${V}-beta3
REV = 532
DISTNAME = gambatte_src-r${REV}
PKGNAME = gambatte-0.5.0.${REV}
CATEGORIES = emulators
@ -36,8 +36,6 @@ do-build:
do-install:
${INSTALL_PROGRAM} ${WRKDIST}/gambatte_sdl/gambatte_sdl ${PREFIX}/bin
${INSTALL_MAN} ${WRKDIST}/gambatte_sdl/man/gambatte_sdl.6 \
${PREFIX}/man/man6
do-test:
${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKDIST}/testrunner \

View File

@ -1,2 +1,2 @@
SHA256 (gambatte_src-0.5.0-wip2v2.tar.gz) = f0Ca2ujiwJKDDleSqhp5nF/UYgi0UT+W4myUZXADRy4=
SIZE (gambatte_src-0.5.0-wip2v2.tar.gz) = 523879
SHA256 (gambatte_src-r532.tar.gz) = 9iXBbqHmmpMlM++2aDWXlSlH+NeN8y12kTQ6apQYTvc=
SIZE (gambatte_src-r532.tar.gz) = 520626

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-gambatte_sdl_SConstruct,v 1.1 2013/05/31 15:34:55 bentley Exp $
--- gambatte_sdl/SConstruct.orig Thu May 30 10:38:24 2013
+++ gambatte_sdl/SConstruct Thu May 30 10:38:40 2013
@@ -9,7 +9,7 @@ vars.Add('CXX')
env = Environment(CPPPATH = ['src', '../libgambatte/include', '../common'],
CFLAGS = cflags,
CXXFLAGS = cxxflags,
- CPPDEFINES = { 'HAVE_STDINT_H': None },
+ CPPDEFINES = [ 'HAVE_STDINT_H', None ],
variables = vars)
env.ParseConfig('sdl-config --cflags --libs')
@@ -44,11 +44,11 @@ conf = env.Configure()
conf.CheckLib('z')
conf.Finish()
-version_str_def = { 'GAMBATTE_SDL_VERSION_STR': r'\"r532\"' }
+version_str_def = [ 'GAMBATTE_SDL_VERSION_STR', r'\"r532\"' ]
if Dir('../.git').exists():
try:
git_revno = subprocess.check_output("git rev-list HEAD --count", shell=True).strip()
- version_str_def = { 'GAMBATTE_SDL_VERSION_STR': r'\"r' + git_revno + r'\"' }
+ version_str_def = [ 'GAMBATTE_SDL_VERSION_STR', r'\"r' + git_revno + r'\"' ]
except subprocess.CalledProcessError:
pass

View File

@ -1,39 +0,0 @@
$OpenBSD: patch-gambatte_sdl_man_gambatte_sdl_6,v 1.1 2012/08/13 06:38:00 bentley Exp $
https://sourceforge.net/tracker/?func=detail&aid=3555949&group_id=203791&atid=987012
--- gambatte_sdl/man/gambatte_sdl.6.orig Thu Oct 25 05:57:46 2007
+++ gambatte_sdl/man/gambatte_sdl.6 Fri Aug 10 00:20:20 2012
@@ -69,12 +69,27 @@ Use YUV overlay for (usually faster) scaling.
TAB
fast-forward
.TP
-Ctrl-f
+Ctrl-f
toggle full screen
.TP
Ctrl-r
reset
.TP
+F5
+save state
+.TP
+F6
+previous state slot
+.TP
+F7
+next state slot
+.TP
+F8
+load state
+.TP
+0 to 9
+select state slot 0 to 9
+.TP
Return
Start
.TP
@@ -87,4 +102,4 @@ A
c
B
.SH AUTHOR
-Gambatte and this manual page was written by Sindre Aamås <aamas@stud.ntnu.no>.
+Gambatte and this manual page was written by Sindre Aam\(oas <aamas@stud.ntnu.no>.

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gambatte_sdl_src_gambatte_sdl_cpp,v 1.1 2013/05/31 15:34:56 bentley Exp $
--- gambatte_sdl/src/gambatte_sdl.cpp.orig Thu May 30 13:44:21 2013
+++ gambatte_sdl/src/gambatte_sdl.cpp Thu May 30 13:44:22 2013
@@ -804,7 +804,7 @@ int GambatteSdl::run(long const sampleRate, int const
return 0;
BlitterWrapper::Buf const &vbuf = blitter.inBuf();
- std::size_t runsamples = gb_samples_per_frame - bufsamples;
+ unsigned runsamples = gb_samples_per_frame - bufsamples;
std::ptrdiff_t const vidFrameDoneSampleCnt = gambatte.runFor(
vbuf.pixels, vbuf.pitch, audioBuf + bufsamples, runsamples);
std::size_t const outsamples = vidFrameDoneSampleCnt >= 0

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libgambatte_include_gambatte_h,v 1.1 2013/05/31 15:34:56 bentley Exp $
--- libgambatte/include/gambatte.h.orig Thu May 30 13:33:56 2013
+++ libgambatte/include/gambatte.h Thu May 30 13:34:01 2013
@@ -81,7 +81,7 @@ class GB { (public)
* if no new video frame was completed.
*/
std::ptrdiff_t runFor(gambatte::uint_least32_t *videoBuf, std::ptrdiff_t pitch,
- gambatte::uint_least32_t *audioBuf, std::size_t &samples);
+ gambatte::uint_least32_t *audioBuf, unsigned &samples);
/**
* Reset to initial state.

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libgambatte_src_gambatte_cpp,v 1.1 2013/05/31 15:34:56 bentley Exp $
--- libgambatte/src/gambatte.cpp.orig Thu May 30 13:41:10 2013
+++ libgambatte/src/gambatte.cpp Thu May 30 13:41:15 2013
@@ -55,7 +55,7 @@ GB::~GB() {
}
std::ptrdiff_t GB::runFor(gambatte::uint_least32_t *const videoBuf, std::ptrdiff_t const pitch,
- gambatte::uint_least32_t *const soundBuf, std::size_t &samples) {
+ gambatte::uint_least32_t *const soundBuf, unsigned &samples) {
if (!p_->cpu.loaded()) {
samples = 0;
return -1;

View File

@ -1,17 +1,22 @@
$OpenBSD: patch-testrunner_SConstruct,v 1.1 2012/08/13 06:38:00 bentley Exp $
--- testrunner/SConstruct.orig Sat Jul 23 11:02:32 2011
+++ testrunner/SConstruct Fri Aug 3 00:33:05 2012
@@ -2,9 +2,11 @@ global_cflags = ARGUMENTS.get('CFLAGS', '-Wall -Wextra
$OpenBSD: patch-testrunner_SConstruct,v 1.2 2013/05/31 15:34:56 bentley Exp $
--- testrunner/SConstruct.orig Sun May 12 06:51:24 2013
+++ testrunner/SConstruct Thu May 30 23:21:43 2013
@@ -1,11 +1,16 @@
global_cflags = ARGUMENTS.get('CFLAGS', '-Wall -Wextra -O2 -g')
global_cxxflags = ARGUMENTS.get('CXXFLAGS', global_cflags + ' -fno-exceptions -fno-rtti')
global_defines = ' -DHAVE_STDINT_H'
+vars = Variables()
+vars.Add('CC')
+vars.Add('CXX')
-env = Environment(CPPPATH = ['.', '../libgambatte/include'],
+env = Environment(CPPPATH = ['.', '../libgambatte/include', '${LOCALBASE}/include/libpng'],
CFLAGS = global_cflags + global_defines,
- CXXFLAGS = global_cxxflags + global_defines)
+ CXXFLAGS = global_cxxflags + global_defines,
CXXFLAGS = global_cxxflags + global_defines,
- LIBS = 'm')
+ LIBPATH = '${LOCALBASE}/lib',
+ LIBS = 'm')
+ LIBS = 'm',
+ variables = vars)
sourceFiles = Split('''
testrunner.cpp

View File

@ -1,3 +1,2 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/12/08 19:58:04 landry Exp $
@comment $OpenBSD: PLIST,v 1.2 2013/05/31 15:34:56 bentley Exp $
@bin bin/gambatte_sdl
@man man/man6/gambatte_sdl.6