load debug info into code disk

This commit is contained in:
Kartik K. Agaram 2021-05-14 12:56:58 -07:00
parent ff8ec9bcff
commit 69e477b12b
3 changed files with 12 additions and 4 deletions

View File

@ -9,7 +9,7 @@
display_library: sdl2
ata0-master: type=disk, path="code.img", mode=flat, cylinders=20, heads=16, spt=63 # 10MB, 512 bytes per sector
ata0-master: type=disk, path="code.img", mode=flat, cylinders=20, heads=16, spt=63 # 512 bytes per sector = almost 10MB
boot: disk
mouse: enabled=1, toggle=ctrl+f10
log: -

View File

@ -9,8 +9,8 @@
display_library: sdl2
ata0-master: type=disk, path="code.img", mode=flat, cylinders=20, heads=16, spt=63 # 10MB, 512 bytes per sector
ata0-slave: type=disk, path="data.img", mode=flat, cylinders=20, heads=16, spt=63 # 10MB, 512 bytes per sector
ata0-master: type=disk, path="code.img", mode=flat, cylinders=20, heads=16, spt=63 # 512 bytes per sector = almost 10MB
ata0-slave: type=disk, path="data.img", mode=flat, cylinders=20, heads=16, spt=63 # 512 bytes per sector = almost 10MB
boot: disk
mouse: enabled=1, toggle=ctrl+f10
log: -

View File

@ -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