diff --git a/translate_subx b/translate_subx index 5e2db997..66df2a91 100755 --- a/translate_subx +++ b/translate_subx @@ -43,8 +43,8 @@ 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) +if [ `stat --printf="%s" labels` -ge 131072 ] # 256 sectors * 512 bytes per sector, the most an ATA drive can read in a single command then - echo "a.bin won't all be loaded on boot" + echo "labels won't all be loaded on abort" exit 1 fi diff --git a/translate_subx_emulated b/translate_subx_emulated index 26dd5364..aef29801 100755 --- a/translate_subx_emulated +++ b/translate_subx_emulated @@ -36,7 +36,7 @@ cat a.pack |linux/bootstrap/bootstrap linux/labels_baremetal labels cat a.survey |linux/bootstrap/bootstrap run 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) @@ -44,3 +44,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 131072 ] # 256 sectors * 512 bytes per sector, the most an ATA drive can read in a single command +then + echo "labels won't all be loaded on abort" + exit 1 +fi