![]() |
Forum Index : Microcontroller and PC projects : Is this too silly for MMBasic or is it useful?
![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Have a play with this and see what you think - VGA only for test PicoMiteVGA.zip for normal string input and quoted DATA statements (but not unquoted DATA strings) Implements e.g. s$="\qHello world\q" Edited 2023-03-09 20:10 by matherp |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
I think this is a much-needed feature however implemented (and however broadly implemented across MMBasic platforms). The "\" option immediately above looks good to me. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
Hi Peter, Yes please I like this feature. :-) Using the above install I'm getting an "Error : Not enough memory" after running a small mode 2 program, and then going into edit it. PicoMiteVGA MMBasic Version 5.07.07b26 OPTION SYSTEM I2C GP22,GP15 OPTION COLOURCODE ON OPTION KEYBOARD UK OPTION DISPLAY 30, 53 OPTION SDCARD GP5, GP2, GP3, GP4 OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3 OPTION RTC AUTO ENABLE OPTION DEFAULT FONT 7, 1 > memory Program: 1K ( 0%) Program (35 lines) 97K (100%) Free RAM: 0K ( 0%) 0 Variables 2K ( 1%) General 124K (99%) Free > edit Error : Not enough memory > clear > EDIT Error : Not enough memory If I then change to mode 1 edit works fine, Any ideas? Regards, Kevin. Edited 2023-03-10 20:37 by Bleep |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Need more info - program? Can't replicate with trivial test |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
' Bubble Universe MODE 2 Dim Float u,a,p,q,t,v=0, x=0 Dim Integer g,b,i,j,c(51),d(51),e(51),n(51),nn Dim Integer f(13,41),l(13,41),m(26,41),dd,cc Const w=MM.HRes/2, h=MM.VRes/2 Const r=(2*Pi)/235, o=h/2 CLS RGB(black) t=Rnd*10:Math set 1,e() t=1 nn=Peek(varaddr n()) dd=Peek(varaddr d()) cc=Peek(varaddr c()) For g=0 To 41 For b=0 To 51 n(b)=RGB(g*6,b*5,128*(g+b>30)*(g+b<60)) If g<26 And b<13 Then n(b)=RGB(0,128,0) Next Memory pack nn, Peek(varaddr m(0,g)),52,32 Next g Do Inc t,0.01:g=0':Print Timer:Timer =0 For i=50 To 255 Step 5 b=0:a=r*i Memory unpack Peek(varaddr f(0,g)),cc,52,16 Memory unpack Peek(varaddr l(0,g)),dd,52,16 Box c(),d(),e(),e(),0,,0 For j=50 To 255 Step 4:u=Sin(i+v)+Sin(a+x):v=Cos(i+v)+Cos(a+x):x=u+t:c(b)=w+u*o:d(b)=h+v*o:Inc b:Next Memory unpack Peek(varaddr m(0,g)),nn,52,32:Box c(),d(),e(),e(),0,,n() Memory pack cc,Peek(varaddr f(0,g)),52,16 Memory pack dd,Peek(varaddr l(0,g)),52,16 Inc g Next i Loop |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Still works for me after running your program |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
Hi Peter, Just done a flash wipe & re install, I then put all the options back as above, loaded the same program from the SD card, ran it, ctrl-C out F4 to edit and am still getting the Error : Not enough memory If I go to mode 1 and then edit works fine, but then going back to mode 2 and then edit same error. Was going to try resetting all options then re-introduce them 1 at a time, but doing option reset locks up the Pico. powering off and on and they are still all there. So did a flash wipe and re install. didn't put any options back and it happened. So all I have now is PicoMiteVGA MMBasic Version 5.07.07b26 OPTION KEYBOARD US OPTION DISPLAY 20, 40 > > RUN (Ctrl-C out) > EDIT Error : Not enough memory This is the program, even smaller. 'mandelbrot ' 'inspired by Matt Heffernan s 8-BIT BATTLE 'https://www.youtube.com/watch?v=DC5wi6iv9io 'for PicoMite is a Raspberry Pi Pico running the free MMBasic interpreter. '2022 by M. Herhaus '2022 adaptation for picomiteVGA by Volhout ' 'clear screen, home and cursor off Dim Integer DX,DY,py,px,i Dim Float p,q,x,y,xy,xz,xt MODE 2 CLS 'read colours Dim color(15) For i=0 To 15 Read color(i) Next i 'MANDELBROT Timer =0 ' max x and max y DX=32:DY=22 For py=0 To DY-1 For px=0 To DX-1 xz=px*3.5/DX-2.5 yz=py*2/DY-1 x=0 y=0 For i=0To 14 p=x*x: q=y*y: If p+q>4 Then Exit For y=2*x*y+yz: x=p-q+xz Next Box px*10,py*10,10,10,1,0,color(i) Next Next Print @(10,230) "time = ";Timer; Do :Loop While Inkey$="" End 'indexing the colors Data RGB(white),RGB(yellow),RGB(lilac),RGB(brown),RGB(fuchsia),RGB(rust) Data RGB(magenta),RGB(red),RGB(cyan),RGB(green),RGB(cerulean),RGB(midgreen) Data RGB(cobalt),RGB(myrtle),RGB(blue),RGB(black) I have no idea why you can't reproduce, are you using the same zip file installation from the top of this page? Hopefully you can reproduce now. Regards, Kevin. Edited 2023-03-11 01:39 by Bleep |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
How are you getting this? There is something you aren't telling me Try this although I'm not aware I have made any relevant changes PicoMiteVGA.zip Edited 2023-03-11 03:55 by matherp |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
Hi Peter, Honest I'm not, that option appears when I or a program sets mode 2. > option list PicoMiteVGA MMBasic Version 5.07.07b26 OPTION KEYBOARD US > mode 1 > option list PicoMiteVGA MMBasic Version 5.07.07b26 OPTION KEYBOARD US > mode 2 > option list PicoMiteVGA MMBasic Version 5.07.07b26 OPTION KEYBOARD US OPTION DISPLAY 20, 40 > I'll try the new one, probably tomorrow now. Regards, Kevin. |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
Hi Peter, Ok the new zip does not give me the not enough memory error, but I do still get the OPTION DISPLAY 20, 40 when using mode 2. > option list PicoMiteVGA MMBasic Version 5.07.07b26 OPTION SYSTEM I2C GP22,GP15 OPTION COLOURCODE ON OPTION KEYBOARD UK OPTION SDCARD GP5, GP2, GP3, GP4 OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3 OPTION RTC AUTO ENABLE > mode 2 > option list PicoMiteVGA MMBasic Version 5.07.07b26 OPTION SYSTEM I2C GP22,GP15 OPTION COLOURCODE ON OPTION KEYBOARD UK OPTION DISPLAY 20, 40 OPTION SDCARD GP5, GP2, GP3, GP4 OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3 OPTION RTC AUTO ENABLE I'm fairly certain it has always done this, certainly when I set OPTION LCDPANEL CONSOLE 7 I then get different Option displays, like OPTION DISPLAY 30, 53 in Mode 2 and OPTION DISPLAY 60, 106 in mode 1. Thanks Kevin. Edited 2023-03-11 08:35 by Bleep |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2642 |
+1 |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |