From 1614932bbc4bc50d1c0695e95f25547b9abf91ae Mon Sep 17 00:00:00 2001 From: Snakek Date: Sun, 12 Jul 2020 14:52:47 -0300 Subject: [PATCH 1/2] Linux Patch --- Working Folder/Makefile | 6 ++--- Working Folder/openMSX/emul_start.sh | 33 +++++++++++++++++++++------- Working Folder/openMSX/readme.txt | 3 ++- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/Working Folder/Makefile b/Working Folder/Makefile index 3b31ade..5e77b5d 100755 --- a/Working Folder/Makefile +++ b/Working Folder/Makefile @@ -10,8 +10,8 @@ #| V1.2 - August 2019 | #| | #| | -#| Compilation Script for MacOS | -#| (may be for linux too ! ?) | +#| Compilation Script for MacOS and Linux | +#| | #| | #\___________________________________________________________/ # @@ -76,7 +76,7 @@ CCFLAGS = --code-loc $(ADDR_CODE) --data-loc $(ADDR_DATA) --disable-warning 196 all: $(REL_FILES) $(COM_FILES) clean emulator %.ihx: %.c - @SDCC $(CCFLAGS) $^ + @sdcc $(CCFLAGS) $^ @echo "..•̀ᴗ•́)و .. $(CC) is Processing ... !" %.com: %.ihx diff --git a/Working Folder/openMSX/emul_start.sh b/Working Folder/openMSX/emul_start.sh index 9a63515..a5c02fc 100755 --- a/Working Folder/openMSX/emul_start.sh +++ b/Working Folder/openMSX/emul_start.sh @@ -1,13 +1,30 @@ -#!/bin/bash +#!/bin/bash # OpenMSX Start Script # The emulator will be started only if it's not already active +#MacOS +if [ "$(uname -s)" == "Darwin" ]; then + xopenmsx=`ps x | grep "openmsx " | grep -v grep` + + if [ "${xopenmsx}" == "" ]; then + echo "...Now Starting OpenMsx " + ./openMSX/openMSX.app/Contents/MacOS/openmsx -script ./openMSX/emul_start_config.txt | NULL + else + echo "...openMSX already running " + fi -xopenmsx=`ps x | grep "openmsx " | grep -v grep` - -if [ "${xopenmsx}" == "" ]; then - echo "...Now Starting OpenMsx " - ./openMSX/openMSX.app/Contents/MacOS/openmsx -script ./openMSX/emul_start_config.txt | NULL +#Linux +elif [ "$(uname -s)" == "Linux" ]; then + xopenmsx=`pgrep "openmsx"` + + if [ "${xopenmsx}" == "" ]; then + echo "...Now Starting OpenMSX " + /opt/openMSX/bin/openmsx -script ./openMSX/emul_start_config.txt + else + echo "...openMSX already running " + fi + +#Other else - echo "...openMSX already running " -fi \ No newline at end of file + echo "Failed to identify OS" +fi diff --git a/Working Folder/openMSX/readme.txt b/Working Folder/openMSX/readme.txt index ba4596b..7af0a4b 100755 --- a/Working Folder/openMSX/readme.txt +++ b/Working Folder/openMSX/readme.txt @@ -1 +1,2 @@ -Copy here the OPenMSX Executable. Previously set with needed system roms. +MacOS and Windows: Copy here the OpenMSX Executable. Previously set with needed system roms. +Linux: This script assumes you've compiled the emulator with make install, which puts the executable in /opt/openMSX/bin. Change if needed. From 173dc16b50ba5a37d049ee81d7f6bedfbe5d7d28 Mon Sep 17 00:00:00 2001 From: Snakek Date: Sun, 12 Jul 2020 15:04:58 -0300 Subject: [PATCH 2/2] Linux Patch --- Working Folder/openMSX/emul_start.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Working Folder/openMSX/emul_start.sh b/Working Folder/openMSX/emul_start.sh index a5c02fc..34ce367 100755 --- a/Working Folder/openMSX/emul_start.sh +++ b/Working Folder/openMSX/emul_start.sh @@ -1,12 +1,11 @@ -#!/bin/bash # OpenMSX Start Script # The emulator will be started only if it's not already active #MacOS -if [ "$(uname -s)" == "Darwin" ]; then +if [ "$(uname -s)" = "Darwin" ]; then xopenmsx=`ps x | grep "openmsx " | grep -v grep` - if [ "${xopenmsx}" == "" ]; then + if [ "${xopenmsx}" = "" ]; then echo "...Now Starting OpenMsx " ./openMSX/openMSX.app/Contents/MacOS/openmsx -script ./openMSX/emul_start_config.txt | NULL else @@ -14,10 +13,10 @@ if [ "$(uname -s)" == "Darwin" ]; then fi #Linux -elif [ "$(uname -s)" == "Linux" ]; then +elif [ "$(uname -s)" = "Linux" ]; then xopenmsx=`pgrep "openmsx"` - if [ "${xopenmsx}" == "" ]; then + if [ "${xopenmsx}" = "" ]; then echo "...Now Starting OpenMSX " /opt/openMSX/bin/openmsx -script ./openMSX/emul_start_config.txt else