mirror of
https://github.com/thrust26/6502-QR-code-generator.git
synced 2024-12-27 19:29:35 +00:00
fixed last commit
This commit is contained in:
parent
7dcaaa5c80
commit
58e1551ad7
@ -178,4 +178,8 @@ FirstIdxTbl ; for 25 pixel
|
|||||||
ds 7, 0
|
ds 7, 0
|
||||||
.byte $01
|
.byte $01
|
||||||
ds 7, 0
|
ds 7, 0
|
||||||
.byte $bf
|
IF QR_VERSION = 1 || QR_VERSION = 2
|
||||||
|
.byte $bf ; 1st format bit is 1
|
||||||
|
ELSE
|
||||||
|
.byte $3f ; 1st format bit is 0
|
||||||
|
ENDIF
|
||||||
|
@ -424,7 +424,7 @@ QR_TOTAL = QR_MAX_DATA + QR_DEGREE ; 44
|
|||||||
MAC _DRAW_FORMAT
|
MAC _DRAW_FORMAT
|
||||||
;-----------------------------------------------------------
|
;-----------------------------------------------------------
|
||||||
IF QR_SINGLE_MASK
|
IF QR_SINGLE_MASK
|
||||||
IF QR_VERSION = 2 || QR_VERSION = 3
|
IF QR_VERSION = 3 || QR_VERSION = 4
|
||||||
; invert 1st pixel of 1st copy (bit 0 not set in formats Q and H)
|
; invert 1st pixel of 1st copy (bit 0 not set in formats Q and H)
|
||||||
ldy #0
|
ldy #0
|
||||||
ldx #QR_SIZE-9
|
ldx #QR_SIZE-9
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
; + apply pattern
|
; + apply pattern
|
||||||
; x evaluate pattern (very slow!)
|
; x evaluate pattern (very slow!)
|
||||||
; + optimize single pattern for space
|
; + optimize single pattern for space
|
||||||
; - support multiple QR code versions
|
; x support multiple QR code versions
|
||||||
; o support multiple QR code levels
|
; o support multiple QR code levels
|
||||||
; - try to optimize function pattern (SetPixel)
|
; x try to optimize function pattern (SetPixel)
|
||||||
; x add logo (does NOT work for such small sizes)
|
; x add logo (does NOT work for such small sizes)
|
||||||
|
|
||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
@ -38,9 +38,9 @@ NTSC = 1
|
|||||||
|
|
||||||
; QR Code Generator Switches
|
; QR Code Generator Switches
|
||||||
QR_VERSION = 2 ; 1, 2 or 3 (TODO 1 and 3)
|
QR_VERSION = 2 ; 1, 2 or 3 (TODO 1 and 3)
|
||||||
QR_LEVEL = 1 ; 0 (L), 1 (M), 2 (Q) and 3 (H)
|
QR_LEVEL = 1 ; 0 (L) or 1 (M) (TODO: 2 (Q) and 3 (H))
|
||||||
QR_OVERLAP = 1 ; overlaps input and output data to save RAM (0 not tested!)
|
QR_OVERLAP = 1 ; overlaps input and output data to save RAM (0 not tested!)
|
||||||
QR_SINGLE_MASK = 0 ; (-248) if 1 uses only 1 of the 8 mask pattern
|
QR_SINGLE_MASK = 1 ; (-255) if 1 uses only 1 of the 8 mask pattern
|
||||||
QR_PADDING = 1 ; (+22) add padding bytes
|
QR_PADDING = 1 ; (+22) add padding bytes
|
||||||
|
|
||||||
IF QR_VERSION = 1 || QR_VERSION = 3
|
IF QR_VERSION = 1 || QR_VERSION = 3
|
||||||
@ -245,13 +245,14 @@ DrawScreen SUBROUTINE
|
|||||||
; the QR code kernel
|
; the QR code kernel
|
||||||
.loopKernel ; @55
|
.loopKernel ; @55
|
||||||
lda FirstIdxTbl,x ; 4*
|
lda FirstIdxTbl,x ; 4*
|
||||||
bne .newFirst ; 2/3
|
cmp #1
|
||||||
|
bcs .newFirst ; 2/3
|
||||||
lsr .tmpFirst ; 5
|
lsr .tmpFirst ; 5
|
||||||
bpl .endFirst ; 3 = 14 unconditional
|
bpl .endFirst ; 3 = 14 unconditional
|
||||||
|
|
||||||
.newFirst ; @62
|
.newFirst ; @62
|
||||||
; $bf | $01 | $fe
|
; $bf/$3f | $01 | $fe
|
||||||
bmi .enterLoop ; 2/3
|
bne .enterLoop ; 2/3
|
||||||
lda firstMsl ; 3
|
lda firstMsl ; 3
|
||||||
.enterLoop
|
.enterLoop
|
||||||
sta .tmpFirst ; 3 = 7
|
sta .tmpFirst ; 3 = 7
|
||||||
|
Loading…
Reference in New Issue
Block a user