Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:38 01 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: Option <foo> "Invalid in a program"

Author Message
thwill

Guru

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

Hi folks,

I've been using a file called "config.bas" to reconfigure the CMM2's Options for a while now:
SEARCH_PATH$ = "/bin/"

s$ = Mm.Info$(Search Path)

If LCase$(Mm.CmdLine$) = "reset" Or LCase$(Mm.CmdLine$) = "clear" Then
 Print "OK"
 Option Reset

ElseIf LCase$(Mm.CmdLine$) = "list" Or s$ = SEARCH_PATH$ Then
 Option List

ElseIf Mm.CmdLine$ <> "" Then
 Error "Unknown command line option"

ElseIf s$ = "" Then
 Option F11 "chdir " + Chr$(34) + "/zmim/src" + Chr$(34) + Chr$(13) + Chr$(10)
 Option F12 "chdir " + Chr$(34) + "/sptools/src" + Chr$(34) + Chr$(13) + Chr$(10)
 Option Search Path "/magic/"

 Print "Please run *config again to complete setup"

 ' This will cause a reset
 option SD Timing Fast

ElseIf s$ = "/magic/" Then
 Option Search Path SEARCH_PATH$
 Print "OK"

 ' this will cause a reset
 Option RAM

Else
 Error "Unknown state"

EndIf


But since the release version (or possibly one of the last betas that I missed) of 5.05.05 this has reported the error "Invalid in a program" for the setting of "SD Timing" and "RAM".

Is this deliberate ?

Is there an alternative ?

On a related note, when I started my CMM2 this evening the red LED was flashing intermittently and the SD card would not read. I switched to OPTION SD TIMING CONSERVATIVE and it started working ... I then switched back to OPTION SD TIMING FAST and it was still working. Any ideas ? or was it just cosmic rays ?

Best wishes,

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

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 12:09am 04 Sep 2020
Copy link to clipboard 
Print this post

On the SD card issue, Peter Mather said here:
  Quote  For SDcards that don't work it appears the issue is in initialisation. Once they have been initialised once successfully using the conservative timings, and assuming they are not removed or power cycled, then they can be re-initialised with the normal timings and will continue to work properly with the normal timings.


Bill
Keep safe. Live long and prosper.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 07:36am 04 Sep 2020
Copy link to clipboard 
Print this post

  Quote  But since the release version (or possibly one of the last betas that I missed) of 5.05.05 this has reported the error "Invalid in a program" for the setting of "SD Timing" and "RAM".


All option changes that force a restart are not allowed in a program as it makes no sense and will confuse the majority. Some were missed previously but hopefully they are all now caught
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:52am 04 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  All option changes that force a restart are not allowed in a program as it makes no sense and will confuse the majority. Some were missed previously but hopefully they are all now caught


OK, but these options are still reset when the firmware is updated ?

Should EXECUTE workaround the limitation or is it just something I need to accept ? It's not a big deal, but as you have observed before I seem to work on my CMM2 in an atypical manner.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
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