Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:11 06 Jun 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2 graphics questions

     Page 2 of 2    
Author Message
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 204
Posted: 07:51pm 21 May 2026
Copy link to clipboard 
Print this post

to LeoNicolas:

thank you a lot for your thoughts.

you wrote:
"If you are not syncing your write operation to the screen buffer with the logic that is reading from the same buffer, your write operation can be blocked while trying to write to the same address the reading operation is accessing, leaving that address in memory with its old content, and creating the artifacts we saw in you app."

-good idea

perhaps geoffg or matherp or disco4now will read this to give a complete answer...

soon i will use your 2-buffer concept...
Edited 2026-05-22 05:52 by hhtg1968
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4332
Posted: 09:49pm 21 May 2026
Copy link to clipboard 
Print this post

The write operation would not need to be blocked, it would be enough that the screen memory is being read at the same time you write to it.

If the reading goes past where you have partly written then it gets what you have written but also the old data you have not yet replaced.

It's a sort of race (hardware reading, your program writing).

You can either use a framebuffer that isn't being displayed by the hardware, so your writes cannot be involved in a race, or GETSCANLINE to make sure you're not writing in the wrong place at the wrong time.

John
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 582
Posted: 09:57pm 21 May 2026
Copy link to clipboard 
Print this post

John, your answer makes sense for the flickering problem. My answer was for the artifacts that are persistent in the screen. it's just a guess. I think the screen buffer is becoming dirty because the blocked write operations.

Do you have any theories?
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4332
Posted: 07:13am 22 May 2026
Copy link to clipboard 
Print this post

I think due to the race artefacts might be more common than flickering.

Carefully avoiding the issue should fix both.

John
Edited 2026-05-22 17:14 by JohnS
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 204
Posted: 08:47am 22 May 2026
Copy link to clipboard 
Print this post

Thanks to JohnS too.

i will test it with "GETSCANLINE" too. i think I will have time at the beginning of june.


@JohnS:

do you have watched my movies at youtube?

error movies
Edited 2026-05-22 18:48 by hhtg1968
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 582
Posted: 02:31pm 22 May 2026
Copy link to clipboard 
Print this post

John
The changes I put in place solved the issue. The code is on a link in one of my previous responses
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4332
Posted: 05:46pm 22 May 2026
Copy link to clipboard 
Print this post

I don't youtube much, sorry.

John
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 204
Posted: 12:45pm 24 May 2026
Copy link to clipboard 
Print this post

ok. i can upload such a video.


colour maximite 2 drawing disc with errors.mp4.zip
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 582
Posted: 10:12pm 24 May 2026
Copy link to clipboard 
Print this post

hhtg1968

Can you post your source code here or share its github repo?
I can take a look and fix the problem
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 204
Posted: 06:20am 25 May 2026
Copy link to clipboard 
Print this post

  LeoNicolas said  hhtg1968

Can you post your source code here or share its github repo?
I can take a look and fix the problem


yes of course i can put the code here.


hp.bas.zip

but that is the code you already have (i think so)

but i will change it myself... (or myself too). and you can try it too if you have enough time.

as i told, i will get my cmm2 back in june...

the open question for me is how the artefacts exactly arise... (you and johnS helped a lot). my favorite is that writing in screen memory is blocked while it is read out for the display or something like that...
Edited 2026-05-26 17:48 by hhtg1968
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026