Menu | JAQForum Ver 19.10.27 |
Forum Index : Microcontroller and PC projects : MMBasic for Windows - betas
![]() ![]() ![]() ![]() |
||||||
Thank You, Peter Problem solved! :) |
||||||
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. |
||||||
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 |
||||||
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. |
||||||
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. |
||||||
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 |
||||||
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. |
||||||
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. Not to my knowledge. But there is something similar in the CMM2. Jim |
||||||
#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. |
||||||
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 |
||||||
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 |
||||||
|
||||||
Hi Doug Links come up as Deleted on Dropbox for me Great effort BTW Brian |
||||||
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. |
||||||
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 |
||||||
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 |
||||||
Why would they colour? The functions are bin$, oct$ and hex$. The CMM2 and MMB4W are more rigorous on this than the PicoMite |
||||||
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 |
||||||
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)" BASE$(16,23) I want to print what's between the quotes as a literal, not converted in any way. |
||||||
![]() ![]() ![]() ![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. |