LEN_BITS0 = 1
# long (16-bit) pointer
-DIST_BITS1 = 11
-LEN_BITS1 = 5
+DIST_BITS1 = 10
+LEN_BITS1 = 6
MAX_DIST = (1 << DIST_BITS1) # distance codes are 1..MAX_DIST
MAX_LEN = (1 << LEN_BITS1) + 1 # length codes are 2..MAX_LEN
else:
#print('a', lzss[-1])
bin.append(lzss.pop())
-assert len(lzss) == 0xb4
+assert len(lzss) == 0xb3
bin = bin[::-1]
load_size = len(bin)
LEN_BITS0 = 1
# long (16-bit) pointer
-DIST_BITS1 = 11
-LEN_BITS1 = 5
+DIST_BITS1 = 10
+LEN_BITS1 = 6
MAX_DIST = (1 << DIST_BITS1) # distance codes are 1..MAX_DIST
MAX_LEN = (1 << LEN_BITS1) + 1 # length codes are 2..MAX_LEN
with open(lzss_loader_bin, 'rb') as fin:
lzss_loader = list(fin.read())
-assert len(lzss_loader) == 0xb4
+assert len(lzss_loader) == 0xb3
with open(in_bin, 'rb') as fin:
data = list(fin.read())
bcc pointer
long_pointer:
- ; high of long pointer, lllllddd
+ ; high of long pointer, lllllldd
tax
- and #7
+ and #3
sta dist + 1
lda src
txa
lsr a
lsr a
- lsr a
tay
pointer: ; dist set up, y = len - 2