Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:10 05 Jul 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 5.05.06 beta

     Page 7 of 12    
Author Message
vegipete

Guru

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

As of version 5.05.06b4, the arc command still has the "smear stuff on the top line when drawn partially or completely off the top of the screen" bug.
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 06:27pm 20 Sep 2020
Copy link to clipboard 
Print this post

  Quote  As of version 5.05.06b4, the arc command still has the "smear stuff on the top line when drawn partially or completely off the top of the screen" bug.


What about the latest version? Example code?
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 07:19pm 20 Sep 2020
Copy link to clipboard 
Print this post

I just flashed 5.05.06b10 and it too shows the bug.

Sample program is from bar1010's learning programs.

I see his program is in mode 1,16.

'Draw Arcs demo  by bar1010
dim integer x, y, i, o, s, e, r, g, b, j
cls
mode 1, 16
j = 0
do
 x = rnd * 800 'x pixel coordinate
 y = rnd * 600 'y pixel coordinate
 i = rnd * 145 'inner radius
 o = rnd * 2 + i 'outer radius
 s = rnd * 340 + 1 'start angle
 e = rnd * 340 + 1 'end angle
 r = rnd * 255 'red
 g = rnd * 255 'green
 b = rnd * 255 'blue
 
 'ARC X, Y, R1, R2, A1, A2, C
 'Draws an arc with the center at the X and Y coordinates.
 'R1 and R2 are the inner and outer radius defining the
 'thickness of the arc.  If they are the same the arc will
 'be one pixel thick.  A1 and A2 are the start and end
 'angles in degrees.  C is the color of the arc.

 arc rnd * x, y, i, o, s, e, rgb(r,g,b)

 pause 575
 j = j + 1
 if j > rnd * 925 then
   cls
   j = 0
 endif
loop


Visit Vegipete's *Mite Library for cool programs.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 08:43pm 20 Sep 2020
Copy link to clipboard 
Print this post

OK, this is a nasty one with the watch dog timer.

Twice now, I have edited a program and pressed F2 to save and run and all I got was the watch dog message "Error: System fault - check code".

At the bottom of the screen, the same path and file name is listed. However, that file on disk is now blank! Checked the SD card on a computer and the file is empty, zero bytes.

The first time was with the Arc Demo program above (35 odd lines), the second was with LunarLander v72 (745 lines)

The problem is likely my SD card. I have noticed it to be very slow to write on the CMM2. It works fine, just it's slow. Clearing a file is a bit harsh though.

Can the watch dog be turned off?

edit: I see this matches thwill's report from a few posts back.
.
Edited 2020-09-21 06:58 by vegipete
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 10:19am 21 Sep 2020
Copy link to clipboard 
Print this post

Please find attached V5.05.06b11

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

Fixes bug in ARC command in 16-bit modes
Adds additional checks for the H/W watchdog in the USB and SDcard routines

New parameter for OPTION USBKEYBOARD:
OPTION USBKEYBOARD lang [,noLED]

Set noLED to 1 to disable sending the light LED control command to the keyboard after caps lock etc. Can avoid hangs on some keyboards. Defaults to 0. This setting is preserved after subsequent firmware updates
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 10:37am 21 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  Please find attached V5.05.06b11 ...


Thanks as always Peter.

As an observation OPTION LIST doesn't show the new LED parameter - sorry!

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 12:14pm 21 Sep 2020
Copy link to clipboard 
Print this post

I'm not sure if this is a transparency bug, I'm probably misinterpreting the manual.

Sprite write doesn't work with a (transparent) black sprite. The manual for sprite write says "Overwrites the display with the contents of sprite buffer ‘n’ with the top left at coordinates ‘x’, ‘y’"
which I thought means it should write a black rectangle, but it doesn't do anything.

I tested in 12 bit mode and 8 bit mode, in V5.05.06b11. Test case attached.

gbug.bas.zip
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 01:02pm 21 Sep 2020
Copy link to clipboard 
Print this post

Black is always the transparent colour in 8 and 16 bit modes so will never show. In 12-bit mode you can have transparent black or solid black

Try  tile.colour(tile.empty)=RGB(black,15)
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 01:28pm 21 Sep 2020
Copy link to clipboard 
Print this post

I've honestly been trying to bite my tongue on this, but failed, please feel free to ignore or make some withering putdown.

The error message "Error: System fault - check code" is just too ambiguous, the "check code" still sugegsts to me that there must be an error code, even though I know that is not the case.

Suggest changing it to just "Error: System fault" and then one of:

1. Document possible causes in the manual.

2. Follow with a list of possible causes, e.g.

Error: System fault
Possible causes:
 - PRINT command followed by other keyword, e.g. PRINT AS
 - POKEing somewhere you shouldn't
 - CSUB taking too long to run without calling <foo>
 - firmware bug


3. Set the background blue and fill with apparently meaningless pseudo-technical gibberish.

