Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:11 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: Frustration with arrays....

     Page 2 of 3    
Author Message
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 09:27pm 12 Sep 2020
Copy link to clipboard 
Print this post

  lizby said  
  mkopack73 said  ... Or rather I should say, those who have formal software engineering computer science educations and those who don't...


  thwill said  Those are fighting words partner


If working in BASIC, "formal software engineering computer science education" purists are pretty much self-excluding.

~


Yeah but that's the SCARY part to me....

I cut my teeth mostly on the C64 (although I did have some experience with other computers before that.) I was lucky enough to get to take a structured BASIC class at the local community college as a teen, and 2 more in high school. Even then, when I got to college I had to unlearn a LOT of bad habits that stemmed from my BASIC experiences...

I worry that if we are using this as a teaching tool, and we DON'T push people to use good programming practices, we're just doing them a disservice -they likewise will pick up bad habits and have to unlearn them and struggle when moving to other languages.

I also don't consider VBA to be a good example of a "gold standard language" from which to model how things should be done... There's a reason most of us in industry laugh at people who do VBA professionally (they're usually the people who didn't get CS degrees...)

And I don't feel like suggesting GOOD CS best practices to the "electronics background" folks is a bad thing... Some might just not realize there's a better way to do things.

For example - UNIT TESTS - there's a reason why the industry has taken to using them over the last 15 years - as code has gotten more complex and testing cycles have gotten longer and longer we needed a better way to test that waiting for the end and trying to do "big bang" style testing where we could never get good coverage over all the code.  But when I suggested that here, I got nothing but disdain... Ok, fine, do it your own way, but then don't complain if you are going to fight all those same struggles that the professionals already lived through and learned from over the last 20+ years...
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 09:40pm 12 Sep 2020
Copy link to clipboard 
Print this post

Can the OPTIONS table layout/format/address please be published in this thread? At the very least a few subroutines could be written that use PEEK and properly parse the table values.

Then through that the OPTIONS would be readable.

(And if the OPTIONS table changes for a firmware update the routines would change.)
Micromites and Maximites! - Beginning Maximite
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 09:43pm 12 Sep 2020
Copy link to clipboard 
Print this post

  Quote  .. Or rather I should say, those who have formal software engineering computer science educations and those who don't...


Yes - those who have code running nuclear power stations and automated trading systems and clearing systems in major financial institutions and those who are formal engineering pedants and think a CS degree is relevant to real world applications where knowledge of the user base and user application is paramount.

Having run major project teams my recruitment policy has always been to avoid CS graduates in favour of application specialists who can code which is perhaps why the projects delivered on time instead of disappearing up their own a....s
Edited 2020-09-13 07:55 by matherp
 
chris
Regular Member

Joined: 24/08/2020
Location: United Kingdom
Posts: 56
Posted: 09:53pm 12 Sep 2020
Copy link to clipboard 
Print this post

BASIC isn't C. Each flavour of BASIC is opinionated, and that's ok.

I have a formal software engineering computer science education and I think that MMBasic is wonderful. Is it absolutely perfect? Of course not, it has to be opinionated, and you cannot please all the people all the time.

The array allocation rules seem a bit odd to me, but as someone who has not coded BASIC for 30+ years, it all seems odd to me. Learn the rules, then that's it. There is overhead to learning MMBasic the same as there is overhead to learning any new language. That's half the fun.
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 10:14pm 12 Sep 2020
Copy link to clipboard 
Print this post

  matherp said  
  Quote  .. Or rather I should say, those who have formal software engineering computer science educations and those who don't...


Yes - those who have code running nuclear power stations and automated trading systems and clearing systems in major financial institutions and those who are formal engineering pedants and think a CS degree is relevant to real world applications where knowledge of the user base and user application is paramount.

Having run major project teams my recruitment policy has always been to avoid CS graduates in favour of application specialists who can code which is perhaps why the projects delivered on time instead of disappearing up their own a....s


First off, that comment wasn't directed at you...

BUT, if you want to go get into a pissing contest, I just have code that runs on missiles, military aircraft, UAVs and industrial robots for a few... I'm a published author of several successful programming books and tech edited several more as well... but ok, sure...

I REFUSE to hire anyone who doesn't have a CS degree for a programming job because all too often the code they produce is UTTER sh*tTY messes that are unmaintainable... They tend to be self-taught and code for themselves, not for a team. They don't follow good standard engineering practices, don't use good tools and standards.  

