Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/emulators emulators: add gearboy
details: https://anonhg.NetBSD.org/pkgsrc/rev/4a0acff8b59c
branches: trunk
changeset: 433452:4a0acff8b59c
user: nia <nia%pkgsrc.org@localhost>
date: Tue Jun 02 13:24:31 2020 +0000
description:
emulators: add gearboy
Gearboy is a cross-platform Game Boy / GameBoy Color emulator written in C++.
## Features
- Accurate CPU emulation, passes cpu_instrs.gb from blargg's tests.
- Accurate instruction and memory timing, passes instr_timing.gb and
mem_timing.gb from blargg's tests.
- Supported cartridges: ROM, ROM + RAM, MBC1, MBC2, MBC3 + RTC, MBC5, HuC-1
and MBC1M (multicart).
- Accurate LCD controller emulation with correct timings and priorities
including mid-scanline effects.
- Game Boy Color support.
- LCD screen ghosting effect as seen in the original Game Boy.
- LCD dot matrix effect.
- Sound emulation using SDL Audio and Gb_Snd_Emu library.
- Save battery powered RAM cartridges to file.
- Save states.
- Compressed rom support (ZIP).
- Game Genie and GameShark cheat support.
- Full debugger with disassembler, breakpoints, debug symbols, memory editor,
IO inspector and and VRAM viewer including tiles, sprites, backgrounds and
palettes.
diffstat:
emulators/Makefile | 3 +-
emulators/gearboy/DESCR | 22 ++++
emulators/gearboy/Makefile | 46 +++++++++
emulators/gearboy/Makefile.common | 17 +++
emulators/gearboy/PLIST | 4 +
emulators/gearboy/distinfo | 7 +
emulators/gearboy/patches/patch-platforms_desktop-shared_Makefile.common | 51 ++++++++++
7 files changed, 149 insertions(+), 1 deletions(-)
diffs (188 lines):
diff -r 2bd080e546c7 -r 4a0acff8b59c emulators/Makefile
--- a/emulators/Makefile Tue Jun 02 12:26:14 2020 +0000
+++ b/emulators/Makefile Tue Jun 02 13:24:31 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.323 2020/05/31 17:02:14 nia Exp $
+# $NetBSD: Makefile,v 1.324 2020/06/02 13:24:31 nia Exp $
#
COMMENT= Emulators for other operating systems
@@ -68,6 +68,7 @@
SUBDIR+= fs-uae-launcher
SUBDIR+= fuse-emulator
SUBDIR+= fuse-emulator-utils
+SUBDIR+= gearboy
SUBDIR+= generator-cbiere
SUBDIR+= gens
SUBDIR+= gns3-gui
diff -r 2bd080e546c7 -r 4a0acff8b59c emulators/gearboy/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearboy/DESCR Tue Jun 02 13:24:31 2020 +0000
@@ -0,0 +1,22 @@
+Gearboy is a cross-platform Game Boy / GameBoy Color emulator written in C++.
+
+## Features
+
+- Accurate CPU emulation, passes cpu_instrs.gb from blargg's tests.
+- Accurate instruction and memory timing, passes instr_timing.gb and
+ mem_timing.gb from blargg's tests.
+- Supported cartridges: ROM, ROM + RAM, MBC1, MBC2, MBC3 + RTC, MBC5, HuC-1
+ and MBC1M (multicart).
+- Accurate LCD controller emulation with correct timings and priorities
+ including mid-scanline effects.
+- Game Boy Color support.
+- LCD screen ghosting effect as seen in the original Game Boy.
+- LCD dot matrix effect.
+- Sound emulation using SDL Audio and Gb_Snd_Emu library.
+- Save battery powered RAM cartridges to file.
+- Save states.
+- Compressed rom support (ZIP).
+- Game Genie and GameShark cheat support.
+- Full debugger with disassembler, breakpoints, debug symbols, memory editor,
+ IO inspector and and VRAM viewer including tiles, sprites, backgrounds and
+ palettes.
diff -r 2bd080e546c7 -r 4a0acff8b59c emulators/gearboy/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearboy/Makefile Tue Jun 02 13:24:31 2020 +0000
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.1 2020/06/02 13:24:32 nia Exp $
+
+.include "Makefile.common"
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/drhelius/Gearboy
+COMMENT= Game Boy / Gameboy Color emulator
+LICENSE= gnu-gpl-v3
+
+USE_TOOLS+= gmake
+
+BUILD_DIRS= platforms/linux
+
+MAKE_FLAGS+= CXX=${CXX}
+MAKE_FLAGS+= GIT_VERSION="pkgsrc"
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} != "Darwin"
+MAKE_FLAGS+= UNAME_S="Linux"
+.else
+MAKE_FLAGS+= UNAME_S="Darwin"
+.endif
+
+# alloca
+BUILDLINK_TRANSFORM+= opt:-std=c++11:-std=gnu++11
+
+INSTALLATION_DIRS+= bin share/applications share/pixmaps
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${BUILD_DIRS}/gearboy \
+ ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${FILESDIR}/gearboy.desktop \
+ ${DESTDIR}${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKSRC}/platforms/ios/Gearboy/Images.xcassets/AppIcon.appiconset/gb_icon_120.png \
+ ${DESTDIR}${PREFIX}/share/pixmaps/gearboy.png
+
+.include "../../devel/SDL2/buildlink3.mk"
+.if ${OPSYS} != "Darwin"
+. include "../../graphics/glew/buildlink3.mk"
+. include "../../graphics/MesaLib/buildlink3.mk"
+.endif
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q}
+.include "../../mk/bsd.pkg.mk"
diff -r 2bd080e546c7 -r 4a0acff8b59c emulators/gearboy/Makefile.common
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearboy/Makefile.common Tue Jun 02 13:24:31 2020 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile.common,v 1.1 2020/06/02 13:24:32 nia Exp $
+# used by emulators/gearboy/Makefile
+# used by emulators/libretro-gearboy/Makefile
+
+DISTNAME= gearboy-3.1.1
+CATEGORIES= emulators
+MASTER_SITES= ${MASTER_SITE_GITHUB:=drhelius/}
+GITHUB_PROJECT= Gearboy
+GITHUB_TAG= ${DISTNAME}
+
+USE_LANGUAGES= c c++
+
+DISTINFO_FILE= ${.CURDIR}/../../emulators/gearboy/distinfo
+PATCHDIR= ${.CURDIR}/../../emulators/gearboy/patches
+
+CHECK_PORTABILITY_SKIP+= platforms/*/dependencies/SDL-*/premake/*/build-scripts/*
+CHECK_PORTABILITY_SKIP+= platforms/ios/dependencies/SDL-*/build-scripts/*
diff -r 2bd080e546c7 -r 4a0acff8b59c emulators/gearboy/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearboy/PLIST Tue Jun 02 13:24:31 2020 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2020/06/02 13:24:32 nia Exp $
+bin/gearboy
+share/applications/gearboy.desktop
+share/pixmaps/gearboy.png
diff -r 2bd080e546c7 -r 4a0acff8b59c emulators/gearboy/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearboy/distinfo Tue Jun 02 13:24:31 2020 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/06/02 13:24:32 nia Exp $
+
+SHA1 (gearboy-3.1.1.tar.gz) = 0f4f89c9cc4c12075002cff5137da51a46139944
+RMD160 (gearboy-3.1.1.tar.gz) = bb1d003fb01eead0e24ff4743af210d4ae9552af
+SHA512 (gearboy-3.1.1.tar.gz) = 6ac9a76514ed83fb4d48ffa9f2b12286f21c82a693976899a7f9546d7424634e0a14201456f3b9800074baa323a5b3bd995140de794b8fb808a55b61d15feaaf
+Size (gearboy-3.1.1.tar.gz) = 16734766 bytes
+SHA1 (patch-platforms_desktop-shared_Makefile.common) = a22b4d53d1bf6e4e47cfafcc0e65747ef1fbe33d
diff -r 2bd080e546c7 -r 4a0acff8b59c emulators/gearboy/patches/patch-platforms_desktop-shared_Makefile.common
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearboy/patches/patch-platforms_desktop-shared_Makefile.common Tue Jun 02 13:24:31 2020 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-platforms_desktop-shared_Makefile.common,v 1.1 2020/06/02 13:24:32 nia Exp $
+
+Avoid overriding variables we want to pass through pkgsrc.
+
+--- platforms/desktop-shared/Makefile.common.orig 2020-05-23 18:52:56.000000000 +0000
++++ platforms/desktop-shared/Makefile.common
+@@ -27,14 +27,14 @@ OBJS = $(addsuffix .o, $(basename $(notd
+
+ UNAME_S := $(shell uname -s)
+
+-CXXFLAGS = -I../ -I../../
++CXXFLAGS += -I../ -I../../
+ CXXFLAGS += -Wall -Wextra -Wformat -std=c++11 -DEMULATOR_BUILD=\"$(GIT_VERSION)\"
+
+ DEBUG ?= 0
+ ifeq ($(DEBUG), 1)
+- CXXFLAGS +=-DDEBUG -g3
++ CXXFLAGS +=-DDEBUG
+ else
+- CXXFLAGS +=-DNDEBUG -O3
++ CXXFLAGS +=-DNDEBUG
+ endif
+
+ LIBS =
+@@ -48,7 +48,7 @@ ifeq ($(UNAME_S), Linux) #LINUX
+ LIBS += -lGL -lGLEW -ldl `sdl2-config --libs`
+
+ CXXFLAGS += `sdl2-config --cflags`
+- CFLAGS = $(CXXFLAGS)
++ CFLAGS += $(CXXFLAGS)
+ endif
+
+ ifeq ($(UNAME_S), Darwin) #APPLE
+@@ -58,7 +58,7 @@ ifeq ($(UNAME_S), Darwin) #APPLE
+
+ CXXFLAGS += `sdl2-config --cflags`
+ CXXFLAGS += -I/usr/local/include -I/opt/local/include
+- CFLAGS = $(CXXFLAGS)
++ CFLAGS += $(CXXFLAGS)
+ endif
+
+ ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
+@@ -95,7 +95,7 @@ all: $(EXE)
+ @echo Build complete for $(ECHO_MESSAGE)
+
+ $(EXE): $(OBJS)
+- $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
++ $(CXX) -o $@ $^ $(LDFLAGS) $(LIBS)
+
+ clean:
+ rm -f $(EXE) $(OBJS)
Home |
Main Index |
Thread Index |
Old Index