![]() |
Forum Index : Microcontroller and PC projects : MMB4L: MMBasic for Linux alpha release
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
No pleasing some people. There is a special Circle of Hell reserved for those asking for a Raspi Bare Metal version ![]() Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4004 |
Yes - the (I/O) hardware is not like any of the other MMBasic hosts :( Possibly the work could be made much easier by using one of the other bare metal projects. John |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7538 |
The honest answer, Carsten, is yes - but only if you make it and support it. :) There's been discussion about this before and it's almost certainly not going to happen. Those who dare to suggest it now run the risk of something dodgy happening to them. ;) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10078 |
If you want a version that only runs on one specific "Pi" that will almost certainly then be superseded (witness Pi zero 2 which almost certainly wouldn't run the same bare metal code as Pi Zero). This is the whole issue with the Raspberry Pi, as soon as you get remotely close to the metal you are exposed to multiple changing variants of the H/W. And one layer up you add the OS changes to that as well. Only by doing as Tom is and working at the Linux level are you likely to see something that might work and continue to work on the full range of Pis Edited 2021-11-09 02:30 by matherp |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2404 |
If you want a version that only runs on one specific "Pi" would that really be such a bad thing? according to the Raspberry Pi webside: "Raspberry Pi Zero will remain in production until at least January 2026",having been released in November 2015 (according to wikipedia). that is a production lifespan of 10 years. i rather like the zero as it is close to being model 1A+ (which itself will remain in production until January 2026), and operates at the lowest power compared to subsequent offerings (pico aside). guaranteed production means that the hardware will be available for a long time, negating the need to continuously migrate to the latest available hardware. providing one accepts the limitations of the hardware, all is well. running bare-metal, a zero (not W or 2) has: considerably more memory than even a CMM2, a fair bit more computing power, comparable 40-pin I/O abilities, HDMI video output, USB keyboard input, audio output, all at a fraction of the price. and i honestly expect the original RPi zero to be available for purchase long after the CMM2 in its various forms to have ceased being produced by anyone. on the down size, the RPi zero is perhaps not a cool - in good part because it has the potential to run Linux, had more memory, HDMI video output... cheers, rob :-) |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7538 |
All the Pi series (bar the Pico) are basically a GPU with a AVR glued onto it. The GPU is the clever bit and handles the boot sequence and interfacing with the AVR. They are intimately linked. Unfortunately different models of the Pi change either one, the other or both of these. They are completely incompatible at hardware level. Peter's reluctance to put MMBasic on the Pi is understandable considering MMBasic's requirement for low level access to the hardware. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4866 |
AVR == ARM PicomiteVGA PETSCII ROBOTS |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1533 |
Sure?? https://en.wikipedia.org/wiki/AVR_microcontrollers Best regards causality ≠ correlation ≠ coincidence |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Sure?? https://en.wikipedia.org/wiki/AVR_microcontrollers Best regards Yeah, I don't think @Volhout meant the "equality operator", he was correcting Mick's "typo". MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1533 |
Okay! ![]() causality ≠ correlation ≠ coincidence |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7538 |
Yep. :) It's an ARM Cortex. At my age I have a certain number of typos to get through before I'm allowed to approach the PEARLy gates. This labour has to be completed so I have to drop one in now and again to try to get rid of them. That's my excuse and I'm sticking to it. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4004 |
Tom, Some notes, using x86_64 & i686: 1. (a) the README refers to .tar.gz but it's probably via git or a ZIP (b) or it's a .tgz (c) the mmbasic executables are .tgz In any case, I suspect tar -xf needs to be tar -xzf 2. the README mentions nano --version but I'm not sure why (I haven't needed nano myself, though it's installed) 3. I'm not sure why any glibc versions are there but didn't need any All seemed to work (on a quick test) but: 4. CONSOLE BELL was accepted but silent 5. MM.INFO$(ARCH) looks instead to be MM.INFO(ARCH) i.e. no $ 6. similarly for MM.INFO$(ENVVAR ...) John |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Hi John, Thanks for taking the time to read the README and give MMB4L a spin. (b) or it's a .tgz (c) the mmbasic executables are .tgz Thanks, it should be ".tgz". Note that I'm misusing github to publish the binaries, the expectation is that a potential user would follow the link on the README and download from https://github.com/thwill1000/mmb4l/tree/main/distributions rather than clone the repository itself. Ultimately the intention is that MMB4L will be open-source like the PicoMite with a proper github source repository; Geoff has already given his blessing. I believe it works without. 'tar' is obviously savvy enough to work that out for itself from the file extension. (I haven't needed nano myself, though it's installed) MMB4L uses 'nano' to implement the EDIT command. The instructions on how to configure nano for this purpose depend on the version. Following your comment I think I will put this in a separate section from "How do I install it ?" You mean on the .tgz file names ? They are partly for my benefit and are the minimum version of GLIBC required to run that MMB4L distribution. In the case of x86_64 and i686 I build on an older Xubuntu LTS release (18) so that potential users don't have to be running the very latest Linux distributions. It might be an impertinent question, but is your bell working ![]() 6. similarly for MM.INFO$(ENVVAR ...) Known bug. MM.INFO$ will work within a program, but not in immediate mode. This is because I'm currently not running code entered in immediate mode through the preprocessor (which amongst other things converts MM.INFO$ => MM.INFO). Rather than just patch this up from the CMM2 code I've decided to live with it until (probably) alpha 4 when I want to have a holistic look at all the preprocessing that MMBasic does because I think I may be able to do better. Thanks again, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
For preprocessor related fun and games try this on the CMM2: > list "compare.bas" ? 5 >= 4 ? 5 => 4 > run 1 1 > ? 5 >= 4 1 > ? 5 => 4 Invalid operator Compared with MMB4L: > list "compare.bas" ? 5 >= 4 ? 5 => 4 > run 1 1 > ? 5 >= 4 1 > ? 5 => 4 1 This is a bug in the CMM2 pre-processing in immediate mode as historically MMBasics have supported both >= and => ... it's also evidence that even I have limits as to the triviality of bugs I tell Peter about, at least until now ![]() It doesn't happen in MMB4L because currently I don't rely on the preprocessor to convert => into >= but eventually I will have to when I start running out of function tokens. Best wishes, Tom Edited 2021-11-11 09:49 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1111 |
Although it may be bleedingly obvious to experienced Linux users, the output from MMBasic can be piped to the underlying shell. Eg. File saved as junktst.bas for x = 1 to 10 print "counting ",x next x quit at a terminal prompt mmbasic ./junktst.bas | grep 9 will output counting 9 This opens up a range of shell commands for those command line gurus. Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4004 |
I believe it works without. 'tar' is obviously savvy enough to work that out for itself from the file extension. I've been typing too many chars! Thanks for that. Ah, I've not used EDIT. ![]() Oops. It's not. Sorry! John Edited 2021-11-11 17:25 by JohnS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4866 |
Dear Tom, The private message prevent me from sending you a message because your inbox is full. Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Thanks for letting me know. I've cleared some space now. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
@Volhout if you meant to PM me then I still haven't seen it. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Alpha 3 is *finally* available for x86_64, i686 and armv6l (Raspberry Pi): https://github.com/thwill1000/mmb4l Unless you are a big fan of Unicode the headline item is the addition of serial port support: https://github.com/thwill1000/mmb4l#open I'd appreciate any help in testing this, especially the RTSCTS and XONXOFF flags which are currently completely untested - "monkey see, monkey do". ChangeLog Version 2022.01.00-a3 - 16-Jan-2022: - Added serial port support, e.g. OPEN "/dev/ttyS0: 115200" As #1 this is very preliminary and in need of extensive user testing, see README for details. - Added XMODEM {SEND|RECEIVE} file$, #fnbr command: - #fnbr must first have been OPENed as a serial port. - unlike other MMBasic versions, MMB4L cannot use XMODEM to send to or receive from the console. - Added OPTION CODEPAGE page$ command: - causes character bytes in the range 128-255 to be translated to Unicode (UTF-8) when printed to the console according to a given code page / mapping. - supported values of page$ are currently: - "NONE" : no mapping, characters 128-255 are written as-is. - "CMM2" : best effort mapping to the characters of the CMM2 font. - "CP437" : characters 128-255 of the original IBM PC code 437. Note this was a non-ANSI code page which also included characters 1-31 which are not available in this mapping, but see "MMB4L". - "CP1252" : the classic Windows-1252 Latin alphabet code page. - "MMB4L" : as "CP437" but with characters 129-159 replaced by the original non-ANSI CP437 characters 1-31 and with additional "useful" characters in positions 128, 161-170 and 255. - Added CHR$(UTF8 codepoint%) function: - given a Unicode code-point this returns the 1-4 character string encoding that character in UTF-8 format. - printing such characters is not compatible with OPTION CODEPAGE being set. - Added AUTOSAVE file$ command: - note that as with the CMM2 there is no CRUNCH option; AUTOSAVE writes to a file and MMB4L always crunches the program automatically when it loads it for execution. - Added CONSOLE SETSIZE [ATLEAST] width%, height% command: - sends an XTerm control sequence to set the terminal size. - if the optional ATLEAST modifier is used then this will not reduce the terminal width or height. - Added PRINT @(x%, y%) expression: - unlike the CMM2, x% & y% are obligatory and in character coordinates, there is no mode parameter. - equivalent to: CONSOLE SETCURSOR x, y : PRINT expression - Added missing LIST FILES command: - just another synonym for FILES and LS and only present for compatibility with the CMM2. - Changed SYSTEM command to allow standard output to be captured in a STRING (as an alternative to existing functionality to capture it in a LONGSTRING), e.g. DIM out$ SYSTEM "echo `date`", out$ PRINT out$ Also any trailing whitespace, including CRLF is now trimmed from the captured STRING or LONGSTRING output. - Changed EOF() function to return 1 when at the end of file (like the CMM2), previously it returned -1. - Fixed bug so that MEMORY COPY command correctly handles overlapping source and destination. - Fixed bug with MM.INFO$(...) not being recognised in interactive mode: - synonym for MM.INFO(...). - interim fix pending rewrite of pre-processor and its use from interactive mode. - Fixed bug where error messages over 127 characters would overflow into the storage for MM.CMDLINE$ - error messages are now truncated to 127 characters. Best wishes, Tom Edited 2022-01-16 20:08 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |