From b258ed441ac28f60afed0e287654a91b3b0c5607 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Sat, 2 Sep 2023 11:30:15 -0700 Subject: [PATCH] decompress faster --- Platform/Apple/virtual/src/core/decomp.s | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Platform/Apple/virtual/src/core/decomp.s b/Platform/Apple/virtual/src/core/decomp.s index a83ef764..468c15fb 100644 --- a/Platform/Apple/virtual/src/core/decomp.s +++ b/Platform/Apple/virtual/src/core/decomp.s @@ -33,8 +33,9 @@ DEBUG = 0 decomp !zone { jsr .chkdst ldy #0 ; In lit loop Y must be zero + sec .fill1A jsr .getbt2 - jmp .fill1B + bne .fill1B ; always taken .incdst inc pDst+1 .chkdst ldx pDst+1 @@ -174,19 +175,19 @@ decomp !zone { bne .gshift ; always taken ; Get another 8 bits into our bit buffer. Destroys X. Preserves A. Requires Y=0. +; Carry is always set on entry, Z always clear on exit ; Alternately, use .getbt2 to preserve X and destroy A .getbts tax .getbt2 lda (pSrc),y - inc pSrc - beq .src3A -.src3B sec rol sta bits txa + inc pSrc + beq .src3A rts .src3A inc pSrc+1 - bne .src3B ; always taken + rts } ; end of zone