Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:30 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 : What's The Relationship with SC?

     Page 2 of 3    
Author Message
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 06:03pm 01 Jun 2020
Copy link to clipboard 
Print this post

I'm confused ... as usual ... this thread seems to have a mind of its own.

0. I like trolls ... especially when there's a snapper bluefish as the objective.
1. Why don't we have a better emoticon than this   for a troll?
2. What is SC? I'm  one of those damn yankees and have never seen it.
3. What's a valve? Are you perchance talking about a gas diode, triode, pentode, or beam power tube?
4. You can't expect kids to learn electronics the way us geezers did. There are no filament circuits and the stuff is too small to connect up with fingers.
5. Assembly language is a horror on any machine. The only thing worse is machine code. The first programming I did was to help write a machine code assembler for the IBM 1401. Anyone who WANTS to return to assembler is a masochist.
6. A, B, and C are nearly as bad as assembler.
7. MMBasic is an inspired work of genius ... or maybe masochism ... and an ideal tool for teaching programming techniques, and Geoff and his friends wrote it in C and some assembler.
8. Wind turbines are counter-productive ... if you tap enough energy from the wind you will reduce the coriolis energy available to the planet and slow its rotation.
9. My favorite word is kerfuffle so now you know why I like trolls.

Pavel Artur Jan Waclaw in NY.
Edited 2020-06-02 04:07 by Paul_L
 
GregZone
Senior Member

Joined: 22/05/2020
Location: New Zealand
Posts: 114
Posted: 10:25pm 01 Jun 2020
Copy link to clipboard 
Print this post

  thwill said  The CMM2 is vastly more capable, less than 30% the price proposed for the Commander X16 and comes with a hugely superior BASIC; they are initially using the (even at the time) pretty lousy Commodore BASIC 2.0. However the CMM2 is missing the ability for the user to write and run machine code, which is a big reason that the 8-Bit Guy gave for dismissing the CMM1 as his "dream machine". The ability to code in machine code seems to be a big draw for retro computer programmers and it appeals to something inside me too. <Flame proof suit on>The gold standard for the CMM2 might be for MMBasic to include an inline assembler such as the BBC Micro provided, however that is I suspect a complete pipe dream and possibly even technically impossible - it's certainly out of my area of expertise.</Flame proof suit off>
Hi again Tom.

We're on the same page. :)

I still play around with my own 8-bit CPU’s (mostly 6809 from back in the 70’s / 80’s), and far too many microcontrollers.  I still rather explore Assembly Code on a new microcontroller, to challenge me and to fully learn it’s capabilities, rather than just plug it into Arduino (as the younger generation unfortunately just do).
eg. I’ve just landed the latest AVR-DA chips, which look really interesting (from an 8-bit core / retro DIL package options perspective).  And, old-school me, means I’m deep into the 619 page datasheet and Assembly code.  No C compiler / libraries for me (just yet).  

So, yes, the ability to code CMM2 in machine code seems the only missing feature, relative to the native 65C02 on the Commander X16.
On this note, one of my first posts here was asking if it was going to be possible to call in-line Assembly code on CMM2. :)

However, I suspect that all the X16 followers diving into CC65 (or even CA65 for some Assembly Code), are doing so simply because the primitive BASIC implementation, and the 8Mhz clock speed, dictates that they will need to, in order to achieve the performance they need.

It is with this in mind, and the CMM2 BASIC’s capabilities and (importantly) speed, that I see CMM2 as of great potential interest to the wider community of retro computing enthusiasts (ie. not only the large X16 following).

As @Geoffg noted above, this is not from a “competition” perspective (hell, lets all build one of each!), I purely make note of this in the interests of the CMM2 reaching that “critical mass” of community following, that ensures CMM2 will become a great deal of fun for a lot of people!

