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

     Page 8 of 44    
Author Message
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 971
Posted: 07:37am 21 Mar 2025
Copy link to clipboard 
Print this post

The commands used for PIO compiling don't seem to be checked when variables are assigned. If you try to used a normal command as a variable it complains about the name, but in%() get through and fails when its treated as a command.


>
> list
Dim in%(5)
In %(1)=7    'was in%(1)=7
>
> run
[2] In %(1)=7
Error : Missing Program statement
>

Saved 43 bytes
[2] Cat %(1)=2
Error : Variable name



Latest F4 Latest H7 FotS
 
matherp
Guru

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

You can't use variables in PIO instructions just unquoted literal strings
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 971
Posted: 09:06am 21 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  You can't use variables in PIO instructions just unquoted literal strings

Just to clarify, this was not about PIO itself. Its about the error if you happen to  try to use one of the commands used in PIO as a normal variable. The illegal use of the command name as a variable is not trapped until is is seen as an invalid command.

e.g.
DIM in%(5)    'declare a variable. In is now a command supporting PIO so should complain about it.

DIM cat%(5)  is trapped as an invalid variable name.
Edited 2025-03-21 19:09 by disco4now
Latest F4 Latest H7 FotS
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 295
Posted: 09:09am 21 Mar 2025
Copy link to clipboard 
Print this post

@Peter,

