Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:00 06 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 5 of 12    
Author Message
matherp
Guru

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

That is as correct as it is going to get. You are seeing the run command and then the statement in the program
 
thwill

Guru

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

  matherp said  That is as correct as it is going to get. You are seeing the run command and then the statement in the program


Fair enough.

Thanks for the improvements.

Best wishes,

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

Guru

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

  matherp said  
  Quote  but would it be possible to enable an option for (in the editor) CONTROL + S to be save, and not select?

This would be a YAN (yet another option) which you would want to be permanent with little utility except for a tiny user base so sorry - no

Every one using Windoze is a tiny user base?
[Ctrl]-x/c/v to cut, copy, paste; [Ctrl]-s to save; [Shift]-arrow up/down/left/right to select: these have become the global standard. Even this web browser I'm using understands them.

But don't get me wrong, I'm not complaining. Having the editor built in, always ready to go, is absolutely fantastic. I even use it sometimes! Actually quite often.

Once upon a time, I was functionally fluent with VI. But I have forgotten all of that now. I wonder how it would compare, given that it was a keyboard only editor...
Edited 2020-09-15 03:40 by vegipete
Visit Vegipete's *Mite Library for cool programs.
 
RetroJoe

Senior Member

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

vi - another contender for the “Once you learn it, it’s really great!” prize. The only problem is learning it is less enjoyable than sticking hot needles in your eyes. UNIX seems to have a lot of those “Designed by Torquemada” utilities...
Edited 2020-09-15 04:03 by jpusztai
Enjoy Every Sandwich / Joe P.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4301
Posted: 06:13pm 14 Sep 2020
Copy link to clipboard 
Print this post

Vi{m} is certainly much more capable than the built in editor but with a considerably steeper learning curve.

I have the inkling that the internal editor has the whiff of legacy code about it and is no longer being maintained by its originator leaving Peter to do the best he can? Would that be an inaccurate assessment?

... my second guess is that it is a port and that the CMM2 was not it's original target machine.

EDIT: It's the latter, though the original source (if I've correctly identified it) doesn't appear to have any unit-tests which is one of the possible definitions of "legacy code".

Best wishes,

Tom
Edited 2020-09-15 05:13 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
chris
Regular Member

Joined: 24/08/2020
Location: United Kingdom
Posts: 56
Posted: 07:54pm 14 Sep 2020
Copy link to clipboard 
Print this post

  vegipete said  
  matherp said  
  Quote  but would it be possible to enable an option for (in the editor) CONTROL + S to be save, and not select?

This would be a YAN (yet another option) which you would want to be permanent with little utility except for a tiny user base so sorry - no

Every one using Windoze is a tiny user base?
[Ctrl]-x/c/v to cut, copy, paste; [Ctrl]-s to save; [Shift]-arrow up/down/left/right to select: these have become the global standard. Even this web browser I'm using understands them.

But don't get me wrong, I'm not complaining. Having the editor built in, always ready to go, is absolutely fantastic. I even use it sometimes! Actually quite often.

Once upon a time, I was functionally fluent with VI. But I have forgotten all of that now. I wonder how it would compare, given that it was a keyboard only editor...


I do struggle with the lack of control + S. Nothing rational about it, it's just decades of muscle memory is hard to push against. I also miss being able to hold shift and press cursor up to select backwards through text.

I imagine that the editor keyboard mappings is based on some other editor that predates the modern standards for editor shortcuts.

Thank you for adding OPTION 3 though, that will help a lot.
 
chris
Regular Member

Joined: 24/08/2020
Location: United Kingdom
Posts: 56
Posted: 09:50am 15 Sep 2020
Copy link to clipboard 
Print this post

I have two requests for a future CMM2 firmware version / MMBasic CMM2 enhancement. Neither of these are a super priority, but I would find common use for both of these features.

--- Request One - Custom File Associations ---

I'd like to build a build a simple domain specific language, implemented in MMBASIC or MMBASIC / CSUBs

This language will implement the logic of a game, and let's give it the hypothetical file suffix - .BBQ.

