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 : Linux MMBasic
Author | Message | ||||
vk2sja Newbie Joined: 07/06/2013 Location: AustraliaPosts: 26 |
Hi All, Please find attached a "beta" native static binary version of MMBasic 4.4 along with a Read Me PDF which outlines what it is and does. Since many will ask "Why?" here is the background (reading it is purely optional ). Kind Regards, Steve Several weeks back I found myself waiting for my new Colour Maximite kit to arrive. A mix-up with the postal service delayed it for a week. So bored and frustrated I thought I'd take a look at the DOS version of MMBasic while waiting. At this point I should explain that (by choice) I don't have a single Microsoft Windows/DOS machine available at my place. And haven't had for over 10 years now. Lots of computers but they all run Linux not Windows. So getting the DOS version of MMBasic to fly was always going to be an exercise. Normally not an issue. Between one of the MS-DOS emulators and Wine one can normally get Windows software to run under Linux. But MMBasic.exe proved to be a tricky customer. The DOS version of MMBasic.exe is compiled as a 32bit Windows console application. So the DOS emulators DOSEMU and DOSBOX both throw up an error message saying (quite correctly) that this program is a Windows program and refused to play the game. Moving onto Wine, the Windows emulator (Yes, I know they don't like you calling it an emulator). Unfortunately Wine took one look at MMBasic.exe and did much the same thing. Once upon a time early versions of Wine did support 32bit Windows Console Applications. But apparently the support was buggy and there wasn't much demand for it and so the feature was dropped entirely. So I was stumped. (BTW: If anyone does know a way to make MMBasic.exe run under Linux I love to hear it. Virtual machines running Windows/MS-DOS don't count). By this time I had requested and received the 4.3A source code and thought:- "Why not just recompile it?" So that's what I did. The changes required were in fact pretty minor. In fact I had a version up and running in an hour or so. But it then became obvious that most of the system IO routines would need to be slightly tweaked to make it all run properly in a Linux environment. So I went ahead and did that. And while testing all of this I got frustrated with not having a simple line editor nor any form of command history. So I went and added those features in for good measure. There didn't seem much point pushing a Linux 4.3A version into the wild when 4.4 was just around the corner. So I waited a few weeks and the re-compiled again with the updated 4.4 source code. So if anyone runs Linux and is interested in trying it out then the result is attached. It has been compiled as a self contained static i386 binary. So in "theory" it "should" run on most current generation Linux Kernels if your PC has a i386 family chip. I've spot-checked a couple of different distros myself and it worked for me but YMMV. Please consider this a "Beta" version with everything that this implies. There are probably lots of bugs still. I'm not what I would call a programmer. I learnt PL/I many years ago and then graduated to plain old "C". Never made the transition to C++. My working career involved computers but very little programming. So this effort was a fun learning exercise. Mostly what I got out of it was some small understanding of how the internals of MMBasic work. If you do happen to find any bugs then by all means let me know (not Geoff, as I was then one who broke this particular version! ). 2013-07-25_235039_MMBasic_static.zip 2013-07-25_235108_Linux_MMBasic_ReadMe.pdf |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6102 |
This is a great addition to the MM family. I have started work on a Linux version of MMedit so this will be very handy for Linux users. Jim VK7JH MMedit MMBasic Help |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3196 |
Steve makes it sound easy but he has put a lot of work into this... it was not that easy. If you are a Linux user please give it a run on your favourite program and report back to Steve your experience. When the beta test period is over I plan to put up the executable on my web site and integrate the Linux version into the source tree so that everyone can access the source. Great job Steve and thanks. Geoff Geoff Graham - http://geoffg.net |
||||
psergiu Regular Member Joined: 09/02/2013 Location: United StatesPosts: 83 |
Steve, i can compile a Linux ARM binary on a Raspberry Pi if you'd like. |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3816 |
A quick test on Linux Mint 14 (32-bit; kernel 3.5.0.17) - works fine. Looks a useful addition to the project! I can test an ARM binary if one is created on RPi, A13-Olinuxino-WiFi and CubieBoard2. John |
||||
vk2sja Newbie Joined: 07/06/2013 Location: AustraliaPosts: 26 |
Hi psergio and JohnS, Thanks for the offer and interest. The source code for the Linux version will be integrated into the main MMBasic source tree by Geoff after a "trial" period of time has elapsed and everyone is happy that I have not introduced any major bugs or broken things badly. At that point the source code will be available upon request to Geoff as per normal. In the meantime I also have several Raspberry Pi's lying around so I'll try and compile a rPi ARM binary version and post it here over this weekend for anyone who wants to play. I will also make mention at this point that there appears to be a quite good version of BASIC available for the rPi called "Return To Basic" or RTB available from:- https://projects.drogon.net/return-to-basic/ If you just want to play with BASIC on a rPi. It also has the advantage on the rPi of being interfaced to rPi hardware, GPIO etc. 73, Steve. |
||||
marcwolf Senior Member Joined: 08/06/2009 Location: AustraliaPosts: 119 |
Great idea. I use the RPi as well as a BeagleBone Black so having MMBasic would be very nice. Coding Coding Coding.. Keep those keyboards coding.. RAW CODE!!!!! |
||||
mbramwel Regular Member Joined: 10/07/2013 Location: CanadaPosts: 42 |
Sorry to hijack the thread but... marcwolf: What are you running on the Beaglebone Black? I have a few rPi running and was also looking at the BBB. I have a dhrystone benchmark if you are curious (need gcc to compile). wget http://web1.foxhollow.ca/b.tar.gz My machine named gizmo.rootsgate.ca is running Raspbian. Here is the dhrystone20 output on Gizmo: root@gizmo:/usr/local/benchmarks/dhry20# make clean; make (set nonomatch;rm -f dhrystone dhrystoneR dhrystoneO dhrystoneRO *.o) cc -O0 dhrystone.c -w -o dhrystone Running dhrystone (No optimization, without registers) ./dhrystone Dhrystone(1.1) time for 9,000,000 passes = 14 This machine benchmarks at 627,615 dhrystones/second ./dhrystone Dhrystone(1.1) time for 9,000,000 passes = 14 This machine benchmarks at 625,869 dhrystones/second ./dhrystone Dhrystone(1.1) time for 9,000,000 passes = 14 This machine benchmarks at 628,930 dhrystones/second cc -O1 -DREG=register dhrystone.c -w -o dhrystoneR Running dhrystone (Level 1 optimization, with registers) ./dhrystoneR Dhrystone(1.1) time for 9,000,000 passes = 7 This machine benchmarks at 1,285,714 dhrystones/second ./dhrystoneR Dhrystone(1.1) time for 9,000,000 passes = 6 This machine benchmarks at 1,287,553 dhrystones/second ./dhrystoneR Dhrystone(1.1) time for 9,000,000 passes = 6 This machine benchmarks at 1,287,553 dhrystones/second cc -O2 dhrystone.c -w -o dhrystoneO Running dhrystone (Level 2 optimization, without registers) ./dhrystoneO Dhrystone(1.1) time for 9,000,000 passes = 4 This machine benchmarks at 2,184,466 dhrystones/second ./dhrystoneO Dhrystone(1.1) time for 9,000,000 passes = 4 This machine benchmarks at 2,238,805 dhrystones/second ./dhrystoneO Dhrystone(1.1) time for 9,000,000 passes = 4 This machine benchmarks at 2,222,222 dhrystones/second cc -O3 -DREG=register dhrystone.c -w -o dhrystoneRO Running dhrystone (Level 3 optimization, with registers) ./dhrystoneRO Dhrystone(1.1) time for 9,000,000 passes = 3 This machine benchmarks at 2,586,206 dhrystones/second ./dhrystoneRO Dhrystone(1.1) time for 9,000,000 passes = 3 This machine benchmarks at 2,616,279 dhrystones/second ./dhrystoneRO Dhrystone(1.1) time for 9,000,000 passes = 3 This machine benchmarks at 2,616,279 dhrystones/second FYI: Intel i7 / ubuntu server gives: This machine benchmarks at 50,253,807 dhrystones/second PS: Perhaps we should start a new thread and compare some of the various ARM boards running Linux. |
||||
marcwolf Senior Member Joined: 08/06/2009 Location: AustraliaPosts: 119 |
I have a keen interest in special effects and animatronics esp where the actor/performer does not have an additional group of helpers controlling things with R/C units. One of the things I was working on was real time lip syncing using the SimpleCV libraries. The Raspberry Pi was just too slow and the Beaglebone looks promising. Essentially one would put coloured dots around the mouth and then get the app to look for the blobs and return back the XY co-ords. That would then relay back to servo's controlling the lips of the character. If I can also use the BeagleBone to do other things as well it will reduce on the overall number of boards in the system. All of this is being done with modified off the shelf inexpensive components too Take Care Dave Coding Coding Coding.. Keep those keyboards coding.. RAW CODE!!!!! |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3816 |
Wouldn't a CubieBoard2 be both faster and cheaper? John |
||||
marcwolf Senior Member Joined: 08/06/2009 Location: AustraliaPosts: 119 |
Actually I have just brought a quad core android stick that I plan to change over to one of the Linux's. As the task needs a LOT of processing power and the output only needs to be a string of XY Co-Ords this could work well. http://www.itproportal.com/2013/06/10/reko-mk809-iii-hdmi-do ngle-give-hint-future-computing/ Still early days yet and I do have a couple of other avenues of experimentation :) Take Care Dave. Coding Coding Coding.. Keep those keyboards coding.. RAW CODE!!!!! |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Maybe using a wii controller might help solve your problem following dots. The wii controler keeps track of four dots. http://www.youtube.com/watch?feature=player_embedded&v=0awjP UkBXOU Microblocks. Build with logic. |
||||
marcwolf Senior Member Joined: 08/06/2009 Location: AustraliaPosts: 119 |
Hi TZ Many thanks for your input. It is appreciated. I have looked and experimented with the WII Remote option. I already have a set up for it. I need 8 points of reference (min 6) so I cannot use a passive reflective system of painted silver dots on the lips and backlighting IR. This means I would need to use active components lie IR LED's themselves. The issue there is that the skin on the lips is very flexible and difficult to glue on. Again making a prosthesis that would sit on the lips with the LED's mounted would have the same problem re flexibility. My other concern there is speed of getting ready - I don't have a make up team so I would have to glue the LED's on before performing and I generally don't have that time. This returns back to a passive system where by using different coloured dots I can isolate them from the others. i.e. Blue below nose for reference Green left, right, and below mouth to get overall size of mouth opening Yellow left-upper, right-upper, left-lower, right-lower middle of lips to get general shape of the lips. I have also investigated using speech recognition to extract the phoneme's from the speech and use them but the computing power for THAT goes up even more :) Many thanks for your interest and input Dave Coding Coding Coding.. Keep those keyboards coding.. RAW CODE!!!!! |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Did you look at using lipstick? Blacklight Lipstick On Ebay This would be easy to apply and a 'blacklight' is also a common product. Microblocks. Build with logic. |
||||
psergiu Regular Member Joined: 09/02/2013 Location: United StatesPosts: 83 |
Back on topic. Is the MMBasic ARM binary ready please ? Thanks. PS: can a forum moderator/admin please split the above off-topic discussion in another thread ? |
||||
mobluse Newbie Joined: 10/02/2013 Location: SwedenPosts: 24 |
I thought that there would be a Makefile for Linux by now in the source of MMBasic 4.4B (MMBasicSource.zip from today) since it was a rather long time ago this was posted. Maybe you could post the additional files that are required to compile MMBasic for Linux and tell how they go into the source tree. I did try the binary version (Linux MMBasic Version 4.4.07e) in Ubuntu 10.04 LTS on IA32 and it seems to work well but I would like to run it in Raspbian on ARM6 (Raspberry Pi) since that is a more silent computer than my laptop. There is one thing that I think should change in MMBasic for Linux: "Screen cursor control via the PRINT @(x,y) command has been implemented. Cursor positioning is the more traditional whole character position on the screen. Rather than a pixel position like the Maximite family of MMBasic." I think one should try to be compatible with Maximite MMBasic and one could be that if one assigns some size in pixels to the characters and rounds to nearest possible position. One should be able to change between VGA, composite and serial character resolution. Now MM.VRES doesn't work. I think it should be the height in pixels for a character in Maximite MMBasic (12) times the height of the terminal in lines. MM.HRES does also not work. Now MMBasic for DOS requires Windows but I wonder if one could also compile it for 8086 MS-DOS/FreeDOS since it has 640KB which should be more than enough for MMBasic. I can run DOSBox and 8086tiny (IBM PC emulators) in Raspberry Pi. Maker Pi Pico Rev1.2, DuinoMite-Mini, Raspberry Pi 0-4, iCE40HX8K, Arduino Uno, VM111, STK500, ZX81 |
||||
Print this page |