Updated for compatibility with TempleOS 6/5/2017

This commit is contained in:
Alec Murphy
2017-06-07 21:21:38 -04:00
parent f98af216c9
commit cd245c18a1
3 changed files with 9 additions and 2 deletions
+4
View File
@@ -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
+2
View File
@@ -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 + '" &')
+3 -2
View File
@@ -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)