Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:13 01 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 5.05.02 Beta 3

     Page 1 of 2    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 01:24pm 04 Jul 2019
Copy link to clipboard 
Print this post

It has been a long time coming but I have a new Beta version of MMBasic for the Micromite and DOS/Windows. You can download it from: http://geoffg.net/micromite.html#Downloads

In it I have fixed all the bugs that I know about and added some new features:
- Programs are stored more efficiently in flash resulting in a 5% to 10% reduction in the program memory required for any given program.
- AUTOSAVE and XMODEM can crunch an incoming program (similar to MMEdit) to strip out comments, unnecessary spaces, etc.
- For the MM+ Added the ARC command for drawing arcs and Peter Mather's STR2BIN() and BIN2STR$() functions.

The big new feature for the MM+ is the GUI FORMATBOX control which will allow the user to enter formatted data such as dates, time, latitude, etc. The user is guided to enter the data in a fixed format. For example, you can specify that the user must enter the date as dd/mm/yy or time as hh:mm AM/PM. This can be easily extended so if you have a specific format that needs supporting let me know.

As before, please give this a run and if you find any issues post them to this thread.

Geoff
Geoff Graham - http://geoffg.net
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 01:43pm 04 Jul 2019
Copy link to clipboard 
Print this post

awww... and the wife wanted to pick out furniture this weekend too

I like the inline crunch... I have got pretty bad on comments in the past few years because I am mindful of 60K getting used up really quickly with reams of guff.

Thanks Geoff (and Peter)

Edited by CaptainBoing 2019-07-05
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 12:15am 05 Jul 2019
Copy link to clipboard 
Print this post

Hi Geoff!!! Any news on the varsave, autorun issue? I am not complaning, just have a real weird situation where this is rearing its head once in a while. Other than that, your efforts on mmbasic is nothing short of amazing!!!!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 01:11am 05 Jul 2019
Copy link to clipboard 
Print this post

This bug should be fixed in this beta version - let me know if you still have trouble.

There were actually two bugs associated with VAR SAVE/RESTORE. One was that on a newly flashed chip the VAR SAVE memory area was not properly initialised and the second was that AUTOSAVE and XMODEM did not clear the VAR SAVE memory and that could cause trouble for the new program if it used VAR RESTORE. You could have been stumbling over one or both of these bugs (now fixed).

GeoffEdited by Geoffg 2019-07-06
Geoff Graham - http://geoffg.net
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 01:48am 06 Jul 2019
Copy link to clipboard 
Print this post

Thanks Geoff,

That's quite a big list of bug fixes and enhancements. I can see that you have been busy and I hate to ask (but I will anyway) - is there any news on MMBasic V5 for the Maximite?

Bill
Keep safe. Live long and prosper.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 06:30am 06 Jul 2019
Copy link to clipboard 
Print this post

  Geoffg said  
<snip>
the second was that AUTOSAVE and XMODEM did not clear the VAR SAVE memory and that could cause trouble for the new program if it used VAR RESTORE.


Can I get this straight? So when I upload a new prog (using AUTOSAVE), variables stored in flash are wiped?

h
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 10:03am 06 Jul 2019
Copy link to clipboard 
Print this post

Yes, you are correct.

NEW, AUTOSAVE and XMODEM RECEIVE will automatically clear any saved variables. EDIT will not - this is because it is assumed that the edit is not changing the program.
Geoff Graham - http://geoffg.net
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 01:17pm 06 Jul 2019
Copy link to clipboard 
Print this post

  Geoffg said  NEW, AUTOSAVE and XMODEM RECEIVE will automatically clear any saved variables.

Hmmm ... perhaps this question is for Peter--does XMODEM RECEIVE "file" clear saved variables?

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 08:50pm 06 Jul 2019
Copy link to clipboard 
Print this post

No, it does not.

The reason for clearing the saved variables is that most times the variables saved in one program will be incompatible with the new program. EDIT does not clear them because it is assumed that you would be not entering a completely new program. XMODEM RECEIVE file$ does not clear them because you are not loading a new program.
Geoff Graham - http://geoffg.net
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 09:03pm 06 Jul 2019
Copy link to clipboard 
Print this post

OK. looks like I am sticking with 5.04.08 on some projects then.

I have config data stored in the flash that is specific to the modules and one time settable - dozens of identical units that all get configured at first run.

don't fancy setting it all up again for a tweak of the code... that is a non starter.

Must say, that setting aside any technical reasons, that is a bit of an odd assumption to make that the data can be junked if it gets new code, which might only be a minor tweak.

No matter, it's not like I am stuck, 5.04.08 is rock solid

h
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 04:09am 07 Jul 2019
Copy link to clipboard 
Print this post

That is a pity. The problem is that I tracked down a lot of the VAR RESTORE errors to the new program clashing with the saved variables from the previous program. It is not feasible for MMBasic to analyse if the new program is just a tweak so I guess that we are stuck with it.

Geoff
Geoff Graham - http://geoffg.net
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 04:36am 07 Jul 2019
Copy link to clipboard 
Print this post

I have updated the MM+ Beta version to Beta 4.
You can download it from the same place: http://geoffg.net/micromite.html#Downloads

The only change is a small change to RTC SETTIME so that it will also accept a string in the format dd/mm/yy hh:mm. This means the date/time could be entered by the user using a GUI FORMATBOX with the DATETIME2 format and with one command the program could then set the time in the RTC.

This short program demonstrates how easy it is to implement this feature:

