diff options
author | Alec Murphy <alec@checksum.fail> | 2017-06-07 20:55:51 -0400 |
---|---|---|
committer | Alec Murphy <alec@checksum.fail> | 2017-06-07 20:55:51 -0400 |
commit | f98af216c927fc1eaf151c4a676c9423a73afccb (patch) | |
tree | 056f8c06c36ac34be3a3805aa49f0c7cd8d0ea4b | |
parent | 1f26bcfcef2f0cd5a5851f3f23af636f93f2e3c8 (diff) |
Updated for compatibility with TempleOS 6/5/2017
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | isoc-mount | 2 | ||||
-rwxr-xr-x | isoc.py | 16 |
3 files changed, 9 insertions, 15 deletions
@@ -10,14 +10,10 @@ Currently, you can use redseafs to create/modify/read RedSea ISO.C files on any # Commands -`isoc-mount [--rw] [--2k] <filename.ISO.C> <mount_point>` will mount an ISO.C image on `mount_point` +`isoc-mount [--rw] <filename.ISO.C> <mount_point>` will mount an ISO.C image on `mount_point` Specify `--rw` to commit writes to ISO.C file, otherwise discarded on unmount. -Specify `--2k` to pad ISO.C file to multiple of 2048 bytes, for compatibility with VirtualBox virtual CD or physical disc ONLY - -(2k padded ISO.C files will not mount with TempleOS `MountFile()`, you will get `ERROR: Not RedSea`) - If the ISO.C file does not exist, a blank filesystem will be created (and written on unmount if `--rw` specified.) `fusermount -u <mount_point>` to unmount @@ -20,8 +20,6 @@ if len(sys.argv) < 3: print "Usage: " + sys.argv[0] + " [--rw] [--2k] <filename.ISO.C> <mount_point>" print " --rw: commit writes to ISO.C file, otherwise discarded on unmount." print " If the ISO.C file does not exist, a new one will be created." - print " --2k: Pad ISO.C to multiple of 2048 bytes " - print " (for VirtualBox or physical disk only) " sys.exit() os.system('"' + sys.argv[0][:sys.argv[0].rfind("/")+1] + 'isoc.py" "' + sys.argv[1] + '" "' + sys.argv[2] + '" "' + rw + '" "' + pad + '" &') @@ -24,10 +24,10 @@ if not hasattr(__builtins__, 'bytes'): bytes = str ISO9660_BOOT_BLK = bz2.decompress(base64.b64decode(""" -QlpoOTFBWSZTWTnzaDsAAFv//fREBgRSAWAALyXeECYGQAQAQYEAABAACACAEAAACLAAuSEpAkyM -nogDTR6j1NHqD1NDAA0aGjCMmg0aaAwRKVMmAAARgABo6fxtJYIVGuwUa5EN5FPwiF2AF6AC1VqL -cVpEBSBEAGkQoS9FFTMYyLaXC0JNmwHWi02qQuIQYm7ALwMIX15fetARdoKYuxxptZQqSam9ygW8 -UMkeamWTMolRWHxLB49Jtd9tz5AqlUURPn0XckU4UJA582g7 +QlpoOTFBWSZTWf7EvQUAAFv//fREJgRSAWAALyXeECYGQAQAQBkAABAgCACAEAAACLAAuSEpAk0bS +NNBpoNHqNNHqD1NDAGmho0YjIBoANDBFJINGjQAAAABo67j0bZyRUa5yTYIQ4kKTEIUwAXoAFqrSW +4rKEBSAhABlCEiGmEFTMYxS2moWhFsmA6oWhYpKyEGJZcHEC6HB+P3rMF7qCe92GE9TJlRStvcUio +nnIx8jGJrKA+I80GdJI5JNH6AqxFBNVCiJ+/i7kinChIf2JegoA== """)) epoch = datetime.datetime.utcfromtimestamp(0) @@ -192,11 +192,11 @@ def write_iso_c(self, iso_c_file, pad): file.seek(int(f['clus']*RS_BLK_SIZE)) file.write(self.data[(d+'/'+f['filename']).replace("//","/")]) + # Set counter to byte multiple 2048 + de_clus_ctr=roundup(de_clus_ctr) + # Write to EOF - if int(pad) == 1: - file.seek(roundup(RS_DRV_OFFSET+int(de_clus_ctr*RS_BLK_SIZE))-1) - else: - file.seek(RS_DRV_OFFSET+int(de_clus_ctr*RS_BLK_SIZE)-1) + file.seek(RS_DRV_OFFSET+int(de_clus_ctr*RS_BLK_SIZE)-1) file.write(chr(0)) # Write boot sector |