But sure, whatever... to each their own.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 11:54pm 12 Sep 2020
Copy link to clipboard 
Print this post

I am sure to loose any pissing contest. One of the problems with an enlarged prostrate!

It is 50 years since I shuffled punch cards at Uni.
Since then I have programmed for fun. Still do it for fun.

A few months ago I had a traddie in to do some work. He had a van full of power tools. One for every occasion.

My father taught me to build houses without any power tools, just skill.

I do have a few power tools but get most enjoyment out of working the timber by hand, just skill and a sharp chisel.

As my body steadily fails, I still get enjoyment of of doing what I can with what I have.

To paraphrase JFK
"Ask not what the firmware can do for me, Ask what can I do with the firmware"

I have shown you how to avoid issues with OPTION BASE and Tom's perceived problem with sorting is trivial for me so should be a doddle for him.

Jim
VK7JH
MMedit
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 12:09am 13 Sep 2020
Copy link to clipboard 
Print this post

Ah, Jim--you don't have your certification--in Nova Scotia, that's the "Red Seal":

"Certification with a Red Seal – Carpenter is a designated trade in Nova Scotia. Graduates who complete an apprenticeship program in this trade are eligible to write the provincial certification exam, receive their certification and Red Seal. The Red Seal allows certified tradespersons to practise the trade in any province or territory in Canada – where the trade is designated – without having to write further examinations."

So what good can you possibly be?

Lance
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
berighteous
Senior Member

Joined: 18/07/2020
Location: United States
Posts: 110
Posted: 06:17am 13 Sep 2020
Copy link to clipboard 
Print this post

"this one thing doesn't work the way I think it should, and I'm self-important enough to make sure everybody knows my displeasure - wah wah wah wah!"

RTFM and work it the way it works or work around it as folks have suggested.  Whining and pissing and moaning about it isn't going to change it.  Matherp is a saint for putting up with this crap.  lol.  (with me too when I pulled the same crap a few weeks ago, and then I went off and figured out how to make the cmm2 do what I wanted.  It was super easy)

