From 41b5858e855c68e01bf388e54abd82661e846585 Mon Sep 17 00:00:00 2001 From: Astatin Date: Thu, 7 Aug 2025 16:53:50 +0200 Subject: Add heal sound effect + remove useless tile loads --- scripts/cut-recording-cycle.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/cut-recording-cycle.py (limited to 'scripts') diff --git a/scripts/cut-recording-cycle.py b/scripts/cut-recording-cycle.py new file mode 100644 index 0000000..ba1491b --- /dev/null +++ b/scripts/cut-recording-cycle.py @@ -0,0 +1,21 @@ +import sys + +file = open(sys.argv[1], "rb") +output_file = open(sys.argv[2], "wb") +cycle = int(sys.argv[3]) + +last_cycle_update = 0 +while True: + next_cycle_update_buf = file.read(16) + if len(next_cycle_update_buf) < 16: + break + inputs = file.read(2) + + next_cycle_update = int.from_bytes(next_cycle_update_buf, byteorder="little", signed=False) + print("CYCLES: %d, input1: %08x, input2: %08x" % (next_cycle_update, inputs[0], inputs[1])) + + if next_cycle_update > cycle: + break + + output_file.write(next_cycle_update.to_bytes(16, byteorder="little", signed=False)) + output_file.write(inputs) -- cgit v1.2.3-70-g09d2