Commit a215b231 authored by Taner Tas's avatar Taner Tas Committed by Andy Postnikov

testing/mame: new aport

https://mamedev.org
Multi Arcade Machine Emulator with GroovyMAME/Switchres/No-nag patchset.
parent b4b0c597
# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=mame
pkgver=0.201
pkgrel=0
pkgdesc="Multi Arcade Machine Emulator with GroovyMAME/Switchres/No-nag patchset."
url="https://mamedev.org"
arch="all"
license="GPL-2.0-or-later"
depends="$pkgname-common"
makedepends="
alsa-lib-dev
asio-dev
clang-dev
coreutils
dos2unix
expat-dev
flac-dev
fontconfig-dev
glm-dev
libjpeg-turbo-dev
libxinerama-dev
libxrandr-dev
lua5.3-dev
mesa-dev
nasm
portaudio-dev
portmidi-dev
python2-dev
py3-sphinx
rapidjson-dev
sdl2-dev
sdl2_ttf-dev
sqlite-dev
zlib-dev
"
subpackages="
$pkgname-common::noarch
$pkgname-arcade
$pkgname-mess
$pkgname-data::noarch
$pkgname-doc
$pkgname-lang
$pkgname-tools
$pkgname-plugins::noarch
"
_groovymame_patch=groovymame-$pkgver.diff
source="
https://github.com/mamedev/mame/archive/$pkgname${pkgver/.}.tar.gz
$_groovymame_patch::https://drive.google.com/uc?export=download&id=1ruDLYXbD8Y1lSUZ4ZNZlzbWWqw0-Zi1O
mame.ini
midi.conf
fix-musl.patch
m68000_archopts.patch
nonag.patch
SubtargetArcade_0200u0.diff
"
options="!check" # No test suite
builddir="$srcdir"/$pkgname-$pkgname${pkgver/.}
prepare() {
cd "$builddir"
#clang workaraound
sed -i -e 's/-flifetime-dse=1//g' scripts/genie.lua
default_prepare
cp "$srcdir"/$_groovymame_patch . && dos2unix $_groovymame_patch
patch -p0 < $_groovymame_patch
}
build() {
#clang builds have better benchmark score and smaller size
export OVERRIDE_CC=clang
export OVERRIDE_CXX=clang++
export CFLAGS="$CFLAGS -I/usr/include/lua5.3 -DBX_CRT_MUSL -Wno-everything"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$LDFLAGS -L/usr/lib/lua5.3"
case "$CARCH" in
x86|armhf) _PTR64=0 _SYMBOLS=0;;
*) _PTR64=1 _SYMBOLS=1;;
esac
case "$CARCH" in
x86_64|x86) _NOASM=0 ;;
*) _NOASM=1 ;;
esac
case "$CARCH" in
s390x) _BIGENDIAN=1 ;;
*) _BIGENDIAN=0 ;;
esac
_build="make
TARGETOS=linux
NOWERROR=1
DEBUG=0
USE_QTDEBUG=0
VERBOSE=1
REGENIE=1
OSD=sdl
SYMBOLS=$_SYMBOLS
FORCE_DRC_C_BACKEND=
PTR64=$_PTR64
NOASM=$_NOASM
BIGENDIAN=$_BIGENDIAN
TOOLS=
SDL_INI_PATH=/etc/mame
USE_SYSTEM_LIB_EXPAT=1
USE_SYSTEM_LIB_ZLIB=1
USE_SYSTEM_LIB_JPEG=1
USE_SYSTEM_LIB_FLAC=1
USE_SYSTEM_LIB_LUA=1
USE_SYSTEM_LIB_SQLITE3=1
USE_SYSTEM_LIB_PORTAUDIO=1
USE_SYSTEM_LIB_UV=1
USE_SYSTEM_LIB_GLM=1
USE_SYSTEM_LIB_RAPIDJSON=1
USE_SYSTEM_LIB_PORTMIDI=1
USE_SYSTEM_LIB_ASIO=1"
cd "$builddir"
[ -f mame ] || [ -f mame64 ] || $_build TOOLS=1 SUBTARGET=mame
[ -f mamearcade ] || [ -f mamearcade64 ] || $_build SUBTARGET=arcade
[ -f mess ] || [ -f mess64 ] || $_build SUBTARGET=mess
}
package() {
cd "$builddir"
install -D -m755 mame "$pkgdir"/usr/bin/mame || \
install -D -m755 mame64 "$pkgdir"/usr/bin/mame
install -D -m644 docs/man/mame.6 "$pkgdir"/usr/share/man/man6/mame.6
for i in castool.1 \
chdman.1 \
floptool.1 \
imgtool.1 \
jedutil.1 \
ldresample.1 \
ldverify.1 \
romcmp.1
do
install -D -m644 docs/man/"$i" "$pkgdir"/usr/share/man/man1/"$i"
done
}
common() {
cd "$builddir"
pkgdesc="MAME - Common configuration files"
install -D -m644 "$srcdir"/mame.ini "$subpkgdir"/etc/mame/mame.ini
install -D -m644 "$srcdir"/midi.conf "$subpkgdir"/etc/modules-load.d/midi.conf
install -d -m755 "$subpkgdir"/usr/share/$pkgname/roms
}
arcade() {
pkgdesc="Multi Arcade Machine Emulator - Arcade specific build."
cd "$builddir"
install -D -m755 mamearcade "$subpkgdir"/usr/bin/mamearcade || \
install -D -m755 mamearcade64 "$subpkgdir"/usr/bin/mamearcade
ln -s mamearcade "$subpkgdir"/usr/bin/arcade
}
mess() {
pkgdesc="Multi Arcade Machine Emulator - Mess specific build."
cd "$builddir"
install -D -m755 mess "$subpkgdir"/usr/bin/mess || \
install -D -m755 mess64 "$subpkgdir"/usr/bin/mess
}
data() {
pkgdesc="Distribution data files for MAME"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/$pkgname
for i in artwork \
bgfx \
hash \
hlsl \
ini \
keymaps \
samples
do
cp -r "$i" "$subpkgdir"/usr/share/$pkgname
done
rm -rf "$subpkgdir"/usr/share/$pkgname/bgfx/shaders/dx11
rm -rf "$subpkgdir"/usr/share/$pkgname/bgfx/shaders/dx9
rm -rf "$subpkgdir"/usr/share/$pkgname/bgfx/shaders/metal
}
plugins() {
pkgdesc="Distribution plugins for MAME"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/$pkgname
cp -r plugins "$subpkgdir"/usr/share/$pkgname/
}
tools() {
pkgdesc="Tools for MAME"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/bin
for i in castool \
chdman \
floptool \
imgtool \
jedutil \
ldresample \
ldverify \
romcmp
do
install -sm755 "$i" "$subpkgdir"/usr/bin
done
}
lang() {
pkgdesc="Localization files for MAME"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/$pkgname
cp -r language "$subpkgdir"/usr/share/$pkgname/
}
sha512sums="e82ce0f3b52db88a2efc5a93f6da3174304b6549f19ffb5dd293d97b5630c8f89bb3def7e62cbebf2f75ecab8b5d4c21242775ed094a765207081cbe52636b2d mame0201.tar.gz
a9900699c3c28930d6bb7f8f72b79b25456907e5a59abef4daab87ffd0bbae0e611fe3ed9f414516daf4e9773b15b459d00056860fe21f908dab9bc79da3ad65 groovymame-0.201.diff
dc008245cbea0b94f58d83e09bf5fd3fff04ac0e2f3a36b910a8b7633c5377419fc67a1fd366ef268e283f744d9a8d29928cfacf456b3edaa2d0b1a11d46a701 mame.ini
8f83ff5a916f4ff8e86c5afbdfe4475f7780bb36c20c78d6d029d0eb0dafd77b3471faa538aca384001d2049dc94c4df3429c67d743adde9fd6329c91e6d19a2 midi.conf
75bba366aebb37de7758368fbf7418194a18d535e61c1768e6c2c5cf4b3b7a2f625ef687cb8278c03daa9e308951df4c0bdcc944dfcc4ce5305f5ac83e5e049b fix-musl.patch
a4d628d4648d28b9ae95f27ecba4a70b999ef11ffde31b31ca3ce2ed2fd4cfcab82ec78e2602309952518fac8c549d0b8b4294f6aa34c1acaa77f012ea13de9e m68000_archopts.patch
864816a55f35f9d485ccd143a1e0acd76d47239a6d5344be2a76b50fd4efbdfb4f3e45318d7dfda67faa63c0a52022f2e8313f058965a1eba60e6ca4677a519b nonag.patch
3796c725efb886f953c372b947a84dd6e09d59d0be9abc3c3c73625beeb7f3bdcc6e8c8057c3f59e297ed92fd5077b52a69a2de6dacb005b21cf552e4e641a4a SubtargetArcade_0200u0.diff"
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -626,6 +626,17 @@
MACHINES["ADC0844"] = true
MACHINES["GEN_FIFO"] = true
MACHINES["Z80DAISY"] = true
+--MACHINES["PS2DMAC"] = true
+MACHINES["PS2INTC"] = true
+--MACHINES["PS2MC"] = true
+--MACHINES["PS2PAD"] = true
+--MACHINES["PS2SIF"] = true
+--MACHINES["PS2TIMER"] = true
+--MACHINES["IOPCDVD"] = true
+--MACHINES["IOPDMA"] = true
+--MACHINES["IOPINTC"] = true
+--MACHINES["IOPSIO2"] = true
+--MACHINES["IOPTIMER"] = true
--------------------------------------------------
-- specify available bus cores
--- a/src/lib/netlist/plib/pexception.cpp
+++ b/src/lib/netlist/plib/pexception.cpp
@@ -10,7 +10,7 @@
#include <cfenv>
-#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__)
+#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__) && defined(__GLIBC__)
#define HAS_FEENABLE_EXCEPT (1)
#else
#define HAS_FEENABLE_EXCEPT (0)
--- a/3rdparty/bx/include/bx/bx.h
+++ b/3rdparty/bx/include/bx/bx.h
@@ -11,6 +11,7 @@
#include <stdint.h> // uint32_t
#include <stdlib.h> // size_t
#include <stddef.h> // ptrdiff_t
+#include <time.h> // time_t
#include "platform.h"
#include "config.h"
Author: Jordi Mallach <jordi@debian.org>
Description: Pass $(ARCHOPTS) to standalone m68000 makefile.
Forwarded: no
Index: mame/src/devices/cpu/m68000/makefile
===================================================================
--- mame.orig/src/devices/cpu/m68000/makefile
+++ mame/src/devices/cpu/m68000/makefile
@@ -25,7 +25,7 @@ clean:
-@rm -f m68kops.*
m68kmake.o: m68kmake.cpp
- $(SILENT) $(CC) -x c++ -std=c++11 -o "$@" -c "$<"
+ $(SILENT) $(CC) -x c++ -std=c++11 $(ARCHOPTS) -o "$@" -c "$<"
m68kmake$(EXE) : m68kmake.o
@echo Linking $@...
# Run "mame -cc" to generate a custom mame.ini file.Then put it into ~/.mame folder.
# To see all available options, run "mame -showusage"
homepath .
rompath $HOME/.mame/roms;/usr/share/mame/roms
hashpath /usr/share/mame/hash
samplepath $HOME/.mame/samples;/usr/share/mame/samples
artpath $HOME/.mame/artwork;/usr/share/mame/artwork
ctrlrpath /usr/share/mame/ctrlr
inipath $HOME/.mame;/etc/mame
fontpath $HOME/.mame/fonts;/usr/share/mame/fonts
cheatpath $HOME/.mame/cheat;/usr/share/mame/cheat
crosshairpath $HOME/.mame/crosshair;/usr/share/mame/crosshair
pluginspath $HOME/.mame/plugins/;/usr/share/mame/plugins
languagepath /usr/share/mame/language
swpath software
cfg_directory $HOME/.mame/cfg
nvram_directory $HOME/.mame/nvram
input_directory $HOME/.mame/inp
state_directory $HOME/.mame/sta
snapshot_directory $HOME/.mame/snap
diff_directory $HOME/.mame/diff
comment_directory $HOME/.mame/comments
# Video output method: none, soft, bgfx, opengl
video opengl
# GROOVYMAME SPECIFIC
# Automatic generation of modelines based on the specified monitor type
# Enable it in order to take advantage of Switchres/GroovyMAME features
modeline_generation 0
# Predefined monitor type (http://forum.arcadecontrols.com/index.php/topic,116023.0.html)
monitor lcd
orientation horizontal
connector auto
interlace 1
doublescan 1
super_width 2560
changeres 1
powerstrip 0
lock_system_modes 1
lock_unsupported_modes 1
refresh_dont_care 0
dotclock_min 0
sync_refresh_tolerance 2.0
frame_delay 0
vsync_offset 0
black_frame_insertion 0
modeline auto
ps_timing auto
lcd_range auto
crt_range0 auto
crt_range1 auto
crt_range2 auto
crt_range3 auto
crt_range4 auto
crt_range5 auto
crt_range6 auto
crt_range7 auto
crt_range8 auto
crt_range9 auto
# END OF GROOVYMAME SPECIFIC
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -1399,7 +1399,8 @@
}
// if we are not in the running stage, draw an outer box
- else
+ // DISABLE WHITE BORDER
+ else if ( !m_manager.machine().options().skip_gameinfo() )
{
render_primitive *prim = list.alloc(render_primitive::QUAD);
set_render_bounds_xy(prim->bounds, 0.0f, 0.0f, (float)m_width, (float)m_height);
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -313,7 +313,8 @@
switch (state)
{
case 0:
- if (show_warnings)
+ // DISABLE INTERACTIVE WARNING MESSAGES
+ if (show_gameinfo)
messagebox_text = machine_info().warnings_string();
if (!messagebox_text.empty())
{
@@ -770,6 +771,10 @@
uint32_t mame_ui_manager::handler_messagebox(render_container &container)
{
+ // DISABLE INITIALIZING, LOADING & DECRYPTING MESSAGES
+ if (machine().options().skip_gameinfo())
+ return 0;
+
draw_text_box(container, messagebox_text.c_str(), ui::text_layout::LEFT, 0.5f, 0.5f, messagebox_backcolor);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment