![]() |
Forum Index : Microcontroller and PC projects : Having fun with PSRAM
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10232 |
![]() Ram slots in memory (just like flash slots) but with the ability to load and run programs from within another program with or without the variable space being preserved. NB: 6.00.02 will also have a CHAIN command for all versions Edited 2025-01-13 05:44 by matherp |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7857 |
Lol! You just don't know when to stop, do you Peter? ;) Very nice..... Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
cosmic frog Guru ![]() Joined: 09/02/2012 Location: United KingdomPosts: 302 |
I knew I shouldn't have printed out the latest manual just yet! 😆 Dave. |
||||
javavi![]() Guru ![]() Joined: 01/10/2023 Location: UkrainePosts: 459 |
This is an important development in the use of a large volume of PSRAM for PicoMite on RP2350A/B chips! Interesting! Is it possible to organize color video modes for high HDMI resolutions when PSRAM is connected? 1024x768 x16 colors = 384kB 1280x720 x16 colors = 450kB In this case, the internal memory of the RP2350 should be given over to video memory, and the variable area should be moved to the PSRAM. |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5056 |
Peter, When 6.00.02 is developing, it would be very nice to have the PIO assembler work for individual state machines. You explained the current implementation does not allow it, but it would increase the value of the assembler when a workable solution could be found that avoids manual copying of hex values. Just give it a thought... Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10232 |
Did you try my suggestion of having two separate blocks of compilation in the program? No: It would have to be separate images specifically for PSRAM and we have more than enough already Edited 2025-01-13 18:38 by matherp |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5056 |
Hi Peter, I think this is your suggestion. 'test for PIO assembler 'for state machine 1 PIO ASSEMBLE 1,".program test" PIO ASSEMBLE 1,".line 0" PIO ASSEMBLE 1,".wrap target" PIO ASSEMBLE 1,"SET PINS,1" PIO ASSEMBLE 1,"JMP X-- 1" PIO ASSEMBLE 1,"PUSH" PIO ASSEMBLE 1,".wrap" Print Pio(.WRAP),Pio(.WRAP TARGET) 'for state machine 2 PIO ASSEMBLE 1,".wrap target" PIO ASSEMBLE 1,"SET PINS,2" PIO ASSEMBLE 1,"PULL" PIO ASSEMBLE 1,".wrap" Print Pio(.WRAP),Pio(.WRAP TARGET) 'done... list the program PIO ASSEMBLE 1,".end program list" But that does not work... > run 2 Â Â Â 0 [15] PIO ASSEMBLE 1,".wrap target" Error : Repeat directive But this is not all. The assembler also does not allow different number fo side set pins per state machine. (".side set 2"). So for a more complex PIO program you have to have different MMBasic programs, each husing the PIO assembler, then (on the console terminal screen) type the LIST hex codes into a 3'rd program, in an array. And manually count the .wrap and .wrap target addresses. That is quite a lot of work. (not far of manual assembly). Volhout Edited 2025-01-13 20:01 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10232 |
No: Two complete "program" , "end program" sections with different .line |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5056 |
Hi Peter, That almost works. The only problem is that you need to calculate the new ".line x" for each state machine. But that is a no brainer. Problem 99% solved. 'test for PIO assembler 'for state machine 1 PIO ASSEMBLE 1,".program test" PIO ASSEMBLE 1,".line 0" PIO ASSEMBLE 1,".wrap target" PIO ASSEMBLE 1,"SET PINS,1" PIO ASSEMBLE 1,"JMP X-- 1" PIO ASSEMBLE 1,"PUSH" PIO ASSEMBLE 1,".wrap" PIO ASSEMBLE 1,".end program list" Print Pio(.WRAP),Pio(.WRAP TARGET) 'for state machine 2 PIO ASSEMBLE 1,".program test" PIO ASSEMBLE 1,".line 10" PIO ASSEMBLE 1,".wrap target" PIO ASSEMBLE 1,"SET PINS,2" PIO ASSEMBLE 1,"PULL" PIO ASSEMBLE 1,".wrap" PIO ASSEMBLE 1,".end program list" Print Pio(.WRAP),Pio(.WRAP TARGET) > RUN 0: E001 1: 0041 2: 8000 2 Â Â Â 0 10: E002 11: 8080 11 Â Â Â 10 [24] Print Pio(.WRAP),Pio(.WRAP TARGET) Error : Syntax Strange behaviour: first time you run the program, the error does not show. Second time you run the program you get the error. When you add an explicit END to the program, the error does not show. I focussed on the single ".program xxx" because of your remark that there could only be a single program for the assembler. I must have mis understood. Volhout Edited 2025-01-13 20:11 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5056 |
Hi Peter, I continued this in the 6.00.01 release thread, where this item should reside in the first place (I think). There is still something wrong (or I am doing the wrong thing). Volhout PicomiteVGA PETSCII ROBOTS |
||||
bfwolf Regular Member ![]() Joined: 03/01/2025 Location: GermanyPosts: 75 |
"Having fun with PSRAM" vs. "Having fun with Romans".. ![]() ![]() |
||||
bfwolf Regular Member ![]() Joined: 03/01/2025 Location: GermanyPosts: 75 |
Hello Peter, after the joke "Fun with Romans" now for something sensible: When I saw this thread, something spontaneously occurred to me: I have a Pimoroni Pico Plus 2 and have the PSRAM enabled (with OPTION ..). Then you have an incredible amount of free memory, but which BASIC program needs 8MB? So I thought it would be great to have a RAM disk on the PICOMITE! So - how about: OPTION RAMDISK PSRAM 2048 'kBytes or if there is no PSRAM but for example an RP2350 with 520kB internal RAM: OPTION RAMDISK RAM 128 'kBytes The RAM disk should then be given the drive letter C: and should be operated with FAT. The FAT file system is in the code for SD cards anyway. LittleFs would be too inefficient for that. It is only good for flash and has poor write performance and files can grow up to twice their required space when rewritten unless committed (by flush() or close()). Thank you for your work and continued work! bfwolf |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |