Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:58 01 Nov 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 Windows - pre-alphas

     Page 1 of 17    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9033
Posted: 04:49pm 25 Jan 2022
Copy link to clipboard 
Print this post

MMBasic.zip

This thread is for brave souls who want to help me shake out and shape MMBasic for Windows

Attached is the first version which "sort-of" works, for me at least.

Please download the program, It is a single Win32 exe. If your system thinks it has a virus, it doesn't and I can't help fix the problem.

Please run the program and see what happens and report. First to report successful operation gets my gratitude.

Things to note:
You need to click in the window to enable the keyboard before use and after changing mode
The keyboard handling is very primitive - no auto-repeat and single keymap (UKish)
Use SHIFT-CTRL-X to exit the program tidily
Use LIST COMMANDS and LIST FUNCTIONS to see what is (should be) working
On first run the program stores a file ".options" in "MyDocuments" and the FILES command will show all files in my documents (FILES command is still very primitive - no parameters, no sort, and no paging
USE OPTION DEFAULT PATH "directory" to select the directory from where on startup you want to be able to load programs. This must be a fully specified filepath e.g. OPTION DEFAULT PATH "C:/USERS/PETER/DOCUMENTS/MMB4W". The filepath must exist.
By default the program opens with a 1024x768 window
Use OPTION DEFAULT MODE n to select the graphics mode to use on startup. The modes are as per CMM2 but always ARGB8888
Use the MODE command to switch graphics without rebooting
Use OPTION DEFAULT FONT n [,scale] to select the font to use on startup (same syntax as the font command)
The editor is the same as MM2 etc.
The LOAD "fname" [,R] and RUN "fname" both work
SAVE "fname" is not yet implemented
AUTOSAVE works but only as a way of inputting from the keyboard. Pasting into the window doesn't work and will probably never work but remember you are running on a full blown computer so you can just LOAD a file

I'll post versions here as I think useful. Don't expect any discipline - proper versioning etc.
Edited 2022-01-26 03:02 by matherp
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 05:12pm 25 Jan 2022
Copy link to clipboard 
Print this post

Works for me
Well opens and lists commands and functions
so it's safe to use if anyone else has real basic programs to test it with
I did try the solarsys.bas file but it;s written for a display so all I could do was list it to prove load, list and run works

Edit: after modifing the program I managed to get it as far as here
I'm sure people with real knowledge of MMBASIC can get it running perfectly


Edited 2022-01-26 03:29 by lew247
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 140
Posted: 05:57pm 25 Jan 2022
Copy link to clipboard 
Print this post

So far it's looking great! I think this will save me lots of time writing and editing programs.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9033
Posted: 06:18pm 25 Jan 2022
Copy link to clipboard 
Print this post

  Quote  I'm sure people with real knowledge of MMBASIC can get it running perfectly


day$() and date$ not implemented yet so not your fault
 
JoOngle
Regular Member

Joined: 25/07/2020
Location: Sweden
Posts: 82
Posted: 06:38pm 25 Jan 2022
Copy link to clipboard 
Print this post

Oh gosh, I'm so happy about this Peter, thanks a million.

This will make me actually make programs for my dust-collecting CMM2.
This helps me actually learn MMbasic properly.

*edit* LOL it is so fast it's insane.
Edited 2022-01-26 04:40 by JoOngle
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 339
Posted: 06:43pm 25 Jan 2022
Copy link to clipboard 
Print this post

Tested with some simple BOX plotting. Worked perfectly as far as I can say.
Will there be any possibilities to use serial communications? E.g. to receive data from a MicroMite/PicoMite and plot or print the data on Pixel Game Engine?

I tested MMBasic several years ago and did not the find any specific use for it then. Learned yeasterday on this forum that MMBasic can use Serial Communication.  Hence I downloaded MMBasic today and tested the communication between MMBasic and a 28pin MicroMite; Worked perfectly up to 230400 baud. Used a MicroBridge for the connection (MMBasic -- COM1 on MicroMite). Plus an other MicroBridge for the normal console connection.

Will this possibility still be available with this new graphic interface? It would be nice to be able to plot data on a big screen!

Thanks for all interesting developments!

/Fred
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4139
Posted: 06:44pm 25 Jan 2022
Copy link to clipboard 
Print this post

Hi Peter,



Not being a windows guy, I will see if I can solve it.


EDIT: from a Youtube video, I installed C++ 2015 and that solved it.

MMBasic is quite power hungry. Just am empty screen, not even in edit mode.



Edited 2022-01-26 05:20 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9033
Posted: 06:52pm 25 Jan 2022
Copy link to clipboard 
Print this post

  Quote  Not being a windows guy, I will see if I can solve it.


Would normally be there if anything C++ has ever been used. Install from link should fix it

https://www.microsoft.com/en-us/download/details.aspx?id=53840
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 07:05pm 25 Jan 2022
Copy link to clipboard 
Print this post

  Pluto said  

Will this possibility still be available...

/Fred


Pretty certain.....I also wonder if using DLLs will be possible  


Craig
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9033
Posted: 07:18pm 25 Jan 2022
Copy link to clipboard 
Print this post

TIME$, DATE$, EPOCH, DATETIME$, and DAY$ functions added.

NB: TIME$ and DATE$ commands will not be included as time is derived from the system clock and we don't want to be messing around with that


MMBasic.zip
Edited 2022-01-26 05:19 by matherp
 
JoOngle
Regular Member

Joined: 25/07/2020
Location: Sweden
Posts: 82
Posted: 07:22pm 25 Jan 2022
Copy link to clipboard 
Print this post



VIDEO of circle noise

It's so insanely fast that it looks like TV static noise  
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4139
Posted: 07:26pm 25 Jan 2022
Copy link to clipboard 
Print this post

@Peter,

Is there any way to bring back the CPU load ? My laptop fan is screaming, and the CPU is 60%....90% busy while MMBasic is idle (edit screen, doing nothing) (4 core i5).

Regards,

Volhout
Edited 2022-01-26 05:27 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9033
Posted: 07:28pm 25 Jan 2022
Copy link to clipboard 
Print this post

  Quote  Is there any way to bring back the CPU load ?


Yes but that's for a later day - it's a pre-salpha. At the moment three threads are running each in a tight loop + a 4th thread executing every millisecond
 
JoOngle
Regular Member

Joined: 25/07/2020
Location: Sweden
Posts: 82
Posted: 07:38pm 25 Jan 2022
Copy link to clipboard 
Print this post

  matherp said  At the moment three threads are running each in a tight loop + a 4th thread executing every millisecond




Yeah that pretty much checks out, 3 threads screaming...
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6060
Posted: 08:46pm 25 Jan 2022
Copy link to clipboard 
Print this post

No virus reports.

Calculating Pi to 200 decimal places on BBMasic for DOS
16mS to calculate plus 16mS to format and print the result

On MMB4W
16mS  to calculate plus 0mS to format and print the result

The 16mS times look suspiciously like the Microsoft tick timer resolution so not a valid comparison.

I am not sure if the OPTION DEFAULT PATH accepts spaces in it yet.
I was having 'fun' trying to set it but that was mainly due to my typing stuffups.

MMEdit can readily load MMB4W but MMB4W has no commandline passing yet so it will have to wait before I can do the equivalent to "Run in DOS"

Jim
VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9033
Posted: 10:45pm 25 Jan 2022
Copy link to clipboard 
Print this post

  Quote  The 16mS times look suspiciously like the Microsoft tick timer resolution so not a valid comparison.


My version is definitely accurate to a mSec uses the same high resolution clock for pause and timer, can even do uSec timings
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 553
Posted: 11:29pm 25 Jan 2022
Copy link to clipboard 
Print this post

Hi Matherp,
After installing vc-redist86 it starts.

Found no problem yet. Wonder how you will implement sound? Fmod or openal ? Maybe a wrapper to get the mod support. Will you adding socket commands ( because its win)?
Is the small windows necessary, if yes can we have a option command to hide at Startup.
Even a bench.bas in the zip will get moore lazy Tester  
I know its Alpha  
Greetings
Plasma
 
darthvader
Regular Member

Joined: 31/01/2020
Location: France
Posts: 76
Posted: 12:37am 26 Jan 2022
Copy link to clipboard 
Print this post

Hi Peter  

i make a try  with the code you posted on your last video on youtube.
this two line are too long apparently :
c=Rnd()*255 + ((Rnd()* 255) shiftleft 8) + ((Rnd()* 255) shiftleft16)
f=Rnd()*255 + ((Rnd()* 255) shiftleft 8) + ((Rnd()* 255) shiftleft 16)

It tell me that they are no closed bracket ... but when i try to go after the end of line, the line too long error appear.
As always , great work !! ... it will be fun to do some benchmark with all the PC at disposition on this forum  
Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 475
Posted: 02:01am 26 Jan 2022
Copy link to clipboard 
Print this post

I will test it on Wine
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 02:27am 26 Jan 2022
Copy link to clipboard 
Print this post

I know Peter will not want to hear this      but it comes up under wine on my Mint 20.2 system just fine. Have not tested any programs yet.

Have not been able to get it going under VirtualBox running Win 7 - gets as far as the second window but this stays white rather than going to black and displaying the sign on message. This last comment purely for info for any of the other Linux folks.

Thanks Peter, amazing work,
Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
     Page 1 of 17    
Print this page
© JAQ Software 2024