Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:51 11 May 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 V6.00.02 release candidates - all versions

     Page 17 of 44    
Author Message
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 262
Posted: 10:26am 30 Mar 2025
Copy link to clipboard 
Print this post

  Quote  
ddns: just jury-rigged a VGA RP2350 with PSRAM using a one of my RP2350B DIL boards and no issues with 800x600 even with PSRAM enabled. What board are you using?


With the latest RC8 the situation seems to have improved as it is now hard to initiate a system lockup. This is all impression but it happens like 3 out of 100 tries.. Did you make a change in regards of "my" problem?

Beside that I can confirm, that after more than 20 hours playing with RC8, it runs rock solid at 360Mhz. Just tried shortly and the PGA2350 also runs at RESOLUTION 640,378000

Again, many thanks!
 
ville56
Senior Member

Joined: 08/06/2022
Location: Austria
Posts: 217
Posted: 11:14am 30 Mar 2025
Copy link to clipboard 
Print this post

@Peter,

ad LIST VARIABLES:

- STATIC vars list as e.g.

DIM INTEGER GET_FIELDSCHAR_PTR

where GET_FIELDS is the name of a function, CHAR_PTR a static variable. I guess it's just missing a "." in between ....

- LOCAL vars do not show up at all, is this intended?

Gerald
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 11:19am 30 Mar 2025
Copy link to clipboard 
Print this post

Local variables only show up if you use list variables inside the subroutine otherwise they can't show up because they don't exist. That is how static variables are named - I'll look to see if I can safely add a "."
Edited 2025-03-30 21:34 by matherp
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 262
Posted: 12:32pm 30 Mar 2025
Copy link to clipboard 
Print this post

  dddns said  
With the latest RC8 the situation seems to have improved


Too euphoric again, it just cost me an hour lifetime :))
 
ville56
Senior Member

Joined: 08/06/2022
Location: Austria
Posts: 217
Posted: 01:41pm 30 Mar 2025
Copy link to clipboard 
Print this post

@Peter,

the list variables topic is a bit confusing for me:

some variables show up as variables but also as formal parameters from the SUB declaration and some show up as DIM and LOCAL ....
attached is my test program
 '
 OPTION EXPLICIT
 OPTION DEFAULT NONE
 
 dim string main_a, Main_b, Main_out_str(20)
 dim integer main_idx, main_f_nbr, main_c
 
 print "---- on MAIN 1 -----"
 list variables
 
 call "sub_1", main_a, main_out_str(), main_f_nbr
 
 print "---- on MAIN 2 -----"
 list variables

end
 
sub sub_1 (formal_in_str as string, formal_out_str() as string, formal_fld_nbr as integer)

 static integer sub_static_1, sub_static_2
 local integer sub_local
 print "---- in SUB --------"
 list variables
end sub


and the output

RUN
---- on MAIN 1 -----
DIM INTEGER MAIN_C
DIM INTEGER MAIN_F_NBR
DIM INTEGER MAIN_IDX
DIM STRING MAIN_A
DIM STRING MAIN_B
DIM STRING MAIN_OUT_STR(20)
---- in SUB --------
DIM INTEGER MAIN_C
DIM INTEGER MAIN_F_NBR
DIM INTEGER MAIN_IDX
DIM INTEGER SUB_1SUB_STATIC_1
DIM INTEGER SUB_1SUB_STATIC_2
DIM STRING MAIN_A
DIM STRING MAIN_B
DIM STRING MAIN_OUT_STR(20)
LOCAL INTEGER FORMAL_FLD_NBR
LOCAL INTEGER SUB_LOCAL
LOCAL INTEGER SUB_STATIC_1
LOCAL INTEGER SUB_STATIC_2
LOCAL STRING FORMAL_IN_STR
LOCAL STRING FORMAL_OUT_STR(20)
---- on MAIN 2 -----
DIM INTEGER MAIN_C
DIM INTEGER MAIN_F_NBR
DIM INTEGER MAIN_IDX
DIM INTEGER SUB_1SUB_STATIC_1
DIM INTEGER SUB_1SUB_STATIC_2
DIM STRING MAIN_A
DIM STRING MAIN_B
DIM STRING MAIN_OUT_STR(20)
>
e.g.
- LOCAL STRING FORMAL_OUT_STR(20) is the same as DIM STRING MAIN_OUT_STR(20)

