Removed unnecessary files

This commit is contained in:
ultramagnus_tcv 2015-12-10 10:32:51 -06:00
parent 12bd0e8623
commit 3456ed000c
6 changed files with 0 additions and 78 deletions

View File

@ -1,38 +0,0 @@
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)
filetype, offset = unpack('< 8s H', SOS)
print "Filetype is: %s. Offset is: %04x" % (filetype, offset)
#Seek to first driver
SOSfile.seek(offset,1)
SOS = SOSfile.read(2) # Read two bytes
marker = unpack('< H', SOS)
# if marker == \x0000 : #Saving for later...
SOSfile.close()

View File

@ -1,20 +0,0 @@
1. Obtain the name of the .dsk image from the command-line (like: python my_script.py my_disk_image.dsk)
2. For each driver:
a. File offset
b. List the name of the driver
c. Whether it's char or block device
d. Manufacturer id
e. Version number
If it were to print it all on one line, delimited with commas or something, it might help later when it's used to troll through a directory.
So maybe:
$ python my_script.py my_disk_image.dsk
0530,FMT_D1,BLOCK,01,1.1
096e,FMT_D2,BLOCK,01,1.1
0990,FMT_D3,BLOCK,01,1.1
09B2,FMT_D4,BLOCK,01,1.1
0a00,SILENTYPE,CHAR,01,4.0c
0b00,DMP,CHAR,01,1.0
0c00,CONSOLE,CHAR,01,1.0

View File

@ -1,5 +0,0 @@
Problems to Solve:
1. How to march through the file.
2. How to load a number of bytes at a specific offset? (e.g. Load 2 bytes from 0x04dc)
3. How to write to a file.

View File

@ -1,15 +0,0 @@
from struct import unpack
#Is File a SOS DRIVER file?
SOSfile = open('SOSCFFA.DRIVER', 'rb')
SOS = SOSfile.read(10)
filetype, offset = unpack('< 8s H', SOS)
print "Filetype is: %s. Offset is: %04x" % (filetype, offset)
#Seek to first driver
SOSfile.seek(offset,1)
SOS = SOSfile.read(2) # Read two bytes
marker = unpack('< H', SOS)
if marker == \x0000 :
SOSfile.close()