Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:55 02 Aug 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: Is it fundamentally flawed for developers?

     Page 2 of 2    
Author Message
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 490
Posted: 01:34pm 20 Jul 2020
Copy link to clipboard 
Print this post

The ware leveling function and the option ram are both a very good Ideas and should both be implmented. I think another good idea would be to implement a fuller emulation of the CMM2 in the DOS/Win version with all the graphics and sound functions so that can be our TESTBED and development system for big projects.  The only issues would be sensors and controller functions.  With a WII/SNES to usb adapter like I have could help with the controler side of things.  I have the Mayflash 2 port unint that has worked well for PC use of Nunchucks and Classic controllers.   Is this a good or bad idea? You would have to have restrained graphic modes options to match the modes of the CMM2.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 01:39pm 20 Jul 2020
Copy link to clipboard 
Print this post

  Quote  Should I expect performance to be different ?


Performance different running from RAM, some things faster, some slower, but effect marginal as all depends on vagaries of caching

Solar eclipse RAM 16.07  FLASH 15.72  'lower better
Lines/second  RAM 295419 FLASH 294770 'higher better
Grainbench    RAM 14955  FLASH 14916  'higher better
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 01:53pm 20 Jul 2020
Copy link to clipboard 
Print this post

  matherp said  Performance different running from RAM ...


Looks extremely promising Peter.

Thanks again for making this change and additionally for taking the time to perform this profiling.

Take the rest of the day off, you can start on adding full graphics support to the Windows version of MMBasic tomorrow ... just kidding, I think that's a "pipe dream".

Regards,

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

Joined: 30/06/2020
Location: Germany
Posts: 675
Posted: 02:59pm 20 Jul 2020
Copy link to clipboard 
Print this post

Hi,

I also had this question, which Tom here came up with, in my mind. I really like the idea to choose between RAM or FLASH mode. It would be really great if it would make it into the final version of mmbasic!

Just for the paranoid ones of us :D
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 490
Posted: 03:28pm 20 Jul 2020
Copy link to clipboard 
Print this post

  matherp said  I may not be "agile" but sometimes I impress even myself  

Try this test version

OPTION RAM - programs will save and run from RAM, programs are lost with power, reset, or option change, variable storage reduced by 512Kb
OPTION FLASH (default) programs will save and run from flash, all functionality as before
MM.INFO(PROGRAM) gives the address where the program is stored


CMM2V1.5.zip


What is the base of this version?  Is it 5.5.3X or 5.5.4RC5. Also can this be put into the 5.5.4X when you do release it?  Also, how will the loss of the 512kb variable storage effect progrming.  The veriables just go into ram? Sorry about my ignorance as I have no hands on yet I am waiting for my pcb version(hence my concern) to arived and it is just shipping from UK TODAY!!! I am in the US so who knows when I will get it.
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 377
Posted: 04:42pm 20 Jul 2020
Copy link to clipboard 
Print this post

  mclout999 said  
  matherp said  I may not be "agile" but sometimes I impress even myself  

Try this test version

OPTION RAM - programs will save and run from RAM, programs are lost with power, reset, or option change, variable storage reduced by 512Kb
OPTION FLASH (default) programs will save and run from flash, all functionality as before
MM.INFO(PROGRAM) gives the address where the program is stored


CMM2V1.5.zip


What is the base of this version?  Is it 5.5.3X or 5.5.4RC5. Also can this be put into the 5.5.4X when you do release it?  Also, how will the loss of the 512kb variable storage effect progrming.  The veriables just go into ram? Sorry about my ignorance as I have no hands on yet I am waiting for my pcb version(hence my concern) to arived and it is just shipping from UK TODAY!!! I am in the US so who knows when I will get it.


It shows up as V5.05.04RC6 on the startup screen.
-Carl
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 377
Posted: 05:01pm 20 Jul 2020
Copy link to clipboard 
Print this post

This simple program will print out the tokenized version of itself.

Note requires latest Beta Version posted in this thread (V5.05.04RC6 or later) for the MM.INFO(Program) command.

Print "This program will print out the tokenized version of itself:"
'Note that comments are completely skiped becuase they are not needed by the parser

Print

' Get the address of the program in memory
Start = MM.Info(program)

'Loop through the next 500 bytes and display as ASCII
Print "ASCII:"
X = 0
for i = Start to Start + 500
 PrintAscii(Peek(BYTE i));
 X = X + 1
 if X Mod 24 = 0 then Print
next i

Print
Print

'Loop through and display as HEX
Print "HEX:"
X = 0
for i = Start to Start + 500
 Y = PrintHex(Peek(BYTE i))
 X = X + 1
 if X Mod 24 = 0 then Print
next i

' Sub and function used to show code in tokenized version
Sub PrintAscii(C)

 Print Chr$(C);

End Sub


Function PrintHex(H)

 Print Hex$(H,2),;  
 PrintHex = H

End Function


Here is the output:


-Carl
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 377
Posted: 05:22pm 20 Jul 2020
Copy link to clipboard 
Print this post

V5.05.04RC6


CSUBs do not seem to work with OPTION RAM enabled.  Not sure if this is even possible as the CSubs use direct calls to MMBasic functions in Flash memory?  Will the CPU support function calls like this?
Edited 2020-07-21 03:33 by Sasquatch
-Carl
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 490
Posted: 05:32pm 20 Jul 2020
Copy link to clipboard 
Print this post

  Sasquatch said  
  mclout999 said  
  matherp said  I may not be "agile" but sometimes I impress even myself  