CLS : FONT 4
GUI INTERRUPT IntDown, IntUp
GUI FORMATBOX #1, DATETIME2, 200, 150, 300, 50

DO
' the main program loop goes here
LOOP

SUB IntDown
' any touch down stuff
END SUB

SUB IntUp
IF TOUCH(LASTREF) = 1 THEN RTC SETTIME CTRLVAL(#1)
' any other touch up code
END SUB

Geoff
Geoff Graham - http://geoffg.net
 
flip
Senior Member

Joined: 18/07/2016
Location: Australia
Posts: 114
Posted: 08:30am 07 Jul 2019
Copy link to clipboard 
Print this post

Hi Geoff,
Looking good,
I've flashed Explore64 uM+ and it works fine.

1. I have tried CPU 5 & CPU 10 and it seems to lock up (NOTE: seems to be existing problem - maybe I missed something in the instructions)
even trying to embed the speed change locks up:
CPU 10:a=23:CPU 100


2. Just one problem with the new DOS version when passing a basic file as a parameter,

the message
Error: Expected a string

It freezes for a couple of seconds then returns to the DOS prompt. Suspect it's to do with changes with LOAD & RUN.
Tried with and without quotes, i.e.
C:\> DOS_MMBasic_V5.05.02_Beta_3.exe file.bas
C:\> DOS_MMBasic_V5.05.02_Beta_3.exe "file.bas"

Also the LOAD "file.bas",R
doesn't seem to Run (loads OK) (again in the DOS version)

Not a showstopper as just need to Run

[Edit 2]
Probably all tied in, but Load doesn't seem to parse the path\file..see following ..first statement fails, but the rest work fine:

> load "C:\Users\phil\Apps\MMBasic\DEV\uMiteController\uMslave1.bas"
Error: No such file or directory
> chdir "C:\Users\phil\Apps\MMBasic\DEV\uMiteController"
> load "uMslave1.bas"
> run

Other than that looks good - especially considering the number of versions and amount of functionality you deal with - really good thanks!
Regards Phil (Edit just renamed exe file - makes no difference)
Edited by flip 2019-07-08
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 12:25am 08 Jul 2019
Copy link to clipboard 
Print this post

I have a program running on MM (28 Pin) Beta-3 and it changes between CPU 40 and CPU 5 and back with no problems. You do need to be careful with CPU 5 and CPU 10 that you don't attempt any SPI (LCD,TOUCH) or TEMPR stuff without first increasing the speed.
So the MM version seems to be good for this.
Latest F4 Latest H7 FotS
 
flip
Senior Member

Joined: 18/07/2016
Location: Australia
Posts: 114
Posted: 01:35am 08 Jul 2019
Copy link to clipboard 
Print this post

Thanks for that confirmation disco4now
I don't have screen connected, but maybe comms between my slow Windows10 Pendo and the usb connection / handshaking or something...

But then again I am using Explore64 with it's inbuilt USB connection so would be interested if anyone could replicate that. (also sorry this problem possibly should have been in a separate thread)

Interestingly (and it's good that it does it), when I try and access SD card with CPU speed 20MHz, it gives an error something like accessing SD Card requires 40MHz or greater.

Regards Phil

 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 03:51am 16 Jul 2019
Copy link to clipboard 
Print this post

I have updated the MM+ Beta version to Beta 5.
You can download it from the same place: http://geoffg.net/micromite.html#Downloads

The only change is to the built in editor. If you are using it with Tera Term it is possible to position the cursor in the Micromite's editor by left clicking your PC's mouse in the Tera Term window.

This relies on a feature of Tera Term which reports mouse clicks as an escape code which MMBasic then uses to position the cursor. Other mouse features (scrolling, marking, copy, paste, etc) are not supported.

Big thanks to Robert Rozee for showing how this could be done.

flip: I still have not got around to investigating your report of problems with the Windows/DOS version. Will do that soon.

Geoff
Geoff Graham - http://geoffg.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:07am 16 Jul 2019
Copy link to clipboard 
Print this post

The mouse feature does NOT work in MMEdit but it doesn't cause any problems either.
I might add it in the future.

Jim
VK7JH
MMedit
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 11:40am 17 Jul 2019
Copy link to clipboard 
Print this post

cursor positioning with mouse left-click also works perfectly with GFXterm.

within GFXterm mouse wheel movement is mapped to generate cursor up/down escape sequences, so the mouse wheel also works. i've spent the last day trying to figure out how to make TeraTerm map the mouse wheel to cursor up/down, without success.


cheers,
rob :-)
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 09:12am 18 Jul 2019
Copy link to clipboard 
Print this post

TassyJim discovered that the escape codes used by MMBasic to turn on/off cursor reporting in Tera Term interfered with the ASCII Video Terminal project. So I needed to make a small change to avoid this issue.

We now have Beta 6 which you can download it from the same place:
http://geoffg.net/micromite.html#Downloads

Note that this cursor positioning works with both the MM MKII and MM+ (my previous post was confusing on this point).

Geoff
Geoff Graham - http://geoffg.net
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 04:34pm 18 Jul 2019
Copy link to clipboard 
Print this post

If starting the new MMBasic in dos with, for instance (renamed to mmbasic.exe):

mmbasic pgm.bas

I get "Error: Expected a string", and a return to the DOS prompt.

If I start with 'mmbasic' and 'LOAD "pgm.bas"' and 'run', it works.

[Oops, I just now noted that flip also pointed out this behavior.)
Edited by lizby 2019-07-20
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025