From 45b91ddaa25591af47149bdb5a357b6487d3fbb7 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Mon, 6 Jan 2020 22:24:07 -0800 Subject: [PATCH] fasterer v2 --- asm/6502/decompress_faster_v2.asm | 108 +++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 3 deletions(-) diff --git a/asm/6502/decompress_faster_v2.asm b/asm/6502/decompress_faster_v2.asm index 916da90..a82705b 100644 --- a/asm/6502/decompress_faster_v2.asm +++ b/asm/6502/decompress_faster_v2.asm @@ -10,7 +10,7 @@ ; Optional code is presented for two minor 6502 optimizations that break ; compatibility with the current LZSA2 format standard. ; -; The code is 241 bytes for the small version, and 256 bytes for the normal. +; The code is 241 bytes for the small version, and 268 bytes for the normal. ; ; Copyright John Brandwood 2019. ; @@ -85,6 +85,13 @@ LZSA_SHORT_CP = 1 LZSA_FROM_BANK = 0 + ; + ; We will read from or write to $FFFF. This prevents the + ; use of the "INC ptrhi / BNE" trick and reduces speed. + ; + +LZSA_USE_FFFF = 0 + ; ; Macro to increment the source pointer to the next page. ; @@ -190,13 +197,41 @@ DECOMPRESS_LZSA2_FAST: lzsa2_unpack: ldy #0 ; Initialize source index. sty