Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:38 02 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 : PicoMite/PicoMiteVGA V5.07.05 betas

     Page 4 of 11    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10180
Posted: 11:59am 21 Jun 2022
Copy link to clipboard 
Print this post

  Quote  Is there room to discuss the Program/RAM split ?

No.
Program size is determined by size of available variable RAM for loading the ascii program that is then tokenised into flash. RAM is fully utilised with no spare. Latest VGA version has 32K for simple variables and 100K for arrays and strings
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4299
Posted: 12:05pm 21 Jun 2022
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Is there room to discuss the Program/RAM split ?

No.
Program size is determined by size of available variable RAM for loading the ascii program that is then tokenised into flash. RAM is fully utilised with no spare. Latest VGA version has 32K for simple variables and 100K for arrays and strings


It's your wheelhouse so I can accept the "No", but I don't understand the explanation . My understanding of what you said is that there is an upper limit on the Program size of approximately half the total RAM but I asked you about the possibility of reducing the Program size ???

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10180
Posted: 12:10pm 21 Jun 2022
Copy link to clipboard 
Print this post

Program, including CFunctions, is in flash after tokenising and runs from flash so has no impact on RAM. RAM is use for firmware data, stack, heap, framebuffer + firmware code loaded into memory to achieve performance. What is left is 132K. This determines the maximum program size not the other way round
Attached is the VGA map file FYI

PicoMiteVGA.elf.zip
Edited 2022-06-21 22:13 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4299
Posted: 12:16pm 21 Jun 2022
Copy link to clipboard 
Print this post

  matherp said  Program, including CFunctions, is in flash after tokenising and runs from flash so has no impact on RAM. RAM is use for firmware data, stack, heap, framebuffer + firmware code loaded into memory to achieve performance. What is left is 132K. This determines the maximum program size not the other way round


D'Oh, of course! Had persuaded myself that the Program was also in the Pico RAM - very stupid of me.

Thanks,

Tom
Edited 2022-06-21 22:19 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7820
Posted: 01:05pm 21 Jun 2022
Copy link to clipboard 
Print this post

Understandable, Tom... traditionally the user space has always been in RAM. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4032
Posted: 01:07pm 21 Jun 2022
Copy link to clipboard 
Print this post

  fred777 said  I know that linux users will complain but shouldn't those "/" characters shown in CWD$ and FILES really be "\"? I mean its FAT after all...
No.

M$ admitted they only used \ because they were worried if they used / like UNIX (& thus Linux et al) they might be open to being sued.

John
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4299
Posted: 01:29pm 21 Jun 2022
Copy link to clipboard 
Print this post

  Mixtel90 said  Understandable, Tom... traditionally the user space has always been in RAM. :)


Yup, the "Harvard" architecture of the 'mites frequently throws me.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5023
Posted: 12:03pm 22 Jun 2022
Copy link to clipboard 
Print this post

Hi Peter,

In my last search for the holy grail of PIO state machines I had to shift out data from the PIO into a GPIO pin. The PIO supports shift left, and shift right (independently for output and input shift registers).

The shift direction is in bits 18 and 19 of the SHIFTCTRL register.

The current helper function cannot support these bits (unless I have misread).
Maybe it is possible to add these ?
It is (of coarse) impossible to support everything, but these bits seem essential whenever serial data is handled by PIO (UART is shift right, SPI is shift left).

Of coarse the workaround (hand assembling the register content) worked for me for now.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4299
Posted: 03:23pm 22 Jun 2022
Copy link to clipboard 
Print this post

Peter, just noticed that the splash is out of date, it's now 2022:



Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 08:01am 23 Jun 2022
Copy link to clipboard 
Print this post

  JohnS said  
No.
M$ admitted they only used \ because they were worried


Thats no reason to use "/" when everywhere else in windows a "\" is used.
In most cases the "/" cannot be used and where its supported it often gets converted back to "\"
Even at the simplest level in a (W10) command box:
D:\Z>cd /z
D:\Z>

Either use a real Unix path or a dos path. As soon as drive letters appear (A: etc.) we're talking about a dos path.
A mix is a mess.
Pff, there, I said it (grumble grumble)
Edited 2022-06-23 18:02 by fred777
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5023
Posted: 04:16pm 23 Jun 2022
Copy link to clipboard 
Print this post

Peter,
What is the best way in the pico to move a ball on the screen without artefacts? The ball varies in size so a sprite wont work. It is probably erase old, draw new.

Oh, there are 3 balls...

Actuallt, they are 2d objects (filled circles)
Edited 2022-06-24 03:02 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10180
Posted: 05:46pm 23 Jun 2022
Copy link to clipboard 
Print this post

  Quote  What is the best way in the pico to move a ball on the screen without artefacts?


If we assume VGA then something like:

