Skip to content

Commit

Permalink
remove actual ROMs from repo, rework setup script accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenhael-le-moine committed Aug 11, 2024
1 parent c72a393 commit 6271bc7
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 7 deletions.
Binary file removed dist/ROMs/gxrom-l
Binary file not shown.
Binary file removed dist/ROMs/gxrom-m
Binary file not shown.
Binary file removed dist/ROMs/gxrom-p
Binary file not shown.
Binary file removed dist/ROMs/gxrom-r
Binary file not shown.
Binary file removed dist/ROMs/sxrom-a
Binary file not shown.
Binary file removed dist/ROMs/sxrom-b
Binary file not shown.
Binary file removed dist/ROMs/sxrom-c
Binary file not shown.
Binary file removed dist/ROMs/sxrom-d
Binary file not shown.
Binary file removed dist/ROMs/sxrom-e
Binary file not shown.
Binary file removed dist/ROMs/sxrom-j
Binary file not shown.
24 changes: 17 additions & 7 deletions dist/setup-x48ng-home.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
#!/usr/bin/env sh

DOTX48NG=${DOTX48NG:-.config/x48ng}
CONFIG_FILE=~/"${DOTX48NG}"/config.lua
ROM=${ROM:-./ROMs/gxrom-r}

ROM=${ROM:-gxrom-r}
# [ -d ~/"${DOTX48NG}" ] && rm -fr ~"/${DOTX48NG}"
mkdir -p ~/"${DOTX48NG}"

[ -d ~/${DOTX48NG} ] && rm -fr ~/${DOTX48NG}
mkdir -p ~/${DOTX48NG}
[ -e "${CONFIG_FILE}" ] && mv "${CONFIG_FILE}" "${CONFIG_FILE}".orig
x48ng --print-config > "${CONFIG_FILE}"

x48ng --print-config > ~/${DOTX48NG}/config.lua
cp -r @PREFIX@/share/x48ng/ROMs/ ~/"${DOTX48NG}"/

cp @PREFIX@/share/x48ng/ROMs/$ROM ~/${DOTX48NG}/rom
cd ~/${DOTX48NG}
cd ~/"${DOTX48NG}"/ROMs/ || exit 1
make get-roms

cd ~/"${DOTX48NG}" || exit 1
[ -e rom ] && mv rom rom.orig
cp "$ROM" rom

PORT1_SIZE=128K
PORT2_SIZE=4M

if $(echo $ROM | grep -q "^sx"); then
if $(echo "$ROM" | grep -q "^sx"); then
PORT2_SIZE=128K
fi

[ -e port1 ] && mv port1 port1.orig
@PREFIX@/share/x48ng/mkcard $PORT1_SIZE port1

[ -e port2 ] && mv port2 port2.orig
@PREFIX@/share/x48ng/mkcard $PORT2_SIZE port2

0 comments on commit 6271bc7

Please sign in to comment.