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 : PicoMite V6.00.01 release candidates - please test thoroughly
Page 18 of 20 | |||||
Author | Message | ||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 296 |
PicoMiteHDMI MMBasic RP2350A Edition V6.00.01RC9 Does not allow arrays to occupy more than 180k of RAM memory, although there are still 48k left. If exceeded, it gives an error Error : Not enough Heap memory @Volhout Compared the speeds of linear filling, copying and checking of array values, 128 fragments of 1K bytes with a regular SRAM and an external PRAM - the speeds are absolutely comparable! @matherp When changing the HDMI video mode resolution from 640 to 1024, the system with the connected PSRAM froze. Perhaps some initial check and blocking of the use of external PSRAM system is still necessary. Edited 2024-12-20 07:00 by javavi |
||||
ville56 Senior Member Joined: 08/06/2022 Location: AustriaPosts: 118 |
strange things happens .... > print fnam test.bas > edit fnam Error : Expected a string > print fnam 0 > Version V6.00.01RC9 on Webmite fnam is DIMed as string, prints as such before "EDIT fnam" but after that it prints as "0" and the datatype is definitely numeric. I don't know what i'm doing wrong. Maybe christmas preparations for the grandkids are stirring up my brain ... 73 de OE1HGA, Gerald |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2178 |
I think what is happening is Edit needs a lot of memory so it uses the Variables space. That erases all previous variables so you need to re "Dim String fnam" after editing. Edit Or change it to fnam$. That will give the correct type though it will be empty after Edit. Edited 2024-12-20 07:23 by phil99 |
||||
ville56 Senior Member Joined: 08/06/2022 Location: AustriaPosts: 118 |
By reading the manual I got a bit wiser. EDIT clears the variables, appearently before invoking EDIT, whereas EDIT FILE does not clear variables. So the manual is incosistent as it says EDIT fname$ is a valid construct. It is not, as at the time EDIT is invoked, fname$ is alread empty and the resulting file is ".bas", if saved. Not really useful, at least IMHO. 73 de OE1HGA, Gerald |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 916 |
A trivial one. MATH.C function parseintegerarray() integer point array in lieu of integer array in the error message. if(dimensions==1 && (dims[0]<=0 || dims[1]>0))error("Argument % must be a 1D integer point array",argno); if(dimensions==2 && (dims[0]<=0 || dims[1]<=0 || dims[2]>0))error("Argument % must be a 2D integer point array",argno); Latest F4 Latest H7 |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
The message is correct. Heap memory is full. Variable space for simple variables consumes the other 48K yes it is, but not in a program edit "myfile.bas" is an example of fname$ as a literal No: because properly implemented PSRAM will probably work. The fact that Pimoroni got it wrong doesn't mean it is wrong |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 431 |
Hi I can't use "freepins" command |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 916 |
FreePins is not an inbuilt MMBasic command. It is a small MMBasic program/SUB which you could place in the Library if you want it as a tool. > list Sub FreePins Local n,gp$,p,pu$ For n = 0 To 29 gp$ = "GP" + Str$((n),2) p = MM.Info(pinno gp$) pu$ = MM.Info(pin p) Print gp$,Str$((p),2),pu$ Next End Sub Latest F4 Latest H7 |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2178 |
Freepins is a subroutine, not an inbuilt command. Edit. Too slow! Edited 2024-12-20 13:24 by phil99 |
||||
goc30 Guru Joined: 12/04/2017 Location: FrancePosts: 431 |
thank and Joyeux Noel Edited 2024-12-20 13:48 by goc30 |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 166 |
Harm, Thanks for the SUB and LIBRARY SAVE. Merry Christmas everyone and a productive new hobby year. RP2040-Geek freepins.pdf Greetings, Jan. |
||||
Mark Regular Member Joined: 26/11/2022 Location: United StatesPosts: 50 |
I appreciate all the work that everyone is doing on the V6 release. I just started testing with a Pico 2. Other than links in messages this thread, is there a site where the latest release candidates can be found? In one of the early posts this thread, a list of tested compatible software was given: Is there a place where these (and other) programs can be downloaded? Thanks, Mark |
||||
Mark Regular Member Joined: 26/11/2022 Location: United StatesPosts: 50 |
I've done some testing with PicoMiteRP2350VGAV6.00.01RC9.uf2 and this appears repeatable. I cleared the flash using flash_nuke.uf2 then loaded PicoMiteRP2350VGAV6.00.01RC9.uf2 I have the blocks.bas game at b:\examples\blocks.bas on a SD card. I am using the land-boards PiPicoMite03 boards I set up my options option system i2c gp14,gp15 option colourcode on option sdcard gp13,gp10,gp11,gp12 option audio gp6,gp7 option rtc auto enable then I try to copy blocks.bas to flash slot 1 flash disk load, 1 "b:/examples/blocks.bas" if I do flash list it shows slot 1 is in use if I do flash load 1 or flash run 1 The screen briefly displays a message that I think starts with Invalid address, then the PicoMite goes into an endless reboot cycle, requiring re-flashing. Also, FWIW, a couple of times in my testing, but not every time, after issuing the option audio gp6, gp7 line, the screen prompt returns, but the PicoMite doesn't respond to the keyboard. I have to cycle the power to get the keyboard to work. Thanks, Mark |
||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 379 |
Questions about the new MATH AES128 command My test: > list 'TEST aes128 cbc ' out$ = "" key$ = "1234567812345678" in$ = "1234567890123456" ' Math aes128 encrypt cbc key$,in$,out$ Print out$ > run >ЖCПфdоk > The string input can be ASCII, there is no padding and the correct length must be used. But why is the length OUT so short and does not match the HEX output as on the website https://www.devglan.com/online-tools/aes-encryption-decryption ? Or should the string also be given in hex? And is there a BASIC command for base64 conversion? Matthias Footnote added 2024-12-21 03:55 by homa > list 'TEST aes128 cbc ' Dim integer out2(15) out$ = "" key$ = "1234567812345678" in$ = "1234567890123456" ' Math aes128 encrypt cbc key$,in$,out2() Math v_print out2(), hex 'Print out$ > run 5E, 62, B3, 27, 61, C7, 64, DE, 85, 6B, D, 3E, B6, 43, BF, E4 > Only 16 bytes? Dim integer out2(31) gives me an error?! |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1306 |
Hi Homa, In$ and out$ can of course be strings and up to 240 characters long. Best regards Michael The output should have the same length as the input. Maybe not all of them are printable characters? Edited 2024-12-21 04:16 by twofingers causality ≠ correlation ≠ coincidence |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
So many thing wrong You haven't set an initialisation vector and they seem to be assuming all zeroes - I don't Trying to print out$ can't work as it contains non-printable values. You would have to take each element in turn and HES$(asc(mid$( it And then somehow you have got the website to create a 32 byte output from a 16 byte input My way works Edited 2024-12-21 04:17 by matherp |
||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 379 |
You are right, my first entry on the website was two characters too long. Here is the correct test1: > list 'TEST aes128 cbc ' Dim integer out2(15) out$ = "" key$ = "1234567812345678" in$ = "1234567890123456" iv$ = "1234567812345678" ' Math aes128 encrypt cbc key$,in$,out2(),iv$ Math v_print out2(), hex 'Print out$ > run 5F, C4, 67, 35, E4, 67, 8E, AD, 96, 74, 7B, 30, DC, 33, CF, F4 > But I don't understand this: > list 'TEST aes128 cbc ' Dim integer out2(15) out$ = "" key$ = "1234567812345678" in$ = "1234567890123456" iv$ = "1234567812345678" ' Math aes128 encrypt cbc key$,in$,out2() ',iv$ Math v_print out2(), hex 'Print out$ > run 5E, 62, B3, 27, 61, C7, 64, DE, 85, 6B, D, 3E, B6, 43, BF, E4 > On the website: Enter IV (optional) inizialisation vector And your description: For CBC and CTR versions you can optionally specify an initiallisation vector ‘iv’. ‘iv’ must be 16 elements long (16*8=128bits) Why is iv supposedly optional if it is required? Is there a default value that might be missing? Matthias |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
iv is optional because the firmware has a value built in but it isn't all zeroes as that website assumes. To match the website you have to specify it as all zeroes to override the internal default. Dimming an array iv% sets it to zeroes Edited 2024-12-21 04:40 by matherp |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1306 |
Hi Homa, BTW I have a demo program for AES128 (encryption/decryption) for files almost ready. Maybe that will help. Regards Michael causality ≠ correlation ≠ coincidence |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4343 |
All, About PSRAM there are rumours it is similar speed as normal RAM. Please see below test run on a Pimoroni Pico Plus 2 with PSRAM. It has the RP2350B 80 pin chip on board. Firmware is the 6.00.01rc9. First a test with PSRAM not enabled. Filling 6.4 kbyte array (800 cells at 8 byte each). The size is chosen such that it fits in RAM, but also fits in PSRAM cache. Then the same test with PSRAM enabled. You can see the speed is identical. Finally a test where 1000x more data is filled (6.4 Mbyte). The speed is only 7% of the speed when not exceeding cache (14 times slower). So there is a speed penalty. -------------- Pimoroni Pico Plus 2 --------------- ----- PSRAM not enabled > option list PicoMite MMBasic RP2350B Edition V6.00.01RC9 OPTION FLASH SIZE 16777216 OPTION PICO OFF OPTION CPUSPEED 150000 'KHz > list 'test for memory fill in RAM and PSRAM multi%=1 'or 1000 size%=800*multi% 'array size (8 byte per cell) testtime=10*1000 '10 seconds dim arry%(size%) timer=0 : n%=0 do math set n%,arry%() inc n% loop until timer>testtime print "write speed = ";multi%*n%/10;" matrix fills per second" > run write speed = 6762.9 matrix fills per second ------- PSRAM enabled, but data fits in normal RAM > option list PicoMite MMBasic RP2350B Edition V6.00.01RC9 OPTION FLASH SIZE 16777216 OPTION PICO OFF OPTION CPUSPEED 150000 'KHz OPTION PSRAM PIN GP47 > list 'test for memory fill in RAM and PSRAM multi%=1 'or 1000 size%=800*multi% 'array size (8 byte per cell) testtime=10*1000 '10 seconds dim arry%(size%) timer=0 : n%=0 do math set n%,arry%() inc n% loop until timer>testtime print "write speed = ";multi%*n%/10;" matrix fills per second" > run write speed = 6762.9 matrix fills per second ------- Test uses more data, so PSRAM is used > option list PicoMite MMBasic RP2350B Edition V6.00.01RC9 OPTION FLASH SIZE 16777216 OPTION PICO OFF OPTION CPUSPEED 150000 'KHz OPTION PSRAM PIN GP47 > list 'test for memory fill in RAM and PSRAM multi%=1000 'or 1000 size%=800*multi% 'array size (8 byte per cell) testtime=10*1000 '10 seconds Dim arry%(size%) Timer =0 : n%=0 Do Math set n%,arry%() Inc n% Loop Until Timer>testtime Print "write speed = ";multi%*n%/10;" matrix fills per second" >RUN write speed = 500 matrix fills per second Volhout P.S. MATH SET is used as a way to abstract data management as much as possible from the speed of the MMBASIC interpreter. FOR-NEXT and individual writes would have made the difference less clear. Edited 2024-12-21 05:23 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Page 18 of 20 |
Print this page |