Menu
JAQForum Ver 19.10.27

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

   Page 5 of 23    
Posted: 11:08am
30 Nov 2024
Copy link to clipboard
javavi
Guru


  matherp said  The map function returns an RGB value that will get the new value in element 1 ie it always returns RGB(BLUE)

The RGB(color) function returns a constant value for the specified color. That's how I understand it.
I expect to get the current value for the color from the MAP(n) array of the color palette. But it doesn't change.
Although it looks like I assigned a new value to an element of the array, but the value was not assigned.
Print Map(1)
Map(1)=16384
Print Map(1)
Map Set
Print Map(1)

128
128
128
>

Edited 2024-11-30 21:16 by javavi
 
Posted: 11:17am
30 Nov 2024
Copy link to clipboard
matherp
Guru

I explained it if you read what I wrote - it is not an array - the colour changes. The map function allows you to reference the changed colour using the same value you used in the MAP command

MAP(1)=RGB(RED)
PIXEL 0,0,MAP(1) 'outputs a red pixel

If you want to know the colour of MAP(1) you need to maintain it in your program
Edited 2024-11-30 21:23 by matherp
 
Posted: 11:22am
30 Nov 2024
Copy link to clipboard
javavi
Guru


  matherp said  I explained it if you read what I wrote - it is not an array - the colour changes. The map function allows you to reference the changed colour using the same value you used in the MAP command

These variables are not variables, arrays are not arrays, they are very confusing to me, sorry.  
Then how do I get the current values ​​for a given color palette?
 
Posted: 11:48am
30 Nov 2024
Copy link to clipboard
matherp
Guru

V6.00.00RC4


PicoMiteRP2350V6.00.01RC4.zip


PicoMiteRP2040V6.00.01RC4.zip

Fixes cut-and-paste error in HDMI mode 4 buffer sizes causing crashes

Re-engineers the real time system (TIME and DATE commands and functions and WEB NTP/RTC GETTIME) to avoid time loss when programs use functions that have to disable interrups

MM.INFO(SDCARD) now returns "Not Configured" if the SDcard hasn't been set up

MM.INFO(pinno GPn) now returns pins for HDMI allocated pins - you will still get errors if you try and use them

New command
OPTION MILLISECONDS ON/OFF  (temporary defaults to OFF)
This option enables millisecond output in the TIME$ function ie HH:MM:SS.mmm
NB: the milliseconds are set to zero whenever the time is updated using the TIME command, WEB NTP command or RTC GETTIME command


You can now use a layer in HDMI mode 4 (320x240 RGB555)

MODE 4
FRAMEBUFFER layer
FRAMEBUFFER write l
Box 100,100,100,100,5,RGB(blue),RGB(red)
FRAMEBUFFER write n
GUI test lcdpanel
Do
Loop

Edited 2024-11-30 22:36 by matherp
 
Posted: 03:03pm
30 Nov 2024
Copy link to clipboard
cosmic frog
Guru

Hi Peter, I can't seem to get the VS1053 audio board to work on this version.
It works ok on ver. PicoMiteV5.08.00
I've only tried it with MP3's

PicoMite MMBasic RP2040 Edition V6.00.01RC4
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SDCARD GP13
OPTION AUDIO VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6', ON PWM CHANNEL 1

Thanks.

Dave.
 
Posted: 03:26pm
30 Nov 2024
Copy link to clipboard
Bleep
Guru

Hi Peter,
Thanks for the update, I confirm the crash has gone and also that FRAMEBUFFER works in MODE 4. :-)
My Raspberry Pi keyboard, with built in hub also works, but not reliably in RESOLUTION 1280, so CPUSPEED 372000, about 1 in 5 times it is not recognised?
Thanks for all your work on this update.
Regards, Kevin.
 
Posted: 03:27pm
30 Nov 2024
Copy link to clipboard
Bleep
Guru

Hi Peter,
A sort of technical question, to which there may not be a straightforward answer?
When using, for example, bubble, and writing directly to a HDMI 1280 screen, I get a update rate of say 339mS, basically whatever Mode 2 or 3, or 5, this will change with RESOLUTION, but exactly in line with CPU frequency.
However if I start using a FRAMEBUFFER, in MODE 2, it makes no difference to the update rate, still 339mS maybe 1mS more, but basically the same. However if I change to MODE 5, this update rate drops dramatically to 515mS, so by working with a 25KB buffer, almost no time penalty, working with a 49KB buffer 176mS penalty. I realise you are moving more memory, but only an extra 25K, so if it only took 1mS to move 25K, why does it take 176mS to move 49K. Simirlarly with MODE 3, 339mS with no buffer, 604mS 98K buffer, so an extra 265mS (quarter of a second) to move an extra 73K (compared with MODE 2 25K). This is the same for all RESOLUTIONS whether HDMI or VGA? Bus contention? more work to do in the other modes? it just seems like a huge change, especially when working at the compiled code level, rather than, interpreted code, always assuming I've got my numbers right! Any ideas?
Regards, Kevin.
Edited 2024-12-01 01:48 by Bleep
 
Posted: 04:39pm
30 Nov 2024
Copy link to clipboard
matherp
Guru

  Quote  My Raspberry Pi keyboard, with built in hub also works, but not reliably in RESOLUTION 1280, so CPUSPEED 372000, about 1 in 5 times it is not recognised?


