Skip to content

Commit 9e6ef97

Browse files
committed
assets: add custom non-bootable disk message
1 parent d4cbe9f commit 9e6ef97

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
/stage
44
*.img
55
*.fd
6+
*.bin

assets/non-bootable-msg.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
╔═════════════════════════════════════════════════════════╗
2+
║ Afterglow: Utility Diskette (DOS, x86) ║
3+
╟─────────────────────────────────────────────────────────╢
4+
║ This diskette is non-bootable. Please insert the "Boot ║
5+
║ Diskette" and then insert this diskette after boot-up. ║
6+
╚═════════════════════════════════════════════════════════╝
7+
Insert "Boot Diskette" and <═╛ to continue ...

lib/assemble.bash

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ create_blank_floppy_image() {
1212
local img_size="$2"
1313
local img_size_blocks=$((img_size / 1024))
1414

15-
mkfs.vfat -F12 --mbr=n -n 'AG-BOOT' -C "$img_file" "$img_size_blocks"
15+
iconv -t CP437 "${CURDIR}"/assets/non-bootable-msg.txt > "${CURDIR}"/build/non-bootable-msg.bin
16+
unix2dos "${CURDIR}"/build/non-bootable-msg.bin
17+
mkfs.vfat -F12 --mbr=n -m "${CURDIR}/build/non-bootable-msg.bin" -n 'AG-BOOT' -C "$img_file" "$img_size_blocks"
1618
}
1719

1820
# $1: floppy disk image file path

0 commit comments

Comments
 (0)