![]() |
Forum Index : Microcontroller and PC projects : What's The Relationship with SC?
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
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 ![]() 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 ZealandPosts: 114 |
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 ZealandPosts: 9610 |
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 KingdomPosts: 11 |
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: GermanyPosts: 486 |
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. ![]() ![]() | ||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
check for a PM - I do not do my dirty laundry in public |
||||
Poppy![]() Guru ![]() Joined: 25/07/2019 Location: GermanyPosts: 486 |
Yeah, washing is no fun and the forum is no washing machine ... All Keep Cool! ![]() ![]() ![]() | ||||
IanT![]() Senior Member ![]() Joined: 29/11/2016 Location: United KingdomPosts: 108 |
"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 KingdomPosts: 4044 |
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 KingdomPosts: 4311 |
Hi John, 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. 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 KingdomPosts: 4044 |
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 KingdomPosts: 10315 |
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 KingdomPosts: 4044 |
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 KingdomPosts: 10315 |
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 KingdomPosts: 4311 |
Hi John, We are well off topic ![]() 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. Honestly I'm not expecting anyone to write it I'm just engaging in discussion. 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. 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 KingdomPosts: 4044 |
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 KingdomPosts: 10315 |
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 KingdomPosts: 4044 |
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 KingdomPosts: 10315 |
No, and not possible as the flash memory is completely full |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
OK, I'll stick to the H743 :) John |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |