2023-04-30 19:08:53 +02:00
|
|
|
#!/usr/bin/env sh
|
2023-04-30 18:50:24 +02:00
|
|
|
|
2023-05-14 16:20:09 +02:00
|
|
|
DOTX48NG=${DOTX48NG:-.x48ng}
|
2023-04-30 18:50:24 +02:00
|
|
|
|
2023-05-14 16:32:15 +02:00
|
|
|
ROM=${ROM:-@PREFIX@/share/x48ng/ROMs/gxrom-r}
|
2023-04-30 19:08:53 +02:00
|
|
|
|
2023-05-14 16:20:09 +02:00
|
|
|
[ -d ~/${DOTX48NG} ] && rm -fr ~/${DOTX48NG}
|
|
|
|
mkdir -p ~/${DOTX48NG}
|
2023-04-30 19:08:53 +02:00
|
|
|
|
2023-09-13 16:53:22 +02:00
|
|
|
cp $ROM ~/${DOTX48NG}/rom
|
2023-05-14 16:20:09 +02:00
|
|
|
cd ~/${DOTX48NG}
|
2023-04-30 18:50:24 +02:00
|
|
|
|
2023-05-14 16:20:09 +02:00
|
|
|
PORT1_SIZE=128K
|
|
|
|
PORT2_SIZE=4M
|
2023-04-30 18:50:24 +02:00
|
|
|
|
2023-05-14 16:20:09 +02:00
|
|
|
if $(echo $ROM | grep -q "^sx"); then
|
|
|
|
PORT2_SIZE=128K
|
|
|
|
fi
|
|
|
|
|
|
|
|
@PREFIX@/share/x48ng/mkcard $PORT1_SIZE port1
|
|
|
|
@PREFIX@/share/x48ng/mkcard $PORT2_SIZE port2
|
|
|
|
|
|
|
|
cd ~/${DOTX48NG}/
|
2023-09-13 16:53:22 +02:00
|
|
|
@PREFIX@/bin/x48ng --config-dir=${DOTX48NG} --verbose --initialize
|