-the attribute STATIC is not present, instead it seems to be DIM
   DIM INTEGER SUB_1SUB_STATIC_1
or LOCAL
   LOCAL INTEGER SUB_STATIC_1
depending on the actual scope of list variables.


Gerald
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 02:25pm 30 Mar 2025
Copy link to clipboard 
Print this post

STATIC variables create a Global variable (DIM) with the function name prepended to the variable name. When a STATIC variable is used in a function a LOCAL variable is created that links the global STATIC. This allows you to use the LOCAL name without the prepended function name - just the way it works
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4251
Posted: 06:15pm 30 Mar 2025
Copy link to clipboard 
Print this post

Hi Peter,

I'm still running v6.00.02b17 on my PicoMite VGA USB RP2040 and this:

COLOUR(RED)

Causes the prompt to hang.

I'm aware this is invalid syntax, but is a fairly obvious mistake to make ;-).

EDIT: OK, I suppose it's not invalid syntax, it just reads the colour value from a variable called RED which may or may not be defined.

Tom
Edited 2025-03-31 04:25 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 222
Posted: 06:21pm 30 Mar 2025
Copy link to clipboard 
Print this post

Loaded the latest firmware.
Memory Program is now 288K first 304K.

PicoMite MMBasic RP2350A Edition V6.00.02RC8
Copyright 2011-2025 Geoff Graham
Copyright 2016-2025 Peter Mather

> memory
Program:
  0K ( 0%) Program (0 lines)
288K (100%) Free

Saved Variables:
 16K (100%) Free

RAM:
  0K ( 0%) 0 Variables
  0K ( 0%) General
336K (100%) Free
> list pins
[LIBRARY] For _q%=0 To Format$(max gp)
Error : Expression syntax
> option list
PicoMite MMBasic RP2350A Edition V6.00.02RC8
OPTION FLASH SIZE 16777216
OPTION CPUSPEED (KHz) 150000
> flash list
Slot 1 available
Slot 2 available
Slot 3 available
> list variables
DIM _Q%
DIM FLOAT MAX
>
>

Greetings,

Jan.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 06:23pm 30 Mar 2025
Copy link to clipboard 
Print this post

  Quote  Just hangs the prompt.


No it doesn't. It does what you asked. i.e. it sets the foreground colour to RED which as it hasn't been defined is 0. So you now have black text on a black background. You can prove this by COLOUR(RED),RGB(WHITE). Note that this completely bu...rs the cursor as it now flashes black and black
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4251
Posted: 06:26pm 30 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  It does what you asked ...


LOL. "It's a trap!"

Thanks Peter.
Edited 2025-03-31 04:26 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 06:27pm 30 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Just hangs the prompt.


No it doesn't. It does what you asked. i.e. it sets the foreground colour to RED which as it hasn't been defined is 0. So you now have black text on a black background. You can prove this by COLOUR(RED),RGB(WHITE). Note that this completely bu...rs the cursor as it now flashes black and black


  Quote  list pins
[LIBRARY] For _q%=0 To Format$(max gp)
Error : Expression syntax


Thanks - will fix. Should never have done these command this way (embedded Basic) as they are now subject to any token changes I make.
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 459
Posted: 06:30pm 30 Mar 2025
Copy link to clipboard 
Print this post

> option list
PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.02RC8
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION SYSTEM I2C GP20,GP21
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD GR
OPTION CPUSPEED (KHz) 315000
OPTION RESOLUTION 640x480
OPTION DISPLAY 30, 53
OPTION SDCARD GP22, GP26, GP27, GP28
OPTION AUDIO GP10,GP11', ON PWM CHANNEL 5
OPTION RTC AUTO ENABLE
OPTION MODBUFF ENABLE  192
OPTION PLATFORM HDMIUSB

Option explicit
Do
Test
Loop

Sub Test
 Static int L
 'Static L As integer             <-- that would work
 L=1
 Print L
End Sub



> run
[9] L=1
Error : L is not declared
>


Strange, workaround works.

Matthias
Edited 2025-03-31 04:31 by homa
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 06:33pm 30 Mar 2025
Copy link to clipboard 
Print this post

So would

STATIC INTEGER L

You can't use C types  
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 459
Posted: 08:45pm 30 Mar 2025
Copy link to clipboard 
Print this post

You are right.
But please comment the OPTION EXPLICIT off.
And it runs without an error message.
When copying and pasting from your mouse example, I stumbled across this. And I wonder.
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 459
Posted: 09:04pm 30 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  > list
MODE 3
FRAMEBUFFER create
FRAMEBUFFER layer
> run
[3] FRAMEBUFFER layer
Error : Not enough Heap memory
>
Shouldn't that work?


No: a mode 3 buffer takes 153,600 bytes so after the framebuffer is created there isn't enough left for the layerbuffer. It could work on a version with PSRAM IFF you define the layer buffer first.
...


Because of this formulation (page 129) “In Addition a layer Buffer can be created.” I had assumed that this can also be created. But in the introduction on page 30 it is clearer: “One optional layer”

page 129/130:
MODE 3
640 x 480 x 16 colours.
Colour mapping to RGB555 palette. A framebuffer (F) can be
created. It can be used for creating images and copying to the
display screen (N). In addition a layer buffer can be created.
Any pixels written to the layer buffer will automatically
appear on the display sitting on top of whatever may be in the
main display buffer. A colour can be specified (0-15: defaults
to 0) which does not show allowing the main display buffer to
show through.

page 30:
MODE 3
Displayed image 640x480 in 16 colours with colour mapping to an RGB555 palette
One optional layer
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 09:39pm 30 Mar 2025
Copy link to clipboard 
Print this post

The manual is correct. You can create a layer. It will use most of your available memory but it is possible. However, you can't create it after a framebuffer because by then the memory is already gone.

  Quote   But please comment the OPTION EXPLICIT off.
And it runs without an error message.


because it probably creates  a variable "int"

Sorry but no more of these "revelations". The parser is what it is and cannot be perfect. Follow the manual and things will work. Make up syntax and unexpected things may well happen.
Edited 2025-03-31 07:39 by matherp
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 459
Posted: 06:19am 31 Mar 2025
Copy link to clipboard 
Print this post

&h06
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 10:24am 31 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  Should never have done these command this way (embedded Basic) as they are now subject to any token changes I make.

To avoid hard-coding internal tokens could ASCII MMBasic be used and in effect EXECUTEd?

(That was what I originally thought you'd done.)

John
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 579
Posted: 11:40am 31 Mar 2025
Copy link to clipboard 
Print this post

  JohnS said  
  matherp said  Should never have done these command this way (embedded Basic) as they are now subject to any token changes I make.

To avoid hard-coding internal tokens could ASCII MMBasic be used and in effect EXECUTEd?

(That was what I originally thought you'd done.)

John


That would take up quite a lot of extra storage, possibly more than coding it in C.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 11:57am 31 Mar 2025
Copy link to clipboard 
Print this post

  Bleep said  
  JohnS said  
  matherp said  Should never have done these command this way (embedded Basic) as they are now subject to any token changes I make.

To avoid hard-coding internal tokens could ASCII MMBasic be used and in effect EXECUTEd?

(That was what I originally thought you'd done.)

John


That would take up quite a lot of extra storage, possibly more than coding it in C.

I doubt C would need more.

I expect any extra would be quite small, anyway, compared to what has been used for the other new features.

John
 
     Page 17 of 44    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025