|
Forum Index : Microcontroller and PC projects : Unix on the Pico Computer 3
| Author | Message | ||||
| JanVolk Guru Joined: 28/01/2023 Location: NetherlandsPosts: 405 |
It works. Now using a board with an RP2350B, 16MB of flash, and 8MB of PSRAM. I can now test Peter's latest firmware. > option list PicoMite MMBasic RP2350B V6.03.01 OPTION SYSTEM I2C GP4,GP5 OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION PICO OFF OPTION CPUSPEED (KHz) 200000 OPTION DISPLAY 51, 100 OPTION F1 help OPTION F5 list commands OPTION F6 list functions OPTION F7 list pins OPTION F9 fm OPTION PLATFORM WeAct-RP2350B-FLASH:16-PSRAM:8 OPTION PSRAM PIN GP47 > memory Program: 0K ( 0%) Program (0 lines) 300K (100%) Free Saved Variables: 16K (100%) Free RAM: 0K ( 0%) 0 Variables 0K ( 0%) General 6491K (100%) Free > help ram ' Ram RP2350 alleen met PSRAM ingeschakeld. CSpin RAM = GP0, GP8, GP19 of GP47 Ram LIST Ram LIST nr [,all] Ram ERASE nr Ram ERASE ALL Ram SAVE nr Ram LOAD nr Ram RUN nr Ram CHAIN nr Ram OVERWRITE nr Ram FILE LOAD nr, fname$ [,O[VERWRITE]] > ram list RAM Slot 1 available RAM Slot 2 available RAM Slot 3 available RAM Slot 4 available RAM Slot 5 available > Jan. |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
Hi Peter, I've found the reason I'm having problems with mmedit, it works perfectly if you use a terminal (TeraTerm) but if you use it native with USB keyboard and HDMI screen, F3 doesn't search, Escape locks up, and editing in Mode 2 doesn't work. Here is the pure Basic version of Bubble, I had to remove the pack/unpack and Peek, and it would have been nice to have Slice, but I've done that in a loop, which now it's compiled I susspect is just as fast. It's not quite as fast as your Bubble on Steroids, but considering it is all just compiled MMBasic, with no CSubs, it holds its own. :-) 85mS for 10000 pixel plots. I think the CSub version was 70mS for 12936 pixel plots. This should run on a standard Picomite HDMI if someone wants to do a speed comparison, I don't currently have a easily functioning one. ' Bubble Universe MODE 2 'MODE 3 Font 8 FRAMEBUFFER create FRAMEBUFFER write f Dim Float u(99),w(99),p,q,t,v=0,x=0,b Dim Integer n(99),m(9,99),xc,yc,xs,ys Dim Integer a,g,i,j Const r=(2*Pi)/235,k=255,s=50 CLS RGB(black) t=Rnd*10 't=1 'calculate centre and scale factor xc=MM.HRES\2:yc=MM.VRES\2 xs=MM.HRES/4.2:ys=MM.VRES/4.2 'Oval 'xs=MM.HRes/6:ys=MM.VRes/4 'Circular For a=0 To 99 Step 10 For g=0 To 99 If a<25 And g<38 Then If a<15 Then:m(a\10,g)=RGB(0,255,0):Else:m(a\10,g)=RGB(255,255,0):EndIf Else m(a\10,g)=RGB(a*2.575,g*2.575,128*(a+g<65)) EndIf Next 'g ' Memory pack nn, Peek(varaddr m(0,a)),100,32 'pack pixel colours Next 'a Do CLS Inc t,0.015:g=0:Print @(10,10)Timer:Timer=0 For i=57To 255Step 2 b=r*i+t For j=0To 99 u(j)=Sin(i+v)+Sin(x) v=Cos(i+v)+Cos(x) x=u(j)+b w(j)=v If Not(g Mod 10) Then n(j)=m(g\10,j)'copy from colour map Next 'j Math Scale u(),xs,u():Math Scale w(),ys,w() Math add u(),xc,u():Math Add w(),yc,w() 'Memory unpack Peek(varaddr m(0,g)),nn,100,32 'unpack pixel colours Pixel u(),w(),n() Inc g Next 'i FRAMEBUFFER copy f,n',b Loop Until Inkey$ <> "" ' Mode 1 End Here is starfield, plotting 2000 pixels in 25mS, you can change the number of pixels by changing maxst. 'Starfield ' MODE 2 'change maxst for more or fewer stars Const maxst=2000 Dim Integer h=MM.VRES,w=MM.HRES,x,y,st,c Dim Float f,stx(maxst),stxx(maxst),sty(maxst),styy(maxst),stz(maxst) Dim Integer ox(maxst),oy(maxst),cl(maxst) FRAMEBUFFER create FRAMEBUFFER write f CLS 'initialise the stars For st=0 To maxst stxx(st)=(Rnd*w>>1)-(w>>2):styy(st)=(Rnd*h>>1)-(h>>2) stz(st)=Int(Rnd*5+5)/10 cl(st)=RGB(White) Next Do Cls 'move stars forward Math Add stz(),-0.025,stz() 'do the calculation (stx/stz)+half width 'do the calculation (sty/stz)+half height For st=0 to maxst stx(st)=stxx(st)/stz(st)'Math C_div stxx(),stz(),stx(): sty(st)=styy(st)/stz(st)'Math C_div styy(),stz(),sty(): Next Math Add stx(),w>>1,stx() Math Add sty(),h>>1,sty() 'reset rouge stars 'Inc c:c=c*(c<=maxst) Inc c:If c>maxst Then c=0 'stx(c)=stx(c)*(stz(c)>0.1) If stz(c)<0 Then stx(c)=0 'loop for all stars 'set star colour and check for star off screen For st=0 To maxst x=stx(st):y=sty(st) Select Case stz(st) Case < 0.2 cl(st)=RGB(Yellow) Case < 0.6 cl(st)=RGB(White) Case < 0.8 cl(st)=RGB(Cyan) Case Else cl(st)=RGB(Blue) End Select If (x>0 And x<w And y>0 And y<h)Then ox(st)=x:oy(st)=y Else Inc f,0.025:If f>0.09 Then f=0 stxx(st)=(Rnd*w>>1)-(w>>2) styy(st)=(Rnd*h>>1)-(h>>2) stz(st)=Int(Rnd*5+5)/10+f EndIf Next Pixel ox(),oy(),cl() Print @(10,10)Timer:Timer =0 FRAMEBUFFER copy f,n',b Loop Until Inkey$ <> "" Mode 1 End |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
I've fixed the mmedit issue. USB keyboard was sending lf rather than cr. Fix will be in 0.10 later today. More work on performance at the moment grainbench up to over 51000 and solar eclipse down to 2.11s Edited 2026-08-08 22:28 by matherp |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
Ah, I wonder if that will also cure the scrolling in Vi? I've found that the above programs slow down after a time, Bubble after a reboot gives 85mS but after doing a bit of editing & compiling it drops to 98mS? is this to be expected, maybe using up ram and so using slower PSRam instead? |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
V0.10 now available at https://github.com/UKTailwind/Pico-Computer-3/releases/tag/Pico_Computer_3_V3.1 This version takes the performance of the C compiler/runtime about as far as it can realistically go and the MMbasic transpiler is reworked to optimise compiler usage. In addition more MMbasic functionality is now supported. A demo is now available at https://youtu.be/2pOhOD8-ozI |
||||
| EDNEDN Guru Joined: 18/02/2023 Location: United StatesPosts: 306 |
Can the entire build of this software be built on the Pico_Computer_3 currently? It would be really cool if that is the case. I would probably run out and get a Pico_Computer_3 and a big SD-Card for it. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
No, it is cross compiled |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2056 |
Congrats Pete. Absolutely fantastic ![]() Can we still handle PID? |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
I believe the link Peter has provided is for the latest update for the Pico 3 board. The link you need is below. Fuzix V0.10 |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2056 |
Oh I have been following but the issue of ISRs is a bit vague. I can write a PID but do I need to? |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
Hi Peter, Very nice improvements mmedit working great stand alone (USB keyboard & HDMI screen) also looks to be a decent speed improvement, depending on program, anywhere from not much, to about 16% faster. :-) I'll look forward to seeing what new features you add to the compiled MMBasic in due course. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
PID in the way MMbasic does it would be limited to 5mSec cycle time as that is the clock resolution of Fuzix. As a straight forward program it could be as fast as you like and it would be trivial for an AI to write it in either MMbasic or direct in C. The next release of the firmware will have the various pin control mechanisms you would need. |
||||
| ebbandflow Regular Member Joined: 31/08/2023 Location: United StatesPosts: 59 |
Well this is fun! I have been exploring v.10 and it's exciting to have an MMBasic to C translator and compiler... Reading it's output acts as a Rosetta stone to help me learn some C, and the way the editor highlights valid code makes the process smooth. Looking forward to learning more. Thanks for the opportunity Peter! |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
V0.11 https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.11 Check the release notes for details |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2056 |
Nice |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2056 |
Darned impressive Many thanks. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
V0.12 https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.12 Check the release notes for details New demo Edited 2026-08-12 17:37 by matherp |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 713 |
I have two Pico Computer 3s and, on both, FUZIX crashes constantly when using the HDMI display and USB keyboard. Both work flawlessly when I connect to the serial port. Examples of malfunction: If the machine locks up and I press reset, the USB keyboard no longer functions. I need to power cycle the machine. Occasionally they'll run a few programs (I run compiled MMBasic) before either simply locking up or displaying an infinite number of the last character typed requiring a power reset. Version 11 worked better than version 12 on my units. I tried several USB keyboards on both Picos and the same things happen no matter what combo I use. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
Thanks for the report - will look at it |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
Hi Peter, I realise this is a long shot, but I got a couple of cheap Spanish Raspbery Pi keyboards, which work fine on a PicoMite if I set the keyboard to Spanish, but on Fuzix the AltGr key is not giving the correct characters, (any characters) when I set kbd to es, see image, curley brackets are particularly useful in C. :-( Is there any chance of a fix? Thanks. ![]() Regards Kevin. Edited 2026-08-14 01:08 by Bleep |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |