Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:50 26 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 - betas

     Page 1 of 30    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 08:02pm 26 Feb 2022
Copy link to clipboard 
Print this post

I've just done a compare of the functionality of MMBasic for Windows against the CMM2 and there is nothing really missing now which can (or should) be implemented. I'm not getting many reports of bugs and the OlcPixelGameEngine and sound infrastructure seem solid so it is time to call this version the first beta

MMBasic.zip

Included in V5.07.03b0 is the full turtle functionality from the CMM2 and this has been tested with the various demo-tape turtle examples and seems to work nicely. Also now working are the BOX subcommands OR_PIXEL, XOR_PIXEL and AND_PIXEL.

I'm particularly pleased that things like Mauro's Wolf3d and Demoscene work as downloaded from Github with zero changes needed. This is not an emulator of the CMM2 as it makes no attempt to equalise processing speed but it is now largely functionally compatible other than I/O of course

I'll try and hack together something resembling a manual in the next week or so.

The source code is up-to-date on github so if anyone want to have a go porting to Linux then now would be a good time to start. However, the code work really nicely under Wine so there may be no point.

For reference the current limitations of the implementation are as follows:
Max global variables 1024
Max Local variables  1024
Max program size      1MB
Variable space      128MB
FrameBuffer size    126MB (4 * 4K ARGB8888 pages)
Max open files         64
Max com ports          64
Max FOR loop          128
Max DO loops          128
Max multiline IF      128
Max Sub/function      512

Current irritations - having to click in the window after mode change

Enjoy
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4234
Posted: 09:00pm 26 Feb 2022
Copy link to clipboard 
Print this post

Hi Peter,

Not sure how mature WOLF3D is. I tried WOLF3D in MMB4Wb0 on Wine, and the game starts correctly. The menu sound sounds strange. In Wine there are several keys that are not handled properly (i.e. Lcontrol(fire), Lshift(run)). In the menu, you can go to control to map these keys to something else, but in that menu I cannot even move with the cursor keys. Maybe that is not implemented.

In Wine I can walk the maze, open doors, many things seem to work, but special keys are not handled well.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 03:55pm 27 Feb 2022
Copy link to clipboard 
Print this post

Hi Pete

with beta, mode -16 is ok. But I have in "mode 16" the same problem: after init screen, cursor is out of window. In fact position 0,0 is in screen border, not in visible screen, you don't add heigt of top screen border

pb with win10 is probably pb of audio driver. In this pc, I use fiber output to audio external box

Wish :
is it possible to load more than 5 fonts. As others MM, 16 fonts are the best

thanks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 04:18pm 27 Feb 2022
Copy link to clipboard 
Print this post

  Quote  But I have in "mode 16" the same problem: after init screen, cursor is out of window. In fact position 0,0 is in screen border,


I assume you are running on a 1080p monitor. Mode 16 works perfectly on a 4K monitor. You can't get 1920x1080 on a 1080p monitor unless in fullscreen. I've made the border the minimum possible allowed in windows.

is it possible to load more than 5 fonts. As others MM, 16 fonts are the best

The font handling should be the same as other MM - looks like a bug
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 10:11pm 27 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  

I assume you are running on a 1080p monitor. Mode 16 works perfectly on a 4K monitor. You can't get 1920x1080 on a 1080p monitor unless in fullscreen. I've made the border the minimum possible allowed in windows.

I use 2 screens in 1920x1080 each. Problem is not here, problem is just that in "mode 16" I have no cursor it is no visible because it is out of border window

  matherp said  
is it possible to load more than 5 fonts. As others MM, 16 fonts are the best

The font handling should be the same as other MM - looks like a bug


Here my test fonts program

testfonts.zip


 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 10:42pm 27 Feb 2022
Copy link to clipboard 
Print this post

The font issue was a bug - your test now works perfectly on my development version - will post tomorrow.

The cursor issue is something to do with your set-up. I can't replicate on either a 4K monitor or a single 1080p monitor. Do you have an issue if you use mode 15?
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 11:10pm 27 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  The font issue was a bug - your test now works perfectly on my development version - will post tomorrow.

bug is in this part

for i=1 to nbfonts  'if nbfonts > 7 then it bug
 font i,1
 vsize(i,1)=MM.info(fontwidth)  'dim vsize(16,3) as integer
 vsize(i,2)=MM.info(fontheight)
next i


  matherp said  
The cursor issue is something to do with your set-up. I can't replicate on either a 4K monitor or a single 1080p monitor. Do you have an issue if you use mode 15?

mode -16 is the best for me. I don't want to use "mode 16", but my pb is that option default mode -16 don't work  (in v03a12 it work without pb)



Edited 2022-02-28 09:11 by goc30
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 11:53pm 27 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  
The cursor issue is something to do with your set-up. I can't replicate on either a 4K monitor or a single 1080p monitor. Do you have an issue if you use mode 15?


I understood the problem, in fact with win10, I have window edges reduced to the strict minimum, while with win8 I have window edges of standard size

win10



win8

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 09:37am 28 Feb 2022
Copy link to clipboard 
Print this post

V5.07.03b1


MMBasic.zip


DEFINEFONT now working. I had patched out the code during development and forgot to re-instate

MM.INFO(OPTION CONSOLE) returns "Screen" for CMM2 compatibility reasons
 
pjmart
Newbie

Joined: 13/11/2016
Location: Australia
Posts: 9
Posted: 10:32am 28 Feb 2022
Copy link to clipboard 
Print this post

Have been using MMB4W for a while and think it is a great development.  

However there are a couple of things which I feel could be improved.
I am using W10 on a 64bit machine with a standard 1080 screen.

1. I am having to reset the font to my default setting every time a program finishes and drops back to the prompt.  It doesn't seem to matter what my defaults are or what screen mode I am using it will always be font 3 on exit.  I have even tried defining the font (i.e. Font 4) as the last line in a program without success. Can you consider having it instead revert to whatever Option Default settings are entered.

2. Similar to goc30, am also having issues with the window extending outside of the screen.  I have tried hiding the Taskbar which solves the problem of the cursor below the bottom of the screen when in a normal window mode.  However if I switch to full screen (Mode -16) then when back at the prompt the cursor is visible but I can no longer see or unhide the Taskbar.

As you suggested have tried Mode 15 and all works as expected with the cursor visible and the taskbar visible or can be recalled.

Would appreciate your advice
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 10:43am 28 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  V5.07.03b1


DEFINEFONT now working. I had patched out the code during development and forgot to re-instate


now my prog (testfonts.bas) work perfectly. thank Pete

but I have always pb with "option default mode -16" who return same error
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 12:50pm 28 Feb 2022
Copy link to clipboard 
Print this post

  Quote  but I have always pb with "option default mode -16" who return same error


This is correct. I made the decision not to allow full screen modes to be set as default. Full screen on Windows can be a problem (no access to menu bar etc.) so I thought it better to only allow it to be set once in the application. This is open to discussion but that was my thinking
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 427
Posted: 05:09pm 28 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  
This is correct. I made the decision not to allow full screen modes to be set as default. Full screen on Windows can be a problem (no access to menu bar etc.) so I thought it better to only allow it to be set once in the application. This is open to discussion but that was my thinking


of course, but the problem is that this mode does not stay, and sometimes it starts to flash. Finally at each cls or at the exit of edition, the cursor disappears. We don't even know where we are anymore. Is the cursor just hidden or is MMBasic crashing. Even at startup, the version of MMBasic is not visible. it is unmanageable!!.

There is a basic principle on Windows. The cursor at position 0,0 should be at the top of the visible part of a window, not behind the top border. And this, whatever the resolution. And if there is a menu, position 0,0 is at the bottom of the menu bar.

it is Windows that manages this automatically, so any operation different from these principles must be considered as a malfunction
Edited 2022-03-01 03:12 by goc30
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 05:13pm 28 Feb 2022
Copy link to clipboard 
Print this post

How about I get rid of full screen mode completely but create a new mode for 1080p screens which is the maximum size that will fit above the task bar completely within the screen. Something like 1850x980? I can play with the setting to get the optimum
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4040
Posted: 05:46pm 28 Feb 2022
Copy link to clipboard 
Print this post

Just a quickie:

CMM2:
? Hex$(5, 0)
5


MMB4W:
? Hex$(5, 0)
0 is invalid (valid is 1 to 255)


I have library code that uses a variable/parameter for the second argument which might be equal to 0 where the caller wants to use the default value. I can workaround it, but if the intention is to simulate the CMM2 then you should probably "fix" it.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4040
Posted: 06:05pm 28 Feb 2022
Copy link to clipboard 
Print this post

And it looks like INV is broken:

CMM2:
> Dim i%
> For i% = 1 To 10 : ? Bin$(Inv(1 << i%)) : Next
1111111111111111111111111111111111111111111111111111111111111101
1111111111111111111111111111111111111111111111111111111111111011
1111111111111111111111111111111111111111111111111111111111110111
1111111111111111111111111111111111111111111111111111111111101111
1111111111111111111111111111111111111111111111111111111111011111
1111111111111111111111111111111111111111111111111111111110111111
1111111111111111111111111111111111111111111111111111111101111111
1111111111111111111111111111111111111111111111111111111011111111
1111111111111111111111111111111111111111111111111111110111111111
1111111111111111111111111111111111111111111111111111101111111111


MMB4W:
> Dim i%
> For i% = 1 To 10 : ? Bin$(Inv(1 << i%)) : Next
0
0
0
0
0
0
0
0
0
0


Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 07:09pm 28 Feb 2022
Copy link to clipboard 
Print this post

  Quote  And it looks like INV is broken:

f.....g optimising compilers

void  op_not(void){
// don't do anything, just a place holder
error((char *)"Syntax error");
}

void  op_inv(void){
// don't do anything, just a place holder
error((char *)"Syntax error");
}


This is the code for the two dummy operators because the actual implmentation is in getvalue()

Guess what? the compiler decided they were the same and therefore optimised one out so the test in getvalue for the different addresses failed
Edited 2022-03-01 05:10 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4040
Posted: 07:15pm 28 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  f.....g optimising compilers

<snip>

Guess what? the compiler decided they were the same and therefore optimised one out so the test in getvalue for the different addresses failed


Good catch Peter, unless I was very lucky I suspect that one might have kept me entertained for more than a couple of hours.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 07:15pm 28 Feb 2022
Copy link to clipboard 
Print this post

V5.07.03b2

MMBasic.zip


Fixed bug in INV
Fullscreen modes removed
New mode 19 which is the largest display possible on a 1080p screen without overlapping the edges or the task bar
Modified hex$ to match CMM2
Edited 2022-03-01 05:38 by matherp
 
Michal
Senior Member

Joined: 02/02/2022
Location: Poland
Posts: 123
Posted: 09:16pm 28 Feb 2022
Copy link to clipboard 
Print this post

Hi matherp,

Could it remain Mode -16 (maybe as 20)?

Michal
 
     Page 1 of 30    
Print this page
© JAQ Software 2024