slightly improved instructions

This commit is contained in:
thrust26 2021-04-16 08:33:57 +02:00
parent dde07790ba
commit c53631ec25
3 changed files with 21 additions and 18 deletions

View File

@ -502,8 +502,11 @@ DrawPattern SUBROUTINE
ldy .right1
dey
dey
; bpl .loopRight ; unconditional!
jmp .loopRight ; unconditional!
IF QR_OVERLAP
jmp .loopRight
ELSE
bpl .loopRight ; unconditional!
ENDIF
; } // for right
.exitDraw
ENDM
@ -977,7 +980,11 @@ FormatHi
; positions of the 15 type information bits
FormatX1
.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
.byte 0, 1, 2, 3, 4, 5, 6
; ds 8, QR_SIZE-9 ; shared
@ -985,10 +992,6 @@ FormatY1
ds 8, QR_SIZE-9
.byte QR_SIZE-8, QR_SIZE-6, QR_SIZE-5, QR_SIZE-4
.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
BitMask

View File

@ -12,7 +12,7 @@
; + optimize single pattern for space
; x support multiple QR code versions
; 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)
;---------------------------------------------------------------
@ -58,6 +58,7 @@ QR_SPRITE_GFX = 1 ; display playfield or sprite graphics
ERR
ENDIF
;===============================================================================
; C O N S T A N T S
;===============================================================================
@ -515,14 +516,14 @@ InitDemo SUBROUTINE
sta NUSIZ0
sta VDELP1
ldx #$3f
ldx #$6f
stx HMP0
inx
stx HMP1
lda #$a0
lda #$d0
sta HMM1
SLEEP 5
SLEEP 4
sta RESM1
sta RESP0
@ -811,7 +812,7 @@ _QR_TOTAL SET _QR_TOTAL + . - FunctionModulesData
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!
MessageTbl

View File

@ -22,16 +22,15 @@ Instructions:
4. Implement two subroutines:
- 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)
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
9. Draw the generated QR code bitmap
8. Draw the generated QR code bitmap
That's all! :)