QR code generation

In this forum you can write about anything that does not fit in other forums.
This includes generic Oric talkings and things that are totaly unrelated but want to share with people here :)
User avatar
Dbug
Site Admin
Posts: 5063
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: QR code generation

Post by Dbug »

User avatar
iss
Wing Commander
Posts: 1849
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: QR code generation

Post by iss »

Dbug wrote: Sun May 18, 2025 10:46 am IrqBenchmark: https://github.com/Oric-Software-Develo ... qBenchmark
Wow, all-in-one with profiler, Thanks!
User avatar
xahmol
Squad Leader
Posts: 622
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: QR code generation

Post by xahmol »

Goodwell wrote: Thu May 15, 2025 7:16 pm Please let me know how you can make use of it.
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.
User avatar
Dbug
Site Admin
Posts: 5063
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: QR code generation

Post by Dbug »

@iss, do you have a link to your XA compatible version?
User avatar
iss
Wing Commander
Posts: 1849
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: QR code generation

Post by iss »

Dbug wrote: Sat May 31, 2025 2:59 pm @iss, do you have a link to your XA compatible version?
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... :wink:
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.
User avatar
Dbug
Site Admin
Posts: 5063
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: QR code generation

Post by Dbug »

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.
User avatar
Dbug
Site Admin
Posts: 5063
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: QR code generation

Post by Dbug »

Where are these two defined?

Code: Select all

#include "compat.h"
#include "xa.h"
User avatar
iss
Wing Commander
Posts: 1849
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: QR code generation

Post by iss »

Dbug wrote: Sun Jun 01, 2025 7:43 am Where are these two defined?

Code: Select all

#include "compat.h"
#include "xa.h"
Remove/comment-out them. It's not important (like #define byt .byt - just beautification for my personal taste ...).
Goodwell
1st Star Corporal
Posts: 8
Joined: Thu Mar 13, 2025 8:15 am
Contact:

Re: QR code generation

Post by Goodwell »

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... :wink:
Correct.

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
iss wrote: Sat May 31, 2025 8:19 pm Of course a hires render is possible too. @rax is working on this... :wink:
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 :-)
Post Reply