mirror of
https://github.com/thrust26/6502-QR-code-generator.git
synced 2024-09-29 13:54:28 +00:00
8c04c30b55
refined constants and variables
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
6502 QR Code Generator - (C)2021 Thomas Jentzsch
|
|
|
|
Instructions:
|
|
|
|
1. Include QRCodeGen.inc into the code area of your own code
|
|
|
|
2. Define the following constants:
|
|
- QR_VERSION = 1..3 ; QR code size (21, 25, 29)
|
|
- QR_LEVEL = 0..3 ; error correction levels L, M, Q, H
|
|
- QR_PADDING = 0|1 ; add padding bytes add the end of test message text
|
|
- QR_GENERATE = 0|1 ; generate Reed-Solomon ECC generator polynomial on-the-fly
|
|
; else use built-in table
|
|
|
|
3. Define memory for code generation and displayed bitmap:
|
|
- qrTmpVars ds 9
|
|
- qrData ds QR_TOTAL
|
|
- qrPattern ds 1
|
|
- qrGenerator ds QR_DEGREE (only required if QR_GENERATE = 1)
|
|
- bitmap depends on platform
|
|
|
|
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)
|
|
|
|
5. Add the macros GEN_QR_CODE and QR_CODE_DATA to your code area
|
|
|
|
6. Add message text using the START_MSG, n x ADD_MSG_BYTE, STOP_MSG
|
|
|
|
7. Set qrPattern to 0..15 (chosing a mask pattern)
|
|
|
|
8. Call the GEN_QR_CODE macro
|
|
|
|
9. Draw the generated QR code bitmap
|
|
|
|
That's all! :)
|
|
|