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 24 of 30 | |||||
Author | Message | ||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6101 |
In order to have more commands and functions, Peter combined similar ones by doing a search and replace on the commandline/program lines as they are entered. STR_REPLACE((char*)inpbuf, "BIN$(", "BASE$(2,"); STR_REPLACE((char*)inpbuf, "OCT$(", "BASE$(8,"); STR_REPLACE((char*)inpbuf, "HEX$(", "BASE$(16,"); It looks file text within quotes was also searched. Jim Edit: The other part of the problem would be better described as: Hex Bin and Octal numbers are not recognised as number for colour-coding in the editor. Jim Edited 2023-05-22 08:00 by TassyJim VK7JH MMedit MMBasic Help |
||||
panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1101 |
A work around for print "hex$(23) = " as a literal would be print "hex"+"$(23) = " This would stop the pre-processor translating hex$() Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9131 |
Shouldn't do that - will fix |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6101 |
As I start to use MMB4W more, two issues kept coming up. MMEdit would start a new instance of MMB4W whenever you send a bas file to it. This can be very useful but at other times, two or more MMB4W is too much. quit_mmbasic is a short program that looks for a running instance of MMB4W and politely sends it "QUIT" to gracefully shut down. The next update to MMEdit will make use of this. quit_mmbasic is 99% the work of Gerry, disco4now The second issue is getting data from MMB4W. The output is all graphics, not text. I have sent data to a file then accessed that file from other programs. This works but I like to see some output streaming so I made use of TCP SEND. TCT SEND needs a server available so echo_chamber is a small program that listens on port 6832 and sends any data received to all other connected clients. The idea is, start echo-chamber, start TeraTerm etc and connect to echo_chamber. Start your MMB4W program and use TeraTerm as a console to display messages while keeping the MMB4W graphics unmolested. MMB4W_p.zip This program has a couple of subs that make sending to TCP a bit easier. ' TCP CLIENT "localhost", 6800 DO INC n PRINT n nprint "Testing my server" nprintat 30,20,"Here "+STR$(n) IF MM.ERRNO = 16 THEN PRINT "Comms lost" ENDIF 'on error skip 'tcp receive rec$ PAUSE(3000) LOOP UNTIL rec$ = "quit" TCP CLOSE END SUB nprint txt$ ON ERROR SKIP 1 TCP SEND txt$+CHR$(13)+CHR$(10) END SUB SUB nprintat xpos,ypos, txt$ tosend$ = VTpos$(ypos, xpos)+txt$+CHR$(13)+CHR$(10) ON ERROR SKIP 1 TCP SEND tosend$ END SUB FUNCTION VTpos$(r,c) VTpos$ = CHR$(27)+"["+STR$(r)+";"+STR$(c)+"H" END FUNCTION And now a bug report. The manual states that TCP RECEIVE is non-blocking and will return an empty string if there is no data. In the above program it IS blocking. Jim Edited 2023-05-24 15:04 by TassyJim VK7JH MMedit MMBasic Help |
||||
PhilP Newbie Joined: 25/01/2017 Location: United KingdomPosts: 31 |
Help! I am very keen to use MMB4W but can't get it to run. I am using version 2023-05-21_045022_MMBasic. I have read Doug's very comprehensive guide but I can't get the thing to run. I have tried on two laptops one with Norton and one without with the same results. After downloading the exe into its own directory I start MMB4W through the CMD window and a large white panel appears and then disappears after about 10 seconds. The keyboard is dead during this time. I am sure I am doing something stupid somewhere. Phil |
||||
Michal Senior Member Joined: 02/02/2022 Location: PolandPosts: 123 |
The last two versions seem to have a problem with me running on a 768x1366 screen. Find the January 2023 version. Michal |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
I've never run it that way? Just double click the .exe file in explorer or better still use MMEdit. Bill Keep safe. Live long and prosper. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6101 |
Do your laptops run high DPI. If so, that is the problem (or it is with my laptop) I created a desktop shortcut and then edited it's properties Previous versions of MMB4W were OK Edit with more information: My laptop is running Windows 10. On my laptop the MMB4W opening screen is too big for the display. With earlier beta's the sign-on text is off screen and just a hint of it is visible. Turning off DPI settings makes life better. The latest beta gets as far as opening the main window and stops. I can't tell if any of the sign-on text is there. There is no response to the keyboard. Turning off high DPI works nicely for the latest beta and I prefer it that way. Jim Edited 2023-05-31 14:11 by TassyJim VK7JH MMedit MMBasic Help |
||||
PhilP Newbie Joined: 25/01/2017 Location: United KingdomPosts: 31 |
Thanks Jim. I am running Win 10 and turning off high DPI gave me a black panel instead of white but no banner and the keyboard was dead. I have gone back to the October version V5.07.03b12 which seems to work OK. It is a shame I cant't run the latest version though. Phil |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
I'm also having a problem with the latest version. I get a blank screen (black). Sometimes that has happened to me with other versions, and I hit <enter> until the cursor occurs. No matter how many times I do that, nothing ever appears on the screen. I loaded Quazee's recent one-liner and ran it, which should fill the screen with "/\". Nothing appears. If I type Ctrl_C and "quit", MMB4W quits. If I run the version which reports 5.070316 for ?mm.ver, all works as I expect. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
MANUAL ERRORS There are many references (15) to VGA monitor or screen. I don't think that is relevant to MMB4W. Probably just "screen" is sufficient, that would cover laptops and any kind of monitor. OPTION DEFAULT PATH is not described in the OPTIONS section. It is mentioned in the QUICK START TUTORIAL though. Bill Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
MMB4W Bug MMB4W does not 'print' a CR/LF after an INPUT statement but it does after a PRINT command. The following code demonstrates. do input "Resistance (1 to 999.9)? ", r if r = 0 then end loop until r =< 999.9 and r => 1 do input "Within percent (1 t0 2)? ", tol loop until tol => 1 and tol =< 2 print "Done" print "Done" print "Done" The result: In addition: the copyright date needs to be updated. Bill Keep safe. Live long and prosper. |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 145 |
Panky, I've been playing around with Doug's simulator example and noticed that there are more GUI instructions than described in the MMB4W manual? Jan |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
@Jan, If you could list those, I'm sure that would help. Bill Keep safe. Live long and prosper. |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
There is a note in the GUI section of CONTROLS: You can find a copy in the CCM2 download. Bill Keep safe. Live long and prosper. |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 145 |
Turbo46 & panky, These GUI settings are not yet in the MMB4W manual. https://www.c-com.com.au/mmhelp/ GUI AREA #ref, startX, startY, width, height GUI BARGAUGE #ref, StartX, StartY, width, height, FColour, BColour, min, max,c1,ta,c2,tb,c3,tc,c4 GUI BUTTON #ref, caption$, startX, startY, width, height [, FColour] [,BColour] GUI CAPTION #ref, text$, startX, startY [,align$] [, FColour] [, BColour] GUI CHECKBOX #ref, caption$, startX, startY [, size] [, colour] GUI DISPLAYBOX #ref, startX, startY, width, height, FColour, BColour GUI FRAME #ref, caption$, startX, startY, width, height, colour GUI FORMATBOX #ref, Format, startX, startY, width, height, FColour, BColour GUI GAUGE #ref,StartX,StartY,Radius,FColour,BColour,min,max,nbrdec,units$,c1,ta,c2,tb,c3,tc,c4 GUI LED #ref, caption$, centerX, centerY, radius, colour GUI NUMBERBOX #ref, startX, startY, width, height, FColour, BColour GUI RADIO #ref, caption$, centerX, centerY, radius, colour GUI SPINBOX #ref, startX, startY, width, height, FColour, BColour, Step, Minimum, Maximum GUI SWITCH #ref, caption$, startX, startY, width, height, FColour, BColour GUI TEXTBOX #ref, startX, startY, width, height, FColour, BColour These GUI settings are already in the MMB4W manual. GUI CURSOR GUI CURSOR ON GUI CURSOR x, y GUI CURSOR OFF GUI CURSOR HIDE GUI CURSOR SHOW GUI CURSOR COLOUR cursorcolour GUI CURSOR LOAD "fname" GUI BITMAP x, y, bits [, width] [, height] [, schaal] [, c] [,bc] Jan |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
Do these settings actually work in the latest version of MMB4W? I can't test it because the latest version just gives me a black screen and no cursor, even if I <enter> many times; cls rgb(red) doesn't change anything, but QUIT works. In version 5.070316, which works for me, OPTION MAXCONTROLS 20 responds "Invalid Option", and "GUI CURSOR" responds "Syntax". PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 145 |
lizby, I found this out while testing panky's example program on page 18. With this program "simulation.bas" a microcomputer can be simulated in MMB4W, which is not yet finished and menu option 9 already works very well for me and I have mode 9 and font 2.1 in option default for standard. Here I saw that the mouse control works with GUI AREA, so I found out there might be more GUI settings? I haven't been able to test everything yet, but what I have tested works for me. The LED works and the number pad also works, so there are still some tests to do. The GUI CURSOR has not yet been tested either, but I will report back when I have tested it. I also tested u g9_display.txt from page 16 and it works for me with mode 9 and font 1 and display scale=1. I must admit that not the whole image is filled (3/4), but there are results and possibly something to optimize? I still have a 4:3 LCD VGA screen for testing and a VGA tube monitor in storage and I have an HDMI screen 1600x900 on my laptop that this test was done with and I have not yet adjusted the screen settings. This all takes time to implement and I am busy with many things. Jan |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
Jan, Sorry you went to that trouble. Did you not see my Post? There is a note in the GUI section of CONTROLS: You can find a copy in the CCM2 download. See: https://geoffg.net/maximite.html Scroll down to the bottom and download the firmware for the CMM2, It's part of that package. I think the only commands in the MMB4W manual are specific to MMB4W and not part of the general GUI functions. Bill Keep safe. Live long and prosper. |
||||
ice2642 Regular Member Joined: 27/05/2023 Location: BrazilPosts: 82 |
I do not use windows a very long time, but I try it on linux ubuntu 22.04 and wine 5 just for test. The MMBasic window open, but when I press F1 for editor, it list my Documents directory. basic commands, like print, do , loop, etc... work, mode 2 change the window, but no graphics. Best Regards, MMBasic 5.0707 on PicoMite VGA |
||||
Page 24 of 30 |
Print this page |