ps. Someone needs to send The 8-bit Guy a CMM2 as a follow-up to his CMM review (which was also my introduction to Geoffg's stuff).
Edited 2020-06-02 08:27 by GregZone
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 11:35pm 01 Jun 2020
Copy link to clipboard 
Print this post

  Paul_L said  I'm confused ... as usual ... this thread seems to have a mind of its own.

0. I like trolls ... especially when there's a snapper bluefish as the objective.
1. Why don't we have a better emoticon than this   for a troll?
2. What is SC? I'm  one of those damn yankees and have never seen it.
3. What's a valve? Are you perchance talking about a gas diode, triode, pentode, or beam power tube?
4. You can't expect kids to learn electronics the way us geezers did. There are no filament circuits and the stuff is too small to connect up with fingers.
5. Assembly language is a horror on any machine. The only thing worse is machine code. The first programming I did was to help write a machine code assembler for the IBM 1401. Anyone who WANTS to return to assembler is a masochist.
6. A, B, and C are nearly as bad as assembler.
7. MMBasic is an inspired work of genius ... or maybe masochism ... and an ideal tool for teaching programming techniques, and Geoff and his friends wrote it in C and some assembler.
8. Wind turbines are counter-productive ... if you tap enough energy from the wind you will reduce the coriolis energy available to the planet and slow its rotation.
9. My favorite word is kerfuffle so now you know why I like trolls.

Pavel Artur Jan Waclaw in NY.


0) Forums don't.
1) Glen might comment....
2) SC is short-hand for Silicon Chip Magazine, an Australian publication.
3) Valve is our "Tube".  You would probably say: "Tube radio" - those lovely glowing orange things from years back.
4) OK
5) Agreed.
6) AGREED!!!!
7) Yes, and yes.
8)
9) What a kerfuffle this all is!
Smoke makes things work. When the smoke gets out, it stops!
 
Raul
Newbie

Joined: 06/05/2020
Location: United Kingdom
Posts: 11
Posted: 12:55am 02 Jun 2020
Copy link to clipboard 
Print this post

  Quote   I still rather explore Assembly Code on a new microcontroller, to challenge me and to fully learn it’s capabilities, rather than just plug it into Arduino (as the younger generation unfortunately just do).


http://docs.micropython.org/en/latest/pyboard/tutorial/assembler.html
Edited 2020-06-02 10:58 by Raul
 
Poppy

Guru

Joined: 25/07/2019
Location: Germany
Posts: 486
Posted: 03:27am 02 Jun 2020
Copy link to clipboard 
Print this post

  Quote  3. What's a valve? Are you perchance talking about a gas diode, triode, pentode, or beam power tube?


  Quote  3) Valve is our "Tube".  You would probably say: "Tube radio" - those lovely glowing orange things from years back.


This is an interesting generation gap.

Tubes ("Valves") are "those lovely glowing orange things" being replaced by the Transistor.

see on You-Tube

In times before "streaming" here in Germany all portable radios (back then still in operation) were called "Transistor-Radio" to point on the "new" technology (from the 60´s on) and differ from those chunky big boxes (though being really interesting, but today only for enthusiasts).

Today having it all shrunk to microscopic size and made it all throw-away utilities most people even do not know what a Transistor is ... not to mention a tube at all.

In classic amplifiers for Hi-Fi and Electric-Guitars you can still find tubes still working.
Andre ... such a GURU?
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 06:25am 02 Jun 2020
Copy link to clipboard 
Print this post

  thwill said  
I don't know if I'm one of the "trolls" referred to above. The "Captain" certainly thinks so and I won't deny having gently tweaked his tail ... I was provoked.


check for a PM - I do not do my dirty laundry in public
 
Poppy

Guru

Joined: 25/07/2019
Location: Germany
Posts: 486
Posted: 08:03am 02 Jun 2020
Copy link to clipboard 
Print this post

Yeah, washing is no fun and the forum is no washing machine ...

All Keep Cool!

Andre ... such a GURU?
 
IanT

Senior Member

Joined: 29/11/2016
Location: United Kingdom
Posts: 108
Posted: 09:16am 02 Jun 2020
Copy link to clipboard 
Print this post

"So, yes, the ability to code CMM2 in machine code seems the only missing feature, relative to the native 65C02 on the Commander X16. On this note, one of my first posts here was asking if it was going to be possible to call in-line Assembly code on CMM2"

Greg,

I was mostly a Z80 guy (Nascom 2) although my 'games console' was an Atari 800 (I still have two under the bench). So when I got my first PIC32 I started out thinking that I'd do something with assembler too. However the complexity of 32-bit devices is far above that of the 8-bit ones of my younger days. Frankly, I soon looked for better, easier, more productive ways to spend my free time. That's when I stumbled across MMB ad decided that this was the best route for me!

I'm currently trying to learn 3D CAD (Solid Edge 3D Community is really powerful but it does need time to learn well) and so I have decided to hold off on the CMM2 for now - I'm much too easily distracted I'm afraid.

But I am very happy (and excited) that Geoff, Peter and the others have given up their spare time to produce such an elegant & powerful device that will be great fun to explore. In doing so, they will once again save me (and many others) a great deal of our time by NOT having to wade through the complexities of 32-bit assembler - even if such a thing was really viable.

MMB is my programming environment of choice and I'm currently running it on PIC32, RPi and DOS - no assembly required!  :-)

So thank you again Geoff and Peter for all that time and frustration that MMB has saved me whist also being so enjoyable to learn and use.

