Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:56 03 May 2024 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 : MMBasic for Linux (a possiblity - don't get too excited)

     Page 2 of 5    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5735
Posted: 01:55pm 20 Aug 2021
Copy link to clipboard 
Print this post

I keep intending to have another go at C. I got sort of half way at one time with a small C on the Atari ST and I've played with an Arduino a bit, but I've never got to the point where I can really do anything without having to keep referring to some sort of reference. It's powerful but I find it extremely annoying and confusing at the moment.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 03:23pm 20 Aug 2021
Copy link to clipboard 
Print this post

  JohnS said  
  thwill said  ... and how have I never noticed this atrocity before?

I guess you hardly write any C!!


Way to burst my balloon , but "yes", it's been a while (I'm more Java these days) and it was never particularly low-level stuff.

  Quote  BTW C compilers (such as gcc) often allow you to override what the actual CPU provides (but inevitably can generate longer, slower code).


I had already located the GCC flag in question, -funsigned-char

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 03:43pm 22 Aug 2021
Copy link to clipboard 
Print this post

Hi folks,

I've spoken with Geoff and received his blessing, so assuming Peter raises no objections to me cribbing from his code all systems are go; so far it's not even proving all that difficult as in most cases Geoff's DOS/Windows code just needs a little nudge and elsewhere Peter's CMM2 code also basically "just works".

I've already got Z-MIM working and that's relatively demanding of the MMBasic language ... it won't work on the DOS/Windows version for a start.

Video:

   https://www.youtube.com/watch?v=Mfcxq_whYpE

Screenshot:
 


The observant will note:

1. When I type a command into the MMBasic prompt it is being echoed back, that's because to get something running quickly I'm still using the terminal in "cooked" mode.

2. At the end of the video you can see that the MMBasic timer isn't working properly; it's not really taking 2 seconds per Z-machine instruction.

Best wishes,

Tom.
Edited 2021-08-23 02:18 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5735
Posted: 04:10pm 22 Aug 2021
Copy link to clipboard 
Print this post

That's looking very promising. Nice one! :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1095
Posted: 12:39am 23 Aug 2021
Copy link to clipboard 
Print this post

Well done Tom. I am very interested in your project. I am running Mint20.2 and am still  learning although I am starting to get comfortable with the command line.

If you want a tester, I would be happy to assist in any way I can.

Regards,
Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 05:53am 23 Aug 2021
Copy link to clipboard 
Print this post

Thanks for the offer Doug. Despite what I have demoed so far, I am still some way off being able to release an alpha version for testing. I don't want to do so prematurely for fear of bug reports distracting me from filling in the larger missing pieces.

Best wishes,

Tom
Edited 2021-08-23 16:12 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 12:35pm 23 Aug 2021
Copy link to clipboard 
Print this post

Do you have any interest in an MMBasic debugger? I have working, but incomplete, code for DOS MMBasic which has shifted to a back burner. It takes about 6 lines of code added to Geoff's code for hooks (in addition to the C code for the debugger itself). I'd be happy to give you the code.

It has helped to find some deeply hidden MMBasic bugs in my code. It has single-stepping, breakpoints, and display of variable values (but not thoroughly worked out for variables in subroutines). Next on my list for it was break-on-value. Geoff approved of its development.

