Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:38 24 Nov 2024 Privacy Policy
Jump to

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 : RP2350 firmware

     Page 15 of 20    
Author Message
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 04:35pm 15 Sep 2024
Copy link to clipboard 
Print this post

I've re-wired my HDMI socket, which has improved the reliability of the HDMI image in wide screen. :-)

In wide screen mode, Mode 1, using the editor, if you page up and down in the editor the syntax colouring is correct, however if you scroll the screen a line at a time the syntax colouring goes out of sync. it looks almost like the text has scrolled, but the colour highlighting has stayed where it was. If you use the editor in wide screen Mode 3 the syntax colouring is correct.

In wide screen mode, if you try to select Mode 4 (I know it doesn't exist) the Pico locks up and in my case wiped all flash and options.
Regards Kevin.
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 05:05pm 15 Sep 2024
Copy link to clipboard 
Print this post

  Bleep said  
...

In wide screen mode, if you try to select Mode 4 (I know it doesn't exist) the Pico locks up and in my case wiped all flash and options.
Regards Kevin.


I can confirm that, it happened to me too, I forgot to post it due to lack of time.

I now have the Olimex board, widescreen no longer has the blue flickering in the picture, but every 5-10sec the screen resyncs and the screen briefly goes black. It seems that the widescreen mode is not as stable as the normal 4:3.

b6:
mp3 or flac playback works, but for me only from the root directory. Otherwise I get “file not found” ?!

Matthias
Edited 2024-09-16 03:07 by homa
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 05:14pm 15 Sep 2024
Copy link to clipboard 
Print this post

This should block mode 4 in widescreen. Can't remember what else and no test environment where I am - should include the extra layer as per the VGA versions


HDMIUSB.zip
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 05:34pm 15 Sep 2024
Copy link to clipboard 
Print this post

I used a program called sd card formatter to format the sd cards then copied some files and the cards are all read on olimex 2350 hdmi, 2350 usb vga and 2350 picomite.
I think the cards were used with raspberry pi's and windows format doesn't clear them.
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 06:24pm 15 Sep 2024
Copy link to clipboard 
Print this post

  matherp said  This should block mode 4 in widescreen. Can't remember what else and no test environment where I am - should include the extra layer as per the VGA versions


HDMIUSB.zip

Hi Peter,
Thanks for the update, I confirm I can no longer select Mode 4 in wide screen, the editor syntax colouring in Mode 1 is not working, as per above report, but that can easily wait till you are back and have a proper dev environment.
Regards, Kevin.
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 06:31pm 15 Sep 2024
Copy link to clipboard 
Print this post

PS. Does this version now use your faster memcopy routine, my graphics intensive stuff seems to have speeded up slightly? :-)
Edited 2024-09-16 04:32 by Bleep
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 08:20pm 15 Sep 2024
Copy link to clipboard 
Print this post

  Quote  Does this version now use your faster memcopy routine


Yes

.syntax unified

@ High-throughput block transfer using the FPU register set as a 128-byte
@ buffer.
@
@ This implementation exploits the IT Folding feature of the Cortex-M4.
@ An IT instruction following a 16-bit Thumb instruction, when both are
@ aligned into a 32-bit memory word, takes no additional cycles to issue.
@
@ Arguments:
@  r0  source address
@  r1  destination address
@  r2  number of words to transfer.
.section .time_critical,"ax",%progbits
.balign 4
.global _Z10copy_wordsPKmPmm
.thumb_func
_Z10copy_wordsPKmPmm:
@ Name our registers.
src .req r0
dst .req r1
count .req r2
@ The caller may have been using floating point.
@ Save the callee-save portion of the register file.
vpush {s16 - s31} @ 17
@ 'Warm up' the transfer engine, which wants to operate in units of
@ 128 bytes, by making smaller transfers until count a multiple of
@ Special-case the single word transfer; the macro below won't work.
lsrs.n count, #1 @ 1
itt cs @ 0 (aligned)
vldmcs.32 src!, {s0} @ 2
vstmcs.32 dst!, {s0} @ 2
@ Transfer n+1 words.
.macro XFER n @ 5 + 2*n
lsrs.n count, #1 @ 1
itt cs @ 0 (aligned)
vldmcs.32 src!, {s0 - s\n} @ 1+1+n
vstmcs.32 dst!, {s0 - s\n} @ 1+1+n
.endm
XFER 1 @ 7
XFER 3 @ 11
XFER 7 @ 19
XFER 15 @ 35
@ Handle the case where we've been asked to transfer <32 words.
@ In such a case, count will now be zero, and the Z flag will still
@ be set from the last XFER.
@
@ Force the branch to use a 32-bit instruction to preserve alignment
@ of the loop branch below; this saves a cycle per time that branch
@ is taken.
@
@ Note that the target of this branch (at 1 below) is also aligned,
@ saving a cycle on the rare escape path.
beq.w 1f @ 1 (n.t.)
@ All warmed up, transfer in units of 128 bytes.
0: vldm.32 src!, {s0 - s31} @ 33
vstm.32 dst!, {s0 - s31} @ 33
subs.n count, #1 @ 1
bne.n 0b @ ~3 (taken)
@ Restore FPU state.
1: vpop {s16 - s31} @ 17
bx lr @ 1-3??
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 11:47am 17 Sep 2024
Copy link to clipboard 
Print this post

@Peter,

PicoMiteVGA on the 2350 using PSRAM, running 252MHz.

When you run below code all works fine

 points=10000'0
 dim a(points) as float
 adc open 100000,1
 adc start a(),,,,100,200


When you increase the array to 100000 (100k points using 800kbyte memory, thus PSRAM) the adc start causes a video (VGA) clear screen (or black screen). After the adc capture finishes, the VGA is back and usable.

As if PSRAM cache is interfering with VGA.

Volhout
Edited 2024-09-17 21:49 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 12:02pm 17 Sep 2024
Copy link to clipboard 
Print this post

Probably a limitation of the architecture. There is only one DMA device, albeit with multiple channels. I suspect this is blocking on the slow transfers to the PSRAM. Haven't got a board with PSRAM to hand so can't explore for a week or so.
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 08:38pm 17 Sep 2024
Copy link to clipboard 
Print this post

  matherp said  V6.00.00b6 for VGA and VGAUSB


PicoMiteVGARP2350.zip


Should fix a couple of bugs that Harm found

New functionality:
Optional second functional layer for mode 2
Optional second framebuffer for general use

FRAMEBUFFER LAYER TOP
FRAMEBUFFER CREATE 2

Then use T and 2 in the various copy, write commands

Try this example code (excuse the poor picture)




MODE 2
FRAMEBUFFER layer
who's harm and what bugs?
got to flash it, it's the developers next so keep up to date.
FRAMEBUFFER layer top
FRAMEBUFFER write T
'Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,10,RGB(red),R
GB(green)
FRAMEBUFFER write l
'Circle MM.HRes\2,MM.VRes\2,MM.HRes\4,10,1,RGB(blue)
,RGB(yellow)
'Text MM.HRes\2,MM.VRes\2,"MIDDLE",CM,,3,RGB(CYAN),-
1
d=1
i=0
rr=0
x=Sin(Rad(0))*40
y=Cos(Rad(0))*40
Do
FRAMEBUFFER write n
r = Rnd * 255
g = Rnd * 255
b = Rnd * 255
Circle Rnd * MM.HRes, Rnd * MM.VRes, Rnd * MM.HRes/7
,,, 0, RGB(r,g,b)
Inc rr,3
xl=x
yl=y
x=Sin(Rad(rr))*40
y=-Cos(Rad(rr))*40
FRAMEBUFFER wait
FRAMEBUFFER write l
Circle MM.HRes\2+xl,MM.VRes\2+yl,MM.HRes\6,0,1,0,0
Circle MM.HRes\2+x,MM.VRes\2+y,MM.HRes\6,10,1,RGB(bl
ue),RGB(yellow)
Text MM.HRes\2+x,MM.VRes\2+y,"MIDDLE",CM,,2,RGB(CYAN
),-1
FRAMEBUFFER write t
Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,0,0,0
Inc i,d
Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,10,RGB(red),RG
B(green)
Text i+MM.HRes/8,MM.VRes\2,"TOP",CM,,3,RGB(magenta),
RGB(green)
If i>=MM.HRes/4*3 Then d=-1
If i=0 Then d=1
Loop
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 11:23pm 17 Sep 2024
Copy link to clipboard 
Print this post

usb vga pico2 and there's mode 3 ?? using bubble universe to test, what res is mode 3?
more amazing stuff un noticed?
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 11:31pm 17 Sep 2024
Copy link to clipboard 
Print this post

6] GB(green)
Error : Unknown command



  matherp said  V6.00.00b6 for VGA and VGAUSB


PicoMiteVGARP2350.zip


Should fix a couple of bugs that Harm found

New functionality:
Optional second functional layer for mode 2
Optional second framebuffer for general use

FRAMEBUFFER LAYER TOP
FRAMEBUFFER CREATE 2

Then use T and 2 in the various copy, write commands

Try this example code (excuse the poor picture)




MODE 2
FRAMEBUFFER layer
FRAMEBUFFER layer top
FRAMEBUFFER write T
'Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,10,RGB(red),R
GB(green)
FRAMEBUFFER write l
'Circle MM.HRes\2,MM.VRes\2,MM.HRes\4,10,1,RGB(blue)
,RGB(yellow)
'Text MM.HRes\2,MM.VRes\2,"MIDDLE",CM,,3,RGB(CYAN),-
1
d=1
i=0
rr=0
x=Sin(Rad(0))*40
y=Cos(Rad(0))*40
Do
FRAMEBUFFER write n
r = Rnd * 255
g = Rnd * 255
b = Rnd * 255
Circle Rnd * MM.HRes, Rnd * MM.VRes, Rnd * MM.HRes/7
,,, 0, RGB(r,g,b)
Inc rr,3
xl=x
yl=y
x=Sin(Rad(rr))*40
y=-Cos(Rad(rr))*40
FRAMEBUFFER wait
FRAMEBUFFER write l
Circle MM.HRes\2+xl,MM.VRes\2+yl,MM.HRes\6,0,1,0,0
Circle MM.HRes\2+x,MM.VRes\2+y,MM.HRes\6,10,1,RGB(bl
ue),RGB(yellow)
Text MM.HRes\2+x,MM.VRes\2+y,"MIDDLE",CM,,2,RGB(CYAN
),-1
FRAMEBUFFER write t
Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,0,0,0
Inc i,d
Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,10,RGB(red),RG
B(green)
Text i+MM.HRes/8,MM.VRes\2,"TOP",CM,,3,RGB(magenta),
RGB(green)
If i>=MM.HRes/4*3 Then d=-1
If i=0 Then d=1
Loop
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 12:12am 18 Sep 2024
Copy link to clipboard 
Print this post

using usb vga what is mode 3? is it like mode 3 hdmi?
it gives the same no memory using rocks 13 sound.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 08:25am 18 Sep 2024
Copy link to clipboard 
Print this post

  Quote  using usb vga what is mode 3? is it like mode 3 hdmi?


Yes: 640x480x16-colours
Therefore a framebuffer uses 150Kbytes. Therefore is is likely to be incompatible with any other high memory usage program requirements
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 11:04am 18 Sep 2024
Copy link to clipboard 
Print this post

Latest betas:


PicoMiteRP2350V6.00.00b6.zip
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 02:20pm 18 Sep 2024
Copy link to clipboard 
Print this post

used the picomitevgausbrp2350v6.00.00b6.uf2 from your latest betas.
but copied the existing option list to notepad and saved before.
after flashing option list was the same as notepad.
so do I use flash_nuke before I flash latest beta or has it flashed it already?
is it like hdmi olimex where it sets the options
this is before and after flashing latest
> option list
PicoMiteVGA MMBasic USB Edition  6.00.00b6
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD UK
OPTION CPUSPEED (KHz) 378000
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION AUDIO GP0,GP1', ON PWM CHANNEL 0
OPTION MODBUFF ENABLE  192
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 02:48pm 18 Sep 2024
Copy link to clipboard 
Print this post

ok after using flash_nuke and flashing latest get
> option list
PicoMiteVGA MMBasic USB Edition  6.00.00b6
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 252000
>
second time this happened so flash_clear or flash_nuke before flashing new firmware as it's happened to other users
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 03:09pm 18 Sep 2024
Copy link to clipboard 
Print this post

mode 3 is so brill. higher res than hdmi mode 3.
using bubble2350 as a test it looks great on mode 3 vga.
think I be spending more time on my usb vga now. it's got the mmb filter and sounds better than olimex but mod files? do I remove the option and gain memory for graphics?
> option list
PicoMiteVGA MMBasic USB Edition  6.00.00b6
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD UK
OPTION CPUSPEED (KHz) 378000
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION AUDIO GP0,GP1', ON PWM CHANNEL 0
OPTION MODBUFF ENABLE  192
Edited 2024-09-19 01:11 by stanleyella
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 03:33pm 18 Sep 2024
Copy link to clipboard 
Print this post

  Quote  6] GB(green)
Error : Unknown command


The listing had some line wraps - try this

MODE 2
FRAMEBUFFER layer
FRAMEBUFFER layer top
FRAMEBUFFER write T
'Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,10,RGB(red),RGB(green)
FRAMEBUFFER write l
'Circle MM.HRes\2,MM.VRes\2,MM.HRes\4,10,1,RGB(blue),RGB(yellow)
'Text MM.HRes\2,MM.VRes\2,"MIDDLE",CM,,3,RGB(CYAN),-1
d=1
i=0
rr=0
x=Sin(Rad(0))*40
y=Cos(Rad(0))*40
Do
FRAMEBUFFER write n
r = Rnd * 255
g = Rnd * 255
b = Rnd * 255
Circle Rnd * MM.HRes, Rnd * MM.VRes, Rnd * MM.HRes/7,,, 0, RGB(r,g,b)
Inc rr,3
xl=x
yl=y
x=Sin(Rad(rr))*40
y=-Cos(Rad(rr))*40
FRAMEBUFFER wait
FRAMEBUFFER write l
Circle MM.HRes\2+xl,MM.VRes\2+yl,MM.HRes\6,0,1,0,0
Circle MM.HRes\2+x,MM.VRes\2+y,MM.HRes\6,10,1,RGB(blue),RGB(yellow)
Text MM.HRes\2+x,MM.VRes\2+y,"MIDDLE",CM,,2,RGB(CYAN),-1
FRAMEBUFFER write t
Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,0,0,0
Inc i,d
Box i,MM.VRes\6*2,MM.HRes\4,MM.VRes\3,10,RGB(red),RGB(green)
Text i+MM.HRes/8,MM.VRes\2,"TOP",CM,,3,RGB(magenta),RGB(green)
If i>=MM.HRes/4*3 Then d=-1
If i=0 Then d=1
Loop
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 03:40pm 18 Sep 2024
Copy link to clipboard 
Print this post

olimex was simple to get hdmi mode 3. that was it's only advantage over vga until now that there's vga mode 3. no need for olimex? a cunning plan
 
     Page 15 of 20    
Print this page
© JAQ Software 2024