mirror of
https://github.com/emmanuel-marty/lzsa.git
synced 2024-11-29 20:49:25 +00:00
cut one byte
This commit is contained in:
parent
925e435e53
commit
22e2f80ae7
@ -10,7 +10,7 @@
|
|||||||
; Optional code is presented for two minor 6502 optimizations that break
|
; Optional code is presented for two minor 6502 optimizations that break
|
||||||
; compatibility with the current LZSA2 format standard.
|
; 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.
|
; Copyright John Brandwood 2019.
|
||||||
;
|
;
|
||||||
@ -399,8 +399,8 @@ lzsa2_unpack: ldy #0 ; Initialize source index.
|
|||||||
cpx #$00 ; X=$FF for a 5-bit offset.
|
cpx #$00 ; X=$FF for a 5-bit offset.
|
||||||
bne .set_offset
|
bne .set_offset
|
||||||
sbc #2 ; Subtract 512 because 13-bit
|
sbc #2 ; Subtract 512 because 13-bit
|
||||||
tax ; offset starts at $FE00.
|
; offset starts at $FE00.
|
||||||
bne .get_low8 ; Always NZ from previous TAX.
|
bne .get_low8x ; Always NZ from previous SBC.
|
||||||
|
|
||||||
.get_9_bits: dex ; X=$FF if CS, X=$FE if CC.
|
.get_9_bits: dex ; X=$FF if CS, X=$FE if CC.
|
||||||
asl
|
asl
|
||||||
@ -422,7 +422,8 @@ lzsa2_unpack: ldy #0 ; Initialize source index.
|
|||||||
;
|
;
|
||||||
|
|
||||||
.get_16_bits: jsr lzsa2_get_byte ; Get hi-byte of offset.
|
.get_16_bits: jsr lzsa2_get_byte ; Get hi-byte of offset.
|
||||||
tax
|
|
||||||
|
.get_low8x: tax
|
||||||
|
|
||||||
.get_low8:
|
.get_low8:
|
||||||
!if (LZSA_FROM_BANK | LZSA_NO_INLINE | LZSA_USE_FFFF) {
|
!if (LZSA_FROM_BANK | LZSA_NO_INLINE | LZSA_USE_FFFF) {
|
||||||
|
Loading…
Reference in New Issue
Block a user