This may be power supply or cable. It is rock solid for me but wasn't until I changed cable.

Can't comment on the performance issue without thinking about it more and brain isn't available at the moment
 
Posted: 04:54pm
30 Nov 2024
Copy link to clipboard
twofingers
Guru


  matherp said  V6.00.00RC4
...
now returns pins for HDMI allocated pins - you will still get errors if you try and use them ...

Hmm, I still don't get a pin number for the HDMI assigned pins
if I use a string for GPn.
> GP$="GP22":? mm.INFO(pinno GP$)
29
> GP$="GP12":? mm.INFO(pinno GP$)
Error : Invalid pin
> GP$="GP12":? mm.INFO(pinno GP12)
16

But I'm happy with how it is now.
Regards
Michael
Edited 2024-12-01 02:54 by twofingers
 
Posted: 05:29pm
30 Nov 2024
Copy link to clipboard
matherp
Guru

  Quote  Hi Peter, I can't seem to get the VS1053 audio board to work on this version.


Thanks for the report - will look at it.
 
Posted: 06:08pm
30 Nov 2024
Copy link to clipboard
matherp
Guru

Dave

Please try this and report



PicoMite.zip
Edited 2024-12-01 04:39 by matherp
 
Posted: 06:41pm
30 Nov 2024
Copy link to clipboard
stanleyella
Guru


mode 4 same
RUN
[44] Sprite READ 1,10,10,8,16 'reads sprite1 from screen to sprite buffer1
Error : Not available for this display mode
> option list
PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.01RC4
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD UK
OPTION CPUSPEED (KHz) 315000
OPTION AUDIO GP0,GP1', ON PWM CHANNEL 0
 
Posted: 06:42pm
30 Nov 2024
Copy link to clipboard
matherp
Guru

That's because sprites are only available in RGB121 colour modes - the error is correct
 
Posted: 07:02pm
30 Nov 2024
Copy link to clipboard
stanleyella
Guru


I tried this but error
'simple scope gp26 ain. gp2 test signal
 mode 3
 'play tone 1000,1000
 
 SetPin GP2,pwm 1'this optional test signal comment out
 freq=100
 PWM 1,freq,50
 dim c%,x%,samples!(480)
 setpin gp26,ain
 'SETPIN (34), AIn
 adc open freq*100,1 'samples per second
 FRAMEBUFFER CREATE F
 FRAMEBUFFER LAYER L
 FRAMEBUFFER WRITE L
 line 0,119,319,119,,rgb(green)
 line 159,0,159,239,,rgb(green)
 FRAMEBUFFER WRITE F
 
 do
   adc start samples!() 'get new samples
   'trigger
   c%=0
  do:If samples!(c%) > 0.1 then if samples!(c%+1) < 0.2 then exit do
inc c%:loop while c%<160

math scale samples!(),239,samples!()'scale to 240 pixel height
FRAMEBUFFER COPY L,F
for x%=0 to 319 'screen width
     line x%,samples!(x%+c%),x%+1,samples!(x%+1+c%),,rgb(magenta) 'draw new sample from sample(c%)
next x%
FRAMEBUFFER COPY F,N
loop

RUN
[13] FRAMEBUFFER LAYER L
Error : Not enough Heap memory
>
 
Posted: 07:09pm
30 Nov 2024
Copy link to clipboard
matherp
Guru

How big is a framebuffer in mode 3? Answer 150Kb. How much memory is there available? answer 180Kb. How will another 150Kb buffer fit into 30Kb of memory? - answer it won't. What error will this cause? - answer "Not enough Heap memory"
 
Posted: 09:58pm
30 Nov 2024
Copy link to clipboard
stanleyella
Guru


thanks peter, don't want to post sycophantic comments but your work has evolved pico mmbasic. star u r sir.
 
Posted: 11:19pm
30 Nov 2024
Copy link to clipboard
DaveJacko
Regular Member

Trivial I'm sure, but

can any 'civilians' (users) confirm my findings?

'option display' now seems to need the previously optional columns parameter.
(although if you don't use 80 cols, the menu don't display fully)
And maybe setpin/PWM behaviour has evolved beyond the current manual description?

regards, Dave.
 
Posted: 12:12am
01 Dec 2024
Copy link to clipboard
stanleyella
Guru


OPTION DISPLAY lines
[,chars]

Set the characteristics of the display terminal used for the console. Both
the LIST and EDIT commands need to know this information to correctly
format the text for display.
'lines' is the number of lines on the display and 'chars' is the width of the
display in characters. The default is 24 lines x 80 chars and when changed
this option will be remembered even when the power is removed.
Maximum values are 100 lines and 240chars.
This command is only available if the display is not being used as a
console by setting OPTION LCDPANEL NOCONSOLE
 
Posted: 07:41am
01 Dec 2024
Copy link to clipboard
phil99
Guru


An observation on the WebMite RC4 date at bootup.
It has changed from 01-01-2000 to 01-01-2024.

If your programs are using that to indicate a need to get NTP they will need adjusting.

Footnote added 2024-12-01 20:32 by phil99
  Quote  It has changed from 01-01-2000 to 01-01-2024.
Also applies to standard PicoMite, may well apply to all.
 
Posted: 08:26am
01 Dec 2024
Copy link to clipboard
Chopperp
Guru


Thanks Phil
Brian
 
   Page 5 of 23    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025