Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:52 16 May 2024 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/PicoMiteVGA V5.07.05 betas

     Page 9 of 11    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8603
Posted: 05:44pm 08 Aug 2022
Copy link to clipboard 
Print this post

SPI CLOSE frees up the pins so you need to SETPIN before each open if you are closing and re-opening SPI. Manual page 140

  Quote  SPI Close
If required the first SPI channel can be closed as follows (the I/O pins will be set to inactive):
SPI CLOSE

Edited 2022-08-09 03:46 by matherp
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 414
Posted: 05:49pm 08 Aug 2022
Copy link to clipboard 
Print this post

Thanks Peter, I had just found that it seemed to be being caused by the multiple Open and Close calls, I'll look at getting rid of them as I don't think they are necessary on the Pico, because of the 2 SPI busses.
Thanks very much for the fix. :-)
Regards, Kevin.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8603
Posted: 12:44pm 09 Aug 2022
Copy link to clipboard 
Print this post

PicoMite V5.07.05b16

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

Fixes bug in GUI DELETE
Fixes bug in passing string function to time$
Fixes bug in OPTION LIST for some displays
Revised version of CSub header to cater for compiler change

KNOWN issues with Geoff
GUI NUMBERBOX ACTIVATE/CANCEL
GUI FORMATBOX ACTIVATE/CANCEL
both in manual but not in firmware
BUG in GUI TEXTBOX ACTIVATE see here for details

  Quote  I've checked the manual and can't find it, but is anyone aware of a way on the PicoMite VGA to PRINT to the USB console and not to the VGA display ?


You can use OPTION LCDPANEL NOCONSOLE in which case only TEXT commands will write to the display (Use OPTION LCDPANEL CONSOLE [font] to restore). Alternatively just open a COM port and Print diagnostics to that.

I am not going to implement the MMB4W/CMM2 functionality. All these sorts of extra conditionality slow things down slightly and add complexity to both code and documentation and KISS is more important for the Pico
Edited 2022-08-09 22:59 by matherp
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 842
Posted: 10:08pm 09 Aug 2022
Copy link to clipboard 
Print this post

Hi Peter (all),
Thanks for ensuring that my gripe about GUI TEXT ACTIVATE is on the list.

Regards,

Andrew
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 10:14am 10 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  PicoMite V5.07.05b16
...
You can use OPTION LCDPANEL NOCONSOLE in which case only TEXT commands will write to the display (Use OPTION LCDPANEL CONSOLE [font] to restore). Alternatively just open a COM port and Print diagnostics to that.


Thanks Peter, I'll give it a try the OPTION the next time I am infront of the hardware. I'm not so keen on having to open a COM port when I already have a perfectly good terminal connected over the USB.

  matherp said  I am not going to implement the MMB4W/CMM2 functionality. All these sorts of extra conditionality slow things down slightly and add complexity to both code and documentation and KISS is more important for the Pico


It's your wheelhouse, and I wouldn't like to comment further before I've had a chance to give it a run out.

Best wishes,

Tom
Edited 2022-08-10 20:15 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 10:08pm 11 Aug 2022
Copy link to clipboard 
Print this post

  thwill said  I'll give it a try the OPTION the next time I am infront of the hardware.


OK, tested and I can probably do something with it. The main downside being that OPTION LCDPANEL NOCONSOLE seems to clear the VGA display - not asking for a change since I'm not sure how/if I'm going to use it, just making an observation.

I've got a new bug for you:
> ? Mm.Device$
PicoMiteVGA
> ? Mm.Info(Version)
5.070515
> ? Cwd$
A:/
> MkDir "mydir"
> ? Mm.Info(FileSize "mydir")
-2
> ? Mm.Info(FileSize "/mydir")
-2
> ? Mm.Info(FileSize "A:/mydir")
-1
> ? Mm.Info(FileSize "A:\mydir")
-1


I believe it should be -2 in all cases for an existing directory.

I'm using this as the alternative to MM.INFO(EXISTS [FILE|DIR] f$) which would still be nice to have for consistency.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8603
Posted: 07:52am 12 Aug 2022
Copy link to clipboard 
Print this post

OK can fix. If you want the exists syntax please write it and I will include.
Edited 2022-08-12 18:12 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 08:30am 12 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  OK can fix.

Thank you Peter, you edited your original message before I could respond. Looks odd, on first blush I guess f_stat() is not returning FR_OK given those directory paths ? I look forward to examining the fix on github.

  matherp said  If you want the exists syntax please write it and I will include.

Damn you for your perfectly reasonable response . I've been trying to avoid adding  this particular string (building the PicoMite firmware) to my bow, but I can hardly refuse such an offer - there are just a bunch of other things in the TODO list before i get there. Let's hope we don't both live to regret it.

Thanks again,

Tom
Edited 2022-08-12 18:31 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8603
Posted: 02:14pm 12 Aug 2022
Copy link to clipboard 
Print this post

PicoMite V5.07.05b17

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

Max editor clipboard size now 16384 characters (still does not support page up/down in mark mode)
Fixes bugs in MM.INFO(filename and MM.INFO(Modified
Max number of BLIT buffers now 32 (memory dependent)
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 02:37pm 12 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  Fixes bugs in MM.INFO(filename and MM.INFO(Modified


Huh ? has this comment been mangled ?

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8603
Posted: 02:49pm 12 Aug 2022
Copy link to clipboard 
Print this post

Fixes bug in MM.INFO(filesize ... and MM.INFO(Modified ...
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5768
Posted: 04:24pm 12 Aug 2022
Copy link to clipboard 
Print this post

Many, many thanks for the bigger clipboard in particular, Peter. :)
Mick

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

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 09:32pm 12 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  PicoMite V5.07.05b17 ...


Thanks Peter,

You've fixed the MM.INFO(FileSize ...) bug as reported, but:
> ? Mm.Info(FileSize "\")
-1
> ? Mm.Info(FileSize "\")
-1
> ? Mm.Info(FileSize "/")
-1
> ? Mm.Info(FileSize "A:/")
-1
> ? Mm.Info(FileSize "A:\")
-1
> ? Mm.Info(FileSize "")
-1


I think all these should return -2, I've even convinced myself wrt to the last one now c.f. the CMM2 thread.

There is no urgency as it probably only matters to me and I can look at it when I add supports for EXISTS ... in a few weeks if/when I manage to clear one of my other in-progress tasks.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8603
Posted: 06:41am 13 Aug 2022
Copy link to clipboard 
Print this post

  Quote   think all these should return -2, I've even convinced myself wrt to the last one now c.f. the CMM2 thread.


In all these cases fstat does not return FR_OK. The last one only works in CMM2 because it is treated as a special case by the firmware
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3585
Posted: 08:41am 14 Aug 2022
Copy link to clipboard 
Print this post

@Peter,

As of recent, the BLIT command was renamed SPRITE.
I however find it confusing. Isn't it better to leave it with BLIT ?

Look at this piece of code:
Do
         Pause 0.26
         x=Min(500,x+3)
         p=Peek(word ff)
         n=Min(Max((640-p)/22,0),9) 'convert to index
         'n=(p<571)+(p<522)+(p<480)+(p<500)+(p<632)+(p<445)+(p<600)+(p<462)+(p<545)
         Sprite 0,40+n,x,y,3,3
       Loop Until p>u And Timer>60


It is just copying a piece of video memory to another location. There seems no relation with sprites whatsoever. Just a block copy.

The confusion is also in the editing. When you have a program that uses BLIT, it is converted to SPRITE. But when you comment the line, it is BLIT again.


As a second item I would like to discuss the tranparency. In sprites, the color 0 (black) is transparent. Is there any way to use hard black in sprites ? In the above example I used the BLIT copy command so I did not have to use a sprite copy. The BLIT copies black as black. The sprite would use transparent.


I know my application is not using sprites for games, it is simply creating a solid picture from data. And for this I cannot use the sprites as is (unless I am missing something).

P.S. above runs in mode 1.

Volhout
Edited 2022-08-14 19:23 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 10:26am 14 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  
  Quote   think all these should return -2, I've even convinced myself wrt to the last one now c.f. the CMM2 thread.


In all these cases fstat does not return FR_OK. The last one only works in CMM2 because it is treated as a special case by the firmware


I'm not sure I understand your point here Peter. Is it that this particular implementation of fstat() should define the be-all and end-all of what a directory is in MMBasic ? Anyway for the moment I will cut my own furrow and if and when I have some firmware code to share I will pass it along for your consideration.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8603
Posted: 10:48am 14 Aug 2022
Copy link to clipboard 
Print this post

The code is looking for the FILESIZE nothing else. A return of -2 is used if FSTAT happens to say it is a directory rather than -1 which says not found. If it doesn't work for specific directory syntax that could never define a filename that seems entirely reasonable. It never pretended to be an analogue for EXISTS DIR.
Edited 2022-08-14 20:51 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 11:01am 14 Aug 2022
Copy link to clipboard 
Print this post

  matherp said  It never pretended to be an analogue for EXISTS DIR.


That's kind of the point ... for a significant time in the later development of the CMM2 it WAS the way of determining if a directory existed ... and then you got sufficiently hastled by my finding issues (sorry!) that you introduced EXISTS DIR ... but not on PicoMite.

Anyway, leave it with me, and if you don't like what I produce for the PicoMite you can throw it back in my face - if I never actually do anything about it then draw your own conclusions.

EDIT: just in case anyone (beyond Peter) is wondering why I am being such an arse about this it's because in the development of MMB4L and my 'sptools' library I have written an ever growing set of automated unit-tests for the firmware that will run on CMM2, MMB4W and MMB4L (and eventually PicoMite - though I may have to have a *special* firmware to support running them) and these (a) exercise many of the edge-conditions which most MMBasic developers will only encounter once in a blue moon, and (b) pick-up the differences between the different MMBasic dialects.

Best wishes (seriously),

Tom
Edited 2022-08-14 21:06 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8603
Posted: 11:14am 14 Aug 2022
Copy link to clipboard 
Print this post

Volhout

BLIT and SPRITE use the same command and I've run out of command slots to allow both. The code can use either but the token is the same and therefore LIST will show SPRITE

On your second point, The documentation of BLIT WRITE is out-of-date relative to the latest firmware. See the CMM2 manual for the correct syntax and note how specifying a 0 as the last parameter will make SPRITE WRITE output the "transparent" pixels
Edited 2022-08-14 21:15 by matherp
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 06:40pm 15 Aug 2022
Copy link to clipboard 
Print this post

Hello,
I'm testing PicoMite V5.07.05b17 (non vga) - in the Editor F1 now saves and runs the current programme just like F2, it should't do that, right?
 
     Page 9 of 11    
Print this page
© JAQ Software 2024