Skip to content

Commit d47aa6b

Browse files
committed
makedisk: generate vanilla image
1 parent d27263b commit d47aa6b

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

makedisk.sh

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,21 @@ patchslf() {
130130
local locale=$1
131131
log "Patching SLF80037.COM for locale=$locale..."
132132
local slf80037
133+
133134
new_tmp
134135
slf80037=$TMP
135136

136137
make -C applications build/SLF80037.COM > /dev/null
137138
cp applications/build/SLF80037.COM "$slf80037"
138139

139-
# Patch keyboard layout
140-
dd conv=notrunc bs=1 seek=7424 status=none \
141-
if="applications/localization/keymap_${locale}.bin" of="$slf80037"
140+
if [[ $locale != "" ]]; then
141+
# Patch keyboard layout
142+
dd conv=notrunc bs=1 seek=7424 status=none \
143+
if="applications/localization/keymap_${locale}.bin" of="$slf80037"
142144

143-
# Patch 2-letter locale string at offset 303
144-
echo -n "$locale" | dd conv=notrunc,ucase bs=1 count=2 seek=303 status=none of="$slf80037"
145+
# Patch 2-letter locale string at offset 303
146+
echo -n "$locale" | dd conv=notrunc,ucase bs=1 count=2 seek=303 status=none of="$slf80037"
147+
fi
145148

146149
SLF="$slf80037"
147150
}
@@ -151,8 +154,14 @@ patchslf() {
151154
# -----------------------------------------------------------------------------
152155
makedisk() {
153156
local locale=$1
154-
validate_locale "$locale"
155-
local filename="disks/SANCO-CPM22_${locale}.bin"
157+
local filename="disks"
158+
if [[ $locale != "" ]]; then
159+
validate_locale "$locale"
160+
filename="$filename/SANCO-CPM22_${locale}.bin"
161+
else
162+
filename="$filename/SANCO-CPM22.bin"
163+
fi
164+
156165

157166
log "Building disk image: $filename"
158167

@@ -190,6 +199,10 @@ makedisk() {
190199
# -----------------------------------------------------------------------------
191200
prepare_cpmtools
192201

202+
# Generate original image
203+
makedisk ""
204+
205+
# Generate localized images
193206
for loc in us fr it; do
194207
makedisk "$loc"
195208
done

0 commit comments

Comments
 (0)