What I would like CMM2 to do is to allow me to run the BBQ.BAS file every time I select a file ending in the .BBQ suffix in the file explorer.

As such, I would like a formal way to define associations between (non reserved) file suffixes and a path to a .BAS file.

e.g.

In file ./.ASSOCIATIONS

Have contents:

 BBQ "./BBQ/BBQ.BAS"


Upon booting the CMM2, the file association file is read, maybe up to a sensible max filesize (1K ?)

--- Request 2 - Command Line Parameters ---

I'd like to be able to pass parameters to a basic program.

e.g.

At the command line:

> BBQ.BAS

(prints the default zero-arg message)

THROW ANOTHER SHRIMP ON THE BARBIE

At the command line:

> BBQ.BAS "CORN"

(prints)

THROW ANOTHER CORN ON THE BARBIE

N number of string parameters would better to be supported.

----

Anyway, that's it for the wishlist.

It's quite possible that both of these already exist - but I did look at both manuals (searching for strings "command line parameter" and "file association") and couldn't find either of these features, so please believe I wasn't lazy in checking the ####ing manual first.

Thanks for the MMBasic and CMM2. Absolutely love both of them.
 
matherp
Guru

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

  Quote  'd like to be able to pass parameters to a basic program.


MM.CMDLINE$

  Quote  As such, I would like a formal way to define associations between (non reserved) file suffixes and a path to a .BAS file.

No - too specific and doesn't fit the architecture
 
capsikin
Guru

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

I thought about how I was making a lot of typos with quote marks previously when I hadn't set the correct keyboard, and did some testing. I don't think this is my previous bug, but this hangs the computer, typed at the command line:

print as""asd
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 07:36am 16 Sep 2020
Copy link to clipboard 
Print this post

3 bug reports.


Report 1:
Something goes wrong when I do this test:
run a program that includes font 8 (in the example, I called it "fz.bas")
at command line, do:
font 8,2
run a different program that gives an error (in the example, I called it "fn.bas")


zxbug.zip
so to test you go to the folder with the programs, then do:
run "fz.bas"
font 8,2
run "fn.bas"

Report 2:
Also, something goes wrong if I run fz.bas, run another program without the font (e.g. fn.bas), then do:
font 8,2
I don't think it should work, but there should be an error message because the font is no longer loaded
Instead the screen goes blank (this is recoverable by typing other commands, I think by changing mode or font)

Same test but not double sized, using:
"font 8" instead of "font 8,2"
I can see what looks like a giant cursor on the screen


Report 3:
If I enter:
run "f
at the command prompt, the computer hangs. I'm missing a quote mark at the end.
This doesn't require my example program.
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 07:41am 16 Sep 2020
Copy link to clipboard 
Print this post

  capsikin said  I thought about how I was making a lot of typos with quote marks previously when I hadn't set the correct keyboard, and did some testing. I don't think this is my previous bug, but this hangs the computer, typed at the command line:

print as""asd


I think it's nothing to do with the quotes.
These do the same thing:
print as
print then
print until
print to

bad commands starting with while (on the command line) often give "Internal fault 1(sorry)" including:
while
while as
Edited 2020-09-16 17:48 by capsikin
 
capsikin
Guru

Joined: 30/06/2020
Location: Australia
Posts: 341
Posted: 07:55am 16 Sep 2020
Copy link to clipboard 
Print this post

If I try to make a new file using:
edit "wrong/newfile.bas"
(i.e. I have typed the folder name wrong) it lets me edit a new program, then the editor crashes when I try to save it, saying "Could not find the path"
 
matherp
Guru

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

Thanks for the report

It happens with "print as" and "print for" etc.
but not "print if"

i.e. some language words but not others   - now need to find out why
Edited 2020-09-16 18:01 by matherp
 
thwill

Guru

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

Hi folks,

Just updating the Welcome Tape with the latest version of Mandelbrot Explorer, and this:
If Sprite(X,1) > -1 Then Sprite Hide 1

is reporting:
Error in line 362: Not Showing