I do understand the lures of yesterdays Computing but much prefer the convenience and power that todays Tech offers. Life is too short to get buried in the small print I'm afraid. Back to lurking...

Regards to all,

IanT
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 10:45am 02 Jun 2020
Copy link to clipboard 
Print this post

Referring to the assembler in micropython link

does anyone really want something similar in MMBasic?

(Not that I expect there's any chance of it!!)

If so, why?

I can imagine writing a Z Machine or the like might benefit from C functions, however.

John
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 11:19am 02 Jun 2020
Copy link to clipboard 
Print this post

Hi John,

  JohnS said  Referring to the assembler in micropython link

does anyone really want something similar in MMBasic?

(Not that I expect there's any chance of it!!)

If so, why?


I can only speak for myself, but:

1. Potential speed benefits.
2. Allows me to experiment with ARM ASM on a system I am already using and supporting.
3. An answer to those who might be persuaded to join the CMM2 community but for the lack of any "close to the metal" support (for whatever reasons, spurious or otherwise they might have) - the larger the community presumably the more vibrant and healthy it would be.

  Quote  I can imagine writing a Z Machine or the like might benefit from C functions, however.


Using "CFunctions" requires cross-compiling whereas an inline assembler (or similar) would allow one to do all their development on the CMM2 itself ... not that I think anyone doing any serious CMM2 development would, I find a windowed environment essential if only so as to have the internet up as reference ... there are somethings about 80's micro-computers I don't miss.

My Z-Machine is playable on the CMM2, it could do with being 2x faster, and that might be possible with some careful BASIC optimisation, but I'll wait until I'm feature complete to start that; though I'll have a "release" before then. Ideally it would be 5x faster and that would require "CFunctions".

On the CMM1 it will be ridiculously slow, but I'll probably have a go for "kicks-and-giggles". If the CMM1 ever gets an upgrade to MMBasic 5 and hopefully CFunction support then it should become viable, but by that time whatever interest there might have been in CMM1 support will probably have vanished.

Best regards,

Tom
Edited 2020-06-02 21:23 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 03:13pm 02 Jun 2020
Copy link to clipboard 
Print this post

Thanks.

Cross-compiling is easy (e.g. using gcc).  By way of example it's the only way I've ever programmed PIC32, STM32, STR, AVR, and so on chips (all in C and/or C++).

It doesn't need anyone (Geoff, Peter, ...) to write an inline assembler (let alone one that will be CPU-specific).

However, currently there are no CFunctions for ARM as you know.  I'm unsure what needs to be done but until the hectic pre-release period is over I suspect it's not going to be investigated.

I hesitate to go out on a limb but I can't see it being anything like so hard as creating an inline assembler would be.

As I have a working CMM2 I'm hanging on for the release and source availability before trying hand-to-hand combat with gcc.

Do you have a list of the kinds of things you'd likely get a fair speed increase from?  (Not sure I'll understand your list as I don't know the Z M so a sort of simplified high-level short list may be the best?  Skip it if that's not meaningful, of course.)

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 03:39pm 02 Jun 2020
Copy link to clipboard 
Print this post

Cfunctions used to work on the very first port I did to STM32 many moons ago and I think I have the code to implement CFunctions in the CMM2 firmwware. The issue is with creating the Cfunction and converting it to a series of Basic statements.
Firstly the original ARM Cfunctions were written using COIDE which is defunct. Peter Carnegie was responsible for establishing the compiler and linker switches to get it to produce position independent code. He also wrote the conversion program that converted the .elf file to the Basic statements. I don't have the code for that.

I did write a replacement conversion program for Microchip which Jim improved and it wasn't easy. First, there were various jump statements that had to be changed as they weren't actually position independent. Secondly, the program had to deal with data in more than one psect and then generate the relative addressing needed. This worked on the GCC compiler provided by Microchip up to V1.34.

Compiler version greater than V1.40 were needed for the Microchip processors used in the MMX. I never got any of the later compilers to generate usable position independent code due to a major change GCC made in the way the compiler switches work and the way supposedly position independent code linked in library routines.

The compilers needed for the STM32H743 are the very recent releases from GCC and there may well be the same issue.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 05:50pm 02 Jun 2020
Copy link to clipboard 
Print this post

Is it OK to revisit this once the release is done and the no-doubt follow-ups that will require, i.e. once more mainstream things have quietened down?

It feels like something for the future...

(Or if you're happy to spend time now then by all means, but I don't want to derail other things.)

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 06:24pm 02 Jun 2020
Copy link to clipboard 
Print this post

John

There is a version of the ArmmiteH7 code (Nucleo-H743) here that was tested with CFunctions. They have since been removed from the ArmmiteH7 code to save command slots. If you want to have a go working out how to set up STM32CubeIDE to generate something position independent then it can be tested on this version. This of course is the same chip as the CMM2. It is not something I'm going to look at for the foreseeable.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 10:02am 03 Jun 2020
Copy link to clipboard 
Print this post

Hi John,

We are well off topic

  JohnS said  Cross-compiling is easy (e.g. using gcc).  By way of example it's the only way I've ever programmed PIC32, STM32, STR, AVR, and so on chips (all in C and/or C++).


I wasn't suggesting it was particularly difficult just that there is a satisfaction to being able to do it all within one environment. Also if you only needed a single ASM routine amidst a sea of BASIC then embedding it into that BASIC simplifies maintaining it all in one place. I'm prepared to admit it may all be academic and unnecessary.

  Quote  It doesn't need anyone (Geoff, Peter, ...) to write an inline assembler (let alone one that will be CPU-specific).


Honestly I'm not expecting anyone to write it I'm just engaging in discussion.

  Quote  However, currently there are no CFunctions for ARM as you know ...


As it stands the CMM2 is a device I'm very pleased with. I hope it gets CFunctions in the future, through perhaps it would be better in the long term if someone other than matherp picks this up as it is not sustainable for everything to rest on the shoulders of only a couple of people.

I'm awaiting a release of the firmware code too but am in no hurry, in all likelyhood other responsibilities will prevent me from doing the things I might like to do with it.

  Quote  Do you have a list of the kinds of things you'd likely get a fair speed increase from?  (Not sure I'll understand your list as I don't know the Z M so a sort of simplified high-level short list may be the best?  Skip it if that's not meaningful, of course.)


