copy the loader onto the disk.

This commit is contained in:
Kelvin Sherlock 2021-07-18 00:16:05 -04:00
parent 5c21bd0790
commit c485c299a5
3 changed files with 22 additions and 5 deletions

View File

@ -1,12 +1,14 @@
.PHONY: all
all : bootblock loader
bootblock : bootblock.omf hfs.po
bootblock : bootblock.omf | hfs.po
mpw makebiniigs -s -org 2048 bootblock.omf -o bootblock
dd bs=512 if=bootblock of=hfs.po conv=notrunc oseek=0
loader : loader.omf
loader : loader.omf | hfs.po
mpw makebiniigs -s -org 8192 loader.omf -o loader
sh cp-loader.sh
# bootblock.omf : bootblock.obj
# mpw linkiigs bootblock.obj -o bootblock.omf
@ -20,7 +22,7 @@ loader.obj : loader.aii hfs.aii macros.aii
.PHONY: clean
clean:
$(RM) bootblock bootblock.omf bootblock.obj
$(RM) bootblock bootblock.omf bootblock.obj loader loader.omf loader.obj
hfs.po:
mkfs-profuse --fst=hfs --size=800k --name="hfs boot" hfs.po

5
cp-loader.sh Normal file
View File

@ -0,0 +1,5 @@
export dir=`mktemp -d`
profuse -orw --fst=hfs hfs.po "$dir"
cp loader "$dir/"\!
umount "$dir"

View File

@ -2,6 +2,9 @@
;
; loader
;
; currently limited to 512-byte blocks (64MB max filesystem)
; need to use smartport protocol to use > 65535 blocks anyhow.
;
@ -29,7 +32,7 @@ r3 ds.w 1
; readfile
eof ds.l 1
blocks ds.w 1 ; shouldn't exceed...
blocks ds.w 1 ; shouldn't exceed $ffff blocks
ft ds.w 1
at ds.w 1
st ds.w 1
@ -907,6 +910,13 @@ startup proc
txs
lda #buffer
sta pro.buffer
short m
lda #1
sta pro.cmd
long m
with HFSMasterDirectoryBlock
lda #2
jsr read_block_abs