Get bios calls starting to work

This commit is contained in:
Byron Lathi
2023-08-06 21:41:15 -07:00
parent 6b42843f4b
commit 446f4e7539
12 changed files with 280 additions and 298 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
BOOTLOADER=bootloader/bootloader.bin
BOOTLOADER=../bootloader/bootloader.bin
DEVICE=/dev/mmcblk0
TMPBOOTSECT=/tmp/bootsect
TMPMOUNT=/tmp/sd
@@ -13,11 +13,7 @@ sudo mkfs.vfat -F32 $DEVICE -n SUPER6502 $V
echo
echo "$(tput bold setaf 11)Modifying Boot Sector$(tput sgr 0)"
sudo dd if=$DEVICE of=$TMPBOOTSECT bs=512 count=1 $STATUS
sudo dd conv=notrunc if=$BOOTLOADER of=$DEVICE bs=512 skip=0 count=1 $STATUS
sudo dd conv=notrunc if=$TMPBOOTSECT of=$DEVICE bs=1 skip=0 count=90 iflag=skip_bytes,count_bytes $STATUS
sudo dd conv=notrunc if=$BOOTLOADER of=$DEVICE bs=1 skip=0 count=3 iflag=skip_bytes,count_bytes $STATUS
echo
sudo dd if=$BOOTLOADER of=$DEVICE bs=512 count=1 $STATUS
echo "$(tput bold setaf 10)Done!$(tput sgr 0)"