QEMU_FLAGS = -fda floppy.img -serial file:serial.log -d guest_errors
.PHONY: all
-all: floppy.img
+all: floppy.img disk.img
+
+disk.img: boot.img blank.img
+ cp blank.img $@
+ dd of=$@ if=$< conv=notrunc
+ dd of=$@ if=blank.img bs=1 seek=440 skip=440 count=70 status=none conv=notrunc
floppy.img: boot.img
dd of=$@ if=/dev/zero bs=512 count=2880
boot.img: bootldr.bin $(bin)
cat $^ >$@
+blank.img: Makefile
+ dd if=/dev/zero of=$@ bs=512 count=8192
+ echo start=2048 type=c | sfdisk $@
+
bootldr.bin: $(elf)
objcopy -O binary -j '.boot*' $< $@
tools/csprite/csprite:
$(MAKE) -C tools/csprite
-data/sprsheet.inc: data/sprsheet.png
+data/sprsheet.inc: data/sprsheet.png tools/csprite/csprite
tools/csprite/csprite -n sprsheet -s 32x32 $< >$@
#data/sprsheet.inc: data/sprsheet.png