diff --git a/AppleCommander-1.3.5.13-ac.jar b/AppleCommander-1.3.5.13-ac.jar new file mode 100755 index 0000000..5813ca9 Binary files /dev/null and b/AppleCommander-1.3.5.13-ac.jar differ diff --git a/Beginning.py b/Beginning.py index 8347c38..9a15265 100644 --- a/Beginning.py +++ b/Beginning.py @@ -1,5 +1,28 @@ from struct import unpack +import os +#Clear SCREEN +print("\033c"); + +# Ask for the DSK filename then open it +dskname = raw_input("Welcome to the Apple /// SOS.Driver.Slurper.\nAppleCommander _must_ exist in the same directory as this script.\n\nYou must have JAVA on your system. \n\nEnter CaSe-SeNsItIvE DSK filename: ") +if len(dskname) < 1 : + print '\nSorry, you must enter a disk name.' + exit() +else: + try: + dskopen = open(dskname) #Checks to see if DSK exists. + sosdrivername = raw_input('\nEnter the name of the SOS driver file you wish exported [SOS.DRIVER]: ') + if len(sosdrivername) < 1 : + sosdrivername = 'SOS.DRIVER' + print "DEBUG: Taking the default IF. sosdrivername is: " + sosdrivername + os.popen("java -jar AppleCommander-1.3.5.13-ac.jar -g %s %s >%s.SOS.DRIVER" % (dskname, sosdrivername,dskname)) + else: + print 'DEBUG: Taking the else...' + os.popen("java -jar AppleCommander-1.3.5.13-ac.jar -g %s %s >%s.SOS.DRIVER" % (dskname, sosdrivername,dskname)) + except: + print '\n\nI cannot find that disk file. Check path and/or name.\n\n' + exit() #Is File a SOS DRIVER file? SOSfile = open('SOSCFFA.DRIVER', 'rb') SOS = SOSfile.read(10) @@ -10,6 +33,6 @@ print "Filetype is: %s. Offset is: %04x" % (filetype, offset) SOSfile.seek(offset,1) SOS = SOSfile.read(2) # Read two bytes marker = unpack('< H', SOS) -if marker == \x0000 : +# if marker == \x0000 : #Saving for later... SOSfile.close() diff --git a/SOSTest.dsk b/SOSTest.dsk new file mode 100644 index 0000000..a2b950f Binary files /dev/null and b/SOSTest.dsk differ diff --git a/SOSTest.dsk.SOS.DRIVER b/SOSTest.dsk.SOS.DRIVER new file mode 100644 index 0000000..8bb8db0 Binary files /dev/null and b/SOSTest.dsk.SOS.DRIVER differ