Has there been a change in Sprite behaviour (i.e. how to detect if they are showing or not) that needs to be accounted for ?

Currently running 5.05.06b5.

If there has been a change then is there some code that will work on both 5.05.05 release and the .06 beta ?

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: 10209
Posted: 10:07am 16 Sep 2020
Copy link to clipboard 
Print this post

  Quote  Has there been a change in Sprite behaviour (i.e. how to detect if they are showing or not) that needs to be accounted for ?


Yes: the code now matches the manual

Try

  Quote  If Sprite(X,1) <> 10000 Then Sprite Hide 1
 
thwill

Guru

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

  matherp said  Yes: the code now matches the manual ...


Thanks Peter. Because I wanted to retain compatibility with the release version of the firmware I instead switched to tracking the visibility of the sprite with a variable.

Best regards,

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 10209
Posted: 04:01pm 16 Sep 2020
Copy link to clipboard 
Print this post

  Quote  If I try to make a new file using:
edit "wrong/newfile.bas"
(i.e. I have typed the folder name wrong) it lets me edit a new program, then the editor crashes when I try to save it, saying "Could not find the path"


The error message is therefore correct - solution obvious

  Quote  print as
print then
print until
print to


From the manual page 19

  Quote  A variable name or a label must not be the same as a function or one of the following keywords: THEN, ELSE, GOTO, GOSUB, TO, STEP, FOR, WHILE, UNTIL, LOAD, MOD, NOT, AND, OR, XOR, AS.
Eg, step = 5 is illegal as STEP is a keyword.


Obviously the firmware shouldn't lockup but the code is in error

  Quote  Also, something goes wrong if I run fz.bas, run another program without the font (e.g. fn.bas), then do:
font 8,2
I don't think it should work, but there should be an error message because the font is no longer loaded


Will fix

  Quote  If I enter:
run "f
at the command prompt, the computer hangs. I'm missing a quote mark at the end.

Will fix
 
djwildstar
Newbie

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

Here's a weird one, using 5.05.06b4:

OPTION ANGLE DEGREES
LET b% = 46 : LET I% = 3 : LET a = 45.0
IMAGE ROTATE_FAST b%*(I%-1),0, b%,b%, b%*(I%-1),400, a, 0, 0

The above behaves as expected.  However, if I run:

IMAGE ROTATE b%*(I%-1),0, b%,b%, b%*(I%-1),400, a, 0, 0

I get the error: "Syntax".

I can't figure out what I am doing wrong - I thought that IMAGE ROTATE and IMAGE ROTATE_FAST should be exactly the same except for the keyword.

I've attached a screenshot, starting from a power-on, as verification.

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10209
Posted: 05:02pm 17 Sep 2020
Copy link to clipboard 
Print this post

  Quote  I thought that IMAGE ROTATE and IMAGE ROTATE_FAST should be exactly the same except for the keyword.


Thanks for the post. It is a documentation error. Neither IMAGE ROTATE non IMAGE RESIZE have the optional flag because as they use bi-linear interpolation it makes no sense. We will update the manual in the next release to reflect this
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10209
Posted: 05:49pm 17 Sep 2020
Copy link to clipboard 
Print this post

Please find attached V5.05.06b6

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

This fixes a number of bugs:

Bug when trying to edit a file with an invalid pathname the error will only occur when exiting the editor. In this release the error will occur immediately

Bug when typing RUN "filename without the closing quote can lock up the system.

Bug when typing PRINT and then some reserved words such as AS or FOR can lock up the processor.

Bug when running a program with a loadable font and then setting to that font at the command line then running another program can give obscure issues.

In addition it implements a windowed watchdog timer in hardware . This should mean that the CMM2 should never lock up and will always return to the command prompt. I believe this will never trigger accidentally but if you think it has please report the cause.

If you are writing CSUBs you must make sure to call routinechecks() every millisecond or so both to keep the USB keyboard active and also ensure the watchdog doesn't trigger. CSUBs that run to completion within a couple of milliseconds can ignore this
 
     Page 5 of 12    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025