I always was hestitate to ask some minor (from user`s perspective), but maybe not so easy to implement thingie. VGA/HDMI versions.

It would make editing so much , much, much faster if we could jump editing cursor whole word using Ctrl+LeftArrow, Ctrl+RightArrow inside of EDITOR.

Maybe I`m not alone who`s would like to have this.
Sure there is no any rush with this. Only would be nice to have some day
My MMBasic 'sand box'
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 529
Posted: 09:32am 21 Mar 2025
Copy link to clipboard 
Print this post

@ electricat,

Why not using the mouse in the editor to position the cursor? I am using the ps2 mouse for that and it is a great experience :)

Greetings
Daniel
 
matherp
Guru

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

  Quote  Just to clarify, this was not about PIO itself. Its about the error if you happen to  try to use one of the commands used in PIO as a normal variable. The illegal use of the command name as a variable is not trapped until is is seen as an invalid command.


It's a feature of the way the PIO assembler has to spoof the tokeniser to get the assembler to work - one you will just have to live with
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 295
Posted: 11:23am 21 Mar 2025
Copy link to clipboard 
Print this post

  Amnesie said  @ electricat,
Why not using the mouse in the editor to position the cursor? I am using the ps2 mouse for that and it is a great experience :)


I am using mouse. For large jumps.
It was long wanted and excelent addition!
But fingers in most cases are just faster.


Did not tested RC6 yet, but in RC5, if program uses MODE 3 , after returning to editor MOUSE is not active. Must enter cmd prompt MODE1 to see it again.
My MMBasic 'sand box'
 
Volhout
Guru

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

@Peter,

RC6 is solid on RP2040 VGA for the main programs I tested.

Volhout
PicomiteVGA PETSCII ROBOTS
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 295
Posted: 02:07pm 21 Mar 2025
Copy link to clipboard 
Print this post

HDMI/USB/2350 RC6

All this week I was missing mouse in editor. But usually I mostly use hotkeys to move arround, in any text editors so not a big deal. Later I faund it`s becouse program works in MODE3 and I always break ctrl+C , so must enter command prompt MODE 1 if I want mouse. But running/breaking while in coding process happens quite often, so I just does ignored it and cotinued use keyboard.

I see manual talks about mouse appearence inside editor, when in MODE 1.

So means returning to editor I`m still in MODE 3 ?  
If it is By design, then OK.
But if it should return to MODE 1, maybe it needs some fix.
Edited 2025-03-22 00:08 by electricat
My MMBasic 'sand box'
 
matherp
Guru

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

The editor switches to mode 1 if the horizontal resolution is less than 512 otherwise it leaves you in the current mode
 
matherp
Guru

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

I've updated RC6 if you want to download. This includes a much better implementation of diagonal line drawing with a width > 1.
Prior to this release diagonal lines could only be 1 pixel wide. This version implements the ability to specify the line width. Previously horizontal and vertical lines could have a defined width and the x1 and y1 coordinate define the top-left pixel of the thick line. i.e. the line is to the right of the specified position or below it on the screen.

This makes no sense for thick diagonal lines where the line should be centered on the origin pixel. To maintain compatibility with existing code you specify this by setting the width as a negative number as in the example below.
This will display a clock in colour on the RP2350 but only in black and white on the RP2040.





Option explicit
Option default none
Option milliseconds on
If Instr(MM.DEVICE$,"RP2350") Then
 MODE 3
Else
 MODE 1
EndIf
FRAMEBUFFER create
FRAMEBUFFER write f
Const sw=-5,mw=-9,hw=-11
Const sl=220,ml=190,hl=160
Const xc=MM.HRES\2,yc=MM.VRES\2
Dim t$
Dim integer s,m,h
Do
 show s,sw,sl,0
 show m,mw,ml,0
 show h,hw,hl,0
 t$=Time$
 s=Val(Mid$(t$,7,2))*6+Val(Right$(t$,3))/1000*6
 m=Val(Mid$(t$,4,2))*6
 h=Val(Left$(t$,2))*30
 show h,hw,hl,RGB(yellow)
 show m,mw,ml,RGB(green)
 show s,sw,sl,RGB(red)
 Circle xc,yc,-mw,,,RGB(blue),RGB(blue)
 FRAMEBUFFER copy f,n,b
 Do
 Loop Until Time$<>t$
Loop
'
Sub show(byval angle As integer, byval w As integer,byval l As integer, byval c
ol As integer)
 Local integer x=l*Sin(Rad(angle))+xc
 Local integer y=yc-l*Cos(Rad(angle))
 Line xc,yc,x,y,w,col
End Sub

Edited 2025-03-22 02:37 by matherp
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 390
Posted: 05:18pm 21 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  The upload doesn't seem to have worked - try again


OK for me now. Thanks!
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 05:57pm 21 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  V6.00.02RC6 is available on


RP2350B only
OPTION VGA PINS and OPTION AUDIO I2S both now support pins in the range GP32-GP47


on RP2040, if you connect an 16bit parallele TFT like SSD1963, DB0 to DB15 use GP0 to GP15. Is it possible to use GP31 to GP47?? with RP2350B.
Edited 2025-03-22 03:59 by goc30
 
matherp
Guru

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

  Quote  Is it possible to use GP31 to GP47?? with RP2350B.


https://www.thebackshed.com/forum/ViewTopic.php?TID=17631&PID=234989#234989
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 06:28pm 21 Mar 2025
Copy link to clipboard 
Print this post

https://www.thebackshed.com/forum/ViewTopic.php?TID=17631&PID=234989#234989

the ref is
OPTION LCDPANEL display, orientation [,backlightpin] [,DCpin] [,NORESET] [,DB0pin]

but in your example you write
e.g. OPTION LCDPANEL SSD1963_4_16, LANDSCAPE,,,GP36,,GP2
this mean:
OPTION LCDPANEL SSD1963_4_16, orientation=LANDSCAPE,backlightpin=no pin,DCpin=no pin,No reset pin,DB0pin=GP36,???=???,???=GP2

what are the 2 last functions
Edited 2025-03-22 04:31 by goc30
 
matherp
Guru

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

The specification is correct. There is an extra comma in the example

OPTION LCDPANEL SSD1963_4_16, LANDSCAPE,,GP36,,GP2
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 02:59am 22 Mar 2025
Copy link to clipboard 
Print this post

  matherp said  The specification is correct. There is an extra comma in the example

OPTION LCDPANEL SSD1963_4_16, LANDSCAPE,,GP36,,GP2


ok
for "NORESET", the choice is "NORESET/RESET" or "NORESET/GPxx" ??

other question:
where I specify other pins (CS, RD, WR)  ?
Edited 2025-03-22 13:05 by goc30
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 390
Posted: 05:47am 22 Mar 2025
Copy link to clipboard 
Print this post

OPTION MILLISECONDS doesn't appear in OPTION LIST whether it's on or off. Should it?

I'm using WebMite MMBasic RP2350A Edition V6.00.02RC6
Edited 2025-03-22 15:48 by toml_12953
 
ville56
Senior Member

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

@Peter,

Function FIELD$ does not always return the right field values. I do not have any logical explanation for the result.

I also would prefer to have some means to find out whether the end of the input string was reached, e.g. by throwing an error or with a variable e.g. a variable like mm.eol set to 1 or something. Currently it is not possible to reliably find out if you have reached the last field.

Attached is a small test program showing the behaviour.


Result is:
----------------------------------------------------
Fields/strings are delimited by ><

field # expected   1   2   3    4   5        6      7   8
Input string     >aaa bbb  ''  ccc ' '  'ddd  eee' fff ggg<

Field# value
1     >aaa<             <- ok
2     >bbb<             <- ok
3     >''<              <- ok
4     >''<              <- not ok, twice
5     >ccc<             <- wrong field #
6     >ccc<             <- not ok, twice
7     >' '<             <- wrong field #
8     >'ddd  eee'<      <- wrong field #
9     >'ddd  eee'<      <- not ok, twice
10    >fff<             <- wrong field #
11    >ggg<             <- wrong field #
12    ><        <- after last field, should be recognizable somehow
13    ><
14    ><
15    ><

 '
 OPTION EXPLICIT
 OPTION DEFAULT NONE
 
 dim string a, b
 dim integer idx
 
 '#    1   2       3        4      5   6
 a = "aaa bbb    ccc   'ddd  eee' fff ggg"
 
 for idx = 1 to 10
   print ">"; field$(a, idx, " ", "'"); "<"
 next idx
 

Environment ist: RP2350, MMBasic V6.00.2RC6

Regards,
Gerald


-----------------------------------------------------
Edited 2025-03-22 17:16 by ville56
                                                                 
73 de OE1HGA, Gerald
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2416
Posted: 07:35am 22 Mar 2025
Copy link to clipboard 
Print this post

  Quote  OPTION MILLISECONDS doesn't appear in OPTION LIST
I think it is a temporary option that does not get saved.
In a program put it near the start. If you want it all the time put it in Sub MM.StartUp.
 
     Page 8 of 44    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025