From 511ddefc08161125b78e81d7444900150ad21980 Mon Sep 17 00:00:00 2001 From: "Peter Helcmanovsky (Ped)" Date: Wed, 14 Sep 2022 00:01:51 +0200 Subject: [PATCH] z80_unpacker: optimisations: -4T per offset/length bit decoded making the 256-alignment of probs array even more baked-in, but there was no real chance to get rid of that any way --- z80_unpacker/unpack.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/z80_unpacker/unpack.asm b/z80_unpacker/unpack.asm index 587d88f..7167242 100644 --- a/z80_unpacker/unpack.asm +++ b/z80_unpacker/unpack.asm @@ -270,11 +270,11 @@ decode_length: ld de,$7FFF ; length = 0 with positional-stop-bit jr .loop_entry .loop: - inc bc ; context_index + 1 ; TODO can be just `inc c` for 257.. and 257+64.. contexts + inc c ; context_index + 1 call decode_bit rr d rr e ; DE = length = (length >> 1) | (bit << 15); - inc bc ; context_index += 2 ; TODO can be just `inc c` for 257.. and 257+64.. contexts + inc c ; context_index += 2 .loop_entry: call decode_bit jr c,.loop