Try this test version

OPTION RAM - programs will save and run from RAM, programs are lost with power, reset, or option change, variable storage reduced by 512Kb
OPTION FLASH (default) programs will save and run from flash, all functionality as before
MM.INFO(PROGRAM) gives the address where the program is stored


CMM2V1.5.zip


What is the base of this version?  Is it 5.5.3X or 5.5.4RC5. Also can this be put into the 5.5.4X when you do release it?  Also, how will the loss of the 512kb variable storage effect progrming.  The veriables just go into ram? Sorry about my ignorance as I have no hands on yet I am waiting for my pcb version(hence my concern) to arived and it is just shipping from UK TODAY!!! I am in the US so who knows when I will get it.


It shows up as V5.05.04RC6 on the startup screen.


Thanks for the info.
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 02:56am 21 Jul 2020
Copy link to clipboard 
Print this post

  Geoffg said  It has been over six years since I introduced the Micromite (with a same flash endurance) and I have lost count of the number of times that someone has worried about the life of the flash.  In all that time I have not heard of anyone, repeat anyone, who has hit that limit.
Geoff

Okay, so it seems this FLASH Endurance question has now hit a whole new problem...

When the internal FLASH wears out, we may no longer be able to buy replacement Waveshare modules (or STM32H743IIT6 chips), as they'll probably be obsolete / out of production!  Arrrgh!

(Sorry, I couldn't resist that summarisation).
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 07:03am 21 Jul 2020
Copy link to clipboard 
Print this post

  Quote  CSUBs do not seem to work with OPTION RAM enabled.  


Thanks for the report. I'll look at it and work out if it is an absolute limitation or can be fixed.
 
greybeard
Senior Member

Joined: 04/01/2010
Location: Australia
Posts: 174
Posted: 07:54am 21 Jul 2020
Copy link to clipboard 
Print this post

It's like someone invented a new hammer and now everyone is running around looking for a nail to hit.
A CMM2 might be a pretty clever/good hammer but just because it can hit nails doesn't mean that it's the magical solution for every nail.
Just need to understand the tools you are using and what they are capable of.  
Edited 2020-07-21 17:55 by greybeard
 
Poppy

Guru

Joined: 25/07/2019
Location: Germany
Posts: 486
Posted: 08:30am 21 Jul 2020
Copy link to clipboard 
Print this post

Hammer

is a good comparison, but more like how many nails can I make with it and how big can they be!

The CMM2 is quite impressive on its hardware side, so some or many users just want to get some functional perception first.

I wonder what it would have been like some 35 years ago about the C64 on the internet ...
Andre ... such a GURU?
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 12:16pm 21 Jul 2020
Copy link to clipboard 
Print this post

  GregZone said  When the internal FLASH wears out, we may no longer be able to buy replacement Waveshare modules (or STM32H743IIT6 chips), as they'll probably be obsolete / out of production!  Arrrgh!


The ultimate problem there may not be the obsolescense of STM32H743IIT6 chips but whether there will ever be someone to pick up Peter's mantle (or Geoff's) to port to the newest flash hardware. But I don't think I'll be around to face that problem.

~
Edited 2020-07-21 22:16 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 490
Posted: 02:41pm 21 Jul 2020
Copy link to clipboard 
Print this post

  matherp said  I may not be "agile" but sometimes I impress even myself  

Try this test version

OPTION RAM - programs will save and run from RAM, programs are lost with power, reset, or option change, variable storage reduced by 512Kb
OPTION FLASH (default) programs will save and run from flash, all functionality as before
MM.INFO(PROGRAM) gives the address where the program is stored


CMM2V1.5.zip


I had a thought that might be interesting.  Could you use the OPTION RAM and OPTION Flash dynamically to load a very static section of code into Flash and other sections of code into ram?  Would this be a good or useless functionality?
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 490
Posted: 04:20am 22 Jul 2020
Copy link to clipboard 
Print this post

OK no one has hit me back on my last post but now I have a new question.  With the new OPTION RAM dose that not also remove the limitation of basic code being limited to the 512K imposed by flash only storage of code? Some one explain this and my last post.  Thanks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 05:44am 22 Jul 2020
Copy link to clipboard 
Print this post

  Quote  I had a thought that might be interesting.  Could you use the OPTION RAM and OPTION Flash dynamically to load a very static section of code into Flash and other sections of code into ram?  Would this be a good or useless functionality?

And we would be back to the fear of wearing out the flash.

  Quote  With the new OPTION RAM dose that not also remove the limitation of basic code being limited to the 512K imposed by flash only storage of code? Some one explain this and my last post.  Thanks

There is room for 25000 lines of code with 512k so that is a very reasonable working space.
Code that long is likely to need plenty of variable working space so further reduction would not be wise.

Jim
VK7JH
MMedit
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 490
Posted: 10:50am 22 Jul 2020
Copy link to clipboard 
Print this post

  TassyJim said  
  Quote  I had a thought that might be interesting.  Could you use the OPTION RAM and OPTION Flash dynamically to load a very static section of code into Flash and other sections of code into ram?  Would this be a good or useless functionality?

And we would be back to the fear of wearing out the flash.

  Quote  With the new OPTION RAM dose that not also remove the limitation of basic code being limited to the 512K imposed by flash only storage of code? Some one explain this and my last post.  Thanks

There is room for 25000 lines of code with 512k so that is a very reasonable working space.
Code that long is likely to need plenty of variable working space so further reduction would not be wise.

Jim


Thanks for the response.
 
     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 2025