MODE 2
r1=20
r2=30
r3=40
x1=20
y1=20
x2=160
y2=120
x3=240
y3=180
FRAMEBUFFER create
FRAMEBUFFER write f
Do
Circle x1,y1,r1,,,0,0
Circle x2,y2,r2,,,0,0
Circle x3,y3,r3,,,0,0
Inc x1,Rnd * 5 -2.5
Inc x2,Rnd * 5 -2.5
Inc x3,Rnd * 5 -2.5
Inc y1,Rnd * 5 -2.5
Inc y2,Rnd * 5 -2.5
Inc y3,Rnd * 5 -2.5
Inc r1,Rnd * 3 -1.5
Inc r2,Rnd * 3 -1.5
Inc r3,Rnd * 3 -1.5
If x1>MM.HRes Then Inc x1,-MM.HRes
If x2>MM.HRes Then Inc x2,-MM.HRes
If x3>MM.HRes Then Inc x3,-MM.HRes
If y1>MM.VRes Then Inc y1,-MM.VRes
If y2>MM.VRes Then Inc y2,-MM.VRes
If y3>MM.VRes Then Inc y3,-MM.VRes
If x1<0 Then Inc x1,MM.HRes
If x2<0 Then Inc x2,MM.HRes
If x3<0 Then Inc x3,MM.HRes
If y1<0 Then Inc y1,MM.VRes
If y2<0 Then Inc y2,MM.VRes
If y3<0 Then Inc y3,MM.VRes
If r1<10 Then r1=10
If r2<20 Then r2=20
If r3<40 Then r3=40
Circle x1,y1,r1,,,RGB(white),RGB(red)
Circle x2,y2,r2,,,RGB(white),RGB(blue)
Circle x3,y3,r3,,,RGB(white),RGB(green)
FRAMEBUFFER copy f,n,b
pause 50
Loop
 
Michal
Senior Member

Joined: 02/02/2022
Location: Poland
Posts: 125
Posted: 06:33pm 23 Jun 2022
Copy link to clipboard 
Print this post

Hi matherp,

And what would it look like in the version for ST7789(320x240) or ILI9488W(480x320)?

Michal
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10180
Posted: 06:35pm 23 Jun 2022
Copy link to clipboard 
Print this post

  Quote  And what would it look like in the version for ST7789(320x240) or ILI9488W(480x320)?


terrible
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3348
Posted: 10:42pm 23 Jun 2022
Copy link to clipboard 
Print this post

I have a PCB set up with which I've used an ILI9488 before. I wanted to flash the latest MMBasic, so the Clear_flash.uf2 which I have (but the date is Dec 16, 2021). I then copied over PicoMiteV5.07.05b11.uf2.

I connect ok with teraterm and set up the SD card:

PicoMite MMBasic Version 5.07.05b11
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> OPTION SYSTEM SPI 4,5,6
> OPTION SDCARD 7
> files
A:/
00:02 01-01-2000      21632  g9.bas
00:01 01-01-2000       2048  g9_display.txt
0 directories, 2 files

I then start to set up the LCD:
> OPTION LCDPANEL ILI9488,L,26,25,24

I never get the prompt back.

If I unplug and plug back in, the LED flashes (usually twice) and then stops flashing. I never get a prompt. The PC is reporting that I have a com port.

I've done this 5 times now. Do I need a more recent Clear_flash.uf2? Is there something else I can do?

(Hmm . . . an update. I unplugged the picomite from the PCB, and those options load ok and I have the LED still blinking. Must be something on the board, but aside from the SD module, the only thing I have is an inline resistor on the MOSI line. More investigations to follow.)

~
Edited 2022-06-24 11:44 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3348
Posted: 01:49am 24 Jun 2022
Copy link to clipboard 
Print this post

Well, cancel the above. I'd have said, and will still say, that except for the SD module and the backlight resistor and the inline MOSI resistor (which I disconnected), there was nothing on the PCB except for connectors, most of which I had previously used.

But I soldered up a new PCB with only RTC, SD card, SPI LCD connector, and 22R backlight resistor for the ILI9488, and it all works. Geoff's guidemo modified for 480x320 works fine.

(Shrug)
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5023
Posted: 07:56am 24 Jun 2022
Copy link to clipboard 
Print this post

Thanks Peter !!!

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10180
Posted: 07:59am 24 Jun 2022
Copy link to clipboard 
Print this post

  Quote  only thing I have is an inline resistor on the MOSI line


Should be in the MISO line from the ILI9488
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3348
Posted: 11:30am 24 Jun 2022
Copy link to clipboard 
Print this post

  matherp said  
  Quote  only thing I have is an inline resistor on the MOSI line


Should be in the MISO line from the ILI9488


I mis-spoke. Yes, it is on the MISO line.

MISO/MOSI me see, but sometimes me don't see.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4299
Posted: 09:23am 26 Jun 2022
Copy link to clipboard 
Print this post

Good morning Peter,

Could I request that you consider two changes:

1. Add MM.INFO(OPTION CPUSPEED) so that a program that wants/needs the PicoMite to be overclocked can detect whether it infact is, or issue an appropriate warning if it is not.

2. Could you change the behaviour of:
PLAY SOUND 1,B,S,440 : END

and:
PLAY SOUND 1,B,S,440 : DO : LOOP
Ctrl-C

so that they stop the sound being played, this would match the behaviour of the CMM2 and MMB4W - and yes, I do know how to work around it, but I think consistency would be better.

Thanks in advance,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
     Page 4 of 11    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025