shithub: pokered

Download patch

ref: c37cc15f44380af3fdd9030fc196b4951cd6920c
parent: f58dbe3849ecb6c47a703c674458fd63436db946
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Oct 2 18:34:06 EDT 2022

Update tools/unnamed.py for rgbds 0.6.0 object files

--- a/tools/unnamed.py
+++ b/tools/unnamed.py
@@ -90,7 +90,7 @@
 		elif magic == b'RGB9':
 			obj_ver = 10 + unpack_from('<I', file)[0]
 
-		if obj_ver not in [6, 10, 11, 12, 13, 15, 16, 17, 18]:
+		if obj_ver not in [6, 10, 11, 12, 13, 15, 16, 17, 18, 19]:
 			print(f"Error: File '{objfile}' is of an unknown format.", file=sys.stderr)
 			sys.exit(1)
 
@@ -97,7 +97,7 @@
 		num_symbols = unpack_from('<I', file)[0]
 		unpack_from('<I', file) # skip num sections
 
-		if obj_ver in [16, 17, 18]:
+		if obj_ver in [16, 17, 18, 19]:
 			node_filenames = []
 			num_nodes = unpack_from('<I', file)[0]
 			for x in range(num_nodes):
@@ -117,7 +117,7 @@
 			sym_type = symtype(unpack_from('<B', file)[0] & 0x7f)
 			if sym_type == symtype.IMPORT:
 				continue
-			if obj_ver in [16, 17, 18]:
+			if obj_ver in [16, 17, 18, 19]:
 				sym_fileno = unpack_from('<I', file)[0]
 				sym_filename = node_filenames[sym_fileno]
 			else: