Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : PicoMite V6.00.01 release candidates - please test thoroughly

   Page 4 of 23    
Posted: 09:11pm
28 Nov 2024
Copy link to clipboard
stanleyella
Guru


any point
vg=1 'vg=<>1 or 0
If vg<>0 Then Print "x"
Print "y"
end if
 
Posted: 09:34pm
28 Nov 2024
Copy link to clipboard
JohnS
Guru

  stanleyella said  any point
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
 
Posted: 10:00pm
28 Nov 2024
Copy link to clipboard
phil99
Guru


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
 
Posted: 10:21pm
28 Nov 2024
Copy link to clipboard
Mixtel90
Guru


vg = 1 '(or 0)
PRINT CHOICE(vg,"X","Y")
 
Posted: 02:43am
29 Nov 2024
Copy link to clipboard
stanleyella
Guru


  JohnS said  
  stanleyella said  any point
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
 
Posted: 07:57am
29 Nov 2024
Copy link to clipboard
JohnS
Guru

  stanleyella said  
  JohnS said  
  stanleyella said  any point
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
 
Posted: 08:05am
29 Nov 2024
Copy link to clipboard
matherp
Guru

  Quote  if k$="x" then if cannon_x< mm.hres-16 then inc cannon_x,8


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
 
Posted: 03:24pm
29 Nov 2024
Copy link to clipboard
WhiteWizzard
Guru

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).
 
Posted: 03:40pm
29 Nov 2024
Copy link to clipboard
stanleyella
Guru


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
 
Posted: 04:37pm
29 Nov 2024
Copy link to clipboard
WhiteWizzard
Guru

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.....
 
Posted: 06:40pm
29 Nov 2024
Copy link to clipboard
matherp
Guru

Manual page 80 is correct. I'm looking at the time issue
Edited 2024-11-30 05:10 by matherp
 
Posted: 09:19pm
29 Nov 2024
Copy link to clipboard
Bleep
Guru

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
 
Posted: 09:44pm
29 Nov 2024
Copy link to clipboard
stanleyella
Guru


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
>
 
Posted: 10:12pm
29 Nov 2024
Copy link to clipboard
phil99
Guru


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
 
Posted: 10:43pm
29 Nov 2024
Copy link to clipboard
matherp
Guru

  Quote  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.


Doesn't for me - tested at the command prompt so something else going on
 
Posted: 11:15pm
29 Nov 2024
Copy link to clipboard
Bleep
Guru

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
 
Posted: 11:50pm
29 Nov 2024
Copy link to clipboard
TassyJim
Guru


  Bleep said  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.

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
 
Posted: 08:18am
30 Nov 2024
Copy link to clipboard
matherp
Guru

Found it, typo/cut-and-paste as usual - will fix in RC4
Edited 2024-11-30 18:36 by matherp
 
Posted: 10:36am
30 Nov 2024
Copy link to clipboard
javavi
Guru


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
 
Posted: 10:46am
30 Nov 2024
Copy link to clipboard
matherp
Guru

  Quote  The values ​​in the MAP(n) color palette array do not change after assigning them other values ​​and executing the MAP SET command.


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 23    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025