load debug info into code disk
This commit is contained in:
parent
ff8ec9bcff
commit
69e477b12b
2
bochsrc
2
bochsrc
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
display_library: sdl2
|
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
|
boot: disk
|
||||||
mouse: enabled=1, toggle=ctrl+f10
|
mouse: enabled=1, toggle=ctrl+f10
|
||||||
log: -
|
log: -
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
display_library: sdl2
|
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
|
||||||
ata0-slave: type=disk, path="data.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 # 512 bytes per sector = almost 10MB
|
||||||
boot: disk
|
boot: disk
|
||||||
mouse: enabled=1, toggle=ctrl+f10
|
mouse: enabled=1, toggle=ctrl+f10
|
||||||
log: -
|
log: -
|
||||||
|
|
|
@ -32,7 +32,7 @@ cat a.pack |linux/labels_baremetal labels > a.survey
|
||||||
cat a.survey |linux/hex > a.bin
|
cat a.survey |linux/hex > a.bin
|
||||||
|
|
||||||
# Create code.img containing 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
|
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)
|
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"
|
echo "a.bin won't all be loaded on boot"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
||||||
|
|
Loading…
Reference in New Issue