QR code generation
- Dbug
- Site Admin
- Posts: 5063
- Joined: Fri Jan 06, 2006 10:00 pm
- Location: Oslo, Norway
- Contact:
Re: QR code generation
IrqBenchmark: https://github.com/Oric-Software-Develo ... qBenchmark
- iss
- Wing Commander
- Posts: 1849
- Joined: Sat Apr 03, 2010 5:43 pm
- Location: Bulgaria
- Contact:
Re: QR code generation
Wow, all-in-one with profiler, Thanks!Dbug wrote: ↑Sun May 18, 2025 10:46 am IrqBenchmark: https://github.com/Oric-Software-Develo ... qBenchmark
- xahmol
- Squad Leader
- Posts: 622
- Joined: Sun Jun 28, 2020 7:32 pm
- Location: Utrecht, The Netherlands
- Contact:
Re: QR code generation
For starters, was thinking on a QR code in the About screen of my software, showing a QR code to the GitHub page with documentation.
Obviously, as earlier I think considered by DBug, you could think of a high score code generator for online hall of fame.
- Dbug
- Site Admin
- Posts: 5063
- Joined: Fri Jan 06, 2006 10:00 pm
- Location: Oslo, Norway
- Contact:
Re: QR code generation
@iss, do you have a link to your XA compatible version?
- iss
- Wing Commander
- Posts: 1849
- Joined: Sat Apr 03, 2010 5:43 pm
- Location: Bulgaria
- Contact:
Re: QR code generation
Here you go: oricOpenLibrary/lib-qrcode.

Attaching the 2 compiled demos here too:
* qrdemo.tap - C/ASM
* qrdemoa.tap - ASM only
Some theory: (TL;DR) the size of generated matrix depends on the length of input data.
So the max size 25x25 that fits on #Oric text display (40x28) limits the input data to 106 bytes.
We can easily double the length with alt-chars then 2x2 square will be replaced with single char.
Of course a hires render is possible too. @rax is working on this...

You do not have the required permissions to view the files attached to this post.
Last edited by iss on Sat May 31, 2025 9:02 pm, edited 1 time in total.
- Dbug
- Site Admin
- Posts: 5063
- Joined: Fri Jan 06, 2006 10:00 pm
- Location: Oslo, Norway
- Contact:
Re: QR code generation
Thanks 
Guess I'll have to see how many characters I want, so probably a short URL (my shortest domain is OSDK.ORG), the player name, score, end condition, possibly the unlocked achievements, actual play time, and some simple checksum validation to eliminate the most obvious cases of abuse.

Guess I'll have to see how many characters I want, so probably a short URL (my shortest domain is OSDK.ORG), the player name, score, end condition, possibly the unlocked achievements, actual play time, and some simple checksum validation to eliminate the most obvious cases of abuse.
- Dbug
- Site Admin
- Posts: 5063
- Joined: Fri Jan 06, 2006 10:00 pm
- Location: Oslo, Norway
- Contact:
Re: QR code generation
Where are these two defined?
Code: Select all
#include "compat.h"
#include "xa.h"
- iss
- Wing Commander
- Posts: 1849
- Joined: Sat Apr 03, 2010 5:43 pm
- Location: Bulgaria
- Contact:
Re: QR code generation
Remove/comment-out them. It's not important (like #define byt .byt - just beautification for my personal taste ...).Dbug wrote: ↑Sun Jun 01, 2025 7:43 am Where are these two defined?Code: Select all
#include "compat.h" #include "xa.h"
-
- 1st Star Corporal
- Posts: 8
- Joined: Thu Mar 13, 2025 8:15 am
- Contact:
Re: QR code generation
Correct.iss wrote: ↑Sat May 31, 2025 8:19 pm So the max size 25x25 that fits on #Oric text display (40x28) limits the input data to 106 bytes.
We can easily double the length with alt-chars then 2x2 square will be replaced with single char.
Of course a hires render is possible too. @rax is working on this...![]()
That's what I did in the initial version. Source code for 2x2 squares in one petscii character is here: https://github.com/The8BitTheory/qr128/ ... /render2.a
Rendering to a VIC-IV sprite for the Mega65 is done here:
https://github.com/The8BitTheory/qr128/ ... enderspr.a
VIC-IV sprite is probably misleading, as this is really only writing a single square as a single pixel.
So it can be used for anything, really

Hope that helps speeding up your work
