Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:01 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 8 of 12    
Author Message
Womble

Senior Member

Joined: 09/07/2020
Location: United Kingdom
Posts: 267
Posted: 11:25pm 21 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  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.

Its happened a few times to me this evening, but so far has not killed the file.  Sometimes it has saved my changes, sometimes not.  So far I have not seen a pattern to predict when its going to error.  This evening I have been testing with TerraTerm and my vga-->usb capture device so the serial terminal has been active.  I will try on the other CMM2 connected to a monitor and keyboard tomorrow to see if that is also randomly erroring.

I am using the most recent firmware posted in this thread which you asked us to try to break.
Edited 2020-09-22 09:27 by Womble
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 01:34am 22 Sep 2020
Copy link to clipboard 
Print this post

I'm still getting many "Error: System fault - check code", even with other SD cards. At least with b11.5 the original file is not being deleted, although edits are lost. It is creating the extra file with the 32 bit hex name, time stamp 00:00 00-00-1980 but these are all with length zero.

I'll try a few more cards.

-- time passes --

Found a card that seems to work reliably. Testing continues.
Visit Vegipete's *Mite Library for cool programs.
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 02:23am 22 Sep 2020
Copy link to clipboard 
Print this post

  vegipete said  I'm still getting many "Error: System fault - check code", even with other SD cards. At least with b11.5 the original file is not being deleted, although edits are lost.

It would be good if this could put you back in the editor with an error message so you can either try again or take a photo of the screen when it happens.
  Quote  
It is creating the extra file with the 32 bit hex name, time stamp 00:00 00-00-1980 but these are all with length zero.

I'll try a few more cards.

-- time passes --

Found a card that seems to work reliably. Testing continues.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 07:32am 22 Sep 2020
Copy link to clipboard 
Print this post

Please find attached V5.05.06b12

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

This includes a change to the editor when saving as follows:

Look for a file named the same as the file being edited but with ".bak" appended
If that file exists delete it.
Rename the current unchanged file by appending ".bak"
Save the edited version with the original filename

This means that you should never lose the original file and the edit but in the worst case may lose one or the other. In addition normally you will always have a previous version available if you do something while editing you later wish you hadn't  

In addition, this release adds a watchdog check to one further SDcard function that shouldn't cause a watchdog timeout but based on feedback may be with some Sdcards and/or CMM2
Edited 2020-09-22 19:00 by matherp
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 09:37am 22 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  Please find attached V5.05.06b12

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

This includes a change to the editor when saving as follows:

Look for a file named the same as the file being edited but with ".bak" appended
If that file exists delete it.
Rename the current unchanged file by appending ".bak"
Save the edited version with the original filename

This means that you should never lose the original file and the edit but in the worst case may lose one or the other. In addition normally you will always have a previous version available if you do something while editing you later wish you hadn't  

In addition, this release adds a watchdog check to one further SDcard function that shouldn't cause a watchdog timeout but based on feedback may be with some Sdcards and/or CMM2


I like it. I wasn't having problems saving often enough to be able to test it easily, but I'm almost looking forward to it happening now so I can see what happens .
 
chris
Regular Member

Joined: 24/08/2020
Location: United Kingdom
Posts: 56
Posted: 10:05am 22 Sep 2020
Copy link to clipboard 
Print this post

Thanks so much for this. I was waiting for the next major release, but after data loss I have nothing to lose updating to this one.  I realise we are on the bleeding edge, and it's whack a mole at the beginning, so thank you for being so responsive.

Actually, some feedback on the update process here.

