By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Allendale Jan 24th

Retro Computing (on Steroids)

Colour Maximite 2 - 3D BASIC Engine

All Topics | Latest Posts

Search for:  in Thread Title in  
IanT06/12/2020 13:30:12
1816 forum posts
177 photos

I think many here may remember their first steps in "Home Computing" back in the late 70's and early 80's.

An inexpensive SBC (single board computer) that booted immediately into interpreted BASIC could (with much laborious typing-in) deliver what at the time, seemed to be quite good games graphics. But if you needed real speed - then an assembler was always required.

In 2011 Geoff Graham introduced his first monochrome 'Maximite' SBC, which was based on the PIC32 chip. This was quickly followed by the 'Colour' Maximite and then many versions of the MicroMite (for embedded control) - ranging from simple 28 pin DIL versions, scaling up to very fast Neucleo STM boards. All of these use a version of MicroMite BASIC (MMB) matched to the available hardware features but sharing a common language base .

Earlier this year, the latest Colour MaxiMite (CMM2) was launched and attracted a great deal of interest. Some very gifted people have helped to develop and test the CMM2, which is ARM Cortex based. Since then, MMB for the CMM2 has been rapidly improved. Most recently a 3D 'engine' has been included into the MMB interpreter. To be clear, no external libraries are required - this is now a built-in feature of CMM2 BASIC.

I know very little about graphics programming but I think the results are pretty remarkable. The following demos are both written in (interpreted) MM BASIC.

CMM2 - 16-bit colour, 1335 vertices, 2452 faces

(the full programme is listed by Peter Mather in his comments below the video.

CMM2 - Rotating Ball with Ambient Lighting

All of this is (of course) way beyond my programming abilities and I haven't purchased a CMM2 myself (although I've been tempted). I'm just using my 'Mites' for embedded control purposes. But I'm really impressed with how quickly this latest 'Maximite' SBC has been developed by just a few (very talented) enthusiasts.

Regards,

IanT

Kiwi Bloke07/12/2020 04:01:46
525 forum posts
1 photos

A couple of weeks ago, I asked Santa for a CMM2. I'm hoping to get the original Silicon Chip Magazine kit version, rather than one of the ready-mades because fiddly soldering is part of the fun. I built an original Maximite shortly after publication in SC Mag. Very impressed, especially by the BASIC dialect. 'Real' programmers are apt to sneer at BASIC, but a lot are out of touch with modern dialects, and don't like it when reminded that it can take feet of code in 'proper languages' to do what a modern BASIC can do in a few lines.

Edited By Kiwi Bloke on 07/12/2020 04:02:44

Frances IoM07/12/2020 08:27:19
1071 forum posts
27 photos
Practical Electronics published in the UK was until the recent change in ownership and name derived most of its copy from the Australian Silicon Chip Magazine which pushed the Micromite very strongly - PE now seems to be more favourable towards Arduino + RaspberryPi projects which introduce Linux via the backdoor which software seemed anathema to the previous owner who always pushed Windows software.
Michael Gilligan07/12/2020 08:54:50
avatar
17658 forum posts
811 photos

Please forgive my digression away from hardware, but I must mention an iPad App

**LINK**

https://apps.apple.com/gb/app/basic-programming-language/id1540244170

I have already protested [to no avail] about Mr. Kibernetic’s non-standard interpretation of INT, but aside from that ... it is quite astonishing.

MichaelG.

Martin Connelly07/12/2020 10:58:06
avatar
1691 forum posts
181 photos

I've still got my UK101, don't know if it still works and I'm not sure I have a TV that will work with its signal now that everything is going digital.

Martin C

Bazyle07/12/2020 12:07:03
avatar
5834 forum posts
217 photos

Yep, UK101, cheaper than a Nascom 2. I had a wordprocessor on it that was just 2k bytes. What does Word need nowadays?

IanT07/12/2020 12:52:52
1816 forum posts
177 photos
Posted by Bazyle on 07/12/2020 12:07:03:

Yep, UK101, cheaper than a Nascom 2. I had a wordprocessor on it that was just 2k bytes. What does Word need nowadays?

Happy days awaiting awaiting the latest edition of Practical Computing (and if I was feeling a bit flush 'Byte' )

The UK101 was very similar to the Ohio Scientific, both being 6502 based but I finally (after much agonising) decided a proper 'bus' was a good very idea and selected the Nascom 2 (Z80 based) . I think it was about £300 with the PSU and came as a large PCB and a bag of components. Several days (and many dry-joints) later, my wife couldn't understand why I was so happy with the red LED flashing on and off.

Wife " What's it doing?" - Me "It's flashing the light on and off every second "

Wife " Yes - but what's it doing?" - Me "I've programmed it to turn that light on and off every second "

Wife "Is that all it does? " [short pause] " And what did you say it cost? "

frown

Regards,

IanT

SillyOldDuffer07/12/2020 14:37:14
Moderator
7040 forum posts
1549 photos
Posted by Kiwi Bloke on 07/12/2020 04:01:46:

... 'Real' programmers are apt to sneer at BASIC, but a lot are out of touch with modern dialects, and don't like it when reminded that it can take feet of code in 'proper languages' to do what a modern BASIC can do in a few lines.

...

For real retro, there's Programming Like its 1975.

There are good reasons why 'real' programmers sneer at BASIC. Glass ceilings!

I've been paid to write code in at least 18 languages, including BASICs and reported on the pros and cons of others. For fun, I've dabbled with 11 more. Latest is Process, ideal for wow graphics.

In my view computer languages are as different as screws and nails, or tanks and racing cars. It pays to look for the best choice. Plenty on the shortcomings of BASIC about, mostly well founded! But they may not matter in amateur work because they only bite big projects. Apply the 'so what' test.

All computer languages have advantages and shortcomings, for example:

  • Algol-60. Mathematical language, clean syntax and structure, poor IO, unsuitable for data processing. Poor team support. First language I liked, but useless for my job.
  • Fortran. Efficient maths. Grubby syntax and weak structure, but fast. Support for teams and linkage to other languages. Yuk. Wrote it because I was ordered to.
  • COBOL. Data Processing language. Verbose syntax & weak structure. Good support for team development and linkage. First successful business 3GL. Multiple variants, common. Low productivity, not used for new projects. Nasty, but it paid the bills.
  • Filetab. Report Generating Language. Brilliant for tabulating data created by COBOL. Not recommended for problems requiring more than 4 pages of code. Liked it very much, but not its glass ceilings.
  • 4GLs (Forte, Informix etc). Excellent for database work. A good way of earning a crust, but boring.
  • Pascal. Academic language inspired by Algol. Good structure and syntax, weak team support. Good for teaching, less suited to commerce, and slower than Fortran at maths. Like but don't use it - glass ceilings again.
  • C. Systems programming language inspired by Algol. Low-level, fast and space efficient, capable of anything - the language other languages are written in. Deceptively simple syntax with dangerous shoals relying on the programmer to get it right. First rate support for multi-million line projects. Portable unless platform specific features are used. Maths reasonably fast. Loads of libraries. Love it! Good mix of challenge and can do.
  • C++. Object oriented super-set of C - C on steroids. Wonderful, except full throttle object oriented programming is hard. Fun to write if the advanced features are avoided. Almost anything is possible. Love it apart from the spikes!
  • Visual Basic and Gambas. BASICs for Windowing applications. Excellent for but don't scale well. I like both of them for certain jobs. More glass ceilings.
  • bash, George 3. Job Control Languages. All nasty in my experience, but essential when programs operate in sequences. Server rather than home user work. perl and Python are useful as JCLs because they're easier to write and maintain. Up to a point!
  • perl. Reporting and system scripting language. Built in pattern recognition and other text processing features. Back in the day, superb. Clean structure but spiky syntax that doesn't support later object oriented features cleanly. Today, Python rules the roost.
  • Python. Batteries Included. Exceptionally clean structure and syntax. Powerful & reasonably efficient. Programmer friendly and highly productive. Does beginner & grown-up computing equally well. Massive 3rd-party module support. Team friendly. Contender for 'best computer language', but not ideal for Windowing applications, too heavy for most microcontrollers, and too slow and distant from the hardware to be a high performance systems language.

These days I do almost everything in C++ and Python. Almost all computers support C++, which simplifies moving from one platform to another.

Although BASIC is a poor choice for me that doesn't mean it's rubbish! It could be exactly what's needed. Micromites are ideal for chaps who know BASIC from the BBC/Spectrum era and want to program a microcontroller.

Compared with C, BASIC takes up more memory, runs slowly and has weak system programming features. BASIC struggles with linked lists, deques, stacks, atomicity and micro-efficiency. BASIC remains capable until an advanced feature is needed, or tight fast code is of the essence, at which point crunch. The crisis might never happen, but pro's can't take the risk. 'Real programmers' don't like languages that run out of steam.

Dave

 

 

Edited By SillyOldDuffer on 07/12/2020 14:41:15

john halfpenny07/12/2020 15:15:22
142 forum posts
21 photos

Back in 1970/2, when I did an A level in computer science, Basic was the teaching language of choice, just overtaking Fortran, Cobol and Algol. I remember at college in 1974 that calculators were banned in exams (until 1976). A Datamath four function (+-÷×calculator cost about £50 - I didn't buy one; you could buy a very good car with 12 months MOT for that. By 1976 we could get a full scientific CBM calculator for £15, and mine still works.

Squint07/12/2020 17:02:23
12 forum posts
35 photos

The problem with Basic computer language is the name. I used TrueBasic by the originators of the original basic language, a structured and improved Basic. Speed seems to be the bug bear of opponents of Basic. But what does a fraction of a second matter to a bigger fraction of a second? TrueBasic was my go to computer programming language. Later in life while wanting to programme PICs I used assembler(assembly) programming language, mainly for decoding digital calipers. Python seems a peculiar programming language in that indents are part of the essential formatting. Model Engineers like to use old machines and methods but seem to disapproved of old programming languages.

SillyOldDuffer07/12/2020 18:38:32
Moderator
7040 forum posts
1549 photos
Posted by John Smith 18 on 07/12/2020 17:02:23:

...

Speed seems to be the bug bear of opponents of Basic. But what does a fraction of a second matter to a bigger fraction of a second? ...

Python seems a peculiar programming language in that indents are part of the essential formatting. Model Engineers like to use old machines and methods but seem to disapproved of old programming languages.

Well this old programmer disapproves of old programming languages because they're primitive. Modern versions of old languages are better but still saddled with various restrictions. TrueBasic is only available for Windows. It doesn't run native on Apple, UNIX, Linux, Android or any microcontroller. That's a glass ceiling.

Python's strictly enforced indentation rules do seem strange at first but the idea works well. It's difficult to write badly structured code in Python because it doesn't allow bad habits.

Speed is a good question. Application programmers rarely need to worry about it, though I was once called in to advise on a weekend process that took 3 days to finish and stopped Monday from happening! However, that was unusual. Obsessing about the efficiency of an application program is bad.

System programmers are much more concerned with performance because most of the system is time-critical. Bad things happen when a network interface clogs up and causes time-outs. And whenever the computer can't keep up with users, including other computers spewing data far faster than a human can type. Tiny computers are a problem too - my current Arduino project requires me complete all the processing caused by an event within 4mS. Not something BASIC could do, starting with it being too big to fit on the machine. Same problem with Python - I love it dearly, but it's no good for that particular job.

Horses for courses!

Dave

Squint07/12/2020 18:52:42
12 forum posts
35 photos

I totally agree with all your comments Dave.

But we are hobby programmers, like we use hobby machines, for our own enjoyment and pleasure. We do not use industrial machines and methods (in general) for our pastime.

Our time is purely for our own pleasure. If our programme provides us with the result we want does it matter whether it is written in Basic, C++, assembler or machine code? We are in a hobby world of anything goes as long as it works.

Btw TrueBasic was originally for Dos, Windows, Mackintosh and Linux. I still have a linux installation disk, if only I could figure out how to install a tar ball. lol regards John.

Edited By John Smith 18 on 07/12/2020 19:15:08

IanT07/12/2020 21:33:34
1816 forum posts
177 photos

For anyone who would like to 'sample' MicroMite Basic (MMB) there is a version for PCs (I run it on my Win 10 laptop). It doesn't have many of the features that other versions of MMB have, such as all the communication, display and external I/O options - but it does support Serial Comms and the PC's disk filing system. So I can read and save .cvs files for instance (usable by Excel) and also open COM ports.

" This interpreter runs in a DOS box under the Windows operating system and will work with Windows versions from Windows XT through to Windows 10. It does not need installation, you just copy the executable to a convenient location on your computer and run it from there. "

MMB for PCs

If you find MMB isn't for you, you can just delete the .exe file and it will be gone - it's that simple. It won't change anything on your PC.

Here's a Change Wheel programme (that I spotted in MEW 277) you can use to try MMB with. Just Cut & Paste it into a Notepad-type document (not Word! - I use Notepad++) and save it with a .bas file extension. You can then load it into MMB.

'
' Change Wheel Calculation
' by Mike Aireton - from MEW 277 Feb 2019
'
Cls
Input "Input required TPI ", W
Input "Input deviation ", Z
'
X = W + Z
Y = W - Z
'
For A = 20 To 75 Step 5
For B = 20 To 75 Step 5
For C = 20 To 75 Step 5
For D = 20 To 75 Step 5
'
If A = B Then GoTo SKIP
If A = C Then GoTo SKIP
If A = D Then GoTo SKIP
If B = C Then GoTo SKIP
If B = D Then GoTo SKIP
If C = D Then GoTo SKIP
'
' Assumes 8 TPI Leadscrew
'
If A*B*8/C/D < X And A*B*8/C/D > Y Then Print C;" "; D; " "; B;" ";A*B*8/C/D
'
SKIP:
Next D
Next C
Next B
Next A
'
Print "DONE!"
End

Mike said it ran on his PC/Basic in about 15 seconds - but it runs on mine in 2-3 seconds. Fast enough.

Regards,

IanT

Bazyle07/12/2020 23:08:03
avatar
5834 forum posts
217 photos

There are several computer languages. How many do you know? see this little list. Time was every student computer programmer wrote one as a final year project. Perhap they still do.

Basic is interpreted which makes it easy for beginners to cycle round testing their program. That was part of teh concept. Wasn't so easy with Fortran punched cards submitted for batch processing. I think the main reason Python has taken off is that it is introduced with an interpreter that can be easily loaded on a 'pc'. Despite the origniator's claims that he invented it from scratch (sorry not meeaning the language) it is a kludged mix of Basic and Perl.


increased speed and memory just encourages bad prgramming and bad languages. You shouldn't need the get spaces and brackets and formatting to some special format, the computer should work that out for you.

Kiwi Bloke08/12/2020 10:48:05
525 forum posts
1 photos

Yes, as SOD said, 'Horses for courses'. I'd imagine that most of us who will only ever scrabble around in the dirt, as far as programming is concerned; glass ceilings are never going to be a limitation. The great thing about the Maximites is the versatility of the hardware, coupled to an easy-to learn, sophisticated language, that just seems ideal for the basis of, for instance, a 'digital leadscrew' project, or similar. It makes the physical and intellectual interfaces easier than anything else I've come across.

Thanks, SOD, for the overview of some languages - illuminating. You didn't respond to my assertion that, for 'our kind of application' at least, a suitable BASIC might do the job in far fewer lines of code than something more 'proper'. We're talking quick and dirty, not a bank's financial system, after all.

In the early 1970s, I spent some time, as a student, in a MOD research lab, and had the use of a DEC PDP12 computer, running FOCAL. This was, I think, DEC's version of a BASIC-like language. Armed only with the manual, it was teach-yourself time. I rapidly realised that GOTOs, DO loops, and jumping all over the place to line numbers was a good way to create a real mess, so I broke my programs into little modules which were, in effect, called, as needed, by a very simple main program. I gather that was a rather unusual approach at the time, but it made editing and bug-chasing easy. Now, modern BASICs seem to have this facility built-in, with user-defined functions, etc.. Spaghetti code is no more?

SillyOldDuffer08/12/2020 11:42:06
Moderator
7040 forum posts
1549 photos

Here for comparison with BASIC is Mike Ayrton's change wheel program in Python3

changepy.jpg

On my machine, for 26tpi, it runs in 0.07309572899976047 seconds.

Mike's version ran in 15 seconds and Ian's in 2 or 3 seconds. For a singleton user, both are perfectly acceptable. It wouldn't matter if it took the computer a minute or two. BASIC is fit for purpose.

But what if the same calculation is done on a website serving several thousand users? How many users can be satisfied by each version in a minute?

  • Mike: 4
  • Ian: 30
  • Dave: 820

And my version can serve up to 13 users in under a second so they don't realise there's a delay at all. The same 13 users wait between 15 and 195 seconds to get an answer from Mike. Most online users start twitching if they have to wait for more than a few seconds, and because most servers can only queue a limit number of requests, they drop users to avoid overloading - they never get an answer.

Dave

Nick Clarke 308/12/2020 12:31:37
avatar
1156 forum posts
48 photos

Teaching blind and visually impaired students I use an old, text only version of BASIC to introduce programming lower down the school because it runs in a single text window that screen readers can follow.

Python is problematic for a few reasons - firstly the forced indentation is interpreted differently depending upon the editor used - either a single tab character or 4 spaces. Next the default editor opens program results in a new window which can be difficult to navigate to. The way round this is to install a different editor - but this requires a non standard installation which the network technicians were loathe to do. Finally the punctuation within longer words is ignored by screen readers so plt.plot(x, np.sin(x)) is read out as pltplot(x npsin(x)) for example.

I have introduced a few more advanced pupils to text based C on a stand alone computer and this is probably the way to go in future, almost certainly on a Raspberry Pi.

Dave - one more for your list ADA which used by the US military for projects because there are NO alternative versions from different manufacturers. It was also the language used to teach first year undergraduates at a large Uni near here in the 90's

SillyOldDuffer08/12/2020 13:31:25
Moderator
7040 forum posts
1549 photos

Posted by Kiwi Bloke on 08/12/2020 10:48:05:

...You didn't respond to my assertion that, for 'our kind of application' at least, a suitable BASIC might do the job in far fewer lines of code than something more 'proper'. We're talking quick and dirty, not a bank's financial system, after all.

...

It's a fair cop guv! Although the source code of a simple program written in 'C' and BASIC are similar, C has substantial overheads. Apart from being low-level and harder to learn, the compiler is but one part of a complicated tool-set. There's an editor, preprocessor, type-strict compiler, and a linker to stitch user code, system code and libraries together. All these tools have multiple options, and there are yet more tools to address large project issues. For example, the 'make' utility understands which files needed to build a project, and is able to determine the minimum number that need to be recompiled when changes are made. So, it's not necessary to recompile the whole of Windows 10 every time a small change is tested. This is vital when a few thousand programmers are working on a project consisting of thousands of intertwined modules. In the same way, tools exist allowing multiple versions of code bases to exist in parallel, so past, current and future versions can coexist during development. One team will be bug fixing maintenance versions, another enhancing the current version, and a third working on the next. Careful management is needed to avoid chaos.

Much of this is unnecessary overhead on singleton projects! BASIC was one of the early attempts to bring computing to the people, and I think the most successful. But, especially in the early versions, the programmer is insulated from the machine. As always tools are fit for purpose provided they do what's needed. My main objection to BASIC is it's limitations, which don't matter until they bite! Python has considerable advantages over BASIC:  to anyone wanting to learn programming, or tackle more advanced work, it's gold.

No computer language is perfect, and - so far - attempts to produce a good all rounder have failed. Ada is probably the closest, but it's not popular for several reasons. The road to hell is paved with good intentions!

Dave

 

Edited By SillyOldDuffer on 08/12/2020 13:33:10

Bazyle08/12/2020 13:47:59
avatar
5834 forum posts
217 photos

LIke it matters unless your lathe cuts at 50krpm

Person A "My dick is bigger than yours"
Person B "I've seen bigger. By the way I'm a woman"

John Haine08/12/2020 15:30:21
3780 forum posts
220 photos

I have sort of learned Python to program the Pi that logs my clock data, and though it was difficult at first I got the hang of it quite quickly. I love the indentation, it's great for making the structure clear and you don't get confused forgetting to put in }s and {s or putting in too many. But it's easy to get very confused by other aspects. And Pythonistas seem sometimes to have a funny attitude to users.

For example, I needed to do some RF circuit simulation recently and was pointed at a free Python package called Scikit-RF. As an RF engineer I found it completely useless as it didn't let me describe my circuit in any way that was remotely familiar. The industry leading package lets you draw circuit diagrams and arrangements of transmission lines and extracts useful performance graphs that look just like the ones you get off the test equipment. It may be a great program, and extremely powerful, but it desperately needed a simple front end to hide away the actual software doing the work. Horses for courses as always.

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Latest Forum Posts
Support Our Partners
ChesterUK
JD Metals
Eccentric July 5 2018
Warco
cowells
emcomachinetools
Eccentric Engineering
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest