Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:11 13 May 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: Bug reports

     Page 6 of 17    
Author Message
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1835
Posted: 02:16am 12 Jun 2020
Copy link to clipboard 
Print this post

I've been editing since my last post, no errors.

I just confirmed your test above as I had already found the answer to that, but tried it again now and - the dam editor would not paste, and when I looked at the last line in the edit window it had an ESC sequence.    

When you mark a line of text by moving down past the last text line, you are also copying the CRLF at the end of the last line of text. If you put a space at the end of the last word on the line and only highlight to the last character, you don't get an extra CR inserted in the paste.

Mike.

EDIT: I've been using Ctrl-W a lot in the last edit session, no problems here. Could be a keyboard sticking or that auto repeat hick-up has returned?
..
Edited 2020-06-12 12:20 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1090
Posted: 02:31am 12 Jun 2020
Copy link to clipboard 
Print this post

  TassyJim said  
OPTION DISPLAY is read only (as a reminder to set your terminal appropriately)
Jim


Thanks Jim. I'll keep that in mind when I go reading the manual again.

Brian
ChopperP
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1122
Posted: 03:54am 12 Jun 2020
Copy link to clipboard 
Print this post

  KeepIS said  EDIT: I've been using Ctrl-W a lot in the last edit session, no problems here. Could be a keyboard sticking or that auto repeat hick-up has returned?
..
Auto-repeat thing is still happening, but _only_ the [ENTER] key after the CTRL-W save file in the editor. Pressing any key, including [ENTER] makes it stop.

Interesting, the effect persists after pressing the reset button on the waveshare board.

And the effect remains after power cycling the whole system.

Both [ENTER] keys do the same. But CTRL-M does not!
Microsoft Wired Keyboard 400, for what it's worth.
Visit Vegipete's *Mite Library for cool programs.
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2401
Posted: 04:11am 12 Jun 2020
Copy link to clipboard 
Print this post

well, this is embarrassing...

using gw-basic 3.23, running under DosBox:

110 For i=0 To 1
120   Print "example " i+1 ":"
130   If i Then Print ,, "green eggs ";: Print "on ham"
140 Next i
150 '
160 For i=0 To 1
170   Print "example " i+3 ":"
180  If i Then Print ,, "oxfords" Else Print ,, "brouges"
190 Next i
200 '
210 For i=0 To 1
220   Print "example " i+5 ":"
230   If i Then Print ,, "jam on "; Else Print ,, "french ";: Print "toast"
240 Next i
250 rem '
255 ?
260 For i=0 To 1
270   Print "example " i+7 ":"
280   If i Then Print ,, "1st ";: ? "2nd" Else Print ,, "3rd ";: Print "4th"
290 Next i


we get the following output:

example  1 :
example  2 :
                           green eggs on ham
example  3 :
                           brouges
example  4 :
                           oxfords
example  5 :
                           french toast
example  6 :
                           jam on
example  7 :
                           3rd 4th
example  8 :
                           1st 2nd
Ok


whereas micromite basic running on an MX170 gives:

> RUN
example  1:
example  2:
               green eggs on ham
example  3:
               brouges
example  4:
               oxfords
example  5:
               french toast
example  6:
               jam on toast

example  7:
example  8:
               1st
[19] 280   If i Then Print ,, "1st ";: Print "2nd" Else Print ,, "3rd ";: Print
"4th"
Error: Expected closing bracket
>


note the deviation of example 6, that is NOT syntactically incorrect.

one might speculate that the origins of the discrepancy lay in code written by Mrs Verda Spell, whose premature departure from this mortal plane prevented her completing the implementation of single line if-then-else. but then, i couldn't possibly comment!


cheers,
rob   :-)
Edited 2020-06-12 14:15 by robert.rozee
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1835
Posted: 04:13am 12 Jun 2020
Copy link to clipboard 
Print this post

Strange one that, could still be a local issue as I've been hammering Ctrl-W and enter all day. Using a small LINDEN wireless keyboard, I grabbed the last two a few years back at a stock runout for around $12.00 each. Haven't missed a beat and get used every day. Hope you find the problem, I'll keep checking on it to be sure.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1111
Posted: 05:56am 12 Jun 2020
Copy link to clipboard 
Print this post

@KeepIS/matherp