Thanks for taking an interest, if you don't mind I'm going to move that discussion to this thread to avoid derailing this one any further.

Best regards,

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

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 02:24pm 05 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  John

There is a version of the ArmmiteH7 code (Nucleo-H743) here that was tested with CFunctions. They have since been removed from the ArmmiteH7 code to save command slots. If you want to have a go working out how to set up STM32CubeIDE to generate something position independent then it can be tested on this version. This of course is the same chip as the CMM2. It is not something I'm going to look at for the foreseeable.

Thanks.

I've flashed my Nucleo-H743ZI (MB1137 Rev B) with it, and the flash reads back OK (so long as I don't let MMBasic run, as it looks then to overwrite part of the flash).

I've got a USB-serial device (set to 3.3V) connected to Gnd, PD8 & PD9 for the console and at 38400 baud I see the MMBasic start-up messages (V 05.04.18 etc) and the ">" prompt.

I can't input anything, nothing even echoes.

If I press RESET I get the start-up messages each time, as expected.

The USB-serial device works fine (checked by connecting its Tx to Rx & with other boards).

The Nucleo board seems OK generally (ran its test program OK before I flashed it, and its STLINK enumerates apparently OK).

Is there some magic I need to do that I've overlooked?  Maybe with jumpers?

I'm powering the board via CN1 (STLINK end of board) before powering up the USB-serial (in case it can leak power).

I expected this to be the easy bit!

Thought I'd next check the strrev in the thread works OK and go from there...

(I disassembled it out of curiosity and built a rough equivalent bearing in mind I don't have the actual source that was used.)

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 03:03pm 05 Jun 2020
Copy link to clipboard 
Print this post

John

Not sure which version you mean but pics of my board attached,
 both tested with RC18, both work, both verify properly if H/W reset selected in STM32CubeProgrammer. After programming disconnect ST-LINK and press RESET.
You should be using the ST-LINK VCP as the console unless you disconnect it it will conflict with direct connection to the pins






Edited 2020-06-06 01:13 by matherp
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 03:40pm 05 Jun 2020
Copy link to clipboard 
Print this post

Looks like the left one - with PCB marked MB1137 Rev B.

But for the console I've connected direct to the pins :(

Will now investigate VCP (never heard of it!).

edit: aha - got it! Can use /dev/ttyACM0
(VCP must be virtual console port or some such)
It works - thanks

BTW, does the F4 armmite (for the 407VET6) have CFunctions?

John
Edited 2020-06-06 01:46 by JohnS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 03:52pm 05 Jun 2020
Copy link to clipboard 
Print this post

  Quote  BTW, does the F4 armmite (for the 407VET6) have CFunctions?


No, and not possible as the flash memory is completely full
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 04:41pm 05 Jun 2020
Copy link to clipboard 
Print this post

OK, I'll stick to the H743 :)

John
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025