summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapp/bin2mw.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/bin2mw.py b/app/bin2mw.py
new file mode 100755
index 0000000..8bce375
--- /dev/null
+++ b/app/bin2mw.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+
+import sys
+
+with open(sys.argv[1], 'rb') as f:
+ addr = 0x2000_0000
+ while word := f.read(4):
+ word = int.from_bytes(word, 'little')
+ print(f'mw.l {addr:08x} {word:08x}')
+ addr += 4