Skip to content

Commit

Permalink
Added hardcoded recognizer for the Getaway ATR image
Browse files Browse the repository at this point in the history
  • Loading branch information
robmcmullen committed Jan 21, 2016
1 parent e3c3173 commit 35ab562
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions omnivore/tasks/hex_edit/hex_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ def init_user_segments(self, doc):
self.update_colors(colors)
self.set_font(font_segment.antic_font, 5)
self.initial_segment = segment
state = doc.bytes[0x10:0x19] == [0x00, 0xc1, 0x80, 0x0f, 0xcc, 0x22, 0x18, 0x60, 0x0e]
if state.all():
print "Found getaway.atr!!!"
font_segment = AnticFontSegment(0x2b00, doc.bytes[0x090:0x490], name="Playfield font")
doc.add_user_segment(font_segment)
segment = DefaultSegment(0x4b00, doc.bytes[0x2090:0x6090], name="Playfield map")
segment.map_width = 256
doc.add_user_segment(segment)
colors = [0x46, 0xD6, 0x74, 0x0C, 0x14, 0x86, 0x02, 0xB6, 0xBA]
self.update_colors(colors)
self.set_font(font_segment.antic_font, 5)
self.initial_segment = segment

def rebuild_document_properties(self):
self.find_segment_parser([ATRSegmentParser, XexSegmentParser])
Expand Down

0 comments on commit 35ab562

Please sign in to comment.