Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : MMBasic for Windows - betas

   Page 23 of 30    
Posted: 06:24pm
09 May 2023
Copy link to clipboard
electricat
Senior Member


Thank You, Peter
Problem solved! :)
 
Posted: 04:22am
11 May 2023
Copy link to clipboard
panky
Guru


Peter,
With 440 replies and over 20 thousand views, it seems MMB4W is very interesting to many people. - a testament to all your hard work, many thanks.
Do you have any plans to move forward to a release candidate?
Regards,
Doug.
 
Posted: 04:16am
16 May 2023
Copy link to clipboard
panky
Guru


Bug in GUI SWITCH

MMB4W 5.07.03b18
OPTION CONSOLE BOTH

The bi-furcated switch works as per manual, standard switch does not react to click. The following code demonstrates

gui switch #1,"swi|tch",0,0,100,100,rgb(green),rgb(0,100,0) ' works
gui switch #2,"switch",0,200,100,100,rgb(green),rgb(0,100,0) ' nada
do
 console ctrlval(#1),ctrlval(#2)
 pause 500
loop

 
Posted: 04:54am
16 May 2023
Copy link to clipboard
panky
Guru


Re the switch issue, I notice in the Pico code in GUI.c the following

gui_int_down = true;                 // signal that a MMBasic interrupt is valid
 for(r = 1; r < Option.MaxCtrls; r++) {
    if(Ctrl[r].type && TouchX >= Ctrl[r].x1 && TouchY >= Ctrl[r].y1 && TouchX <= Ctrl[r].x2 && TouchY <= Ctrl[r].y2) {
    if(!(CurrentPages & (1 << Ctrl[r].page))) continue;  // ignore if the page is not displayed
    if(Ctrl[r].state & (CTRL_DISABLED | CTRL_DISABLED2 | CTRL_HIDDEN)) continue;  // ignore if control is disabled
    switch(Ctrl[r].type) {
       case CTRL_SWITCH:   if(!(TouchX >= Ctrl[r.min && TouchX <= Ctrl[r.max)) return;   // skip if it is not the touch sensitive area (depends on the switch state)
            Ctrl[r].value = !Ctrl[r].value;
            break;

While in the MMB4W similar area there is the highlighted difference?
gui_int_down = true;                 // signal that a MMBasic interrupt is valid
 for(r = 1; r < Option.MaxCtrls; r++) {
    if(Ctrl[r].type && TouchX >= Ctrl[r].x1 && TouchY >= Ctrl[r].y1 && TouchX <= Ctrl[r].x2 && TouchY <= Ctrl[r].y2) {
    if(!(CurrentPages & (1 << Ctrl[r].page))) continue;  // ignore if the page is not displayed
    if(Ctrl[r].state & (CTRL_DISABLED | CTRL_DISABLED2 | CTRL_HIDDEN)) continue;  // ignore if control is disabled
    switch(Ctrl[r].type) {
       case CTRL_SWITCH:   if((TouchX >= Ctrl[r.min && TouchX <= Ctrl[r.max)) return;   // skip if it is not the touch sensitive area (depends on the switch state)
            Ctrl[r].value = !Ctrl[r].value;
            break;

The negate  indicator is missing in the MMB4W code - sorry but I don't know enough c or c++ to understand if this is significant.

Regards,
Doug.
 
Posted: 10:10am
17 May 2023
Copy link to clipboard
JanVolk
Senior Member

Is it true that LIST COMMANDS are missing:
#COMMENT
#DEFINE
#INCLUDE
#MMDEBUG
CAT
EXIT Thu
MMDEBUG
XMODEM

And for LIST FUNCTIONS missing:
BAUDRATE
BIN$(
HEX$(
OCT$(

Or is it an error in the manual?

Nice day.
 
Posted: 11:11am
17 May 2023
Copy link to clipboard
JohnS
Guru

I'm thinking that XMODEM makes little sense in Windows.

CAT is INC I think.

What is EXIT Thu?

Are the # things actually MMEDIT or some such? (transpiler?)

John
 
Posted: 09:23pm
17 May 2023
Copy link to clipboard
toml_12953
Guru

  JohnS said  I'm thinking that XMODEM makes little sense in Windows.

John


But many people communicate with systems other than Windows and over long transmission lines, it's good to have the error checking of XMODEM.
 
Posted: 09:46pm
17 May 2023
Copy link to clipboard
lizby
Guru

  toml_12953 said  
  JohnS said  I'm thinking that XMODEM makes little sense in Windows.

John


But many people communicate with systems other than Windows and over long transmission lines, it's good to have the error checking of XMODEM.


Since the thread is about MMBasic for Windows, Windows is already involved and I'm afraid I don't understand the use case. Someone who wants to get a file from a non-Windows device to a Windows device which runs MMB4W probably has a better way to do it than via XMODEM in MMBasic for Windows.
 
Posted: 09:49pm
17 May 2023
Copy link to clipboard
TassyJim
Guru


BIN$ etc are there - easy to test.
If they don't appear in the LIST it is probably because they are converted to BASE$( on input.
STR_REPLACE((char*)inpbuf, "BIN$(", "BASE$(2,");
   STR_REPLACE((char*)inpbuf, "OCT$(", "BASE$(8,");
   STR_REPLACE((char*)inpbuf, "HEX$(", "BASE$(16,");


The other 'missing' commands are most likely from CMM2 which the manual is derived from.

  Quote  Are the # things actually MMEDIT or some such? (transpiler?)

Not to my knowledge. But there is something similar in the CMM2.

Jim
 
Posted: 02:36am
18 May 2023
Copy link to clipboard
panky
Guru


  JanVolk said  Is it true that LIST COMMANDS are missing:
#COMMENT
#DEFINE
#INCLUDE
#MMDEBUG
CAT
EXIT Thu
MMDEBUG
XMODEM

And for LIST FUNCTIONS missing:
BAUDRATE
BIN$(
HEX$(
OCT$(

Or is it an error in the manual?

Nice day.

Hi JanVolk,

#COMMENT, #DEFINE and #INCLUDE are implemented and are in the manual.
#MMDEBUG and XMODEM do not seem to be implemented and will be removed from the next version of the manual.

BAUDRATE is not implemented - it can be set in the OPEN command - see Annex A on using serial.

As Jim said, BIN$(, HEX$( and OCT$( are all implemented and shown in the manual.

I am hopeful of getting a new cut of the manual out in a few days - there have been quite a few other errors fixed.

Cheers,
Doug.
 
Posted: 07:14am
20 May 2023
Copy link to clipboard
panky
Guru


MMB4W 5.07.03b18  - some more anomalies/bugs:-

MM.INFO(OPTION ANGLE)  fails with Syntax. Angle is being correctly acknowledged but the MM.INFO is incorrect.

Same for
MM.INFO(OPTION Y_AXIS)
MM.INFO(OPTION HEIGHT)
MM.INFO(OPTION WIDTH)

F10 generates AUTOSAVE but throws a syntax error because there is no ON | OFF

F11 and F12 generate to XMODEM Rx and Send but XMODEM not implemented.

The result of the following option being set/unset do not show up in OPTION LIST - intentional or omission?
OPTION BASE ON | OFF

Any word on the GUI SWITCH bug logged earlier?

Regards,
Doug.
Edited 2023-05-20 17:24 by panky
 
Posted: 06:52pm
20 May 2023
Copy link to clipboard
matherp
Guru

V5.07.03b19

WARNING - This version deletes all options so make a note of them before running

MMBasic.zip

Implements OPTION F10, F11, and F12 as the previous defaults were useless
Fixes bugs in mm.info(option ...
Changes to GUI switch - please report if now OK
Fixes to SPRITE SWAP command.
Edited 2023-05-21 04:54 by matherp
 
Posted: 12:08am
21 May 2023
Copy link to clipboard
panky
Guru


Thanks Peter,

GUI Switch now works.

Latest cut of the User Manuals are here for the large version with bookmark navigation and here for the smaller version with just page thumbnail navigation.

Thanks for all your work on this,
Regards,
Doug.
Edited 2023-05-21 10:09 by panky
 
Posted: 12:46am
21 May 2023
Copy link to clipboard
Chopperp
Guru


Hi Doug

Links come up as Deleted on Dropbox for me

Great effort BTW

Brian
 
Posted: 01:19am
21 May 2023
Copy link to clipboard
panky
Guru


Sorry folks - found an error and updated files but forgot to update link - the following should now be OK.
The bookmark version
The thumbnail version

Doug.
 
Posted: 03:22am
21 May 2023
Copy link to clipboard
Turbo46
Guru


Thanks again Doug for all of your hard work. It looks like it is encouraging more people to use MMB4W now and that's why the odd bug is coming out.

Bill
 
Posted: 06:05pm
21 May 2023
Copy link to clipboard
JanVolk
Senior Member

Run this with MMB4W

Edit "test.bas"

Print "Dec:         21=" 21
Print "Hex:       &h21=" &h21
Print "Bin: &b00010101=" &b00010101
Print "Oct:       &o21=" &o21

Result:

Dec:         21= 21
Hex:       &h21= 33
Bin: &b00010101= 21
Oct:       &o21= 17

Result is good but with edit the output for colors with Bin, Hex, Oct is not correct.

See also for OldEdit with MMB4W and then with a PicoMite with Edit the above, which does give correct colors with edit and OPTION COLOURCODE ON.

Nice day
 
Posted: 06:54pm
21 May 2023
Copy link to clipboard
matherp
Guru

Why would they colour? The functions are bin$, oct$ and hex$. The CMM2 and MMB4W are more rigorous on this than the PicoMite
 
Posted: 07:40pm
21 May 2023
Copy link to clipboard
JanVolk
Senior Member

Peter,

I'm still exploring so this was strange to me?

Another difference with MMB4W and PicoMite Basic:

Print "Hex$(23)=" Hex$(23)

With MMB4W gives a different answer than with the PicoMite?

Jan
 
Posted: 07:59pm
21 May 2023
Copy link to clipboard
toml_12953
Guru

  JanVolk said  Peter,

I'm still exploring so this was strange to me?

Another difference with MMB4W and PicoMite Basic:

Print "Hex$(23)=" Hex$(23)

With MMB4W gives a different answer than with the PicoMite?

Jan


Yeah, why does

print"Hex$(23)"

print

BASE$(16,23)

I want to print what's between the quotes as a literal, not converted in any way.
 
   Page 23 of 30    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025