Merge pull request #40 from peterferrie/master

cut one byte
This commit is contained in:
Emmanuel Marty 2020-01-08 10:26:29 +01:00 committed by GitHub
commit 315cda7b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 268 bytes for the normal.
; The code is 241 bytes for the small version, and 267 bytes for the normal.
;
; Copyright John Brandwood 2019.
;
@ -74,11 +74,11 @@ LZSA_NO_INLINE = 0
!if LZSA_SMALL_SIZE {
LZSA_SHORT_CP = 1
} else {
LZSA_SHORT_CP = 1
LZSA_SHORT_CP = 0
}
;
; Assume that we're decompessing from a large multi-bank
; Assume that we're decompressing from a large multi-bank
; compressed data file, and that the next bank may need to
; paged in when a page-boundary is crossed.
;
@ -399,8 +399,8 @@ lzsa2_unpack: ldy #0 ; Initialize source index.
cpx #$00 ; X=$FF for a 5-bit offset.
bne .set_offset
sbc #2 ; Subtract 512 because 13-bit
tax ; offset starts at $FE00.
bne .get_low8 ; Always NZ from previous TAX.
; offset starts at $FE00.
bne .get_low8x ; Always NZ from previous SBC.
.get_9_bits: dex ; X=$FF if CS, X=$FE if CC.
asl
@ -422,7 +422,8 @@ lzsa2_unpack: ldy #0 ; Initialize source index.
;
.get_16_bits: jsr lzsa2_get_byte ; Get hi-byte of offset.
tax
.get_low8x: tax
.get_low8:
!if (LZSA_FROM_BANK | LZSA_NO_INLINE | LZSA_USE_FFFF) {