Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:05 15 Nov 2025 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: keydown not cleared after blit & save image

Author Message
BruderJo

Newbie

Joined: 16/08/2020
Location: Germany
Posts: 18
Posted: 10:27pm 04 Nov 2020
Copy link to clipboard 
Print this post

Hello,

I have the following test program.
Once started, it waits for a key.
Press any single letter and you can see, the key is never released.
e.g. "s" has a permanent output of "1  115"
The device does not recognize, that there is nokey pressed.
But as soon as you press the next key, the program stops and works correctly.

Seems, the keydown functions becomes confused by the "page write/blit" statements.

my firmware version is 5.05.05.


option explicit
option default none
option base 0
mode 1,8
cls

dim integer k
dim a$
dim string Fname = "dummy.bmp"

do
 a$=inkey$
loop until a$ <> ""
k=keydown(1)
do while inkey$ <> "": loop

page write 2
blit 0,0,0,0,MM.HRES,MM.VRES,0
page write 0
blit 0,0,0,0,MM.HRES,MM.VRES,1
save image Fname,0,0,512,256
blit 0,0,0,0,MM.HRES,MM.VRES,2
page write 0

do
 print keydown(0), keydown(1)
loop until keydown(0) = 0

end
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1116
Posted: 01:34am 05 Nov 2020
Copy link to clipboard 
Print this post

@BruderJo

Tested with 5.05.06 and works OK. One thing to note, your final do-loop cycles VERY fast and even for a relatively short keypress will still go through the loop hundreds if not more, of times.

I put a 100mS pause in that final loop and you can then see the keydown reported while a key is pressed and end correctly when the key is released.

Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
BruderJo

Newbie

Joined: 16/08/2020
Location: Germany
Posts: 18
Posted: 06:42am 05 Nov 2020
Copy link to clipboard 
Print this post

The code is only to demonstrate the issue without any tuning.
A "pause 100" within the final do-loop only delays the my output, but the result is the same.

BUT!

a "pause 100" right before the first "page write 2" is a solution.
The only output is now "0  0", what I always expected.
Maybe I ran into a timing issue and should go for an update.

btw: I own the pre-assembled version.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10582
Posted: 08:01am 05 Nov 2020
Copy link to clipboard 
Print this post

  Quote  my firmware version is 5.05.05


Upgrade to 5.05.06RC13 - definitely fixed (at least with any of my keyboards)
Edited 2020-11-05 18:01 by matherp
 
BruderJo

Newbie

Joined: 16/08/2020
Location: Germany
Posts: 18
Posted: 11:10am 05 Nov 2020
Copy link to clipboard 
Print this post

confirmed: 5.05.06rc13 solved it.
 
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 2025