CMM2: Next steps?


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12139
Posted: 07:29am 23 Jun 2020      

I know I'm going to regret starting this thread but.......

I'm interested in views on how or if to take the CMM2 forward. I'm not talking about changes to the concept, major structural changes to the language, or changes to the H/W design - these are fixed, but about things that may make it better both from the perspectives of its educational use and its enjoyment as a "retro" style computer.

Ideas can can range from the simple:

e.g. implement a BLIT ARRAY sub-command to output to the screen directly from an array (could be useful for ray-tracing)

to the more complex:

implement a MATH command with multiple subcommands for things like matrix manipulation, complex arithmetic, scaling vectors (ray tracing again) etc.

What I can't do is increase the number of commands or functions significantly so ideas have to use and extend existing syntax rather than changing or adding to it.

For a number of reasons I'm currently ruling out CFunctions or embedded assembler so think about where you might want a CFunction and if that functionality could be incorporated into the language (e.g. the MATH concept)

In general interpreted Basic is most inefficient when the ratio of the effort to parse a command is significantly greater than the processing needed to execute. So, for example, in the case of many of the graphics commands coding entirely in C would have almost no advantage as the parsing overhead is trivial compared to the work to execute, whereas A=A/B is entirely dominated by the effort of parsing as is evidenced by the limited speed advantage of using integers even on MM without floating point processors.

Support for additional sensors or external devices should only be suggested if there is something about a device that means it can't be coded in Basic. For example, The BME280 is a bit complex to interface but there is nothing that can't be done in Basic and once a BME280 I/F subroutine is available then it can be shared as an INCLUDE file. Contrast this to the (already supported) WS2812 which simply can't be coded in Basic as the timings are too fast and specific.