Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:36 11 Jul 2025 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 : Having fun with PSRAM

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10232
Posted: 07:44pm 12 Jan 2025
Copy link to clipboard 
Print this post



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 Kingdom
Posts: 7857
Posted: 07:47pm 12 Jan 2025
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 302
Posted: 09:31pm 12 Jan 2025
Copy link to clipboard 
Print this post

I knew I shouldn't have printed out the latest manual just yet! 😆

Dave.
 
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 459
Posted: 09:57pm 12 Jan 2025
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 5056
Posted: 07:39am 13 Jan 2025
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10232
Posted: 08:36am 13 Jan 2025
Copy link to clipboard 
Print this post

  Quote  When 6.00.02 is developing, it would be very nice to have the PIO assembler work for individual state machines.


Did you try my suggestion of having two separate blocks of compilation in the program?

  Quote   Is it possible to organize color video modes for high HDMI resolutions when PSRAM is connected?


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: Netherlands
Posts: 5056
Posted: 09:56am 13 Jan 2025
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 10232
Posted: 09:59am 13 Jan 2025
Copy link to clipboard 
Print this post

No:

Two complete "program" , "end program" sections with different .line
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5056
Posted: 10:05am 13 Jan 2025
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 5056
Posted: 07:46am 14 Jan 2025
Copy link to clipboard 
Print this post

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: Germany
Posts: 75
Posted: 10:50am 14 Jan 2025
Copy link to clipboard 
Print this post

"Having fun with PSRAM" vs. "Having fun with Romans"..  


 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 75
Posted: 12:43pm 14 Jan 2025
Copy link to clipboard 
Print this post

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
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025