mirror of
https://github.com/86Box/bios-tools.git
synced 2026-02-22 01:25:34 -07:00
Add Philips BIOS analyzer
This commit is contained in:
@@ -579,6 +579,7 @@ def analyze_process(queue, formatter, scan_base, options):
|
||||
analyzers.MRAnalyzer(),
|
||||
analyzers.MylexAnalyzer(),
|
||||
analyzers.OlivettiAnalyzer(),
|
||||
analyzers.PhilipsAnalyzer(),
|
||||
analyzers.PromagAnalyzer(),
|
||||
analyzers.SchneiderAnalyzer(),
|
||||
analyzers.SystemSoftAnalyzer(),
|
||||
|
||||
@@ -1786,6 +1786,24 @@ class OlivettiAnalyzer(Analyzer):
|
||||
return True
|
||||
|
||||
|
||||
class PhilipsAnalyzer(Analyzer):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__('Philips', *args, **kwargs)
|
||||
|
||||
self._version_pattern = re.compile(b'''\\x0DPhilips ROM BIOS Version ([\\x21-\\x7E]+) ''')
|
||||
|
||||
def can_handle(self, file_path, file_data, header_data):
|
||||
# Locate version.
|
||||
match = self._version_pattern.search(file_data)
|
||||
if not match:
|
||||
return False
|
||||
|
||||
# Extract version.
|
||||
self.version = match.group(1).decode('cp437', 'ignore')
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class PhoenixAnalyzer(Analyzer):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__('Phoenix', *args, **kwargs)
|
||||
@@ -3467,7 +3485,7 @@ class ZenithAnalyzer(Analyzer):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__('Zenith', *args, **kwargs)
|
||||
|
||||
self._date_pattern = re.compile(b'''([0-9]{2}/[0-9]{2}/[0-9]{2}) \(C\)ZDS CORP''')
|
||||
self._date_pattern = re.compile(b'''([0-9]{2}/[0-9]{2}/[0-9]{2}) \\(C\\)ZDS CORP''')
|
||||
self._monitor_pattern = re.compile(b'''[\\x20-\\x7E]+ Monitor, Version [\\x20-\\x7E]+''')
|
||||
|
||||
def can_handle(self, file_path, file_data, header_data):
|
||||
|
||||
@@ -1907,6 +1907,7 @@ class InterleaveExtractor(Extractor):
|
||||
b'Copyright COMPAQ Computer Corporation', # Compaq
|
||||
b'Press any key when ready', # Access Methods
|
||||
b'* AMPRO Little Board', # AMPRO
|
||||
b'Philips ROM BIOS ' # Philips
|
||||
]
|
||||
|
||||
# Interleave the strings.
|
||||
|
||||
Reference in New Issue
Block a user