I have gone through the sequences by KeepIS above quite a number of times with no errors, EXCEPT for a 1 time Part 2 error with the ?[?255l?[H error appearing in white over black. Have not been able to repeat this and have never got the @@@@@ sequence anywhere. Tried at least thirty times.

version 5.05.03b1c
CMM2 from Circuit Gizmos,
Microsoft USB keyboard, VGA output

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

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1835
Posted: 06:13am 12 Jun 2020
Copy link to clipboard 
Print this post

@panky, thanks for trying, I'm in the same boat, it can take an hour or so of coding before it happens, other times after a few seconds. That's what happened today, no rhyme nor reason, and appears to have nothing to do with Ctrl-C or errors, just seems totally random.
Edited 2020-06-12 16:13 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10070
Posted: 08:38am 12 Jun 2020
Copy link to clipboard 
Print this post

All

many thanks for keep trying to get to the bottom of the cut/paste issue.

The editor shows control characters in reverse video and the @ symbol is a 0. What is happening is that for some reason the number of characters in the buffer is getting incorrectly set so it is pasting beyond the end of the valid data and into the  zero initialised buffer - the question is why?

Please try the attached version V5.05.03b1e

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

In it I've included on the status line the number of characters in the paste buffer




This should be equal to the number of characters that were highlighted + the number of CRLF end of line pairs. It gets set when you press F4 or F5 to cut or copy the buffer.

In addition I've included a check of the difference between my calculated buffer size and the length of the C string in the buffer - strlen(buffer). If these don't match then the number of chars is displayed as 999999

None of these changes should fix the problem but they may help you to diagnose when an issue has occurred. If you ever see the number of chars as 999999 then please let me know. In addition, if you see it, what happens if rather than pasting you do another selection? Does the error stay or does it self correct?
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1835
Posted: 08:48am 12 Jun 2020
Copy link to clipboard 
Print this post

If I try another selection, it does the same thing. Just now I tried to paste a line and got garbage, I tried to copy the same line and paste, different garbage.

Pressed SAVE this time and went back into edit, cleared the garbage and tried again to copy & paste, same problem. Pressed save again and went back into Edit, this time the copy & paste worked without error.

I'll download the Zip file now and install.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1835
Posted: 09:05am 12 Jun 2020
Copy link to clipboard 
Print this post

New firmware and spent some time before I got an error, however the behaviour has changed.

The Error is nothing was pasted, copied again and pasted, still nothing, did it a 3rd time and the line pasted, editor then worked correctly every time.

Difference this time, no garbage inserted. No 999999.

EDIT, forgot to add, the Paste Buffer said 23 chars which was correct but nothing pasted.

Mike

EDIT 2: Same thing again, worked the second time, correct buffer size and once again, no garbage anywhere and the editor was stable again. I have never NOT had garbage pasted or other effects, so something has indeed changed for the better.
.
Edited 2020-06-12 19:17 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10070
Posted: 09:20am 12 Jun 2020
Copy link to clipboard 
Print this post

Please download again - sorry I b.....d cut/paste even though copy/paste was OK
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1835
Posted: 09:43am 12 Jun 2020
Copy link to clipboard 
Print this post

Running new/new FW and was about to give up as all ok, however this time after a paste with nothing being pasted, I pressed F4 on a blank spot to clear the buffer, no chars in buffer display.  

When I pressed enter key, the text that didn't paste was inserted and another small line of text near the copy point was also inserted, trying to edit was making a mess as every enter key press inserted more text, so aborted edit, went back in and all ok and could not get another error so far. Still no Zero or Esc chars showing up.

I've had this happen before but always followed by ESC and zero garbage.

I will have to go shortly, but I will try again tomorrow.

Mike.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10070
Posted: 10:32am 12 Jun 2020
Copy link to clipboard 
Print this post

Please download and try V5.05.03b1f

http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip

Based on the above feedback it appears the cut/copy algorithm is robust but the issue is probably somewhere in paste. Accordingly I have re-engineered this slightly so please test this version and see if the editor issue has been solved. I've left the paste buffer count in the code as this is probably a useful feature.
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2401
Posted: 01:47pm 12 Jun 2020
Copy link to clipboard 
Print this post

  KeepIS said  I get an ESC seq ?[?25l?[H
...
ESC code ?[?255l?[HMJMJMJMJM is inserted.


just had a lightbulb moment.

it looks very much like what some folks are seeing may be escape sequences sent out the console TxD line being echoed back on the RxD line. are you powering your CMM2 from a PSU, or from a USB port attached to a PC?

if powered from a PSU, then the 1455/2221 will not be enumerating, and in that state may not be configuring the UART I/O pins running back to the H7. if this is the case, the console RxD input (PA10) to the H7 may float, picking up signals from all sorts of different places, including the adjacent console TxD output (PA9).

to check this hypotheses, power your CMM2 from a USB port on a running PC and see if the garbage disappears. if it does, the solution is to either:

1. have the CMM2 firmware configure a weak pullup on PA10 (if this is possible), or,
2. add a 10k pullup from PA10 to 3v3 at the H7 module, or,
3. add a 10k pullup between pins 6 and 1 of the 1455/2221.

note that a floating RxD pin picking up 'random' noise may create framing errors and/or massive interrupt storms that can cause bad issues.


cheers,
rob   :-)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10070
Posted: 02:11pm 12 Jun 2020
Copy link to clipboard 
Print this post

  Quote  just had a lightbulb moment.


Interesting idea that is certainly worth considering.

I've added an internal pullup to the console RX port on the STM32H743 as a precaution. V5.05.03b1f was updated at 14:04 GMT 12/06/2020 with this change

Questions for those seeing the issue.
Are you running with the USB console port not enunciated?
Which USB adapter are you using MCP2221A or PIC16F1455?
What happens if you set OPTION CONSOLE SCREEN, OPTION CONSOLE SAVE so that the serial port is disabled?

UPDATE

Please hold off downloading for the moment
Edited 2020-06-13 00:27 by matherp
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1122
Posted: 06:06pm 12 Jun 2020
Copy link to clipboard 
Print this post

Still have my [ENTER] key repeat problem after using CTRL-W in the editor. This persists after power cycling and even removing the back-up battery.

(latest copy of version 5.0503, US USB keyboard, power from a PSU.)

Another keyboard issue, upon fresh power-up, ie, battery removed to clear saved config, I cannot select any keyboard type other than "1" UK. "2", "3" and other numbers do nothing. Other numbers do work when I'm typing in the time and date. I can change the keyboard type afterwards from the command prompt with option usbkeyboard.
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10070
Posted: 06:43pm 12 Jun 2020
Copy link to clipboard 
Print this post

  Quote  Another keyboard issue, upon fresh power-up, ie, battery removed to clear saved config, I cannot select any keyboard type other than "1" UK. "2", "3" and other numbers do nothing. Other numbers do work when I'm typing in the time and date. I can change the keyboard type afterwards from the command prompt with option usbkeyboard.


This is deliberate to limit choices to those that are valid

thwill: I'm struggling with zmim. I think it is corrupting memory with a rogue POKE or similar. If you write a trivial program to output scrolling and line-wrap work perfectly but somehow zmim is breaking it. Depending on trivial changes to the firmware I see very different effects - all bad, suggesting corruption which impacts differently depending on where the internal variables are placed by the linker
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4251
Posted: 07:22pm 12 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  
thwill: I'm struggling with zmim. I think it is corrupting memory with a rogue POKE or similar. If you write a trivial program to output scrolling and line-wrap work perfectly but somehow zmim is breaking it. Depending on trivial changes to the firmware I see very different effects - all bad, suggesting corruption which impacts differently depending on where the internal variables are placed by the linker


Thanks Peter, I hadn't dare hope you would find time to look at my issue.

Currently what I've almost finished doing is changing the code to pass all "printing" through a single user subroutine. I need to do this anyway to implement word-wrapping and handle the case where more than a page of output is generated between input prompts. Perhaps this will *magically* fix it.

Either way I'll then look at the POKEs. Ignoring trivial ones in "debug.inc" and "main.bas" they are all in "mem_cmm2.inc" so it should be easy to find if this is the issue. On a first glance it looks like the only possibility is if 'a' is < 0 or 'BASE_STATIC' contains nonsense on calls to wb() or ww(). I can't test this immediately as I'm away from the hardware.

  Quote  ... a rogue POKE or similar ...


What does "or similar" mean? Isn't POKE the only way I can make a mess unless there is a bug in the firmware ?

Thanks again,

Tom
Edited 2020-06-13 05:22 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1122
Posted: 07:57pm 12 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  This is deliberate to limit choices to those that are valid
On my setup, the only valid response is "1". No other choice works. (Cicruit Gizmo CMM2 with Waveshare, 5.0503.)
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10070
Posted: 10:03pm 12 Jun 2020
Copy link to clipboard 
Print this post

  Quote  What does "or similar"


I think this or something similar may be causing the problem

 ElseIf oc = &h7 Then
   ' RESTART
   Run



Can you easily recode?

  Quote  To run it, I need to "chdir "src"" and then "run "main""


This is an issue in the early versions of 5.05.03. For the moment just run main.bas. Easy fix but I need to get to the bottom of thwill's issue first
 
     Page 6 of 17    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025