Checkpoint working player

This commit is contained in:
kris 2022-06-04 14:06:52 +01:00
parent 8ea4f150ad
commit fbd6b956d1
6 changed files with 388 additions and 388 deletions

View File

@ -161,7 +161,7 @@ def audio_bytestream(data: numpy.ndarray, step: int, lookahead_steps: int,
# TODO: avoid temporarily doubling memory footprint to concatenate
data = numpy.ascontiguousarray(numpy.concatenate(
[data, numpy.zeros(max(lookahead_steps, opcodes.cycle_length(
opcodes.Opcode.END_OF_FRAME_1, is_6502)), dtype=numpy.float32)]))
opcodes.Opcode.END_OF_FRAME_0, is_6502)), dtype=numpy.float32)]))
# Starting speaker position and applied voltage.
# position = 0.0
@ -198,11 +198,29 @@ def audio_bytestream(data: numpy.ndarray, step: int, lookahead_steps: int,
y1 = y2 = 0.0 # last 2 speaker positions
min_lookahead_steps = lookahead_steps
while i < int(dlen / 10):
# data = numpy.full(data.shape, -0.05)
last_v = 1.0
since_toggle = 0
import itertools
# opcode_seq = itertools.cycle(
# (
# opcodes.Opcode.TICK_13,
# opcodes.Opcode.TICK_14,
# )
# )
while i < dlen // 10:
# XXX handle end of data cleanly
# print(i, dlen)
if i >= next_tick:
eta.print_status()
next_tick = int(eta.i * dlen / 1000)
# if i >= next_tick:
# eta.print_status()
# next_tick = int(eta.i * dlen / 1000)
# if frame_offset == 2047:
# print("\n",i / sample_rate)
# if frame_horizon(frame_offset, min_lookahead_steps) != 0:
# data[i:i+160] = numpy.mean(data[i:i+160])
# Compute all possible opcode sequences for this frame offset
opcode_hash, candidate_opcodes, voltages, lookahead_steps = \
opcodes.candidate_opcodes(
@ -230,11 +248,30 @@ def audio_bytestream(data: numpy.ndarray, step: int, lookahead_steps: int,
# Pick the opcode sequence that minimizes the total squared error
# relative to the data waveform. This total_error() call is where
# about 75% of CPU time is spent.
opcode_idx = numpy.argmin(
total_error(
all_positions * sp.scale, data[i:i + lookahead_steps])).item()
# avoided = False
# while True:
errors = total_error(
all_positions * sp.scale, data[i:i + lookahead_steps])
# if numpy.min(errors) > 1 and frame_offset == 2046:
# if avoided:
# print("...failed")
# break
# print("Avoiding click at", i, frame_offset, numpy.min(errors))
# mult = 1.0
# for j in range(lookahead_steps):
# if j <= lookahead_steps // 2:
# mult *= 0.95
# else:
# mult /= 0.95
# data[i+j] = data[i+j] * mult
# avoided = True
# else:
# break
opcode_idx = numpy.argmin(errors).item()
# Next opcode
opcode = candidate_opcodes[opcode_idx][0]
# opcode = opcode_seq.__next__()
opcode_length = opcodes.cycle_length(opcode, is_6502)
opcode_counts[opcode] += 1
# toggles += opcodes.TOGGLES[opcode]
@ -258,24 +295,39 @@ def audio_bytestream(data: numpy.ndarray, step: int, lookahead_steps: int,
new_error = total_error(
all_positions[0] * sp.scale, data[i:i + opcode_length]).item()
total_err += new_error
if new_error > 1:
print(i, frame_offset, new_error)
if frame_offset == 2047:
print(i / sample_rate, opcode, new_error,
numpy.mean(data[i:i + opcode_length]), "<----" if new_error >
0.3 else "")
# for v in opcode_voltages[0]:
# since_toggle += 1
# if v != last_v:
# print(since_toggle)
# since_toggle = 0
# last_v = v
# print(i, opcode, numpy.mean(all_positions[0] * sp.scale))
# print(all_positions[0] * sp.scale, data[i:i + opcode_length])
# print(frame_offset, opcode)
for v in all_positions[0]:
yield v * sp.scale
# print(v * sp.scale)
# if i >= 174600:
# print(i, frame_offset, new_error, opcode)
# for v in all_positions[0]:
# yield v * sp.scale
# print(v * sp.scale)
# for v in opcode_voltages[0]:
# print(" %d" % v)
yield opcode
i += opcode_length
frame_offset = (frame_offset + 1) % 2048
# if i == 174720:
# frame_offset = 0
# Make sure we have at least 2k left in stream so player will do a
# complete read.
# for _ in range(frame_offset % 2048, 2048):
# yield opcodes.Opcode.EXIT
for _ in range(frame_offset % 2048, 2048):
yield opcodes.Opcode.EXIT
eta.done()
print("Total error %f" % total_err)
toggles_per_sec = toggles / dlen * sample_rate
@ -336,20 +388,24 @@ def main():
# 16/14 as long.
sample_rate = 1015657 if args.clock == 'pal' else 1020484 # NTSC
# with open(args.output, "wb+") as f:[d20+
output = numpy.array(list(audio_bytestream(
preprocess(args.input, sample_rate, args.normalization,
args.norm_percentile), args.step_size,
args.lookahead_cycles, sample_rate, args.cpu == '6502')),
dtype=numpy.float32)
output_rate = 44100 # int(sample_rate / 4)
output = librosa.resample(output, orig_sr=sample_rate,
target_sr=output_rate)
with sf.SoundFile(
args.output, "w", output_rate, channels=1, format='WAV') \
as f:
f.write(output)
# f.write(bytes([opcode.value]))
# output = numpy.array(list(audio_bytestream(
# preprocess(args.input, sample_rate, args.normalization,
# args.norm_percentile), args.step_size,
# args.lookahead_cycles, sample_rate, args.cpu == '6502')),
# dtype=numpy.float32)
# output_rate = 44100 # int(sample_rate / 4)
# output = librosa.resample(output, orig_sr=sample_rate,
# target_sr=output_rate)
# with sf.SoundFile(
# args.output, "w", output_rate, channels=1, format='WAV') \
# as f:
# f.write(output)
with open(args.output, "wb+") as f:
for opcode in audio_bytestream(
preprocess(args.input, sample_rate, args.normalization,
args.norm_percentile), args.step_size,
args.lookahead_cycles, sample_rate, args.cpu == '6502'):
f.write(bytes([opcode.value]))
if __name__ == "__main__":

View File

@ -78,22 +78,48 @@ def all_opcodes(
num_opcodes += 1
import itertools
def _make_end_of_frame_voltages(skip) -> numpy.ndarray:
"""Voltage sequence for end-of-frame TCP processing."""
length = 160 # 4 + 14 * 10 + 6
c = numpy.full(length, 1.0, dtype=numpy.float32)
# Always start with a STA $C030
c = [] # numpy.full(length, 1.0, dtype=numpy.float32)
voltage_high = True
# toggles = 0
for i in range(0, 16):
for skip_cycles in itertools.cycle(skip):
if len(c) + skip_cycles < length:
c.extend([1.0 if voltage_high else -1.0] * (skip_cycles - 1))
else:
c.extend([1.0 if voltage_high else -1.0] * (length - len(c)))
break
voltage_high = not voltage_high
# toggles += 1
for j in range(3 + 10 * i + skip , min(length, 3 + 10 * (i + 1) +
skip)):
c[j] = 1.0 if voltage_high else -1.0
return c
c.append(1.0 if voltage_high else -1.0)
# # toggles += 1
# for j in range(3 + 10 * i + skip , min(length, 3 + 10 * (i + 1) +
# skip)):
# c[j] = 1.0 if voltage_high else -1.0
return numpy.array(c[:length], dtype=numpy.float32)
# return c
eof_bits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# These are duty cycles
eof_cycles = [
# (16,6),
# (14,6),
# (12,8), # -0.15
# (14, 10), # -0.10
# (12,10), # -0.05
(4, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6), # 0.0
# (10, 8, 10, 10, 10, 8), # 0.05
# (12, 10, 12, 8, 10, 10), # 0.1
# (4, 10, 8, 10, 8, 10, 8, 10, 8, 10, 8, 10, 8, 10, 8, 10, 8, 10, 6), # 0.15
# (10, 6, 12, 6), # 0.20
# (10, 4), # 0.25
# (14, 4, 10, 6), # 0.30
# (12, 4), # 0.35
# (14, 4), # 0.40
]
def generate_player(player_ops: List[Tuple[Opcode]], opcode_filename: str,
@ -148,7 +174,7 @@ def generate_player(player_ops: List[Tuple[Opcode]], opcode_filename: str,
f.write(" TICK_%02x = 0x%02x\n" % (o, o))
f.write(" EXIT = 0x%02x\n" % num_bytes)
# f.write(" END_OF_FRAME = 0x%02x\n" % (num_bytes + 3))
for i in eof_bits:
for i, _ in enumerate(eof_cycles):
f.write(" END_OF_FRAME_%d = 0x%02x\n" % (i, num_bytes + 4 + i))
f.write("\n\nVOLTAGE_SCHEDULE = {\n")
@ -156,11 +182,11 @@ def generate_player(player_ops: List[Tuple[Opcode]], opcode_filename: str,
f.write(
" Opcode.TICK_%02x: numpy.array(%s, dtype=numpy.float32),"
"\n" % (o, v))
for i in eof_bits:
for i, skip_cycles in enumerate(eof_cycles):
f.write(" Opcode.END_OF_FRAME_%d: numpy.array([%s], "
"dtype=numpy.float32),\n" % (i, ", ".join(
str(f) for f in _make_end_of_frame_voltages(
i))))
skip_cycles))))
f.write("}\n")
f.write("\n\nTOGGLES = {\n")
@ -171,7 +197,7 @@ def generate_player(player_ops: List[Tuple[Opcode]], opcode_filename: str,
f.write("}\n")
f.write("\n\nEOF_OPCODES = (\n")
for i in eof_bits:
for i in range(len(eof_cycles)):
f.write(" Opcode.END_OF_FRAME_%d,\n" % i)
f.write(")\n")

View File

@ -7,92 +7,84 @@ class Opcode(enum.Enum):
TICK_03 = 0x03
TICK_06 = 0x06
TICK_09 = 0x09
TICK_0a = 0x0a
TICK_0d = 0x0d
TICK_0c = 0x0c
TICK_0f = 0x0f
TICK_10 = 0x10
TICK_13 = 0x13
TICK_14 = 0x14
TICK_17 = 0x17
TICK_1a = 0x1a
TICK_1d = 0x1d
TICK_1e = 0x1e
TICK_1b = 0x1b
TICK_23 = 0x23
TICK_26 = 0x26
TICK_27 = 0x27
TICK_33 = 0x33
TICK_36 = 0x36
TICK_39 = 0x39
TICK_2a = 0x2a
TICK_2e = 0x2e
TICK_31 = 0x31
TICK_32 = 0x32
TICK_35 = 0x35
TICK_3a = 0x3a
TICK_3f = 0x3f
TICK_42 = 0x42
TICK_43 = 0x43
TICK_4b = 0x4b
TICK_4e = 0x4e
TICK_4f = 0x4f
TICK_3d = 0x3d
TICK_46 = 0x46
TICK_49 = 0x49
TICK_4c = 0x4c
TICK_51 = 0x51
TICK_54 = 0x54
TICK_57 = 0x57
TICK_5a = 0x5a
TICK_5b = 0x5b
TICK_63 = 0x63
TICK_6e = 0x6e
TICK_79 = 0x79
TICK_84 = 0x84
TICK_5d = 0x5d
TICK_67 = 0x67
TICK_72 = 0x72
TICK_7c = 0x7c
TICK_87 = 0x87
TICK_88 = 0x88
TICK_8f = 0x8f
EXIT = 0x99
END_OF_FRAME_0 = 0x9d
END_OF_FRAME_1 = 0x9e
END_OF_FRAME_2 = 0x9f
END_OF_FRAME_3 = 0xa0
END_OF_FRAME_4 = 0xa1
END_OF_FRAME_5 = 0xa2
END_OF_FRAME_6 = 0xa3
END_OF_FRAME_7 = 0xa4
END_OF_FRAME_8 = 0xa5
END_OF_FRAME_9 = 0xa6
TICK_8a = 0x8a
TICK_8b = 0x8b
TICK_91 = 0x91
TICK_94 = 0x94
TICK_95 = 0x95
TICK_9c = 0x9c
TICK_a5 = 0xa5
EXIT = 0xaf
END_OF_FRAME_0 = 0xb3
VOLTAGE_SCHEDULE = {
Opcode.TICK_00: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_03: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_06: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_09: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_0a: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_0d: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_10: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_13: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_14: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_1a: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_1d: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_1e: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_27: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_33: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_36: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_39: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_3a: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_3f: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_42: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_43: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_4b: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_4e: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_4f: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_57: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_5a: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_5b: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_63: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_6e: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_79: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_84: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_87: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_88: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_8f: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_00: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_03: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_06: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_09: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_0c: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_0f: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_10: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_17: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_1a: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_1b: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_23: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_26: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_27: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_2a: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_2e: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_31: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_32: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_35: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_3a: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_3d: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_46: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_49: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_4c: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_51: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_54: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_57: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_5d: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_67: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_72: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_7c: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_87: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_8a: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_8b: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_91: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_94: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_95: numpy.array((1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0), dtype=numpy.float32),
Opcode.TICK_9c: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.TICK_a5: numpy.array((1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0), dtype=numpy.float32),
Opcode.END_OF_FRAME_0: numpy.array([1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_1: numpy.array([1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_2: numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_3: numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_4: numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_5: numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_6: numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_7: numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_8: numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0], dtype=numpy.float32),
Opcode.END_OF_FRAME_9: numpy.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0], dtype=numpy.float32),
}
@ -101,47 +93,43 @@ TOGGLES = {
Opcode.TICK_03: 2,
Opcode.TICK_06: 1,
Opcode.TICK_09: 0,
Opcode.TICK_0a: 0,
Opcode.TICK_0d: 3,
Opcode.TICK_10: 2,
Opcode.TICK_13: 1,
Opcode.TICK_14: 1,
Opcode.TICK_1a: 3,
Opcode.TICK_1d: 2,
Opcode.TICK_1e: 2,
Opcode.TICK_27: 3,
Opcode.TICK_33: 2,
Opcode.TICK_36: 1,
Opcode.TICK_39: 0,
Opcode.TICK_3a: 0,
Opcode.TICK_3f: 2,
Opcode.TICK_42: 1,
Opcode.TICK_43: 1,
Opcode.TICK_4b: 2,
Opcode.TICK_4e: 1,
Opcode.TICK_4f: 1,
Opcode.TICK_57: 2,
Opcode.TICK_5a: 1,
Opcode.TICK_5b: 1,
Opcode.TICK_63: 2,
Opcode.TICK_6e: 2,
Opcode.TICK_79: 2,
Opcode.TICK_84: 1,
Opcode.TICK_87: 0,
Opcode.TICK_88: 0,
Opcode.TICK_8f: 1,
Opcode.TICK_0c: 2,
Opcode.TICK_0f: 1,
Opcode.TICK_10: 1,
Opcode.TICK_17: 2,
Opcode.TICK_1a: 1,
Opcode.TICK_1b: 1,
Opcode.TICK_23: 2,
Opcode.TICK_26: 1,
Opcode.TICK_27: 1,
Opcode.TICK_2a: 0,
Opcode.TICK_2e: 2,
Opcode.TICK_31: 1,
Opcode.TICK_32: 1,
Opcode.TICK_35: 0,
Opcode.TICK_3a: 2,
Opcode.TICK_3d: 1,
Opcode.TICK_46: 2,
Opcode.TICK_49: 1,
Opcode.TICK_4c: 0,
Opcode.TICK_51: 2,
Opcode.TICK_54: 1,
Opcode.TICK_57: 0,
Opcode.TICK_5d: 2,
Opcode.TICK_67: 2,
Opcode.TICK_72: 2,
Opcode.TICK_7c: 2,
Opcode.TICK_87: 1,
Opcode.TICK_8a: 0,
Opcode.TICK_8b: 0,
Opcode.TICK_91: 1,
Opcode.TICK_94: 0,
Opcode.TICK_95: 0,
Opcode.TICK_9c: 1,
Opcode.TICK_a5: 1,
}
EOF_OPCODES = (
Opcode.END_OF_FRAME_0,
Opcode.END_OF_FRAME_1,
Opcode.END_OF_FRAME_2,
Opcode.END_OF_FRAME_3,
Opcode.END_OF_FRAME_4,
Opcode.END_OF_FRAME_5,
Opcode.END_OF_FRAME_6,
Opcode.END_OF_FRAME_7,
Opcode.END_OF_FRAME_8,
Opcode.END_OF_FRAME_9,
)

Binary file not shown.

View File

@ -397,160 +397,76 @@ checkrecv:
JMP (WDATA) ; 6
.endproc
; 72 cycles --> 133 with tick padding
; 13 ticks is too much to parametrize
_end_of_frame:
; Save the W5100 address pointer so we can come back here later
; We know the low-order byte is 0 because Socket RX memory is page-aligned and so is 2K frame.
; IMPORTANT - from now on until we restore this below, we can't trash the Y register!
STA zpdummy ; 3
STA TICK ; 4
LDY WADRH ; 4
; Read Received Read pointer
; XXX we know what it should be though, += 8 from last time
LDA #>S0RXRD ; 2
STA TICK ; [10]
STA WADRH ; 4
LDX #<S0RXRD ; 2
STA TICK ; [10]
STX WADRL ; 4
; Update new Received Read pointer
; We have received an additional 2KB
CLC ; 2
STA TICK ; [10]
LDA RXRD ; 4
ADC #$08 ; 2
STA TICK ; [10]
STA WDATA ; 4 Store new high byte
LDX #<S0CR ; 2 prepare to reset WADRL
STA TICK ; [10]
STA RXRDZP ; 4
; Send the Receive command
LDA #SCRECV ; 2
STA TICK ; [10]
STX WADRL ; 4
LDX #<S0RXRSR ; 2 Socket 0 Received Size register
STA TICK ; [10]
STA WDATA ; 4 #SCRECV
checkrecv:
LDA #$07 ; 2
; we might loop an unknown number of times here waiting for data but the default should be to fall
; straight through
@0:
STA TICK ; [10]
STX WADRL ; 4 #<S0RXRSR
NOP ; 2
STA TICK ; [10]
CMP WDATA ; 4 High byte of received size
BCS @0 ; 2 in common case when there is already sufficient data waiting.
STA TICK ; [10]
; point W5100 back into the RX buffer where we left off
; There is data to read - we don't care exactly how much because it's at least 2K
;
; Restore W5100 address pointer where we last found it.
;
; It turns out that the W5100 automatically wraps the address pointer at the end of the 8K RX/TX buffers
; Since we're using an 8K socket, that means we don't have to do any work to manage the read pointer!
STY WADRH ; 4
LDX #$00 ; 2
STA TICK ; [10]
STX WADRL ; 4
NOP ; 2
STA TICK ; [10]
JMP (WDATA) ; 6
; frame trampoline
LDX WDATA ; 4
STA @0+2 ; 4
@0:
JMP ($xx00) ; 6 - 7 bit index table
; 72 cycles --> 133 with tick padding
; 13 ticks is too much to parametrize with 8 bits
;
; splitting still requires 9 + 8 ticks, can't fit in 7-bit jump table
_end_of_frame:
; Save the W5100 address pointer so we can come back here later
; We know the low-order byte is 0 because Socket RX memory is page-aligned and so is 2K frame.
; IMPORTANT - from now on until we restore this below, we can't trash the Y register!
STA zpdummy ; 3
STA TICK ; 4
LDY WADRH ; 4
; Read Received Read pointer
; XXX we know what it should be though, += 8 from last time
LDA #>S0RXRD ; 2
STA TICK ; [10]
STA WADRH ; 4
LDX #<S0RXRD ; 2
STA TICK ; [10]
STX WADRL ; 4
; Update new Received Read pointer
; We have received an additional 2KB
CLC ; 2 - XXX maybe can assume
STA TICK ; [10]
LDA RXRD ; 4 - could use ZP but that would mess up our tick offsets
ADC #$08 ; 2
STA TICK ; [10]
STA WDATA ; 4 Store new high byte
LDX #<S0CR ; 2 prepare to reset WADRL
STA TICK ; [10]
STA RXRDZP ; 4
NOP ; 2
STA TICK ; [10]
STY WADRH ; 4
LDX #$00 ; 2
STA TICK ; [10]
STX WADRL ; 4
NOP ; 2
STA TICK ; [10]
JMP (WDATA) ; 6
_end_of_frame2:
STA zpdummy ; 3
STA TICK ; 4
LDY WADRH ; 4
; Send the Receive command
LDA #SCRECV ; 2
STA TICK ; [10]
STX WADRL ; 4 #<S0CR
LDX #<S0RXRSR ; 2 Socket 0 Received Size register
STA TICK ; [10]
STA WDATA ; 4 #SCRECV
checkrecv:
LDA #$07 ; 2
; we might loop an unknown number of times here waiting for data but the default should be to fall
; straight through
@0:
STA TICK ; [10]
STX WADRL ; 4 #<S0RXRSR
NOP ; 2
STA TICK ; [10]
CMP WDATA ; 4 High byte of received size
BCS @0 ; 2 in common case when there is already sufficient data waiting.
STA TICK ; [10]
; point W5100 back into the RX buffer where we left off
; There is data to read - we don't care exactly how much because it's at least 2K
;
; Restore W5100 address pointer where we last found it.
;
; It turns out that the W5100 automatically wraps the address pointer at the end of the 8K RX/TX buffers
; Since we're using an 8K socket, that means we don't have to do any work to manage the read pointer!
STY WADRH ; 4
LDX #$00 ; 2
STA TICK ; [10]
STX WADRL ; 4
NOP ; 2
STA TICK ; [10]
JMP (WDATA) ; 6
;; 72 cycles --> 133 with tick padding
;; 13 ticks is too much to parametrize
;_end_of_frame:
; ; Save the W5100 address pointer so we can come back here later
; ; We know the low-order byte is 0 because Socket RX memory is page-aligned and so is 2K frame.
; ; IMPORTANT - from now on until we restore this below, we can't trash the Y register!
; STA zpdummy ; 3
; STA TICK ; 4
; LDY WADRH ; 4
;
; ; Read Received Read pointer
; ; XXX we know what it should be though, += 8 from last time
;
; LDA #>S0RXRD ; 2
; STA TICK ; [10]
; STA WADRH ; 4
; LDX #<S0RXRD ; 2
; STA TICK ; [10]
; STX WADRL ; 4
;
; ; Update new Received Read pointer
; ; We have received an additional 2KB
; CLC ; 2
; STA TICK ; [10]
; LDA RXRD ; 4
; ADC #$08 ; 2
; STA TICK ; [10]
; STA WDATA ; 4 Store new high byte
; LDX #<S0CR ; 2 prepare to reset WADRL
; STA TICK ; [10]
; STA RXRDZP ; 4
;
; ; Send the Receive command
; LDA #SCRECV ; 2
; STA TICK ; [10]
; STX WADRL ; 4
; LDX #<S0RXRSR ; 2 Socket 0 Received Size register
; STA TICK ; [10]
; STA WDATA ; 4 #SCRECV
;
;checkrecv:
; LDA #$07 ; 2
; ; we might loop an unknown number of times here waiting for data but the default should be to fall
; ; straight through
;@0:
; STA TICK ; [10]
; STX WADRL ; 4 #<S0RXRSR
; NOP ; 2
; STA TICK ; [10]
; CMP WDATA ; 4 High byte of received size
; BCS @0 ; 2 in common case when there is already sufficient data waiting.
; STA TICK ; [10]
; ; point W5100 back into the RX buffer where we left off
; ; There is data to read - we don't care exactly how much because it's at least 2K
; ;
; ; Restore W5100 address pointer where we last found it.
; ;
; ; It turns out that the W5100 automatically wraps the address pointer at the end of the 8K RX/TX buffers
; ; Since we're using an 8K socket, that means we don't have to do any work to manage the read pointer!
; STY WADRH ; 4
; LDX #$00 ; 2
; STA TICK ; [10]
; STX WADRL ; 4
; NOP ; 2
; STA TICK ; [10]
; JMP (WDATA) ; 6
;
;; frame trampoline
; LDX WDATA ; 4
; STA @0+2 ; 4
;@0:
; JMP ($xx00) ; 6 - 7 bit index table

View File

@ -1,118 +1,132 @@
tick_00: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
tick_00: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_03: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
tick_03: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_06: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
tick_06: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_09: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
tick_0a: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
tick_09: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
JMP (WDATA)
tick_0d: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
tick_0c: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_10: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_13: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
tick_14: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
JMP (WDATA)
tick_1a: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_1d: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
tick_1e: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
STA $C030
JMP (WDATA)
tick_27: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
STA $C030
STA $C030
JMP (WDATA)
tick_33: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_36: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_39: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
tick_3a: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
NOP
JMP (WDATA)
tick_3f: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_42: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
tick_43: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
NOP
NOP
JMP (WDATA)
tick_4b: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_4e: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
tick_4f: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
STA $C030
NOP
JMP (WDATA)
tick_57: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_5a: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
tick_5b: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
tick_0f: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
tick_10: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
STA $C030
JMP (WDATA)
tick_63: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_17: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_1a: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
tick_1b: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA zpdummy
STA $C030
JMP (WDATA)
tick_23: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_26: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
tick_27: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_2a: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
JMP (WDATA)
tick_6e: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
tick_2e: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_31: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
NOP
tick_32: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_35: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA zpdummy
JMP (WDATA)
tick_3a: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_3d: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA zpdummy
STA $C030
NOP
JMP (WDATA)
tick_79: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
tick_46: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_49: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_4c: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
NOP
JMP (WDATA)
tick_51: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
tick_54: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_57: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
STA zpdummy
JMP (WDATA)
tick_5d: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
NOP
STA $C030
JMP (WDATA)
tick_84: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
tick_67: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
STA zpdummy
STA $C030
JMP (WDATA)
tick_72: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
STA $C030
tick_87: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
tick_88: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
JMP (WDATA)
tick_7c: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
STA $C030
STA $C030
STA zpdummy
JMP (WDATA)
tick_87: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_8a: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
tick_8b: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
NOP
NOP
JMP (WDATA)
tick_8f: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
tick_91: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
tick_94: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
tick_95: ; voltages (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
NOP
NOP
STA zpdummy
JMP (WDATA)
tick_9c: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
NOP
NOP
NOP
JMP (WDATA)
; 153 bytes
tick_a5: ; voltages (1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0)
STA $C030
NOP
NOP
STA zpdummy
JMP (WDATA)
; 175 bytes