Runs and hides,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 01:39pm 21 Sep 2020
Copy link to clipboard 
Print this post

  Quote  I've honestly been trying to bite my tongue on this, but failed, please feel free to ignore or make some withering putdown.


I'm waiting until I'm sure the H/W watchdog can stay in place but 2 seems like a good idea. Hopefully in b11 you are not seeing the error any more unless forced with print?

The watchdog is quite difficult as it is windowed. You can't ping it too soon or too late. The easy solution is to ping it in the clock interrupt but I don't want to do that as it is quite possible for the S/W to be in a tight loop but interrupts still work.
Edited 2020-09-21 23:40 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 01:47pm 21 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  I've honestly been trying to bite my tongue on this, but failed, please feel free to ignore or make some withering putdown.


I'm waiting until I'm sure the H/W watchdog can stay in place but 2 seems like a good idea. Hopefully in b11 you are not seeing the error any more unless forced with print?


I haven't seen it since the latest update (b11) even when I remove and reinsert the USB keyboard when running ... but then again I haven't been using the CMM2 other than to test your keyboard fixes. Also note I'm now using SD TIMING NORMAL, so if the file zeroing problem was related to SD TIMING FAST I won't be reproducing that.

Thanks for everything,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 02:09pm 21 Sep 2020
Copy link to clipboard 
Print this post

  Quote  so if the file zeroing problem was related to SD TIMING FAST I won't be reproducing that.


Wasn't
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 02:15pm 21 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  so if the file zeroing problem was related to SD TIMING FAST I won't be reproducing that.


Wasn't


OK, does that mean you think you have found and fixed the cause? It was occurring for me before the introduction of the watchdog ... it just zeroed the file and hung previously.

Regards,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 02:20pm 21 Sep 2020
Copy link to clipboard 
Print this post

  Quote  OK, does that mean you think you have found and fixed the cause?


No: I've just stopped the watchdog tripping by pinging it in the SD wait loops. The issue is that for some reason your SDcard is stopping responding which is why the watchdog triggered and why before the firmware would lockup. I would suspect a bad block or something similar.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 02:33pm 21 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  OK, does that mean you think you have found and fixed the cause?


No: I've just stopped the watchdog tripping by pinging it in the SD wait loops. The issue is that for some reason your SDcard is stopping responding which is why the watchdog triggered and why before the firmware would lockup. I would suspect a bad block or something similar.


OK ... <he says doubtfully> ... I think my mental model is missing something because I thought the watchdog was new in beta 6 and the issue predates that. I'm guessing there is a distinction between what you refer to as a "watchdog" and what your refer to as a "watchdog timer" ... alternatively I'm just displaying my ignorance.

Anyway if it's fixed then that's great. For what it is worth Win10 chkdsk doesn't think there is anything wrong with my SD card.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 02:44pm 21 Sep 2020
Copy link to clipboard 
Print this post

  Quote  Anyway if it's fixed then that's great.


It isn't fixed. I just found that sometimes SD access took longer than the watchdog so I'm pinging it in the SDcard access routines. I haven't done anything that would impact whatever may have caused your problem, nor can I see a reason.

Try the attached and see if you can break it. This saves to a temporary file and only if that works deletes the original and renames the temporary file. Worst case should be either the edit isn't saved or you end up with temporary file instead of the proper name (filename would be number in hex between 1 and FFFFFFFF)


CMM2V1.5.zip
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 03:04pm 21 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  Try the attached and see if you can break it. This saves to a temporary file and only if that works deletes the original and renames the temporary file. Worst case should be either the edit isn't saved or you end up with temporary file instead of the proper name (filename would be number in hex between 1 and FFFFFFFF)


Thanks Peter, I'll keep you apprised.

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 03:49pm 21 Sep 2020
Copy link to clipboard 
Print this post

Version b10 was unusable for me, probably due to my slightly duff SD card so I had rolled back to b5.

So far, b11 is working great. I can edit, save and run, test, and repeat with no clearing of the file on the SD card! Awesome!

===========
I wonder if Peter talks with a slight Scottish burr?

Kirk:   "Scotty! I need more power"
Scotty: "Captain! The firmware, she canna take it!"
Kirk:   "I need those features!"
Scotty: "It's impossible and it'll take me three weeks to do it!"

10 minutes later, Scotty is finished the upgrade, along with half a dozen other improvements. Sound familiar?
Visit Vegipete's *Mite Library for cool programs.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 04:14pm 21 Sep 2020
Copy link to clipboard 
Print this post

I spoke too soon.

I just got another "Error: System fault - check code" and the file I was editing is now 0 bytes long.

I guess I should try a different SD card...
Visit Vegipete's *Mite Library for cool programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 04:29pm 21 Sep 2020
Copy link to clipboard 
Print this post

  Quote  I just got another "Error: System fault - check code" and the file I was editing is now 0 bytes long.


Try the one I posted just above. Should never kill the file.
 
     Page 7 of 12    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025