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 : PicoMite V6.00.01 release candidates - please test thoroughly
Page 4 of 20 | |||||
Author | Message | ||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2183 |
any point vg=1 'vg=<>1 or 0 If vg<>0 Then Print "x" Print "y" end if |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3824 |
Looking at the manual - looks invalid. Just follow the manual correctly instead. John |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2179 |
Stan, is this what you are after? vg = 1 'vg = 0 If vg<>0 Then 'this would do the same:- If vg Then Print "x" else Print "y" endif Edit. Another way to do it > vg=0 > if vg then ? "x" else ? "y" y > vg = not vg > if vg then ? "x" else ? "y" x > vg = not vg > if vg then ? "x" else ? "y" y > Edited 2024-11-29 08:07 by phil99 |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6904 |
vg = 1 '(or 0) PRINT CHOICE(vg,"X","Y") Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2183 |
works as k$=inkey$ if k$="x" then if cannon_x< mm.hres-16 then inc cannon_x,8 if k$="z" then if cannon_x>16 then inc cannon_x,-8 |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3824 |
vg=1 'vg=<>1 or 0 If vg<>0 Then Print "x" Print "y" end if Looking at the manual - looks invalid. Just follow the manual correctly instead. John works as k$=inkey$ if k$="x" then if cannon_x< mm.hres-16 then inc cannon_x,8 if k$="z" then if cannon_x>16 then inc cannon_x,-8 Those are not equivalent to your post about which I commented. Look closely at the end if! John |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
This is just horrible code. Why not just use the standard IF clause THEN code ELSE code ENDIF However, as always, please start a different thread to discuss code style instead of cluttering a thread which is supposed to allow people to see the new versions and report any bugs For reference the latest is RC3 and the firmware is on page 2 of this topic Edited 2024-11-29 19:25 by matherp |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2838 |
Peter, On an official RPi Pico2W running firmware from your 'That was easy' first post. Have just a small display hooked up (Waveshare 2" IPS ST7789 modified to allow Pico to be plugged in without conflict between GP12 (SPI2 RX) and the IPS RST signal - hardwired to GP0). Options set up as below and IPS works as it should do. So far, so good. WebMite MMBasic RP2350A Edition V6.00.01RC1 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION AUTORUN ON OPTION FLASH SIZE 4194304 OPTION LIBRARY_FLASH_SIZE 28000 OPTION CPUSPEED 252000 'KHz OPTION LCDPANEL ST7789_320, LANDSCAPE,GP8,GP0,GP9,GP13 Have a simple program loop to display time (after hooking up to WiFi, and then to an NTP server to set Time$ and Date$.) All works as expected at first glance. The looping program under test is to display TIME$ on IPS. However, I am seeing really bad drift (just a simple loop continually updating TIME$ on the IPS. It is losing time (i.e. running slow). Consistently after just 15 minutes it will lose 7.5 seconds. I first noticed it after popping out for an hour, and it had was running half a minute behind true time (gets the correct starting time on power-up). For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2183 |
my thoughts are if test not true then if test2 not true, it skips test2 if test not true. better than if test not true AND test2 not true as it tests both. stan |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2838 |
What is the max CPUSPEED for a RPi Pico2W? Manual implies 378000 but on v6.00.01 RC1, when trying to set to this it says max is 252000 Any clarification appreciated..... For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
Manual page 80 is correct. I'm looking at the time issue Edited 2024-11-30 05:10 by matherp |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 517 |
While testing out your new HDMI board, I noticed that if you are using HDMI resolution 640 and run a program which sets MODE 4 and tries to use framebuffers (I know there are no frame buffers in mode 4) It crashes and does a complete hard reset, all options gone... Regards Kevin. Edited 2024-11-30 07:20 by Bleep |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2183 |
I got RUN [44] Sprite READ 1,10,10,8,16 'reads sprite1 from screen to sprite buffer1 Error : Not available for this display mode > |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2179 |
The error message says it all. Change to a Mode that does support copying from screen to buffer. In some modes the buffer would use too much memory so it is not allowed. The modes that do should be in the new draft manual somewhere for your device and screen type. Edit. If it is in the manual it's well hidden. I guess trial and error is a quicker way to find out. Edited 2024-11-30 08:36 by phil99 |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
Regards Kevin. Doesn't for me - tested at the command prompt so something else going on |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 517 |
Hi Peter, Here is a program which will do it every time on my board. Just change Mode 2 to Mode 4. It does also use some quite large arrays. In all other modes it works fine, or says not enough heap space. bubble2350vga.bas.zip I do use the pack functions, I wonder if I've screwed up & got an overwrite. I'll check tomorrow. Regards Kevin. Edited 2024-11-30 09:30 by Bleep |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6127 |
Here is a program which will do it every time on my board. Just change Mode 2 to Mode 4. It does also use some quite large arrays. In all other modes it works fine, or says not enough heap space. bubble2350vga.bas.zip I do use the pack functions, I wonder if I've screwed up & got an overwrite. I'll check tomorrow. Regards Kevin. This is sufficient to demonstrate the lockup. MODE 4 FRAMEBUFFER CREATE FRAMEBUFFER WRITE f CLS RGB(BLACK) PRINT "Test" Jim Edited 2024-11-30 10:09 by TassyJim VK7JH MMedit MMBasic Help |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
Found it, typo/cut-and-paste as usual - will fix in RC4 Edited 2024-11-30 18:36 by matherp |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 296 |
The values in the MAP(n) color palette array do not change after assigning them other values and executing the MAP SET command. MODE 2 Print Map(1) Map(1)=RGB(Red) Map Set Print Map(1) and it turns out that later in the program I cannot get the values of the current colors from the array of the color palette MAP(n) Although the palette of displayed colors itself changes. Edited 2024-11-30 20:39 by javavi |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
This is how it works. When you change a colour - say 1 you are overwriting the value in element 1 of the mapping array. In your case it originally held &HFF i.e. BLUE To use this colour you can't use RGB(RED) because that will pick up element 8 in the mapping array but it makes no sense to use RGB(BLUE) because you have changed that element to red. The map function returns an RGB value that will get the new value in element 1 ie it always returns RGB(BLUE) |
||||
Page 4 of 20 |
Print this page |