def extractrom_sega(self, arc, filename): if arc.hasfile('data.ccf'): ccf = CCFArchive(arc.getfile('data.ccf')) if ccf.hasfile('config'): for line in ccf.getfile('config'): if line.startswith('romfile='): romname = line[len('romfile='):].strip('/\\\"\0\r\n') else: print('config not found') return False if romname: print('Found ROM: %s' % romname) rom = ccf.find(romname) writerom(rom, filename) print('Got ROM: %s' % filename) if self.extractsave(): print('Extracted save to %s.srm' % self.name) else: print('No save file found') return True else: print('ROM filename not specified in config') return False
def extractrom_sega(self, arc, outputPath, filenameWithoutExtension): filename = os.path.join( outputPath, filenameWithoutExtension + self.extensions[self.channeltype]) if arc.hasfile('data.ccf'): ccf = CCFArchive(arc.getfile('data.ccf')) if ccf.hasfile('config'): romfilename = getConfiguration(ccf.getfile('config'), 'romfile') else: return False if romfilename: rom = ccf.find(romfilename) writerom(rom, filename) print('Got ROM: %s' % filename) if self.extractsave(outputPath): print('Extracted save to %s.srm' % self.name) else: print('No save file found') return True else: print('ROM filename not specified in config') return False
def extractrom_sega(self, arc, filename): if arc.hasfile('data.ccf'): ccf = CCFArchive(arc.getfile('data.ccf')) if ccf.hasfile('config'): for line in ccf.getfile('config'): if line.startswith('romfile='): romname = line[len('romfile='):].strip('/\\\"\0\r\n') else: print 'config not found' return False if romname: print 'Found ROM: %s' % romname rom = ccf.find(romname) writerom(rom, filename) print 'Got ROM: %s' % filename if self.extractsave(): print 'Extracted save to %s.srm' % self.name else: print 'No save file found' return True else: print 'ROM filename not specified in config' return False