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 : Any interest in MMBasic for Windows with full Graphics?
Page 3 of 5 | |||||
Author | Message | ||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 328 |
I'd certainly run it! One use would be to debug programs for the CMM2. |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 450 |
It will be a great feature running graphics on the MMBasic DOS / Linux. |
||||
KD5ZXG Regular Member Joined: 21/01/2022 Location: United StatesPosts: 53 |
Definitely want MMBASIC w. graphics for Windows or DOS/VESA. But also want simple remote control of USB attached Picos. PC isn't exactly bristling with native GPIO. Not Windows, but what about running quad SPI connected Picos to offload VGA and maybe other burdens from the interpreter? $4 could afford one for each color, maybe going too far... Two Picos could hide in a PS/2 keyboard as easily as one. Edited 2022-01-21 16:58 by KD5ZXG |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 3589 |
This is what I do in almost all of my test setups. I have an Arduino (tinybasic) or MX170 (MMBasic) attached through USB as a COM device. In Teraterm Scripting Language(windows) or Expect Scripting(linux) scripting I send sets of commands to the commandline of the Arduino/MX170 and read the response. In some cases, where speed is more of an issue, this can include loading (through the same commanline interface) a basic program, executing it, reading the response, killing the program, and continue on the commandline. Then you benefit is a/ simple direct commands b/ option to run basic programs that do some fast stuff. c/ enjoy the functionality that is inside basic (just imagine you have a simple bit based IO only and have to write all the SPI functionality, I2C functionality, ADC reads, string handling, yourself. The script would be immense. In essence: everything you need already exists. You just have to use what is there. And if you use scripting languages, or MMBasic with COM port support that is free to you. Reason I use scripting in Expect, is that it allows me to use ethernet devices also using telnet or ssh (it is not limitted to serial ports only) where as MMBasic does not support that yet. Volhout Edited 2022-01-21 21:35 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
There is also the IOIO-OTG which originally was Android only but now is PC compatible. The cool thing about the IOIO on Android is that; unlike most OTG devices, it can charge the device. Not very hobbyist-friendly in terms of pricing but I believe it is open source. Edited 2022-01-22 01:39 by Tinine |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 3865 |
And now I've had to buy an OTG adapter (a normal one, not that piece of gold-plated unobtanium) to see if MMB4L running on my Android phone can talk serial to an attached 'mite. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
This is also quite exciting....looking forward to the results |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
@thwill Does this mean that we could be looking at MMBasic on the Odroid or similar? Cheers, Craig |
||||
KD5ZXG Regular Member Joined: 21/01/2022 Location: United StatesPosts: 53 |
GPIO over USB isn't completely daft, as proven in BASIC at least once before. Anyone ever fool with FUZE Basic? Could control pins of connected Arduinos. I could never get Arduino pin I/O to work when Pi3 ran the FUZE interpreter. Which was a nuisance, at the time I needed 5V GPIO my Pi3 couldn't do. But a PC running specific obsolete version (I forget exactly which) could... Maybe was fuzebasic64v3'9'1 with fuzeBasicArduino.ino both vintage 2017? Found this silly demo I once wrote (for PC) to read two pots (via Arduino). Point trying to make that FUZE treated external GPIO as-if part of the PC. Maybe could connect more than one? Never actually tried more than one. NEEDS LINE NUMBERSssssss. Hate how FUZE stripped line numbers and shoveled unwanted structure over my glorious numeral spaghetti. rem *** 360 degrees in a circle *** DEG rem *** Arduino *** setDevice (0) rem *** setup button between pins 10 and 12 *** pinMode (12, 2) pinMode (10, 1) digitalWrite (10, 0) rem *** setup button between pins 7 and 9 *** pinMode (9, 2) pinMode (7, 1) digitalWrite (7, 0) rem *** setup built-in red LED on Arduino *** pinmode (13,1) rem *** setup a sprite for Knob AO to turn *** knoba = newSprite (1) loadSprite ("fighter.png", knoba, 0) spriteCentre (knoba) rem *** setup a sprite for Knob A1 to turn *** knobb = newSprite (1) loadSprite ("fighter.png", knobb, 0) spriteCentre (knobb) CLS UNTIL digitalRead (12) + digitalRead (9) = 2 LOOP printAt (0, 0); analogRead (0); " " printAt (10, 0); analogRead (1); " " printAt (0, 1); digitalRead (12); " " printAt (10, 1); digitalRead (9); " " rem *** echo D9 button to RED LED D13 *** digitalWrite(13,digitalRead(9)) setSpriteAngle (knoba, 30 + (analogRead (0) * 300 / 1024)) setSpriteAngle (knobb, 30 + (analogRead (1) * 300 / 1024)) plotSprite (knoba, 150, 150, 0) plotSprite (knobb, 650, 150, 0) UPDATE REPEAT hideSprite (knoba) hideSprite (knobb) PRINT "exiting, both buttons pressed." WAIT (2) END So, a half dozen Picos dangling from a PC might be awesome... Why spend $41 the for IOIO_OTG when a Pico is $4? Not sure which direction you meant about Android OTG? https://shop.pimoroni.com/products/pico-lipo-shim Even with the shim, Pico is cheaper than IOIO_OTG. Edited 2022-01-22 04:42 by KD5ZXG |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8605 |
Quick progress report Based on responses and some feasibility testing I've been doing the project is a GO. I've got the framework running with three threads One handles the Display, keyboard and mouse. This uses the olcPixelGameEngine which gives pixel level access to a display window The second thread will run the main MMbasic loop The third thread will run a millisecond timer that can be used for all the various timeouts and provide data to the clock/timer commands etc. The keyboard input and screen output are all up and running and the screen will be completely recognisable using your favourite MMBasic fonts - none of this windows font rubbish. It all seems to be going together OK although mixing C and C++ is proving a bit of a pain. The screen and keyboard handling are controlled though a class and its methods and are totally event controlled whereas MMbasic is fully procedural C sitting in a tight loop. What doesn't help is my total lack of competence in C++ Speed is impressive Hopefully MMbasic will be running to the extent of executing at the command line in the next couple of days or so. Edited 2022-01-22 05:26 by matherp |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5771 |
Erm... yeah... it is a bit. :) Looking good so far, Peter, and excellent news about the fonts. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
I almost posted earlier that @matherp has gone quiet so watch out |
||||
IanT Regular Member Joined: 29/11/2016 Location: United KingdomPosts: 84 |
Just seen the demo on YT Peter - fantastic - thank you, looking forward to trying it. Regards |
||||
JoOngle Regular Member Joined: 25/07/2020 Location: SwedenPosts: 82 |
To the original Question: YES! And as everyone in here is onto: this is GREAT for learning MMBASIC for the CMM2. I gotta admit my CMM2 has been gathering dust for the last 6 months since I don't really have the time to switch between the CMM2 and my work computer+home computer on my TV. If you in the future could support Sprites Natively (and for example use the 3D graphics cards polygons as sprites and bitplanes and screens) that would be OUT OF THIS WORLD cool. |
||||
HardingJohn Regular Member Joined: 28/07/2017 Location: AustraliaPosts: 78 |
The best thing about MMBasic is how close it is to real world. It allows the development of complex Programmable Logic Controllers that integrate with anything with a SPI, I2C interface or just a GPIO. That's the most powerful ability of MMBasic embedded in a chip. Using it to make graphical games that no one will play seems OK for learning a bit of Basic Programming, but it goes nowhere. Just my silly thoughts considering I use to write silly graphical games on my VZ200 35 years ago. Just know enough to get me in trouble, but not quite enough to get me out. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5771 |
^^^ This ^^^ Agreed. Without hardware IO capability MMBasic is stripped of it's whole purpose. Even linking the IO over USB is a compromise and adds a whole new layer of complexity that can go wrong. Games writing has better tools available, even FreeBasic is probably better as it's compiled. I'm not knocking this project by any means, but I stick by what I said earlier - I hope Peter is seeing this as something for his own enjoyment. I don't see the PC as a good platform for MMBasic but it's an interesting exercise. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
OTOH, there is Windows Embedded, now renamed to Windows IoT. I evaluated XPE many years ago and it was granular. Not everyone is a hobbyist and if Pete is planning on being able to support DLLs, this could be HUGE for industrial control. Craig |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8605 |
In your view but not of lots of the posters above. I use the DOS version quite frequently for simple utility programs. The CSUB generator is written in it. |
||||
flasherror Senior Member Joined: 07/01/2019 Location: United StatesPosts: 159 |
Since this project is going ahead, a few ideas for "down the road" TCP/IP client/server and MQTT support, with the intent of being a "server" for connected nodes Some kind of database support (SQLite should be fine) Basic audio support (play .WAVs, .MP3s etc) for user notification. Since this is running on a PC with way more resources than embedded systems, could there be some way to have multiple MMBasic interpreters running in parallel allowing each one's basic code to run independently and pass data between running instances? |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3678 |
Likely to "just work". Worst case, use files to pass data. John |
||||
Page 3 of 5 |
Print this page |