![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 release candidates - all versions
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
dddns Senior Member ![]() Joined: 20/09/2024 Location: GermanyPosts: 262 |
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: AustriaPosts: 217 |
@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 KingdomPosts: 10067 |
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: GermanyPosts: 262 |
Too euphoric again, it just cost me an hour lifetime :)) |
||||
ville56 Senior Member ![]() Joined: 08/06/2022 Location: AustriaPosts: 217 |
@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 KingdomPosts: 10067 |
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 KingdomPosts: 4251 |
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: NetherlandsPosts: 222 |
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 KingdomPosts: 10067 |
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 KingdomPosts: 4251 |
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 KingdomPosts: 10067 |
[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: GermanyPosts: 459 |
> 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 KingdomPosts: 10067 |
So would STATIC INTEGER L You can't use C types ![]() |
||||
homa![]() Guru ![]() Joined: 05/11/2021 Location: GermanyPosts: 459 |
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: GermanyPosts: 459 |
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 KingdomPosts: 10067 |
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. 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: GermanyPosts: 459 |
&h06 |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3998 |
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 KingdomPosts: 579 |
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 KingdomPosts: 3998 |
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 |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |