about summary refs log tree commit diff stats
path: root/translate_subx
diff options
context:
space:
mode:
Diffstat (limited to 'translate_subx')
-rwxr-xr-xtranslate_subx10
1 files changed, 9 insertions, 1 deletions
diff --git a/translate_subx b/translate_subx
index 70400f45..5e2db997 100755
--- a/translate_subx
+++ b/translate_subx
@@ -32,7 +32,7 @@ cat a.pack      |linux/labels_baremetal     labels              > a.survey
 cat a.survey    |linux/hex                                      > a.bin
 
 # Create code.img containing a.bin
-dd if=/dev/zero of=code.img count=20160  # 512-byte sectors, so 10MB
+dd if=/dev/zero of=code.img count=20160  # 20*16*63 512-byte sectors = almost 10MB
 dd if=a.bin of=code.img conv=notrunc
 
 if [ `stat --printf="%s" a.bin` -ge 258048 ]  # 8 tracks * 63 sectors per track * 512 bytes per sector (keep this sync'd with boot.subx)
@@ -40,3 +40,11 @@ then
   echo "a.bin won't all be loaded on boot"
   exit 1
 fi
+
+# Latter half of disk is for debug info.
+dd if=labels of=code.img seek=10080 conv=notrunc
+if [ `stat --printf="%s" labels` -ge 516096 ]  # 16 tracks * 63 sectors per track * 512 bytes per sector (keep this sync'd with boot.subx)
+then
+  echo "a.bin won't all be loaded on boot"
+  exit 1
+fi