The debugger outputs via serial to another PC (or, in theory, to the same PC, though I haven't tested that).


 
(Then the question would be, how readily can the linux version be transferred back to DOS.) (And bearing in mind the desire not to have forks.)
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 04:13pm 23 Aug 2021
Copy link to clipboard 
Print this post

Duplicate double post deleted.
Edited 2021-08-24 22:22 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 04:13pm 23 Aug 2021
Copy link to clipboard 
Print this post

  lizby said  Do you have any interest in an MMBasic debugger?


Hi @lizby, it's not that I'm disinterested, but my plate is thoroughly overflowing at the moment. Get back to me if/when I have 64 and 32 bit Linux ports of MMBasic "published".
 
  Quote  (Then the question would be, how readily can the linux version be transferred back to DOS.) (And bearing in mind the desire not to have forks.)


Once I have the Linux version beaten into submission I don't think a back port to "DOS" would be too difficult. However as above, it and any surrounding discussion as to the desirability can definitely wait.

Best wishes,

Tom
Edited 2021-08-24 02:52 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 05:18am 24 Aug 2021
Copy link to clipboard 
Print this post

C and me had something of a hate/hate relationship that I have never recovered from.
Much happier am I, writing in a 2nd level language.

After a few tries at something basic(no pun intended) such as blinking an LED on and off, it was a case of "C ya later!"

I have enormous respect for anyone who can write in C and it seems like it is nothing to them.  Geoff, Peter, Rob(ert Rozee) - now Tom....
Apologies to anyone who is a master of C that I am not aware of on this forum.
Smoke makes things work. When the smoke gets out, it stops!
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 12:33pm 24 Aug 2021
Copy link to clipboard 
Print this post

Tom--out of curiosity, are you aiming ultimately for a command-line version like DOS MMBasic, or a graphical version like the Picromite?
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 12:58pm 24 Aug 2021
Copy link to clipboard 
Print this post

  lizby said  Tom--out of curiosity, are you aiming ultimately for a command-line version like DOS MMBasic, or a graphical version like the Picromite?


My initial goals are a console/terminal (which is what I guess you mean by command-line) version for Linux 64 & 32 bit (including Raspberry Pi) with MMBasic language compatibility with the CMM2 excluding VGA graphics, sound, hardware comms and the like. Basically something that will run all my CMM2 programs: Z-MIM, SAAINT, Yellow River Kingdom and SPTools (including my unit-test framework).

Wild speculation follows:

Ultimately it would be nice to have at least serial comms support and graphics and sound using SDL (or possibly something like Allegro - thanks @JohnS). Note that wrt graphics I'm talking about an implementation of the same API as the CMM2 not an emulation, so if a CMM2 program achieves graphics by poking at the video memory it wouldn't work in my proposed Linux version. CSub/Function support if I ever got that far would be through dynamic loading of shared objects rather than the CMM2's and other 'mites use of embedded binary code.

Reality intrudes:

But I'm a long way from that and might still grind to a halt before even the basics are done - currently I have more time than usual because I am on holiday but soon I'll be back to only a snatched hour an evening.

Thanks for taking an interest,

Tom
Edited 2021-08-24 23:08 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 01:45pm 24 Aug 2021
Copy link to clipboard 
Print this post

  thwill said  [Wild speculation follows:

Ultimately it would be nice to have at least serial comms support and graphics and sound using SDL (or possibly something like Allegro - thanks @JohnS).


And pin control and I2C, I hope. Very interested indeed. Hope you find the time and don't hit roadblocks.

I'd also offer to alpha-test if you get Geoff's and Peter's permission to share code.

This on a Pi-ZW would fill an MMBasic gap that the lapsing of the Picromite has left.

I do love embedded MMBasic, but there's something to be said for MMBasic on an OS platform with full access to control of pins (and wifi included).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 01:54pm 24 Aug 2021
Copy link to clipboard 
Print this post

  lizby said  And pin control and I2C, I hope.


OK, my aim is not to fill the hole left by the PicRoMite and support the Raspberry Pi GPIO, though perhaps in time and with help that might happen. Quoting my first post in this thread "to be honest if Peter with all his hardware/electronics experience can't get it [the PiCroMite] to work I don't see muggins succeeding."

  Quote  I'd also offer to alpha-test if you get Geoff's and Peter's permission to share code.


Both Geoff and Peter have given their blessing, though Peter has asked for his name to be removed from the (c) message in the banner so as not to sully his good name with Linux associations .

If/when I get to that point I'll probably post the alpha publicly on TBS like Peter did with the Picomite.

Best wishes,

Tom
Edited 2021-08-25 00:36 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 02:56pm 24 Aug 2021
Copy link to clipboard 
Print this post

  thwill said  OK, my aim is not to fill the hole left by the PicRoMite


[niggle]It's not a Pic+Micromite basic, but a Pi+Micromite basic, so a PiCromite[/niggle] ;-}
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 03:26pm 24 Aug 2021
Copy link to clipboard 
Print this post

  lizby said  [niggle]It's not a Pic+Micromite basic, but a Pi+Micromite basic, so a PiCromite[/niggle] ;-}


But it's the "r" that is the distinguishing letter between Picomite and Picromite. To make matters even more confusing BigMik has a tiny PCB breakout board carrying the SMD MX170 which of course he called the Picomite before the Raspberry Pico even existed .

Best wishes,

Tom
Edited 2021-08-25 01:53 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 12:39pm 25 Aug 2021
Copy link to clipboard 
Print this post

  thwill said  
  lizby said  Tom--out of curiosity, are you aiming ultimately for a command-line version like DOS MMBasic, or a graphical version like the Picromite?


My initial goals are a console/terminal (which is what I guess you mean by command-line) version for Linux 64 & 32 bit (including Raspberry Pi) with MMBasic language compatibility with the CMM2 . . .


Actually by "command-line" I meant headless with an ssh connection. But I think we're talking about the same thing.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5735
Posted: 04:18pm 25 Aug 2021
Copy link to clipboard 
Print this post

At the moment anyway it seems to be "MMBasic for linux" - not for the RPi. That has a version, albeit discontinued. If Tom's port will run on the Pi then that's fine, but I don't think that's Tom's target hardware in particular and, personally, I'd be happy to sacrifice Pi compatibility if it means that "normal" distros work. Control of the serial port should be sufficient for most purposes, if that can be attained without having to run as root all the time.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 04:51pm 25 Aug 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  At the moment anyway it seems to be "MMBasic for linux" - not for the RPi. That has a version, albeit discontinued.


I'm afraid I don't understand that. I'm running Buster and Stretch on R-Pi ZWs, and just about everything I know Linux (and I'm no guru, but always work from the command line) works on the Pi. Not to mention that I thought Tom's not-Windows preferred device was a Pi.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 326
Posted: 04:59pm 25 Aug 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  At the moment anyway it seems to be "MMBasic for linux" - not for the RPi. That has a version, albeit discontinued. If Tom's port will run on the Pi then that's fine, but I don't think that's Tom's target hardware in particular and, personally, I'd be happy to sacrifice Pi compatibility if it means that "normal" distros work. Control of the serial port should be sufficient for most purposes, if that can be attained without having to run as root all the time.


If he makes it run on Debian-based ARM linux, then it should run on both linux and Raspberry Pi OS. If it runs on Debian at all, it should be a simple recompile for x86 and ARM.
 
     Page 2 of 5    
Print this page
© JAQ Software 2024