mirror of
https://github.com/thrust26/6502-QR-code-generator.git
synced 2024-06-16 08:29:35 +00:00
slightly improved instructions
This commit is contained in:
parent
dde07790ba
commit
c53631ec25
|
@ -502,8 +502,11 @@ DrawPattern SUBROUTINE
|
||||||
ldy .right1
|
ldy .right1
|
||||||
dey
|
dey
|
||||||
dey
|
dey
|
||||||
; bpl .loopRight ; unconditional!
|
IF QR_OVERLAP
|
||||||
jmp .loopRight ; unconditional!
|
jmp .loopRight
|
||||||
|
ELSE
|
||||||
|
bpl .loopRight ; unconditional!
|
||||||
|
ENDIF
|
||||||
; } // for right
|
; } // for right
|
||||||
.exitDraw
|
.exitDraw
|
||||||
ENDM
|
ENDM
|
||||||
|
@ -977,7 +980,11 @@ FormatHi
|
||||||
; positions of the 15 type information bits
|
; positions of the 15 type information bits
|
||||||
FormatX1
|
FormatX1
|
||||||
.byte 0, 1, 2, 3, 4, 5, 7, 8
|
.byte 0, 1, 2, 3, 4, 5, 7, 8
|
||||||
.byte 8, 8, 8, 8, 8, 8, 8
|
; ds 7, 8 ; shared
|
||||||
|
FormatX2
|
||||||
|
ds 7, 8
|
||||||
|
.byte QR_SIZE-8, QR_SIZE-7, QR_SIZE-6, QR_SIZE-5
|
||||||
|
.byte QR_SIZE-4, QR_SIZE-3, QR_SIZE-2, QR_SIZE-1
|
||||||
FormatY2
|
FormatY2
|
||||||
.byte 0, 1, 2, 3, 4, 5, 6
|
.byte 0, 1, 2, 3, 4, 5, 6
|
||||||
; ds 8, QR_SIZE-9 ; shared
|
; ds 8, QR_SIZE-9 ; shared
|
||||||
|
@ -985,10 +992,6 @@ FormatY1
|
||||||
ds 8, QR_SIZE-9
|
ds 8, QR_SIZE-9
|
||||||
.byte QR_SIZE-8, QR_SIZE-6, QR_SIZE-5, QR_SIZE-4
|
.byte QR_SIZE-8, QR_SIZE-6, QR_SIZE-5, QR_SIZE-4
|
||||||
.byte QR_SIZE-3, QR_SIZE-2, QR_SIZE-1
|
.byte QR_SIZE-3, QR_SIZE-2, QR_SIZE-1
|
||||||
FormatX2
|
|
||||||
ds 7, 8
|
|
||||||
.byte QR_SIZE-8, QR_SIZE-7, QR_SIZE-6, QR_SIZE-5
|
|
||||||
.byte QR_SIZE-4, QR_SIZE-3, QR_SIZE-2, QR_SIZE-1
|
|
||||||
ENDIF ; /QR_SINGLE_MASK = 0 || QR_DIRECT_DRAW = 0
|
ENDIF ; /QR_SINGLE_MASK = 0 || QR_DIRECT_DRAW = 0
|
||||||
|
|
||||||
BitMask
|
BitMask
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
; + optimize single pattern for space
|
; + optimize single pattern for space
|
||||||
; x support multiple QR code versions
|
; x support multiple QR code versions
|
||||||
; o support multiple QR code levels
|
; o support multiple QR code levels
|
||||||
; x try to optimize function pattern (SetPixel)
|
; + 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)
|
||||||
|
|
||||||
;---------------------------------------------------------------
|
;---------------------------------------------------------------
|
||||||
|
@ -58,6 +58,7 @@ QR_SPRITE_GFX = 1 ; display playfield or sprite graphics
|
||||||
ERR
|
ERR
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
;===============================================================================
|
;===============================================================================
|
||||||
; C O N S T A N T S
|
; C O N S T A N T S
|
||||||
;===============================================================================
|
;===============================================================================
|
||||||
|
@ -515,14 +516,14 @@ InitDemo SUBROUTINE
|
||||||
sta NUSIZ0
|
sta NUSIZ0
|
||||||
sta VDELP1
|
sta VDELP1
|
||||||
|
|
||||||
ldx #$3f
|
ldx #$6f
|
||||||
stx HMP0
|
stx HMP0
|
||||||
inx
|
inx
|
||||||
stx HMP1
|
stx HMP1
|
||||||
lda #$a0
|
lda #$d0
|
||||||
sta HMM1
|
sta HMM1
|
||||||
|
|
||||||
SLEEP 5
|
SLEEP 4
|
||||||
|
|
||||||
sta RESM1
|
sta RESM1
|
||||||
sta RESP0
|
sta RESP0
|
||||||
|
@ -811,7 +812,7 @@ _QR_TOTAL SET _QR_TOTAL + . - FunctionModulesData
|
||||||
|
|
||||||
QR_CODE_DATA
|
QR_CODE_DATA
|
||||||
|
|
||||||
.byte " QR Code Generator Demo V0.4 - (C)2021 Thomas Jentzsch "
|
.byte " QR Code Generator Demo V0.5 - (C)2021 Thomas Jentzsch "
|
||||||
|
|
||||||
; messages MUST NOT be longer than 26 bytes for version 2, level M!
|
; messages MUST NOT be longer than 26 bytes for version 2, level M!
|
||||||
MessageTbl
|
MessageTbl
|
||||||
|
|
|
@ -22,16 +22,15 @@ Instructions:
|
||||||
4. Implement two subroutines:
|
4. Implement two subroutines:
|
||||||
- GetPixel: checks the pixel at position x (Y), y (X), returns Z = 1 if not set
|
- GetPixel: checks the pixel at position x (Y), y (X), returns Z = 1 if not set
|
||||||
- InvertPixel: inverts the pixel at position x (Y), y (X)
|
- InvertPixel: inverts the pixel at position x (Y), y (X)
|
||||||
|
Note: Both routines MUST NOT change X and Y registers!
|
||||||
|
|
||||||
5. Add the macros GEN_QR_CODE and QR_CODE_DATA to your code area
|
5. Add message text using the START_MSG, n x ADD_MSG_BYTE, STOP_MSG
|
||||||
|
|
||||||
6. Add message text using the START_MSG, n x ADD_MSG_BYTE, STOP_MSG
|
6. Set qrPattern to 0..7 (chosing a mask pattern)
|
||||||
|
|
||||||
7. Set qrPattern to 0..7 (chosing a mask pattern)
|
7. Use the GEN_QR_CODE and QR_CODE_DATA macros
|
||||||
|
|
||||||
8. Call the GEN_QR_CODE macro
|
8. Draw the generated QR code bitmap
|
||||||
|
|
||||||
9. Draw the generated QR code bitmap
|
|
||||||
|
|
||||||
That's all! :)
|
That's all! :)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user