BTW I have credits on more than a dozen commercial games since the 80's and designed the 6th worst Mario game of all time according to some magazine. (Mario's Game Gallery for Interplay) and in a couple weeks I hope to release my 4th major 6502 Apple ][ game. I think the Cmm2 is freaking great and I love how it works, even when it works differently than I expect.
Edited 2020-09-13 16:19 by berighteous
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 420
Posted: 09:09am 13 Sep 2020
Copy link to clipboard 
Print this post

  berighteous said  "and I love how it works, even when it works differently than I expect.


I can't compete with the insightful code published here - teaching K12 means that often have to compromise "the right way" for a "functional way" (that my students can understand")

The quote above sums it it up for me.  For my learners, they mostly don't have any preconceived ideas on how it should work.  They adapt quicker than me and I find that it is me that has the learning curve.

I wonder if sometimes we know too much and for me (in my context) the shear joy of the CMM2 is it perfectly captures for my students what I felt in the late 1970's / early 1980's as I moved from ZX81 > Spectrum 16K >  Spectrum 48K > Spectrum 128 + 2   (plus assorted peripherals -- microdrive anyone?)

Passion and debate is great - and it is community input that shapes and drives projects, but let's not forget that all technology has "it's way of doing things" - it is this richness and diversity that makes learning on different platforms an empowering process.

As an aside - I cut my teeth on a word processing package called WordStar -- we had to wrap words with the formatting <b>BOLD</b> for example. It was a massive pain.  But learning this scheme set me up to use LATEX for "serious" formatting. When graphical GUIs came along, people instead leant that you mash the B button on the tool bar.  So, they can "use" the software, but they don't really "know" what its doing.  Old timer me still uses <b></b> but now I call it html.  Plus as a bonus <CTRL-B> also makes things bold in Word and I get what Markdown is up to.  My point --- one persons foible / irritation is another's feature.

Plus, coding workarounds is always a useful exercise for teachers to give to students.

No hardware / software system is perfect - but the CMM2 is seriously the closest to enter the education landscape for many years (dare I say "ever")  -- something that finally prioritises substance & functionality.

For me it's a huge      

Nim
Entropy is not what it used to be
 
HellbentHorse
Regular Member

Joined: 08/07/2020
Location: Australia
Posts: 55
Posted: 10:00am 13 Sep 2020
Copy link to clipboard 
Print this post

I finally got done building my CMM2 kit today, flashed the latest firmware and it booted right up.

The child-like excitement of having the magic of early computers come back is a very welcomed feeling and part of the appeal of this great little machine and I can't wait to get stuck in, warts and all.
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 01:39pm 13 Sep 2020
Copy link to clipboard 
Print this post

Guys, I think you're misunderstanding me...

I can live with the weirdness of mode 0.. I can live with all the various other options... All I'm asking for is if there's going to be all these options that can cause one person's code snippets to not work when plugged into somebody else's code because of how those settings are configured, then can we please get something like MM.INFO(OPTION x) to report back the current settings so we can adapt to them in a CLEAN and CONSISTENT manner?

It's not adding a new command (so not hitting up against the parser table limitations.)

It's certainly simpler than the added change to the Y_axis (which I'm betting there are a lot of things that still need to be worked out, like Peter said, it doesn't work with Sprites currently)...

Hell, I'd be happy with just a known set of addresses to PEEK to ask the system... The internals obviously must poke something into an address to set those options. So this SHOULD be a pretty simple addition. Hell, the MMBasic code itself must check those values to know what to do internally, so all I'm asking for is to expose that for us to make use of.

The concern I'm having stems from long term ability of the community to share code and make bigger more complex software over time. If you guys don't see the utility of that, then I don't know what to tell you...   This isn't about "Mike Wants this for Mike" ... this is "Mike wants this to make things better for everyone".  I could VERY easily just write my code to use the options I set and if you don't like it, tough, don't use my code or libraries. But I'm trying to suggest this SIMPLE addition of querying the system for the options to make things more accessible for everyone here.

And finally, that comment about the pros vs the hobbyists was NOT meant to be a dig at anyone. Just an observation that there are 2 very different communities with 2 very different perspectives in how things work here.


TassyJim - Alas we're all destined to one day get there with the prostate... Getting old sucks and my body reminds me of it every morning. :(
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 03:02pm 13 Sep 2020
Copy link to clipboard 
Print this post

I can agree regarding the desirability of access to the option settings, and certainly applaud the desire to contribute generalized library-type code but ...

  mkopack73 said  And finally, that comment about the pros vs the hobbyists was NOT meant to be a dig at anyone. Just an observation that there are 2 very different communities with 2 very different perspectives in how things work here.(


I think "2" is too narrow a categorization (if one is needed at all). There are software pros, active or retired, who are hardware hobbyists, and there are hardware pros who consider themselves software hobbyists (or at least non-pros). There are some who are earning a living doing both, and if that doesn't make them pros, I don't know what would. There are those who would consider themselves hobbyists in both categories, some of whom are quite proficient. Some have scholastic training, some don't. Some may be happy to flash an LED for the first time--or move a sprite.

The CMM2 has brought a very interesting set of new proficiencies and enthusiasms to the Micromite/Maximite community. It's a credit to what Geoff and Peter have conceived and implemented, with the help of the development and testing team.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 08:02pm 13 Sep 2020
Copy link to clipboard 
Print this post

How about simply removing Option Base 1 from MMBasic? It's main purpose is probably to give some compatibility with other BASICs, but MMBasic is sufficiently different for that to not matter much anyway. :)
Mick

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

Senior Member

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

  mkopack73 said  ... long term ability of the community to share code and make bigger more complex software over time. If you guys don't see the utility of that, then I don't know what to tell you...   This isn't about "Mike Wants this for Mike" ... this is "Mike wants this to make things better for everyone"(


Speaking as a member of the “retrocomputing hobbyist” segment of the MM community, what you are describing is counterintuitive. I don’t agree that “bigger and more complex” is “better”, and if I wanted complex code libraries, there are hundreds of other platforms, frameworks and languages I could choose (e.g. Python on a Raspberry Pi).

The appeal of the CMM2 for me is it’s simplicity and the fact that I can “do stuff” immediately. A MMBasic code library, with rigid function calls and entry and exist points, is kind of alien to the Maximite “DIY” ethos, as well as the 8-bit world I grew up with (e.g. the vast majority of software in those days was written by one or two guys, working without the benefit of complex frameworks and toolchains, and even assembling machine code by hand).

In my view, the impetus for any sort of code reuse is primarily a commercial one i.e. enabling a large team of developers to produce quality code more efficiently. I have none of those considerations - in fact, working slowly by myself and learning by trial and error is kind of the point of a hobby.

Yes, there are commercial applications of the Maximite platform, and it’s great to have the camaraderie and contributions of this vibrant community to learn from and share with,  but the overarching appeal for me is that you are intimate with what every line of code is doing... usually because you wrote it yourself.

I apologize if I’m misunderstanding or misrepresenting your intent - maybe it will be clearer when I see some examples of what you have in mind.
Enjoy Every Sandwich / Joe P.
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 08:38pm 13 Sep 2020
Copy link to clipboard 
Print this post

  jpusztai said  
  mkopack73 said  ... long term ability of the community to share code and make bigger more complex software over time. If you guys don't see the utility of that, then I don't know what to tell you...   This isn't about "Mike Wants this for Mike" ... this is "Mike wants this to make things better for everyone"(


Speaking as a member of the “retrocomputing hobbyist” segment of the MM community, what you are describing is counterintuitive. I don’t agree that “bigger and more complex” is “better”, and if I wanted complex code libraries, there are hundreds of other platforms, frameworks and languages I could choose (e.g. Python on a Raspberry Pi).

The appeal of the CMM2 for me is it’s simplicity and the fact that I can “do stuff” immediately. A MMBasic code library, with rigid function calls and entry and exist points, is kind of alien to the Maximite “DIY” ethos, as well as the 8-bit world I grew up with (e.g. the vast majority of software in those days was written by one or two guys, working without the benefit of complex frameworks and toolchains, and even assembling machine code by hand).

In my view, the impetus for any sort of code reuse is primarily a commercial one i.e. enabling a large team of developers to produce quality code more efficiently. I have none of those considerations - in fact, working slowly by myself and learning by trial and error is kind of the point of a hobby.

Yes, there are commercial applications of the Maximite platform, and it’s great to have the camaraderie and contributions of this vibrant community to learn from and share with,  but the overarching appeal for me is that you are intimate with what every line of code is doing... usually because you wrote it yourself.

I apologize if I’m misunderstanding or misrepresenting your intent - maybe it will be clearer when I see some examples of what you have in mind.


Yeah I think you're misunderstanding...  I'm not suggesting making bigger libraries that are more complex to USE... If anything, what I'm suggesting will ensure that they will be easier to use because you can use them no matter how you wish to set the various OPTION settings in your main program...  It'll make things more complex for the authors of the reusable libraries IF and ONLY IF they want to support all the various OPTIONS settings. But, if they do, they can ensure that the widest audience can use their library.

This in NO way takes away from you doing things however you want as a hobby user - this only helps you (and everyone else) by being able to make use of library code without running into a ton of errors caused by varying OPTION settings and having the library/includes helps reduce how much code you'd have to write to make something work...

For example, maybe I build out a great Physics library or a great 3D graphics rendering library - If I do them right, they should work no matter how you set the OPTIONS up, and it would jump start your coding efforts so you wouldn't have to write all that yourself and can instead focus your efforts on the other parts of your program.

Totally understand where you're coming from with the concern over complex library API's though - the Python and Java ones for instance can seem really daunting at first because they're so extensive (and seem to get bigger every year). But they also give you a TON of power by eliminating the need for you to implement all that stuff yourself (effectively reinventing the wheel).

But hey, if you want to reinvent the wheel, nothing is stopping you!  
Edited 2020-09-14 06:41 by mkopack73
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 09:07pm 13 Sep 2020
Copy link to clipboard 
Print this post

It looks like it's impossible to cope with incompatible OPTION settings (short of scanning the code and reprocessing it), so if you want to do the kind of things you say then instead why not pick some settings that make some sense to you.  Say what they are if people want to contribute.

OPTION BASE 1 is probably used by near enough no-one so not really worth worrying about.

Other OPTIONS are more trouble, e.g. if one set of code is written using one OPTION DEFAULT and another code uses a different DEFAULT then it looks awkward.

It may be the difference between doing something perfect and something good enough.

John
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 09:18pm 13 Sep 2020
Copy link to clipboard 
Print this post

I also agree that it is desirable to be able to view the option settings! It could be done most simply by PEEKing at a documented set of memory locations with a few lines of basic code in a function.

Paul in NY
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 09:19pm 13 Sep 2020
Copy link to clipboard 
Print this post

  JohnS said  It looks like it's impossible to cope with incompatible OPTION settings (short of scanning the code and reprocessing it), so if you want to do the kind of things you say then instead why not pick some settings that make some sense to you.  Say what they are if people want to contribute.

OPTION BASE 1 is probably used by near enough no-one so not really worth worrying about.

Other OPTIONS are more trouble, e.g. if one set of code is written using one OPTION DEFAULT and another code uses a different DEFAULT then it looks awkward.

It may be the difference between doing something perfect and something good enough.

John


Actually, I would argue that OPTION MODE 1 is probably the one that MOST people set vs the other OPTIONS, since anyone coming from the Atari or Commodore background would be used to seeing arrays set up this way... I can go either 0 ir 1 based since I've used some many different languages and the majority are 0 based - my only annoyance with 0 based on MMBasic that you aren't specifying the SIZE of the array during declaration but rather the last index (which apparently is a hold over from MS's BASICs from the late 80's onwards... I say that because technically Commodore's BASIC was made by MS, but it's 1-based).

No, there are ways to do it that really aren't THAT onerous (would be even less so if Peter puts in a standard mechanism for querying the OPTIONS to understand how they're set). They aren't the sorts of things I would say you should do if you're just throwing together a small demo program, but if you're intentionally trying to make something compatible and reusable you probably should.

See this that I've been putting together:  https://docs.google.com/document/d/1dkQcLM2FRTiNELj5P3neeFih0oN2tOOxC2jy3BBH5Po/edit?usp=sharing
Edited 2020-09-14 07:22 by mkopack73
 
RetroJoe

Senior Member

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

  mkopack73 said   But hey, if you want to reinvent the wheel, nothing is stopping you!


I was actually going to write something along those lines e.g. reinventing the wheel is part of the fun :)

