Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators emulators: add gearsystem



details:   https://anonhg.NetBSD.org/pkgsrc/rev/aa2cab1c85fe
branches:  trunk
changeset: 433453:aa2cab1c85fe
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Jun 02 13:25:00 2020 +0000

description:
emulators: add gearsystem

Gearsystem is a cross-platform Sega Master System / Game Gear / SG-1000
emulator written in C++.

## Features

- Accurate Z80 core, including undocumented opcodes and behaviour like R
  and MEMPTR registers.
- Multi-Mapper support: SEGA, Codemasters, Korean, MSX, SG-1000, and ROM
  only cartridges.
- External RAM support with save files.
- Automatic region detection: NTSC-JAP, NTSC-USA, PAL-EUR.
- Accurate VDP emulation including timing and SMS2 only 224 mode support.
- Internal database for rom detection.
- Audio emulation using SDL Audio and Sms_Snd_Emu library.
- Saves battery powered RAM cartridges to file.
- Save states.
- Compressed rom support (ZIP deflate).
- Game Genie and Pro Action Replay 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/gearsystem/DESCR                                                  |  21 ++++
 emulators/gearsystem/Makefile                                               |  46 +++++++++
 emulators/gearsystem/Makefile.common                                        |  17 +++
 emulators/gearsystem/PLIST                                                  |   4 +
 emulators/gearsystem/distinfo                                               |   7 +
 emulators/gearsystem/patches/patch-platforms_desktop-shared_Makefile.common |  51 ++++++++++
 7 files changed, 148 insertions(+), 1 deletions(-)

diffs (187 lines):

diff -r 4a0acff8b59c -r aa2cab1c85fe emulators/Makefile
--- a/emulators/Makefile        Tue Jun 02 13:24:31 2020 +0000
+++ b/emulators/Makefile        Tue Jun 02 13:25:00 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.324 2020/06/02 13:24:31 nia Exp $
+# $NetBSD: Makefile,v 1.325 2020/06/02 13:25:00 nia Exp $
 #
 
 COMMENT=       Emulators for other operating systems
@@ -69,6 +69,7 @@
 SUBDIR+=       fuse-emulator
 SUBDIR+=       fuse-emulator-utils
 SUBDIR+=       gearboy
+SUBDIR+=       gearsystem
 SUBDIR+=       generator-cbiere
 SUBDIR+=       gens
 SUBDIR+=       gns3-gui
diff -r 4a0acff8b59c -r aa2cab1c85fe emulators/gearsystem/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearsystem/DESCR        Tue Jun 02 13:25:00 2020 +0000
@@ -0,0 +1,21 @@
+Gearsystem is a cross-platform Sega Master System / Game Gear / SG-1000
+emulator written in C++.
+
+## Features
+
+- Accurate Z80 core, including undocumented opcodes and behaviour like R
+  and MEMPTR registers.
+- Multi-Mapper support: SEGA, Codemasters, Korean, MSX, SG-1000, and ROM
+  only cartridges.
+- External RAM support with save files.
+- Automatic region detection: NTSC-JAP, NTSC-USA, PAL-EUR.
+- Accurate VDP emulation including timing and SMS2 only 224 mode support.
+- Internal database for rom detection.
+- Audio emulation using SDL Audio and Sms_Snd_Emu library.
+- Saves battery powered RAM cartridges to file.
+- Save states.
+- Compressed rom support (ZIP deflate).
+- Game Genie and Pro Action Replay 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 4a0acff8b59c -r aa2cab1c85fe emulators/gearsystem/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearsystem/Makefile     Tue Jun 02 13:25:00 2020 +0000
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.1 2020/06/02 13:25:00 nia Exp $
+
+.include "Makefile.common"
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/drhelius/Gearsystem
+COMMENT=       Sega Master System / Game Gear / SG-1000 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}/gearsystem \
+               ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_DATA} ${FILESDIR}/gearsystem.desktop \
+               ${DESTDIR}${PREFIX}/share/applications
+       ${INSTALL_DATA} ${WRKSRC}/platforms/ios/Gearsystem/Images.xcassets/AppIcon.appiconset/sms_icon_120.png \
+               ${DESTDIR}${PREFIX}/share/pixmaps/gearsystem.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 4a0acff8b59c -r aa2cab1c85fe emulators/gearsystem/Makefile.common
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearsystem/Makefile.common      Tue Jun 02 13:25:00 2020 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile.common,v 1.1 2020/06/02 13:25:00 nia Exp $
+# used by emulators/gearsystem/Makefile
+# used by emulators/libretro-gearsystem/Makefile
+
+DISTNAME=      gearsystem-3.1.0
+CATEGORIES=    emulators
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=drhelius/}
+GITHUB_PROJECT=        Gearsystem
+GITHUB_TAG=    ${DISTNAME}
+
+USE_LANGUAGES= c c++
+
+DISTINFO_FILE= ${.CURDIR}/../../emulators/gearsystem/distinfo
+PATCHDIR=      ${.CURDIR}/../../emulators/gearsystem/patches
+
+CHECK_PORTABILITY_SKIP+=       platforms/*/dependencies/SDL-*/premake/*/build-scripts/*
+CHECK_PORTABILITY_SKIP+=       platforms/ios/dependencies/SDL-*/build-scripts/*
diff -r 4a0acff8b59c -r aa2cab1c85fe emulators/gearsystem/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearsystem/PLIST        Tue Jun 02 13:25:00 2020 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2020/06/02 13:25:00 nia Exp $
+bin/gearsystem
+share/applications/gearsystem.desktop
+share/pixmaps/gearsystem.png
diff -r 4a0acff8b59c -r aa2cab1c85fe emulators/gearsystem/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearsystem/distinfo     Tue Jun 02 13:25:00 2020 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/06/02 13:25:00 nia Exp $
+
+SHA1 (gearsystem-3.1.0.tar.gz) = 7f18fb9513cdde9e66d5bb7b023777797ba079f9
+RMD160 (gearsystem-3.1.0.tar.gz) = 259d0bf11044e2c7adf915193b5df742c7350996
+SHA512 (gearsystem-3.1.0.tar.gz) = 579c620780ce0f44aa7c6c3ec5257f6d4f3b257d8c736e472776280c7c4820b97cae6fb68836a7b78a46ee2b82ca60ae95ece751e55384e3bed9c2ec50533f11
+Size (gearsystem-3.1.0.tar.gz) = 11274822 bytes
+SHA1 (patch-platforms_desktop-shared_Makefile.common) = a22b4d53d1bf6e4e47cfafcc0e65747ef1fbe33d
diff -r 4a0acff8b59c -r aa2cab1c85fe emulators/gearsystem/patches/patch-platforms_desktop-shared_Makefile.common
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/gearsystem/patches/patch-platforms_desktop-shared_Makefile.common       Tue Jun 02 13:25:00 2020 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-platforms_desktop-shared_Makefile.common,v 1.1 2020/06/02 13:25:00 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