mirror of
https://github.com/86Box/bios-tools.git
synced 2026-02-25 21:43:17 -07:00
Add AMPRO analyzer
This commit is contained in:
@@ -490,6 +490,7 @@ def analyze_process(queue, formatter, scan_base):
|
||||
# less common BIOSes with no dependencies on the common part begin here #
|
||||
analyzers.AcerAnalyzer(),
|
||||
analyzers.AcerMultitechAnalyzer(),
|
||||
analyzers.AmproAnalyzer(),
|
||||
analyzers.AmstradAnalyzer(),
|
||||
analyzers.CDIAnalyzer(),
|
||||
analyzers.CentralPointAnalyzer(),
|
||||
|
||||
@@ -781,6 +781,26 @@ class AMIUEFIAnalyzer(Analyzer):
|
||||
return True
|
||||
|
||||
|
||||
class AmproAnalyzer(Analyzer):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__('AMPRO', *args, **kwargs)
|
||||
|
||||
self._version_pattern = re.compile(b'''AMPRO (.+) Rom-Bios[^\\n]+\\nVersion ([^ ]+)''')
|
||||
|
||||
def can_handle(self, file_data, header_data):
|
||||
match = self._version_pattern.search(file_data)
|
||||
if not match:
|
||||
return False
|
||||
|
||||
# Extract version.
|
||||
self.version = match.group(2).decode('cp437', 'ignore')
|
||||
|
||||
# Extract board type as a sign-on.
|
||||
self.signon = match.group(1).decode('cp437', 'ignore')
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class AmstradAnalyzer(NoInfoAnalyzer):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__('Amstrad', *args, **kwargs)
|
||||
|
||||
@@ -1355,6 +1355,7 @@ class InterleaveExtractor(Extractor):
|
||||
b'memory (parity error)',
|
||||
b'Copyright COMPAQ Computer Corporation', # Compaq
|
||||
b'Press any key when ready', # Access Methods
|
||||
b'AMPRO ', # AMPRO
|
||||
]
|
||||
|
||||
# Interleave the strings.
|
||||
|
||||
Reference in New Issue
Block a user