From d6e2ba80dd01c6a974aceb40d4bcff7e23c047e9 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 15 Feb 2021 12:54:15 -0800 Subject: [PATCH] 7748 Bug in code-size check. It costs 18 bytes in the boot sector to load 2 tracks of disk (63KB). At that rate I can load 6 more tracks before I need to perform the drudgery again of recalculating offsets. --- translate_subx_baremetal | 2 +- translate_subx_baremetal_emulated | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/translate_subx_baremetal b/translate_subx_baremetal index 80f59f2e..f2d4274d 100755 --- a/translate_subx_baremetal +++ b/translate_subx_baremetal @@ -39,7 +39,7 @@ apps/hex < baremetal/boot.hex > boot.bin cat boot.bin a.bin > disk.bin dd if=disk.bin of=disk.img conv=notrunc -if [ `stat --printf="%s" disk.bin` -ge 96768 ] # 3 tracks * 63 sectors per track * 512 bytes per sector (keep this sync'd with boot.hex) +if [ `stat --printf="%s" disk.bin` -ge 129024 ] # 4 tracks * 63 sectors per track * 512 bytes per sector (keep this sync'd with boot.hex) then echo "disk.bin won't all be loaded on boot" exit 1 diff --git a/translate_subx_baremetal_emulated b/translate_subx_baremetal_emulated index 069983ec..881fcef1 100755 --- a/translate_subx_baremetal_emulated +++ b/translate_subx_baremetal_emulated @@ -33,7 +33,7 @@ dd if=/dev/zero of=disk.img count=20160 # 512-byte sectors, so 10MB cat boot.bin a.bin > disk.bin dd if=disk.bin of=disk.img conv=notrunc -if [ `stat --printf="%s" disk.bin` -ge 96768 ] # 3 tracks * 63 sectors per track * 512 bytes per sector (keep this sync'd with boot.hex) +if [ `stat --printf="%s" disk.bin` -ge 129024 ] # 4 tracks * 63 sectors per track * 512 bytes per sector (keep this sync'd with boot.hex) then echo "disk.bin won't all be loaded on boot" exit 1