diff options
author | Alec Murphy <alec@checksum.fail> | 2017-06-07 21:21:38 -0400 |
---|---|---|
committer | Alec Murphy <alec@checksum.fail> | 2017-06-07 21:21:38 -0400 |
commit | cd245c18a1c86c6d1a829651be150f0bf7d347f5 (patch) | |
tree | 04685301e83d998798a9f5a26e993fa7a1ce91c9 | |
parent | f98af216c927fc1eaf151c4a676c9423a73afccb (diff) |
-rw-r--r-- | README.md | 4 | ||||
-rwxr-xr-x | isoc-mount | 2 | ||||
-rwxr-xr-x | isoc.py | 5 |
3 files changed, 9 insertions, 2 deletions
@@ -14,6 +14,10 @@ Currently, you can use redseafs to create/modify/read RedSea ISO.C files on any 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,6 +20,8 @@ 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 + '" &') @@ -192,8 +192,9 @@ 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) + # If --2k, Set counter to byte multiple 2048 + if int(pad) == 1: + de_clus_ctr=roundup(de_clus_ctr) # Write to EOF file.seek(RS_DRV_OFFSET+int(de_clus_ctr*RS_BLK_SIZE)-1) |