Skip to content

Commit 963af0d

Browse files
authored
Merge pull request #3849 from cmitu/quasi88-sdl2
quasi88: switch upstream repository, upgrade to 0.7.1
2 parents 06e2ce9 + 7479eb2 commit 963af0d

File tree

3 files changed

+58
-39
lines changed

3 files changed

+58
-39
lines changed

scriptmodules/emulators/quasi88.sh

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,36 @@
1212
rp_module_id="quasi88"
1313
rp_module_desc="NEC PC-8801 emulator"
1414
rp_module_help="ROM Extensions: .d88 .88d .cmt .t88\n\nCopy your pc88 games to to $romdir/pc88\n\nCopy bios files FONT.ROM, N88.ROM, N88KNJ1.ROM, N88KNJ2.ROM, and N88SUB.ROM to $biosdir/pc88"
15-
rp_module_repo="file $__archive_url/quasi88-0.6.4.tgz"
15+
rp_module_repo="git https://github.com/winterheart/quasi88.git master"
16+
rp_module_licence="BSD https://raw.githubusercontent.com/winterheart/quasi88/master/LICENSE.txt"
1617
rp_module_section="exp"
17-
rp_module_flags="sdl1 !mali !kms"
18+
rp_module_flags="sdl2"
1819

1920
function depends_quasi88() {
20-
getDepends libsdl1.2-dev
21+
getDepends cmake libsdl2-dev libfmt-dev libspdlog-dev
2122
}
2223

2324
function sources_quasi88() {
24-
downloadAndExtract "$md_repo_url" "$md_build" --strip-components 1
25-
applyPatch "$md_data/01_fixes.diff"
25+
gitPullOrClone
26+
applyPatch "$md_data/01_cmake.diff"
2627
}
2728

2829
function build_quasi88() {
29-
make X11_VERSION= SDL_VERSION=1 clean
30-
make X11_VERSION= SDL_VERSION=1 ARCH=linux SOUND_SDL=1 USE_OLD_MAME_SOUND=1 USE_FMGEN=1 ROMDIR="$biosdir/pc88" DISKDIR="$romdir/pc88" TAPEDIR="$romdir/pc88"
31-
md_ret_require="$md_build/quasi88.sdl"
30+
rm -fr build
31+
mkdir -p build && pushd build
32+
cmake -DROMDIR="$biosdir/pc88" -DDISKDIR="$romdir/pc88" -DTAPEDIR="$romdir/pc88" ..
33+
make
34+
popd
3235
}
3336

3437
function install_quasi88() {
35-
make X11_VERSION= SDL_VERSION=1 BINDIR="$md_inst" install
38+
md_ret_files=(
39+
"build/quasi88.sdl"
40+
"document"
41+
"LICENSE.txt"
42+
"README.md"
43+
"ChangeLog.md"
44+
)
3645
}
3746

3847
function configure_quasi88() {
@@ -42,4 +51,23 @@ function configure_quasi88() {
4251

4352
addEmulator 1 "$md_id" "pc88" "$md_inst/quasi88.sdl -f6 IMAGE-NEXT1 -f7 IMAGE-NEXT2 -f8 NOWAIT -f9 ROMAJI -f10 NUMLOCK -fullscreen %ROM%"
4453
addSystem "pc88"
54+
55+
[[ "$mode" == "remove" ]] && return
56+
57+
# add a minimal configuration file
58+
local conf="$md_conf_root/pc88/quasi88.ini"
59+
if [[ ! -f "$conf" ]]; then
60+
cat > "$conf" << EOF
61+
-auto_mouse
62+
-nostatus
63+
-double
64+
-english
65+
-use_joy
66+
-verbose 1
67+
-romdir "$biosdir/pc88"
68+
-diskdir "$romdir/pc88"
69+
-tapedir "$romdir/pc88"
70+
EOF
71+
chown $user:$user "$conf"
72+
fi
4573
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 83c52bc..98deb4f 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -229,7 +229,7 @@ if(ENABLE_SDL)
6+
add_definitions(-DQUASI88_SDL)
7+
find_package(SDL2 CONFIG REQUIRED)
8+
9+
- list(APPEND SDL_LIBS SDL2::SDL2 SDL2::SDL2main)
10+
+ list(APPEND SDL_LIBS ${SDL2_LIBRARIES})
11+
list(APPEND SDL_INCLUDES
12+
src/SDL
13+
)
14+
@@ -257,6 +257,7 @@ if(ENABLE_SDL)
15+
)
16+
target_include_directories(${PROJECT_NAME}.sdl PRIVATE ${SDL_INCLUDES})
17+
target_link_libraries(${PROJECT_NAME}.sdl ${COMMON_LIBS} ${SDL_LIBS})
18+
+ target_link_libraries(${PROJECT_NAME}.sdl $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
19+
20+
#### macOS needs rpath set if using a Framework
21+
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")

scriptmodules/emulators/quasi88/01_fixes.diff

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)