fix some bugs with unpacking literal chars
This commit is contained in:
1 parent
d8c236009d
commit
54b0cff2fd
2 files changed
+13
-4
No files matched your search
@@ -107,7 +107,6 @@ end_string_if_required:
|
|||||||
|
|
||||||
end_string:
|
end_string:
|
||||||
;; Write end of string sequence if required
|
;; Write end of string sequence if required
|
||||||
inc $d020
|
|
||||||
lda #$00
|
lda #$00
|
||||||
jsr write_unpacked_char
|
jsr write_unpacked_char
|
||||||
rts
|
rts
|
||||||
|
|||||||
@@ -115,8 +115,10 @@ next_packed_word_char:
|
|||||||
lda (temp_string_ptr),y
|
lda (temp_string_ptr),y
|
||||||
cmp #$00
|
cmp #$00
|
||||||
beq end_of_packed_word
|
beq end_of_packed_word
|
||||||
|
cmp #$fe
|
||||||
|
beq last_literal
|
||||||
and #$f0
|
and #$f0
|
||||||
beq end_of_packed_word
|
beq end_of_packed_word
|
||||||
|
|
||||||
;; Check if it is an uncommon char
|
;; Check if it is an uncommon char
|
||||||
lda (temp_string_ptr),y
|
lda (temp_string_ptr),y
|
||||||
@@ -189,7 +191,15 @@ end_of_packed_word:
|
|||||||
;; Hit end of packed data
|
;; Hit end of packed data
|
||||||
rts
|
rts
|
||||||
|
|
||||||
next_is_literal_char:
|
last_literal:
|
||||||
|
jsr unpack_literal_char
|
||||||
|
rts
|
||||||
|
|
||||||
|
next_is_literal_char:
|
||||||
|
jsr unpack_literal_char
|
||||||
|
jmp ready_for_next_char
|
||||||
|
|
||||||
|
unpack_literal_char:
|
||||||
;; Output the literal char, and ready for next char
|
;; Output the literal char, and ready for next char
|
||||||
iny
|
iny
|
||||||
tya
|
tya
|
||||||
@@ -198,7 +208,7 @@ next_is_literal_char:
|
|||||||
jsr $ffd2
|
jsr $ffd2
|
||||||
pla
|
pla
|
||||||
tay
|
tay
|
||||||
jmp ready_for_next_char
|
rts
|
||||||
|
|
||||||
is_uncommon_char:
|
is_uncommon_char:
|
||||||
;; Lower nybl has offset into low-frequency part of the table
|
;; Lower nybl has offset into low-frequency part of the table
|
||||||
|
|||||||
Reference in new issue
Block a user