Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 18:37 10 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 betas

     Page 19 of 23    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7504
Posted: 08:58am 27 Feb 2025
Copy link to clipboard 
Print this post

I'll have to try that. The YD should be ok.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
ville56
Senior Member

Joined: 08/06/2022
Location: Austria
Posts: 217
Posted: 09:47am 27 Feb 2025
Copy link to clipboard 
Print this post

strange behavior after executing OPTION EXPLICIT


> list system i2c
HEX  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
00:
[LIBRARY] addr = y * 16 + x
Error : ADDR is not declared

> list system i2c
[LIBRARY] Dim integer x,y
Error : x already declared

> list system i2c
[LIBRARY] Dim integer x,y
Error : x already declared--


Situation can be cleared with NEW. If OPTION EXPLICIT is entered on the commandline it is ok, but if in a program the error will show up after first RUN.

Version is 6.00.02b11 on RP2350A.

Regards, Gerald
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 10:14am 27 Feb 2025
Copy link to clipboard 
Print this post

This is correct. Library code must follow the normal rules for variables. If you set OPTION EXPLICIT then any variable used in the library must be explicitly defined. If you have executable code in the library that is not in a subroutine it will be executed whenever a Basic command is executed.
 
ville56
Senior Member

Joined: 08/06/2022
Location: Austria
Posts: 217
Posted: 11:48am 27 Feb 2025
Copy link to clipboard 
Print this post

Peter, could you please also DIM variable "addr" in the library for "list system i2c" command as this seems to be the cause of the trouble.
                                                                 
73 de OE1HGA, Gerald
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 12:57pm 27 Feb 2025
Copy link to clipboard 
Print this post

  ville56 said  Peter, could you please also DIM variable "addr" in the library for "list system i2c" command as this seems to be the cause of the trouble.

Maybe addr should be a local.

John
 
matherp
Guru

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

V6.00.02b14 posted

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Fixes bug in LIST SYSTEM I2C using an undeclared variable
Fixes a bug in ADC conversions when CPU speed is > than about 250MHz
Fixes a bug in MM.END not being called properly

As soon as I get some feedback on any unsupported gamepads I will be moving to release candidate status for V6.00.02.
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 259
Posted: 03:02pm 27 Feb 2025
Copy link to clipboard 
Print this post

I am very happy and can confirm, that the ADC bug is gone on RP2040/378Mhz and PGA2350/352Mhz!

Another very nice new world is:
> timer=0:blit 0,0,400,0,399,479:?timer
97.577

That is about 5Mb/s ?! Fantastic
Is it possible to make the framebuffer color depth configurable like 8bit?

Thank you!
Edited 2025-02-28 01:04 by dddns
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1526
Posted: 10:16pm 27 Feb 2025
Copy link to clipboard 
Print this post

  matherp said  V6.00.02b14 posted
...
Fixes a bug in MM.END not being called properly

Can confirm that fix! Thanks.
MM.END now works in the library but also when stored in the main program.
Regards
Michael
causality ≠ correlation ≠ coincidence
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7504
Posted: 10:46pm 27 Feb 2025
Copy link to clipboard 
Print this post

V6.00.02b14 VGA version seems to be running ok on a YD-RP2040 at 252MHz. IIRC it has done previously because of some tweaks to memory timing, but it's nice to know it still works. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
ville56
Senior Member

Joined: 08/06/2022
Location: Austria
Posts: 217
Posted: 08:01am 28 Feb 2025
Copy link to clipboard 
Print this post

"list system i2c" works, many thanks Peter !!

Gerald
                                                                 
73 de OE1HGA, Gerald
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4854
Posted: 09:34am 28 Feb 2025
Copy link to clipboard 
Print this post

Hi Peter,

Thanks for the larger heap in the 2040 VGA build (b14). From here we can build further on Kong.

Volhout
PicomiteVGA PETSCII ROBOTS
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 259
Posted: 12:02am 01 Mar 2025
Copy link to clipboard 
Print this post

PicoMiteRP2040USBV6.00.02b14:

While writing a blit close to the boundaries with parts of the blit being out of
bounds, this out of bounds drawing seems to take memory during the process. I'm not sure but this behavior might be unwanted instead of discarding the data.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10067
Posted: 05:34pm 01 Mar 2025
Copy link to clipboard 
Print this post

V6.00.02b15 posted

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

New functionality from Geoff - with thanks
Now supporting  BYVAL & BYREF.  BYVAL & BYREF are prefixes that can be applied to parameters in the definition of a sub or function.  BYVAL will force the interpreter to use the value of the supplied argument even if a variable is supplied.  BYREF informs the interpreter that a variable is expected and if that is not supplied it will throw an error.

Additional parameter for OPTION LCDPANEL paralleldisplaytype (e.g. SSD1963_7[_16])

