Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:49 19 Nov 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 First Impressions

Author Message
OldScot
Newbie

Joined: 12/08/2021
Location: United States
Posts: 9
Posted: 02:56am 29 Aug 2021
Copy link to clipboard 
Print this post

First impressions of using a Maximite (CMM2) for the first time. (Very early days.) These are just my first impressions, I'm not criticizing, and I don't expect changes to be made. For context I started writing software in High School on terminals and then a Trash-80 Model I at home, Commodore Pets at the local high school, and an Apple ][ and an Ohio Scientific at my high school. I've worked for an M$ only shop for the last nearly 20 years, and spend these days architecting and developing Azure systems in C# and Azure Sql.

Wow, it's been forever since I wrote in Basic. Even in the Trash days most of my development was in z80 assembler. Thankfully, the old Basic knowledge is coming back to me. Yes, I did live through VB6.

The biggest adjustments so far are moving from a compiler to interpreted code, and losing objects. You take so much for granted with a compiler that is analyzing entire routines allowing declarations anywhere in the code. The first time the CMM2 interpreter sees a name used, that name is defined, regardless of its actual definition executed later. I was sorely puzzled by functions (that were used as subs - results ignored) ahead of their definitions. The interpreter refused to interpret them as functions even though they were declared as functions. Definition and use ordering is so important on the CMM2, something I've not had to think of in ages.

(I've also used names for subroutines/functions that begin with an underscore, I think the documentation claims that isn't allowed?)

So far my biggest complaint is with the handling of image files. It's great for games, but seems quite poor for general use. Images must be smaller than the screen size and Jpegs can't be progressive? Initially I thought ok, but then I thought of my ancient photo frames, frames with very low resolutions that are happy to load/scale any size image.

So far I'm trying to keep it "old school", working on the CMM2 itself. I had plenty of experience years ago working with Arduinos and Raspberry Pis, and wanted something "simpler" and more "direct" for experimenting. My preference would be for an OO language, coding without objects at this point is a head scratcher, and feels like, well assembler. Hindsight is rose coloured but my favorite ancient development environment of the 80s was the Symbolics 3600 machines. So user friendly. I did google up whatever became of the Symbolics and it seems "Open Genera 2.0" can be run on Ubuntu so I intend to try running it under a Ubuntu VM on my Unraid server someday soon.

So far I'm quite impressed with the CMM2 and its very extended "Basic". All that and no built in "Trim$" functions?

I've nothing amazing to share software wise, but would like to share what I create eventually. What site is recommended for sharing CMM2 software, even Works in Progress? Here? Fruit of the Shed? Other?

(I'm a complete noob on the CMM2 so may be completely mistaken in my interpretations.)

Thanks
- OldScot
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 535
Posted: 04:42am 29 Aug 2021
Copy link to clipboard 
Print this post

Hey OldScot

Great post! Welcome to the CMM2 world :D

You can share your CMM2 software here: https://cmm2.fun/

I like to store and share my working progress code on a GitHub repo.

Cheers
Leo
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10610
Posted: 07:50am 29 Aug 2021
Copy link to clipboard 
Print this post

Not sure I understand some of the points you are making but put

  Quote  Option explicit
option default none


at the top of your programs. This stops any variables being defined automatically and for any significant program is pretty much essential to avoid bugs that are difficult to track down.

The jpg decoding uses the H/W decoder built into the STM32. This doesn't support progressive and the output is limited to the size of the H/W framebuffer currently in use - nothing can be done about this
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8297
Posted: 01:58pm 29 Aug 2021
Copy link to clipboard 
Print this post

[RANT]
Grrr... I never did like the term "Trash-80". ;-)
Once you'd got disks on one and a decent OS like Newdos80 or LDOS you were in the world of disk BASIC, which was very good (although still interpreted). Ok, it was hardly the fastest machine around, but I, for one, would never label it as "Trash". The Commodore 64, on the other hand, gave the user no access to graphics or sound or anything else, for that matter, from BASIC. It was truly awful to program on (and the only home PC I've been happy to get rid of). It was following in the steps of the PET, which was also truly awful to program - not helped by the early keyboard which was a prototype to see if anyone could make anything worse. Only the ZX80 did.  :)
{Puts flack jacket on in readiness for outraged Commodore fans}
[/RANT]

You don't really need Trim$ functions on a machine where the interpreted defined function is faster than the machine code on most home computers. The CMM2 doesn't hang about. :)

You have to bear in mind that the CMM2 doesn't pretend to be an office computer - or even a general purpose computer at all. It's a modern replacement for your old TRS-80, Commodore 64, Speccy  or whatever. Like those, BASIC doesn't run under an OS, it *is* the firmware. It's not a linux box or a DOS box and it shouldn't be compared with them really.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 02:14pm 29 Aug 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  [RANT]
Grrr... I never did like the term "Trash-80". ;-)


I like the TRS-80 and I know a lot of fans that, although they don't think of it as trash, still use the nickname TRaSh-80. It's like having a buddy that you refer to in a completely derogatory way.
Micromites and Maximites! - Beginning Maximite
 
OldScot
Newbie

Joined: 12/08/2021
Location: United States
Posts: 9
Posted: 02:32pm 29 Aug 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  [RANT]
Grrr... I never did like the term "Trash-80". ;-)
{Puts flack jacket on in readiness for outraged Commodore fans}
[/RANT]


Hi Mixtel90. I used "Trash-80" as a term of endearment. I never heard it called that "back in the day", but enjoy a good slang name. My friends and I spent way too much time in High School on our TRS-80s and enjoyed every minute. My Model I with 32K expansion unit and (eventually) 4 disk drives was the machine I took to college. I think I made the lowercase modification while I was there. With an acoustic coupler I could log into the school mainframe and work on assignments without trudging to a computer lab in the dead of winter. Eventually I inherited my dad's LNW-80 as well.

My grandfather was a COCO user starting with the original COCO. He had all the COCO models. OS9 was great. I still get a kick out of the "TRS-80" branding on the COCO, as they were 6809 based, not Z80 based. I can still picture him in his porch writing COCO graphic programs.

As for Commodores, I did a good amount of 8 bit automation during summer jobs using a plethora of machines (like the Rockwell Aim-65), including a Vic20 with Forth code. I appreciated the value of the Commodore machines, but wasn't taken with them.

Apologies for the slang, they were never trash to me, and never will be.
- OldScot
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4147
Posted: 04:09pm 29 Aug 2021
Copy link to clipboard 
Print this post

  OldScot said  All that and no built in "Trim$" functions?

Just code them if you use them :)

Lots of things aren't there due to a shortage of internal slots for builtins but fortunately MMBasic is so fast it's not a big deal.

John
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1681
Posted: 05:18pm 29 Aug 2021
Copy link to clipboard 
Print this post

  JohnS said  
  OldScot said  All that and no built in "Trim$" functions?

Just code them if you use them :)
...
I agree that a normal user defined function will do the job.
If we need it faster just use the CFunction available here.
(Or write your own ...)

Best regards
Michael

PS
I like  Z80 assembler too.
causality ≠ correlation ≠ coincidence
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8297
Posted: 05:37pm 29 Aug 2021
Copy link to clipboard 
Print this post

I spent many a happy hour on my Model II. I'd bought it from a local retailer and they couldn't get a UK monitor so I ended up with a 120V one with a little transformer. Unfortunately it didn't synch properly at 50Hz so it had a constant "weave" on the screen. Extremely annoying but I (mostly) got used to it eventually. It finally grew an expansion interface and a home-made AY3-8910 sound/I/O board mounted in it. (I'd increased the RAM in the keyboard so I didn't need RAM in the expansion box). A couple of floppy drives too. I've still got it in the shed, but I daren't plug it in without giving it a serious inspection first. It's getting on a bit. :)  (like me!)

I think you'll be pleasantly surprised by the CMM2, OldScot. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
mclout999

Guru

Joined: 05/07/2020
Location: United States
Posts: 492
Posted: 02:27am 01 Sep 2021
Copy link to clipboard 
Print this post

My first out-of-the-box system was a Model I (I built a few hobby computers like the KIM I).  I did a overclock mod and a custom programable character set mod that let me make game graphics that looked very good and had a lower case mode at the flip of a switch. It had a lot of potentials but it never took off.  I even got exatron stringy floppies for it because I got 2 used drives for 1/3 the price and it was WAY Cheaper than getting a floppy back then.  I loved my Model 1.  I mowed lawns all over my town to afford it and the habit it developed in me of doing mods and upgrades. I did an internal RAM upgrade as well.
They call me Shai-Hulud (The maker)
 
OldScot
Newbie

Joined: 12/08/2021
Location: United States
Posts: 9
Posted: 03:47am 02 Sep 2021
Copy link to clipboard 
Print this post

Thank you all for the warm welcome! I'm certainly enjoying my CMM2 experience so far. I also really appreciate hearing people's early computing experiences. My trs-80 buddy in town had an Exatron floppy, I had forgotten all about that.

So far I've figured out (got working) the Nunchuk and classic controllers, attached a Raspberry Pi breakout and used the GPIO, and have the wireless attaching to the interweb and pulling down weather data. I wrote (mimicked) arcade games on the trs-80 years ago, all with only b/w text graphics, no sprites or colour, so am definitely overwhelmed.

I have two quandaries at present, the mouse, and the programming naming style/convention to use. I know that latter issue isn't a concern for everyone.

I've connected an old HP usb kbd and mouse, and invoked the option to enable the mouse. So the mouse is active in the editor and file explorer. The trouble I have is at some point I'll hit F4 for the editor, the editor will come up for a few seconds, and then the editor terminates saying the mouse wasn't found. That gets old very fast. I changed mice, but the situation is the same. Eventually I turned off the mouse option. I'd like to get that figured out.

As far as a naming convention goes, I appreciate that the CMM2 isn't case sensitive so I'm free to be consistent in whatever I choose. I'm partial to the java standard of camel case starting with lower case. (As opposed to the MS standard of everything being capitalized.) That just leaves the use of type suffixes. I'm leaning toward using the $ suffix instead of the declaration as it's consistent with the built in functions. I've tried using % as well but so far I keep forgetting to add the suffixes and I find the % distracting. No doubt I'm just not used to it. I don't think the standard/convention itself is overly important, other than one exists and it's used for consistency sake. If there are any widely adopted standard/conventions I'd be interested in learning what they are.

Today I remembered the slang terms for Commodore, Apple, etc. They're all fun.

Thanks Again!
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2831
Posted: 06:35am 02 Sep 2021
Copy link to clipboard 
Print this post

Re type suffixes.
The DIM command (see manual) allows you to define a variable's type without a suffix if you wish.
MMBasic is very flexible, allowing many different programming styles.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8297
Posted: 08:15am 02 Sep 2021
Copy link to clipboard 
Print this post

I think the only "standard" I seem to stick to is using i & j for loop counters, k or k$ for returned keyboard values and s$ for a simple string variable. By using them as LOCAL variables you can recycle them to your heart's content. Old habits die hard. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 10:53am 02 Sep 2021
Copy link to clipboard 
Print this post

If you want to force yourself into using a type suffix you could add OPTION DEFAULT NONE to the top of your program.  After a short time you will get used to adding $, % and ! to the end of your variables because you are forced to.

I have found that (like Mick) using i & j for integers, s1, s2 etc for strings works well.  I structure my programs into subroutines and use LOCAL to define the type of these variables.  The suffix is not needed as their type is obvious (ie i & j are always integers).  With this approach even large programs will have less than 50 global variables and I use long variable names for these which also make their type obvious (eg, RecordCount, FileName, SaleTotal).

You don't want to get too complex with naming variables (eg, using Simonyi's Hungarian) because that can negate one of the benefits of BASIC which is quick and easy development.

Everyone is different, this is just what I do.

Geoff
Geoff Graham - http://geoffg.net
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8297
Posted: 11:16am 02 Sep 2021
Copy link to clipboard 
Print this post

Also, watch out if you are writing programs that you want to be back-compatible with other platforms. The way variable names work is different. On the CMM2 a hashing algorithm is used to search variable names, subs and functions. That is fast. On the platforms with less processing power there is no hash table and these things have to be searched for. Variable names are first scanned for the first 4 characters, then the next four and so on. Consequently, using long variable names inside a loop will slow it down. It's a good idea to keep such variable names to four characters or less. "scr1" and "scr2" will be found in a single scan, "screen1" and "screen2" will need 2 scans each, "screens.layer.testing" will need six scans of the variables table to find it!
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 480
Posted: 04:34pm 02 Sep 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  Also, watch out if you are writing programs that you want to be back-compatible with other platforms. The way variable names work is different. On the CMM2 a hashing algorithm is used to search variable names, subs and functions. That is fast. On the platforms with less processing power there is no hash table and these things have to be searched for. Variable names are first scanned for the first 4 characters, then the next four and so on. Consequently, using long variable names inside a loop will slow it down. It's a good idea to keep such variable names to four characters or less. "scr1" and "scr2" will be found in a single scan, "screen1" and "screen2" will need 2 scans each, "screens.layer.testing" will need six scans of the variables table to find it!


In fact, many BASIC interpreters of the '80s only used one-or-two character variable names. You could name a variable with more but only the first two were searched. Also, you couldn't have a reserved word embedded.

>LENGTH=4
>LESTER=7
>PRINT LENGTH   Both variables are stored as LE
7

> FORTRAN=12
^ ERROR - KEYWORD 'FOR' FOUND
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8297
Posted: 07:29pm 02 Sep 2021
Copy link to clipboard 
Print this post

Li-Chen Wang's Palo Alto Tiny BASIC gave you variable names A-Z (note the capitals) and one array called @(1) that was automatically dimensioned to use all the remaining memory space after the program. Numeric values were all 16-bit integers. It was quite something to program in. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
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