I tried to update the firmware (for the first time) using the UPDATE FIRMWARE command (so I didn't have to take the board out of the case). STM32CubeProgrammer could see the CMM2 as COM6, and I went to the firmware update screen, selected the .bin file, then made sure verify was checked, and tried to write. It wrote everything but failed on the verify. I tried switching on CMM2 just in case, but it was unresponsive. In the end, used the jumper + buttom on the board to put it in firmware update mode, repeated the process and it worked. Just for your information. I was quite excited to do a firmware update without taking it out of the case, but I guess perhaps there are problems with my particular board with the process or this is just some random event. The board I'm using is the all-in-one board, purchased from Micromite.

Anyway - all is well that ends well, just wanted to report this, so you are aware, and perhaps can point me to user-error.
 
matherp
Guru

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

If you use a USB-A to USB-A cable then the update will be rock-solid. I use UPDATE FIRMWARE even when developing.
 
djwildstar
Newbie

Joined: 29/07/2020
Location: United States
Posts: 24
Posted: 07:51pm 22 Sep 2020
Copy link to clipboard 
Print this post

This is a weird one, currently using 5.05.06 beta 12.  The actual file where I triggered this is too big to serve as an example (the #INCLUDE file is about 1k lines and 26kbytes).  Luckily after much eyestrain I was able to track down a single-character error that was the cause of all this.  After figuring out what went wrong, I was able to re-create the issue with a small example file (below).

The structure is that Weird.BAS (which is a correct BASIC program) contains a line where it INCLUDES Malformed.INC (which contains a syntax error).  

After RESET or NEW, attempting to RUN "Weird.BAS" produces the following results:
> RUN "Weird.BAS"
No closing quote
> RUN "Weird.BAS"
Memory write address
> RUN "Weird.BAS"
No closing quote
> RUN "Weird.BAS"
Memory write address
> RUN "Weird.BAS"
Not enough heap memory
> MEMORY
Program:
  0K ( 0%) Program (0 lines)
512k (100%) Free
Data:
 0K ( 0%) 0 Variables
4610K (88%) General
574k (12%) Free

The first error message, "No closing quote" is correct, although it does not identify the line or file where the error is located.  It should probably say "Error in Malformed.INC line 3: No closing quote".  

Also, attempting to find the problem is also somewhat strange.  After reset or NEW:
> RUN "Weird.BAS"
> No closing quote
> EDIT
Nothing to edit


This seems odd, since normally EDIT will load the most-recently-run program into memory (in the case of a program that has an INCLUDE file with an error, it would be nice if the editor loaded the file with the error rather than the base program).  

It is easy enough to issue the command EDIT "Weird.BAS" and the program does load up into the editor.  However saving the program with F1 will cause the editor's text to remain on-screen and the one of the two error messages (either "No closing quote" or "Memory write address") to appear on the line where the editor's cursor was.  The BASIC prompt ">" appears two lines below.

Editing the Malformed.INC file does not display any problems, even though this is where the error is located.

Weird.BAS:
REM Trigger the error
#INCLUDE "Malformed.INC"
PRINT "Hello, World!"


Malformed.INC:
REM Malformed INCLUDE file
DATA 1,1,1
DATA 2,"
DATA 3,3,3

Note the missing close quote on line 3.  I'm guessing that when processing the #INCLUDE, that the CMM2 basic reads past the end of the line, the end of the input buffer, an up through the rest of memory looking for the close quote, resulting in the strange behavior and out-of-memory condition.
Edited 2020-09-23 05:52 by djwildstar
 
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 11:33pm 22 Sep 2020
Copy link to clipboard 
Print this post

With the firmware 5.05.06b12, when tried to run the last version of Gauntlet when you press space before the character select screen, it gives:

Error: System fault - check code.

The error doesn´t occurs if I comment the lines 6 and 7 in the PLAYER_SELECT.INC file:

if CtrlType(t)=1 then ON ERROR SKIP 1: WII CLASSIC OPEN
if CtrlType(t)=2 then ON ERROR SKIP 1: WII NUNCHUK OPEN

Edited 2020-09-23 09:38 by MauroXavier
 
Womble

Senior Member

Joined: 09/07/2020
Location: United Kingdom
Posts: 267
Posted: 12:07am 23 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  Please find attached V5.05.06b12

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

This includes a change to the editor when saving as follows:

Look for a file named the same as the file being edited but with ".bak" appended
If that file exists delete it.
Rename the current unchanged file by appending ".bak"
Save the edited version with the original filename

This means that you should never lose the original file and the edit but in the worst case may lose one or the other. In addition normally you will always have a previous version available if you do something while editing you later wish you hadn't  

In addition, this release adds a watchdog check to one further SDcard function that shouldn't cause a watchdog timeout but based on feedback may be with some Sdcards and/or CMM2

Peter...

I think this is a very wise and worthwhile change.  Saving the old file as .bak is a change I would like to see retained as standard editor behaviour.  With modern SD cards we are not short of space.

Excellent work, Thanks

Womble
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 04:01am 23 Sep 2020
Copy link to clipboard 
Print this post

Updating sprites on page 1 in the frame blanking interval in mode 7,12 doesn't seem to be working.
When I do it in mode 1 or 2 or 3, it's fine. I'm using sprite next and setting a flag in the frame blanking interrupt to trigger the update. But in mode 7 (320x240), the sprites flicker like they're being updated outside of the screen blanking interval.

At first I wondered if the interrupt is going off at the wrong time, but I couldn't find any sign of that.

I checked the time between interrupts, and it seems to be close to the expected 13.333 ms

And the flickering isn't only for sprites near the top or bottom of the screen.

I reduced how often I do the "sprite next", and it looks like sprite next isn't correctly updating the screen memory, it leaves some lines blank that shouldn't be.

game-simple.bas.zip

I thought maybe it's a combination of the double-sized pixels taking longer to update (compared to 800x600), and the full screen display taking more memory bandwidth to display (compared to 320x200)

But then I tested a cls from the command line, which I'd expect to take longer than three small sprites, and that updated the whole screen properly. So I'm not sure what's happening.

This works normally:

mode 7,12
page write 1
cls rgb(green)


Last tested on 5.05.06b11

(edited to add - I was just testing mode 7, I was originally using a different mode)
Edited 2020-09-23 14:12 by capsikin
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 08:01am 23 Sep 2020
Copy link to clipboard 
Print this post

  Quote  But in mode 7 (320x240), the sprites flicker like they're being updated outside of the screen blanking interval.


When a mode is displaying from the SDRAM I have to change the memory controller to allow shared access to the memory. Normally the SDRAM is only accessed by the processor. I'd missed mode 7,12 from the list of modes that needs this (page 1 in mode 7,12 is @ &HD0000000). I'll fix this is the next beta.

  Quote  Note the missing close quote on line 3.

Will try and fix

  Quote  The error doesn´t occurs if I comment the lines 6 and 7 in the PLAYER_SELECT.INC file:

The ST I2C routines have a timeout for when the device doesn't respond but during this time the watchdog isn't being pinged. I' try and fix in next beta
Edited 2020-09-23 18:12 by matherp
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 07:49am 24 Sep 2020
Copy link to clipboard 
Print this post

Please find attached V5.05.06b14

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

Page up/down functionality in editor now goes to top or end of current display on first
press and then pages by the number of lines showing on subsequent presses

Fixes bug where the DAC interrupt triggers immediately when used for a second time
Fixes bug in I2C wait loops which caused watchdog timeouts (I hope - couldn't replicate) Mauro: please test and confirm
Fixes bug where closing quotes are missing in program lines and improves error reporting of same
Fixes memory management bug in mode 7,12
Traps error when a static variable name and function/sub name are greater than 32 chars combined.
Edited 2020-09-24 19:42 by matherp
 
djwildstar
Newbie

Joined: 29/07/2020
Location: United States
Posts: 24
Posted: 01:27pm 24 Sep 2020
Copy link to clipboard 
Print this post

@matherp -- Wow, thank you!  I'm going to go check it out now ...
 
Womble

Senior Member

Joined: 09/07/2020
Location: United Kingdom
Posts: 267
Posted: 02:55pm 24 Sep 2020
Copy link to clipboard 
Print this post

Peter ... Many Thanks for this  

I was tidying up some .BAK files on my SD Card from last night, with the manual close at hand, and noticed this:



I tested F3=List, F5=MkDir which both worked fine, they are just missing from the display.
^F=Find I think is only applicable to the Edit screen, could not fathom out how this worked in the Files screen.
All of the other commands worked as expected.
The Edit screen also matches the manual.

Some time ago you asked for suggestions in the "CMM2: Whats Next?" thread.
Could I suggest ^N=NewFile be added to the Edit screen, possibly replacing the ^F=Find function there.  Might make things a bit more user friendly for new users.

Regards

Womble
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 03:07pm 24 Sep 2020
Copy link to clipboard 
Print this post

  Quote  ^F=Find I think is only applicable to the Edit screen, could not fathom out how this worked in the Files screen.

finds a filename containing the text you type - very useful for getting to a specific file

  Quote  I tested F3=List, F5=MkDir which both worked fine, they are just missing from the display.

These is an algorithm that decides how much to show on the line but it hasn't kept up with the latest modes
 
weirdocollector
Newbie

Joined: 03/09/2020
Location: Italy
Posts: 4
Posted: 04:47pm 24 Sep 2020
Copy link to clipboard 
Print this post

  chris said  Thanks so much for this. I was waiting for the next major release, but after data loss I have nothing to lose updating to this one.  I realise we are on the bleeding edge, and it's whack a mole at the beginning, so thank you for being so responsive.

Actually, some feedback on the update process here.

I tried to update the firmware (for the first time) using the UPDATE FIRMWARE command (so I didn't have to take the board out of the case). STM32CubeProgrammer could see the CMM2 as COM6, and I went to the firmware update screen, selected the .bin file, then made sure verify was checked, and tried to write. It wrote everything but failed on the verify. I tried switching on CMM2 just in case, but it was unresponsive. In the end, used the jumper + buttom on the board to put it in firmware update mode, repeated the process and it worked. Just for your information. I was quite excited to do a firmware update without taking it out of the case, but I guess perhaps there are problems with my particular board with the process or this is just some random event. The board I'm using is the all-in-one board, purchased from Micromite.

Anyway - all is well that ends well, just wanted to report this, so you are aware, and perhaps can point me to user-error.


Experienced just the same with my MM2 bought from Micromite.org.

Perhaps it's time to get an A-A USB Cable  

An USB 2.0 is OK or I need a 3.0 one ?
Edited 2020-09-25 02:50 by weirdocollector
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 05:23pm 24 Sep 2020
Copy link to clipboard 
Print this post

  weirdocollector said  An USB 2.0 is OK or I need a 3.0 one ?


USB 2.0 will work fine, assuming everything else is OK.
Enjoy Every Sandwich / Joe P.
 
Womble

Senior Member

Joined: 09/07/2020
Location: United Kingdom
Posts: 267
Posted: 09:00pm 24 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  ^F=Find I think is only applicable to the Edit screen, could not fathom out how this worked in the Files screen.

finds a filename containing the text you type - very useful for getting to a specific file

  Quote  I tested F3=List, F5=MkDir which both worked fine, they are just missing from the display.

These is an algorithm that decides how much to show on the line but it hasn't kept up with the latest modes

Thanks for clarifying that Peter.  I knew I was missing something with ^F.

Womble
 
weirdocollector
Newbie

Joined: 03/09/2020
Location: Italy
Posts: 4
Posted: 02:08pm 26 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  If you use a USB-A to USB-A cable then the update will be rock-solid. I use UPDATE FIRMWARE even when developing.


How can I issue the UPDATE FIRMWARE command after connecting the cased CMM2 to my PC using the USB-A to USB-A cable?

My PC does not seem to recognise a new serial port when the CMM2 is connected and I cannot open a Putty section to type the command in.

Thanks for your help.
 
     Page 8 of 12    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025