Skip to content

Commit f40ccc0

Browse files
committed
furtool: skip unsupported macro attributes
Instead of crashing, try to skip unsupported attribute in SSG macro definition.
1 parent a2e26a5 commit f40ccc0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/furtool.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ def read_ssg_macro(length, bs):
319319
header_end = bs.pos
320320
assert header_end - header_start == header_len
321321
data = [bs.u1() for i in range(length)]
322-
blocks[code_map[code].offset]=data
322+
if code not in code_map:
323+
warning("macro element not supported yet: %02x"%code)
324+
else:
325+
blocks[code_map[code].offset]=data
323326
assert bs.pos == max_pos
324327
# pass: create a "empty" waveform property if it's not there
325328
# we need it to tell nullsound to not update the envelope SSG register

0 commit comments

Comments
 (0)