QR Code version 1
QR Code version 1
Hi All,
I've written a QR Code version 1 generator in Z80 assembly, along with a plotter for the ZX81: https://github.com/leiradel/qrc1
QR Code version 1 can encode 14 bytes of information. There's a PR which I'm changing a bit with a version 11 generator, capable of encoding messages with up to 251 bytes. Unfortunately it's too big for the humble ZX81, but a ZX Spectrum plotter will be included.
If you use QR Codes in your programs I'd love to hear about it.
Cheers,
Andre
I've written a QR Code version 1 generator in Z80 assembly, along with a plotter for the ZX81: https://github.com/leiradel/qrc1
QR Code version 1 can encode 14 bytes of information. There's a PR which I'm changing a bit with a version 11 generator, capable of encoding messages with up to 251 bytes. Unfortunately it's too big for the humble ZX81, but a ZX Spectrum plotter will be included.
If you use QR Codes in your programs I'd love to hear about it.
Cheers,
Andre
Re: QR Code version 1
Nice - what resolution would be needed for a bigger QR code ?
Re: QR Code version 1
Hi,
http://abandonlistings.free.fr/microsys ... HR_n33.zip
Or my printer driver to store 4 graphics screen (low res), and print them to the printer (one full inverted space=2x2 pixel square)…
http://zx81.ordi5.free.fr/xavsnap/downl ... ER_HRG.zip
For the Zx81 display, but you can throw the HR QRcode, directly to the ZxPrinter… from an array.big for the humble ZX81
http://abandonlistings.free.fr/microsys ... HR_n33.zip
Or my printer driver to store 4 graphics screen (low res), and print them to the printer (one full inverted space=2x2 pixel square)…
http://zx81.ordi5.free.fr/xavsnap/downl ... ER_HRG.zip
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: QR Code version 1
Not sure what you're trying to do, the machine code cannot be relocated as it uses some absolute addresses, but you've added a line before the QR Code routines that live in line 10:
Code: Select all
0 REM #5 ?)# U#RND RETURN #C- RETURN #C) RETURN #C� RETURN #ASN aINKEY$ RETURN #ASN PAUSE INKEY$/#;;;63INKEY$E�RND7INKEY$2 #k#U9I
NKEY$ RETURN
8215 INKEY$)S ;63INKEY$E7INKEY$7INKEY$/ LLIST A2I NEW # RETURN C#VAL ?)# ;( CLEAR AT LN ?INKEY$LN ?INKEY$ACS kC#LN ?INKEY$LN ?INKE
Y$ACS ?C#LN #INKEY$)# ;LN ?INKEY$LN ?INKEY$ACS kC#LN $INKEY$LN ?INKEY$ACS ?C#LN -INKEY$E7INKEY$7INKEY$#?TAB uRNDE3INKEY$U5INKEY$?)4
;U6INKEY$? GOSUB ?763INKEY$E7INKEY$ TAB uRNDTAN U9INKEY$ACS kC#U5INKEY$ACS *ACS *ACS #ACS ?M5INKEY$TAN U6INKEY$ACS *ACS *ACS #ACS ?M
6INKEY$TAN U5INKEY$ACS INT M5INKEY$TAN U5INKEY$ACS SIN M5INKEY$TAN U6INKEY$ACS INT M6INKEY$TAN U6INKEY$ACS SIN M6INKEY$TAN ;? #? LN
SCROLL #5 ?-K: 24?PEEK CLS <= CLS #K CLS #"( RETURN ##STR$ ?*ACS 73l?<= CLS NEW #C IF ?PEEK CLS ( LOAD SGN 714 NEW <= CLS NEW #C IF
+C#? RETURN #4ASN :#/LEN Y#PEEK CLS LN ##TAN Q )#?# # GOSUB kTAN
1 REM
10 DIM Z$(1,14)
15 LET MAKEQR=16901
20 FAST
30 CLS
40 PRINT AT 0,0;"ENTER MESSAGE (MAX 14 CHARS)"
50 INPUT M$
52 LET Z$(1)=M$
60 LET M$=Z$(1)
80 PRINT AT 1,0;M$
100 LET O=17607
110 POKE O,14
120 FOR I=1 TO 14
130 POKE O+I,CODE M$(I)
140 NEXT I
145 STOP
150 FOR I=6 TO 16
160 PRINT AT I,10;" "
170 NEXT I
175 POKE 16514,5
177 RAND USR 16515
180 RAND USR MAKEQR
181 POKE 16514,0
182 RAND USR 16515
183 POKE 16514,1
184 RAND USR 16515
185 POKE 16514,2
186 RAND USR 16515
187 POKE 16514,3
188 RAND USR 16515
189 POKE 16514,4
190 RAND USR 16515
9000 SAVE "QRCODe"
9999 RUN
Re: QR Code version 1
Then you could make a bigger version for ZX81 as well as is supports a resolution of 256x192 pixels.
With HRG driver like used by Z88dk. In general the ZX printer is able to print high resolution graphics as well, maybe a special driver is needed.
http://k1.spdns.de/Vintage/Sinclair/80/ ... ctions.pdf
https://www.z88dk.org/forum/
Re: QR Code version 1
My goal for now is to show them on the screen. As for a highres version for the ZX81, there are some different ways to implement the video driver. While I could provide a sample plotter for one specific driver, I want to focus on the QR Code version 11 PR.
Re: QR Code version 1
ZX Spectrum sample code added!
The code is capable of plotting the barcode using 1x1, 2x2, and 4x4 square pixels per module, selectable in compile time. The encoder and plotter code is shared between the ZX81 and ZX Spectrum versions, only the pixel routines are specific to each of the platforms.
The code is capable of plotting the barcode using 1x1, 2x2, and 4x4 square pixels per module, selectable in compile time. The encoder and plotter code is shared between the ZX81 and ZX Spectrum versions, only the pixel routines are specific to each of the platforms.