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 14 of 17 | |||||
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9033 |
colour 15 is a very low intensity red with 0 opacity Colours are ABGR8888. If setting them explicitly always set the top 8 bits to 1 to get opaque. e.g. color &HFFFFFFFF, &HFF000000 would be white on black Now if the Framebuffer issue was so easy... |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9033 |
pa19 MMBasic.zip Should fix the framebuffer issue |
||||
Romeo Newbie Joined: 11/02/2022 Location: FrancePosts: 24 |
Well, it does...a little No more crashing, but the (windowed) screen is not more legible, althought I can see the cursor blinking |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9033 |
My test program Are you getting confused with the ABGR8888 use the pre-define RGB colours to get going. You need to post accurate problem descriptions and code if I am to really help Edited 2022-02-13 23:11 by matherp |
||||
Michal Senior Member Joined: 02/02/2022 Location: PolandPosts: 119 |
(5.07.03pa19): Atom Z3735F 1,57GHz 45%CPU, grain.bas 75%CPU 56234 grains, gui-tes.bas 75%CPU Michal |
||||
Goksteroo Senior Member Joined: 15/03/2021 Location: AustraliaPosts: 114 |
The NoClue program now crashes MMB when words are read in from an open file... open f$ for input as #1 print "open" ' ** test file is open ok ** c=0 wc=int(chars/(wordlength+1)) pc=0 text 0,90,"Searching "+str$(dict(wordlength))+" Words....",l,,,rgb(green) colour rgb(yellow) do while not eof(#1) print "reading word" ' ** flag for eof test ** line input #1, goodword$ print goodword$ ' ** flag for word is read in ok ** This is the code that crashes MMB now - I'v added print statements to track commands... file is open ok, eof is tested ok, but the LINE INPUT #1 crashes MMB. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9033 |
That's because it was trying to read from an unopened serial port. Hopefully better now MMBasic.zip |
||||
mclout999 Guru Joined: 05/07/2020 Location: United StatesPosts: 456 |
First thanks for responding. It worked but I use backslashes (\) instead of forward slashes per windows as you used in your example and it works both ways. That is kind of odd and cool. It takes Linux and windows syntax. The second thing that was frustrating the hell out of me is that I thought that the F1 save key in the editor worked. I thought I had it wrong until I just did a command line save. We are on an Alpha so I need to be more flexible in my thinking. I should have noted that it did not ask for a file name when I hit F1. Thanks again. Edit: The save in the editor is to save progress in the editor. my bad. Edited 2022-02-14 01:26 by mclout999 |
||||
Romeo Newbie Joined: 11/02/2022 Location: FrancePosts: 24 |
Your test program does give me this result: the screen goes red at the FB WINDOW instruction, then when the FRAMEBUFFER WRITE occurs, it paints the upper half screen in green, then the Hello text writing seems to occur but isn't legible. My guess is the screen does'nt shows correctly because it is squeezed by two, hence the half green screen and text not legible. Maybe I misunderstood the FB WRITE instruction, I'm using the CMM2 Graphic Programming v.3f documentation where it does'nt specify every graphic command entered after the FB CREATE occurs in the FB, I was misleaded as it specify PAGE WRITE FB and FB WRITE are the same command and thus shall be entered before any drawing in this memory area. In this case, I don't get what the FB WRITE command do..could you please check this documentation, I think it may be unclear (at least for non english-native reader). Plus, interrestingly, commenting the last instruction (DO LOOP) raises again the 'Memory cannot be written' crash, this time showing the faulty memory adress: 0xffffffc (some kind of void pointer under the hood??) Once again, sorry for messing the current thread, I can see Peter has to answer (and solve! lol) differents problems at once. Thanks for that, Peter. (PS: Peter, how comes this pb does'nt occur on you own dev. environnement?) Edited 2022-02-14 01:42 by Romeo |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9033 |
What mode are you in? Please set OPTION DEFAULT MODE 16 and see if you get the same. The green colour should cover the complete screen |
||||
Romeo Newbie Joined: 11/02/2022 Location: FrancePosts: 24 |
Oh Yes! Far better: a red Hello on a green screen! Thank you! Now lets Rock and Scroll! Edited 2022-02-14 02:21 by Romeo |
||||
KD5ZXG Regular Member Joined: 21/01/2022 Location: United StatesPosts: 53 |
Console COLOR numbers 0-15 mislead from page 16 of MMBasic for DOS v5.05.05 manual. There is no manual, addendum, or appendix for Windows yet (other than this thread). Some confusion is expected when referencing wrong books, the reason I had been trying 15 for white... "COLOUR fc, bc Sets the colours for subsequent characters written to the console window.'fc' is the foreground colour and 'bg' is the background colour. These values can be any one of the following: 0 = Black 1 = Blue 2 = Green 3 = Cyan 4 = Red 5 = Purple 6 = Yellow 7 = White 8 = Gray 9 = Bright Blue 10 = Bright Green 11 = Bright Cyan 12 = Bright Red 13 = Bright Purple 14 = Bright Yellow 15 = Bright White This command can also be spelt as COLOR" I will try ABGR8888 (A is for alpha?) By what rule does "CLS RGB(green)" work? And green does work. But Bright Purple, BrightPurple, and brightpurple all produce "Error: Invalid Colour". So, what valid color names do I need to know to represent the new spectrum? Already tried wavelength in picofurlongs, no go... Again referencing wrong books, in "The CMM2 3D engine.pdf" I find: DIM INTEGER colours(6)=(rgb(blue), rgb(green), rgb(yellow), rgb(cyan), rgb(red), rgb(magenta), rgb(yellow)) Are there others? In MMBasic for Windows > LIST FUNCTIONS . "RGB(" appears as a function. This operates by rule of dimensioned integer variables or an actual function? ANSI escape codes Documents color names (in order suspiciously similar to MMBasic for DOS) and common conversions to RGB888. Edited 2022-02-14 06:15 by KD5ZXG |
||||
Pluto Guru Joined: 09/06/2017 Location: FinlandPosts: 339 |
I had finally the opportunity to test the Swedish Keyboard. All characters that are needed works perfectly. Tested also to to read from a standard 28 pin micromite. First testing at 230400 baud worked directly THANKS!! /Fred |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6060 |
mode 1 cls text 10,10, "Blue ", ,1,1,rgb(blue) text 10,30, "Green ", ,1,1,rgb(Green) text 10,50, "Cyan ", ,1,1,rgb(Cyan) text 10,70, "Red ", ,1,1,rgb(Red) text 10,90, "Magenta ", ,1,1,rgb(Magenta) text 10,110, "Yellow ", ,1,1,rgb(Yellow) text 10,130, "Brown ", ,1,1,rgb(Brown) text 10,150, "Gray ", ,1,1,rgb(Gray) 'text 10,170, "Litegray ", ,1,1,rgb(Litegray) text 10,190, "White ", ,1,1,rgb(White) text 10,210, "Orange ", ,1,1,rgb(Orange) text 10,230, "Pink ", ,1,1,rgb(Pink) text 10,250, "Gold ", ,1,1,rgb(Gold) text 10,270, "Salmon ", ,1,1,rgb(Salmon) text 10,290, "Beige ", ,1,1,rgb(Beige) do : loop Jim VK7JH MMedit MMBasic Help |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6060 |
Switching MODEs back to working again. Serial now talks to picomite USB (as well as anything else). You are progressing well! Jim VK7JH MMedit MMBasic Help |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9033 |
pa20 MMBasic.zip Editor replaced with the CMM2 editor. Definite pre-alpha status Not implemented yet: mouse support F7 Shift-DEL Shift-TAB F12 First time after starting you must specify the filename to be edited e.g edit "myfile.bas" Afterwards in the session it will remember the last file edited if saved (not if you esc) and you can just use edit use OLDEDIT to use the original MM2 editor Edited 2022-02-14 08:44 by matherp |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6060 |
Current colours are: WHITE YELLOW LILAC BROWN FUCHSIA RUST MAGENTA RED CYAN GREEN CERULEAN MIDGREEN COBALT MYRTLE BLUE BLACK GRAY GREY LIGHTGRAY LIGHTGREY ORANGE PINK GOLD SALMON BEIGE Jim VK7JH MMedit MMBasic Help |
||||
Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 553 |
NEW - WILL NOT WORK @pa20 Plasma |
||||
flip Senior Member Joined: 18/07/2016 Location: AustraliaPosts: 114 |
Peter, still not working ..it always opens initial text-mode cmd-like window with cursor in top-left. that's it. Regards Phil |
||||
Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 553 |
serial test : open "COM4:115200" as #2 do k$ = inkey$ if k$ <>"" then print #2,k$; if loc(#2) > 0 then j$ = input$(loc(#2),#2) print j$; print "-"; endif loop first Start gives an Error second Start will work Plasma |
||||
Page 14 of 17 |
Print this page |