Regarding the anxiety about accommodating variable config options, and similar to JohnS's suggestion, why not just assume that the default options are "the" options? Caveat emptor to those who deviate from the defaults i.e. if you want to use a "standard" library, you should set your machine back to a "standard" configuration.

Regarding the potential to flip the Y-axis direction, I was wracking my brains last week doing some "coordinate math", and to be honest, I can't think of one good reason why computer graphics coordinate systems place the (0,0) origin at the top left instead of the lower left like the rest of the Cartesian-plotting world.

It was the convention widely adopted by (all of?) the 8-bit BASICs, but was there a reason for it? Was it "easier" to implement somehow (e.g. memory allocation), or did designers think it was more intuitive for computing novices to learn? Even though I'm used to it, in retrospect it's definitely counter-intuitive, and is an extra mental burden (but, per my earlier comment, getting some mental exercise is part of the fun :)
Edited 2020-09-14 07:35 by jpusztai
Enjoy Every Sandwich / Joe P.
 
mkopack73
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 261
Posted: 09:40pm 13 Sep 2020
Copy link to clipboard 
Print this post

  jpusztai said  
  mkopack73 said   But hey, if you want to reinvent the wheel, nothing is stopping you!


I was actually going to write something along those lines e.g. reinventing the wheel is part of the fun :)

Regarding the anxiety about accommodating variable config options, and similar to JohnS's suggestion, why not just assume that the default options are "the" options? Caveat emptor to those who deviate from the defaults i.e. if you want to use a "standard" library, you should set your machine back to a "standard" configuration.

Regarding the potential to flip the Y-axis direction, I was wracking my brains last week doing some "coordinate math", and to be honest, I can't think of one good reason why computer graphics coordinate systems place the (0,0) origin at the top left instead of the lower left like the rest of the Cartesian-plotting world.

It was the convention widely adopted by (all of?) the 8-bit BASICs, but was there a reason for it? Was it "easier" to implement somehow (e.g. memory allocation), or did designers think it was more intuitive for computing novices to learn? Even though I'm used to it, in retrospect it's definitely counter-intuitive, and is an extra mental burden (but, per my earlier comment, getting some mental exercise is part of the fun :)



Sure I COULD do that. But my intention is to try to support as many people as possible. Let you work the way that makes sense to YOU, so support whatever set of options you want to set, but still make my library work. Yes it makes it more work for ME, but increases the adoptability by YOU ALL.

0,0 being top left is likely a hold over from the CRT days because the raster refresh was top to bottom. So it made sense that the first line drawn would have the 0 index and thus be at the top...
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025