RevEng Posted April 7, 2021 Share Posted April 7, 2021 29x29 with 6-scanlines per block works perfectly on my small CRT (with heavy rounding), and there's plenty of blanking around the QR code. I can even QR scan this picture being displayed on my computer monitor. 7800 binary attached, as well as the QR code test image in binary. qrtest.a78 qrtest-binary-data.txt 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 7, 2021 Author Share Posted April 7, 2021 And that's with minimal error correction (1st and 2nd pixel below top left eye = 11). 1 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted April 7, 2021 Share Posted April 7, 2021 52 minutes ago, Thomas Jentzsch said: That would probably be simpler, but people are much more used to QR codes. And many today's smartphone have QR-code readers ready out of the box. The image produced is readable by a QR app on a phone, here a link to the high-score-cafe, but looks like you have a solution. 3 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 7, 2021 Author Share Posted April 7, 2021 (edited) 27 minutes ago, Wrathchild said: but looks like you have a solution. Not at all, just on somewhere the way to it. Edit: After looking into the Datamatrix code provided, I might change my mind. The code generation seems more compact. And we have tested code. Edited April 7, 2021 by Thomas Jentzsch Quote Link to comment Share on other sites More sharing options...
RevEng Posted April 7, 2021 Share Posted April 7, 2021 I'm not arguing against it, but it looks like it uses self-modifying code. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted April 7, 2021 Share Posted April 7, 2021 12 minutes ago, RevEng said: I'm not arguing against it, but it looks like it uses self-modifying code. I think at the sacrifice of not wanting to use any zeropage space, so could be reworked to use indirect lookups and variables instead. 1 Quote Link to comment Share on other sites More sharing options...
Octavio Pinho Bokel Posted April 7, 2021 Share Posted April 7, 2021 1 hour ago, RevEng said: 29x29 with 6-scanlines I am using 7 lines (was the most square I could get), with 6 lines the distortion looks minimal. Probably 29 x 29 should work fine. 37 minutes ago, Wrathchild said: The image produced is readable by a QR app on a phone This is indeed a Data Matrix, not a QR code. My phone supports it directly from the camera app, I don't now how compatible it is with most phones... This might be an alternative and is what they are generating dynamically, it does not even have to be square. I had no idea... They do save to use one extra byte, since it is 24 x 24, but the border is static, making the dynamic part 22 x 22, and they are encoding 32 chars... https://www.qrcode-tiger.com/data-matrix-code-vs-qr-code 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 7, 2021 Author Share Posted April 7, 2021 35 minutes ago, Wrathchild said: I think at the sacrifice of not wanting to use any zeropage space, so could be reworked to use indirect lookups and variables instead. And it is not that much code which is affected, so that should be quite easy. The features of XASM are more of a problem when converting to DASM. BTW: What does "scc:eor <301" do? I understand "scc", but the "eor" part makes no sense to me. Also, where does than magic number come from? Quote Link to comment Share on other sites More sharing options...
vitoco Posted April 7, 2021 Share Posted April 7, 2021 I tried Data Matrix in my phone with the default camera app, unsuccessfully. I have no problems with the QR (including my "reduced" avatar at the side of the quick reply form). I guess that any app from the store could read DM as well as QR. 2 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted April 7, 2021 Share Posted April 7, 2021 49 minutes ago, Thomas Jentzsch said: What does "scc:eor <301" do? I understand "scc", but the "eor" part makes no sense to me. In code this comes out as, so I can only think 'by design' But @fox is on AA so hopefully can explain that and the magic number? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 7, 2021 Author Share Posted April 7, 2021 2 hours ago, vitoco said: I tried Data Matrix in my phone with the default camera app, unsuccessfully. I have no problems with the QR (including my "reduced" avatar at the side of the quick reply form). That's the problem I was afraid of. Also the iOS camera app seems to support QR code only. Quote Link to comment Share on other sites More sharing options...
Albert Posted April 7, 2021 Share Posted April 7, 2021 9 hours ago, RevEng said: People use monospace fonts to embed QR codes in reddit posts, and those are nowhere near square. Interesting, I'd like to see an example of this. 9 hours ago, Thomas Jentzsch said: Depends on the webserver, AFAIK (e.g. IIS is not case-sensitive). So maybe we can ignore case. But that's academic for now. First we have to solve more major problems. Case is important, Linux webservers are by default case sensitive. The case of the domain name is not important, but any arguments passed beyond that are usually case sensitive and in general you will not get where you are wanting to go if you don't use the proper case for those arguments. For instance, here's the URL to this thread: If you change just one letter here (capitalize Forums), you'll get an error: https://atariage.com/Forums/topic/319259-qr-code-generation/ 1 hour ago, Thomas Jentzsch said: That's the problem I was afraid of. Also the iOS camera app seems to support QR code only. Yeah, I'd prefer to stick with QR code, since support for that is pretty universal these days. I've seen those Data Matrix codes before, but generally not in a way intended for the general public to use. 6 hours ago, RevEng said: 29x29 with 6-scanlines per block works perfectly on my small CRT (with heavy rounding), and there's plenty of blanking around the QR code. I can even QR scan this picture being displayed on my computer monitor. I can scan the above image as well using the camera app in iOS. ..Al 1 Quote Link to comment Share on other sites More sharing options...
RevEng Posted April 7, 2021 Share Posted April 7, 2021 27 minutes ago, Albert said: Interesting, I'd like to see an example of this. I find you sometimes need to pull out a bit, so the lines between each ascii row are blurred. Also some neat non-ascii, but non-standard QR codes... ...now I need to get out of r/qrcodes before I go any deeper down the rabbit hole. 2 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted April 7, 2021 Share Posted April 7, 2021 1 hour ago, Albert said: Case is important, Linux webservers are by default case sensitive. The case of the domain name is not important, but any arguments passed beyond that are usually case sensitive and in general you will not get where you are wanting to go if you don't use the proper case for those arguments. Indeed. Although there are probably ways around this if need be. At the end of Penult I give a URL, but since my text is caps-only, I used a URL shortener that was case-insensitve. 1 Quote Link to comment Share on other sites More sharing options...
Albert Posted April 8, 2021 Share Posted April 8, 2021 3 hours ago, RevEng said: I find you sometimes need to pull out a bit, so the lines between each ascii row are blurred. Also some neat non-ascii, but non-standard QR codes... ...now I need to get out of r/qrcodes before I go any deeper down the rabbit hole. Wow, that's very cool. The first two work fine using the iOS camera app, but the last one does not. Probably would work better with a dedicated QR code reader app. Thanks for digging those up. Pretty interesting especially to see that first one work!! ..Al 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 8, 2021 Author Share Posted April 8, 2021 7 hours ago, Albert said: Case is important, Linux webservers are by default case sensitive. The case of the domain name is not important,... So here we can use upper case. 7 hours ago, Albert said: ...but any arguments passed beyond that are usually case sensitive and in general you will not get where you are wanting to go if you don't use the proper case for those arguments. And the arguments are under our control. If we encode the data into alphanumeric we can decode it from alphanumeric too. Of course binary is more versatile, alphanumeric would save us a bit space for the domain name part (e.g. "AAGE.US/" would need 8*8 = 64 vs. 4*11 = 44 bits). But the difference is marginal and probably not worth the effort. Anyway, for now I plan to stick with binary. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 8, 2021 Author Share Posted April 8, 2021 4 hours ago, Albert said: Wow, that's very cool. Don't expect something even remotely similar from me. These kind of QR-code are all done with level H (30%) error correction. I currently plan for level M (15%) error correction. Maybe this allows for some limited freedom too. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 8, 2021 Author Share Posted April 8, 2021 8 hours ago, Albert said: I can scan the above image as well using the camera app in iOS. I am currently wondering if I should switch from playfield to sprite graphics. The QR code would become much smaller, which will have advantage and disadvantages. Actually I found that I have to move away from my monitor when scanning the large QR codes. "The Stacks" uses such a small 25x25 QR code (also with level M error correction) and it seems to work fine. The main reason for wanting to switch is the much easier memory organization when using sprites. With playfield I have to work with very convoluted reflected and split data. Both require 78.x bytes of RAM, so there is not enough space left for a 2nd buffer. Converting the data stream from the QR code encoder into display data using the same RAM should be much easier for sprites. Quote Link to comment Share on other sites More sharing options...
Octavio Pinho Bokel Posted April 8, 2021 Share Posted April 8, 2021 My thoughts on the matter so far: The stacks QR code should not work well on CRTs. It should work fine in all other kind of monitors. I think it is worth a test on CRTs, my gut feeling might be wrong. I updated my game to use 25% error correction QR and appears to be doing better. The Circus Convoy people are really smart people. They probably know that data matrix is less compatible with phones, since they used QR codes on the static content. My guess is that they reached some kind of road block that the data matrix somehow solves for the dynamic ones. It takes one celebrity to reach other. @ZeroPage Homebrewcan you ask them if they can disclose a little bit of information on the subject? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 8, 2021 Author Share Posted April 8, 2021 3 hours ago, Octavio Pinho Bokel said: The stacks QR code should not work well on CRTs. Just because of the size? Quote Link to comment Share on other sites More sharing options...
Octavio Pinho Bokel Posted April 8, 2021 Share Posted April 8, 2021 16 minutes ago, Thomas Jentzsch said: Just because of the size? Yes, because how soft the edges are in most CRTs, I think it will be too blurry... Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 8, 2021 Author Share Posted April 8, 2021 But it is not displayed in the corners. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 8, 2021 Author Share Posted April 8, 2021 A little math to show how short RAM for a version 2 (25x25), level M QR code is: max. message length: 28 bytes ECC code length: 16 bytes QR code: 25x25 bits = 78 bytes (forget the 1 remaining bit, that can be hard coded) That's 122 bytes in total. We probably will have to at least partially overwrite the message and ECC code when converting both into QR code. With playfield graphics this would become even more complex as it already is. Quote Link to comment Share on other sites More sharing options...
RevEng Posted April 8, 2021 Share Posted April 8, 2021 47 minutes ago, Thomas Jentzsch said: But it is not displayed in the corners. He means blurring on each pixel edge, not the screen edge. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted April 8, 2021 Share Posted April 8, 2021 David Crane Explains Making QR Codes Work on Atari 2600: 4 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.