OPTION LCDPANEL display, orientation [,backlightpin] [,DCpin] [,NORESET] [,DB0pin]


The new parameter only applies to the RP2350B and allows the starting pin for the 8 or 16 data pins to be specified (defaults to GP0)

e.g. OPTION LCDPANEL SSD1963_4_16, LANDSCAPE,,,GP36,,GP2
This allows SSD and other parallel displays to be used on the new 64-pin DIL development board

Support for three new gamepads including the THEGAMEPAD
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 72
Posted: 09:04pm 01 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  V6.00.02b15 posted
..
New functionality from Geoff - with thanks
Now supporting  BYVAL & BYREF.  BYVAL & BYREF are prefixes that can be applied to parameters in the definition of a sub or function.  BYVAL will force the interpreter to use the value of the supplied argument even if a variable is supplied.  BYREF informs the interpreter that a variable is expected and if that is not supplied it will throw an error.


@Geoff, @Peter: Brilliant !!!    


Option explicit
Dim x As integer = 3, y As integer = 4
Print AddInt(x,y), x, y
IncVar(x)
Print x
IncVar(10)
End

Function AddInt(byval a As integer, byval b As integer) As integer
 AddInt = a+b
 a = a+1
 Print a,AddInt
End Function

Sub IncVar(byref z As integer)
 z = z+1
 Print z
End Sub

ESC:Exit  F1:Save  F2:Run  F3:Find  F4:Mark  F5:Paste  Ln: 1  Col: 1      INS



> run
4       7
7       3       4
4
4
[6] IncVar(10)
Error : Variable required for BYREF
>


Works, as described!  

Greetings, bfwolf
 
javavi

Guru

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

  matherp said  V6.00.02b15 posted
New functionality from Geoff - with thanks
Now supporting  BYVAL & BYREF


This already pulls at a major version, like Ver 6.01  
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4854
Posted: 11:13am 02 Mar 2025
Copy link to clipboard 
Print this post

Hi Peter,

The essential code is the TEXT command that (in PETSCII) shows the game loop time usage. However in this framebuffer setup (same as petscii), the text statement prints the timer value (1), but not the leading zero's. Any idea ? Is the ink color not used for "00" but it is for the "STR$()". I am trying to write text to layer L.

This is 2040 VGA b14.

 'screen
 mode 2
 FRAMEBUFFER Layer 9
 FRAMEBUFFER write n
 Color 0,RGB(white) : CLS
 FRAMEBUFFER write l
 CLS RGB(magenta)
 
 timer=1
 
 Text 10,200,right$("00"+Str$(timer,3,0),3)
 
 do:loop while inkey$=""
 end


Volhout
Edited 2025-03-02 21:16 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

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

What a convoluted way of doing something that is fully supported

TEXT 10,200,str$(timer,3,0,"0")
 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 72
Posted: 01:23pm 02 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  V6.00.02b15 posted
New functionality from Geoff - with thanks
Now supporting  BYVAL & BYREF


Forgot to explicitly say many thanks in my former post..

@Geoff: Don't you think, this wonderful new feature would be worth included into the Windows version? As this is really a great improvement of the language regarding readability and bug avoiding..

I took a short look into the sources at
https://github.com/UKTailwind/PicoMiteAllVersions
and saw it's probably mainly done in MMBasic.c/h which I suppose are the "core" files..

@thwill: Same with MMB4L..

Thx again, bfwolf
 
dddns
Senior Member

Joined: 20/09/2024
Location: Germany
Posts: 259
Posted: 03:14pm 02 Mar 2025
Copy link to clipboard 
Print this post

phrasing in manual got me confused too.
> timer=1:print right$("00" + Str$(timer,0,0),3)
001
> timer=10:print right$("00" + Str$(timer,0,0),3)
010
> timer=999:print right$("00" + Str$(timer,0,0),3)
999
> timer=1000:print right$("00" + Str$(timer,0,0),3)
000
>

 
bfwolf
Regular Member

Joined: 03/01/2025
Location: Germany
Posts: 72
Posted: 09:22am 03 Mar 2025
Copy link to clipboard 
Print this post

I'm also "a little bit confused"..  

From the latest manual:



> list
Option explicit
Dim i As integer, t As float
Timer = 0
t = Timer
Print Timer, t, Format$(t, "%08.3f")
For i=0 To 1000000
Next i
t = Timer
Print Timer, t, Format$(t, "%08.3f")
End
> run
0.049   0.022  0000.022
6577.698        6577.677       6577.677
>


@Geoff, @Peter:
Could it be, that "Timer" gives milliseconds with microseconds (3 digits after the dot) resolution?


> option list
PicoMite MMBasic RP2350A Edition V6.00.02b15
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION CPUSPEED  150000 'KHz
>
 
     Page 19 of 23    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025