Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:36 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 : MMBasic for Web - perhaps, maybe, made you look ;-)

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 12:35pm 05 Jul 2022
Copy link to clipboard 
Print this post

A long way from being anything useful, and I've no idea where I'm going with it (probably nowhere), but this is MMBasic running as WebAssembly within Firefox:



Best wishes,

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

Guru

Joined: 31/01/2019
Location: Germany
Posts: 579
Posted: 12:44pm 05 Jul 2022
Copy link to clipboard 
Print this post

Someone must build a pci gpio Card
Great to see a new Port.
Plasma
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 12:58pm 05 Jul 2022
Copy link to clipboard 
Print this post

  Plasmamac said  Someone must build a pci gpio Card
Great to see a new Port.


Why PCI when usb/serial to picomite via usb works fine?

Intriguing at least, Tom.

~
Edited 2022-07-05 23:01 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 582
Posted: 12:43pm 08 Jul 2022
Copy link to clipboard 
Print this post

Nice  
I was going to try Web Assembly but at the time the libraries had a few holes and it would crash on some numeric work  
Keep going and keep us posted please !
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 01:02pm 08 Jul 2022
Copy link to clipboard 
Print this post

  Plasmamac said  Someone must build a pci gpio Card

Just wondering, was that a typo for "pico gpio card"?

I got something along those lines from aliexpress and I'm pretty sure there are others.

John
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 01:12pm 08 Jul 2022
Copy link to clipboard 
Print this post

They are available but I've not seen one that wasn't intended for commercial PC controller use, so they had commercial prices. :(
Mick

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 01:21pm 08 Jul 2022
Copy link to clipboard 
Print this post

  Plasmamac said  Someone must build a pci gpio Card.


What does this have to do with the price of fish ?

i.e. how does this relate to my OP ? - not trying to pick a fight, I just don't understand the relationship.

Best wishes,

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

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 01:29pm 08 Jul 2022
Copy link to clipboard 
Print this post

I suspect it was Plasma's wishful thinking - to be able to control things from a PC browser running MMBasic. Only guessing. :)
Mick

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 01:38pm 08 Jul 2022
Copy link to clipboard 
Print this post

  Mixtel90 said  I suspect it was Plasma's wishful thinking - to be able to control things from a PC browser running MMBasic. Only guessing. :)


Ah, you have the whole "sandbox" problem there, if that were possible you could write malicious WebApps that could do undesireable things to the hardware attached to the GPIO. WebAssembly runs on the JScript virtual machine built into the web-browser and that VM is very very locked down, even access to local file-system is verboten by default, that's one of the things browser plugins are for, to bypass those limitations.

I suspect what I am playing with is completely bl**dy useless to the main MMBasic/hardware community (and probably everyone else too) ... though it would allow me to host SAAINT on a website .

Best wishes,

Tom
Edited 2022-07-08 23:45 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 03:30pm 08 Jul 2022
Copy link to clipboard 
Print this post

Ah....  an ulterior motive.  :)
Mick

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

Joined: 31/07/2019
Location: Australia
Posts: 582
Posted: 01:15am 26 Jul 2022
Copy link to clipboard 
Print this post

Any update on the Web Assembly.. ? Intriguing..
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:37am 26 Jul 2022
Copy link to clipboard 
Print this post

  zeitfest said  Any update on the Web Assembly.. ? Intriguing..


Hi @zeitfest,

Thanks for your interest.

This is a "self-directed learning" project that I started for the day-job. MMBasic was just a conveniently large piece of C code to work with and had the great advantage that my employers wouldn't then try and sell a half-baked learning exercise as if it were product.

At the moment it is in mothballs whilst I deal with other work priorities. Before mothballing it I had reached something of an impasse as the event loop model that is used for writing Web Applications is incompatible with MMBasic's busy loop. Basically in a single-thread once MMBasic starts running there is no way for the Web Application to render output or capture input. By putting MMBasic into a worker thread you can theoretically deal with the output problem by sending messages from it to the main render thread, but MMBasic's busy loop is still incompatible with the main thread sending input messages to the worker thread. Barring a rewrite of MMBasic's busy loop I think the way forward is using a JavaScript SharedArrayBuffer to communicate between the main and worker threads, but historically these were a security hole and whilst I believe most of those issues have now been worked out, their use may still require explicit opt-in by the user/browser (and possibly the website serving the page).

Hopefully I'll get back to this some time in the near future.

Best wishes,

Tom
Edited 2022-07-26 19:40 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 582
Posted: 12:07pm 26 Jul 2022
Copy link to clipboard 
Print this post

Thanks,
it looks like it could be quite a trek, it'll take off though I bet.
To be revisited..  
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025