Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 release candidates - all versions

   Page 8 of 52    
Posted: 07:37am
21 Mar 2025
Copy link to clipboard
disco4now
Guru


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


 
Posted: 07:55am
21 Mar 2025
Copy link to clipboard
matherp
Guru

You can't use variables in PIO instructions just unquoted literal strings
 
Posted: 09:06am
21 Mar 2025
Copy link to clipboard
disco4now
Guru


  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
 
Posted: 09:09am
21 Mar 2025
Copy link to clipboard
electricat
Senior Member


@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
 
Posted: 09:32am
21 Mar 2025
Copy link to clipboard
Amnesie
Guru

@ 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
 
Posted: 11:04am
21 Mar 2025
Copy link to clipboard
matherp
Guru

  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
 
Posted: 11:23am
21 Mar 2025
Copy link to clipboard
electricat
Senior Member


  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.
 
Posted: 11:32am
21 Mar 2025
Copy link to clipboard
Volhout
Guru

@Peter,

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

Volhout
 
Posted: 02:07pm
21 Mar 2025
Copy link to clipboard
electricat
Senior Member


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
 
Posted: 02:25pm
21 Mar 2025
Copy link to clipboard
matherp
Guru

The editor switches to mode 1 if the horizontal resolution is less than 512 otherwise it leaves you in the current mode
 
Posted: 04:36pm
21 Mar 2025
Copy link to clipboard
matherp
Guru

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
 
Posted: 05:18pm
21 Mar 2025
Copy link to clipboard
toml_12953
Guru

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


OK for me now. Thanks!
 
Posted: 05:57pm
21 Mar 2025
Copy link to clipboard
goc30
Guru


  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
 
Posted: 06:02pm
21 Mar 2025
Copy link to clipboard
matherp
Guru

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


https://www.thebackshed.com/forum/ViewTopic.php?TID=17631&PID=234989#234989
 
Posted: 06:28pm
21 Mar 2025
Copy link to clipboard
goc30
Guru


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
 
Posted: 06:52pm
21 Mar 2025
Copy link to clipboard
matherp
Guru

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

OPTION LCDPANEL SSD1963_4_16, LANDSCAPE,,GP36,,GP2
 
Posted: 02:59am
22 Mar 2025
Copy link to clipboard
goc30
Guru


  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
 
Posted: 05:47am
22 Mar 2025
Copy link to clipboard
toml_12953
Guru

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
 
Posted: 07:14am
22 Mar 2025
Copy link to clipboard
ville56
Senior Member

@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
 
Posted: 07:35am
22 Mar 2025
Copy link to clipboard
phil99
Guru


  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 52    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025