Pad files to the correct size (128 sectors) in assemble_floppy.py
This commit is contained in:
parent
56d22db6e0
commit
2a2985640e
|
@ -4,6 +4,7 @@ import os.path
|
|||
floppy_bytes = 1440 * 1024
|
||||
sector_bytes = 512
|
||||
dirent_bytes = 32
|
||||
file_bytes = sector_bytes * 128
|
||||
|
||||
floppy = bytearray()
|
||||
|
||||
|
@ -52,7 +53,7 @@ assert len(directory) <= sector_bytes
|
|||
extend_padded(floppy, sector_bytes, directory)
|
||||
|
||||
for file_contents in files:
|
||||
extend_padded(floppy, sector_bytes, file_contents)
|
||||
extend_padded(floppy, file_bytes, file_contents)
|
||||
|
||||
assert len(floppy) <= floppy_bytes
|
||||
|
||||
|
|
Loading…
Reference in New Issue