From a96d61eca73b97dbd7a8e68ea37785e4a553d8f5 Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Tue, 2 Mar 2021 13:24:11 +0800 Subject: [PATCH] Change padding mechanism --- ChainBoot.py | 5 +++-- ChainLoader.a | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChainBoot.py b/ChainBoot.py index 14fab3d..1551b4a 100755 --- a/ChainBoot.py +++ b/ChainBoot.py @@ -34,11 +34,12 @@ for img2name in image2: image2dict[img2name] = bytearray(img2) img2name = img2name.encode('mac_roman') - image += struct.pack('>LB', len(img2)//512, len(img2name)) + img2name +# image += struct.pack('>LB', len(img2)//512, len(img2name)) + img2name while len(image) % 2: image += b'\0' image += bytes(5) -image += b'Elliot'*10000 # padding, too much! +while len(image) < 8 * 512: image += b'?' +# image += b'Elliot'*10000 # padding, too much! image = append_snefru(image) writable_image = bytearray(open('A608.dsk', 'rb').read()) diff --git a/ChainLoader.a b/ChainLoader.a index cfd1734..acdf053 100644 --- a/ChainLoader.a +++ b/ChainLoader.a @@ -732,3 +732,5 @@ gUserRec ; append user record here later on, no need to waste space on zeros DrvrEnd CodeEnd + + align 12 ; work around unfortunate .ATBOOT bug