Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:52 29 Nov 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/WebMite V5.07.07 release candidates

     Page 12 of 13    
Author Message
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3805
Posted: 03:55pm 01 May 2023
Copy link to clipboard 
Print this post

  thwill said  PicoMite:
> ? Format$(55, "%-5g")
55.0000


MMB4L & MMB4W:
> ? Format$(55, "%-5g")
55


Tom

Looks like a bug in the C library used for the PicoMite.

Maybe they'll fix it one day...

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9131
Posted: 09:35pm 01 May 2023
Copy link to clipboard 
Print this post

Definitely a bug in the Pico sdk but there is a workaround to use the newlib version instead and that fixes it so the release version will be correct
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4252
Posted: 06:59am 02 May 2023
Copy link to clipboard 
Print this post

@Peter

Minor request for the release version. Is it possible to show available disk space on a: when typing "files" ?
Don't want this at b: since it takes a longer time, but for a: (that has 750k only) is is handy to have an idea if what you are trying to store, would actually fit.

I know there is ?mm.info(disk space) as a separate command.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 08:51am 02 May 2023
Copy link to clipboard 
Print this post

Peter,

The PicoMite can get into an unbreakable "Error : Too many labels" state akin to the "Error : Too many subroutines and functions" state - @disco4now reported this a few pages back and I have now encountered it myself.

  matherp said  Since a "proper" program doesn't have any labels then counting them makes no difference to the subroutine number.


Almost true, except a "proper" program probably has labeled DATA - which is what is hitting me.

Best wishes,

Tom
Edited 2023-05-02 18:58 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 08:54am 02 May 2023
Copy link to clipboard 
Print this post

... and re-flashing the RC8a firmware doesn't help, it's still stuck:

PicoMite MMBasic Version 5.07.07RC8
Copyright 2011-2023 Geoff Graham
Copyright 2016-2023 Peter Mather

Error : Too many labels


Is there any way of breaking this other than the "nuke" option ?

Best wishes,

Tom
Edited 2023-05-02 19:25 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9131
Posted: 09:18am 02 May 2023
Copy link to clipboard 
Print this post

I'll put the same fix in. Try this but it will delete everything as it is the release version with a deliberate erase all


PicoMite.zip
Edited 2023-05-02 19:38 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 10:56am 02 May 2023
Copy link to clipboard 
Print this post

What gives, I've got 55K remaining but I can't allocate a 32K array - something to do with a lack of contiguous memory?

Print
Print "*** Start ************************************"
Memory
Dim a%(32*1024/8)
Print
Print "*** 32K allocated ****************************"
Memory
Dim b%(32*1024/8)
Print
Print "*** 64K allocated ****************************"
Memory
Dim c%(32*1024/8)
Print
Print "*** 96K allocated ****************************"
Memory
Dim d%(32*1024/8)
Print
Print "*** 128K allocated ***************************"
Memory
Dim e%(32*1024/8)
Print
Print "*** 160K allocated ***************************"
> run

*** Start ************************************
Program:
  1K ( 1%) Program (25 lines)
123K (99%) Free

Saved Variables:
 16K (100%) Free

RAM:
  1K ( 1%) 1 Variable
  0K ( 0%) General
151K (99%) Free

*** 32K allocated ****************************
Program:
  1K ( 1%) Program (25 lines)
123K (99%) Free

Saved Variables:
 16K (100%) Free

RAM:
 33K (21%) 2 Variables
  0K ( 0%) General
119K (79%) Free

*** 64K allocated ****************************
Program:
  1K ( 1%) Program (25 lines)
123K (99%) Free

Saved Variables:
 16K (100%) Free

RAM:
 65K (42%) 3 Variables
  0K ( 0%) General
 87K (58%) Free

*** 96K allocated ****************************
Program:
  1K ( 1%) Program (25 lines)
123K (99%) Free

Saved Variables:
 16K (100%) Free

RAM:
 97K (63%) 4 Variables
  0K ( 0%) General
 55K (37%) Free
[18] Dim d%(32*1024/8)
Error : Not enough memory


Best wishes,

Tom
Edited 2023-05-02 21:03 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9131
Posted: 11:16am 02 May 2023
Copy link to clipboard 
Print this post

There is 124K of heap for arrays and strings and things like audio buffers and 480*56=28K for simple variables and array/string pointer
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 12:16pm 02 May 2023
Copy link to clipboard 
Print this post

I'm beginning to experiment with SPRITES, and am looking forward to being able to have BLACK in sprites.

I understand that the plan was to add an additional bit to the 'mode" of SPRITE WRITE to ignore transparent pixels.

Can the SPRITE SHOW please have the same ability to ignore transparent pixels?
So the SPRITE SHOW "orientation" argument would be the same as the SPRITE WRITE "mode" argument.

Even though there is less displayed on the screen, I love the syntax highlighting of the editor.A couple of things that I've noted (cosmetic, low priority);

SPRITE LOAD is highlighted correctly, but SPRITE LOADBMP and SPRITE SHOW aren't.

Like I said, very low priority.  I am very appreciative of the work you are putting into this language.  It is a pleasure to work with.

Cheers,
Hawk.

PicoMiteVGA MMBASIC Version 5.07.06
Edited 2023-05-02 22:21 by Hawk
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 12:47pm 02 May 2023
Copy link to clipboard 
Print this post

  matherp said  Definitely a bug in the Pico sdk but there is a workaround to use the newlib version instead and that fixes it so the release version will be correct


Thanks for the fix .

  matherp said  I'll put the same fix in. Try this but it will delete everything as it is the release version with a deliberate erase all


OK. Did you change anything else, because what I thought was the offending problem is now not reporting the issue at all ?

  matherp said  There is 124K of heap for arrays and strings and things like audio buffers and 480*56=28K for simple variables and array/string pointer


That clears up that mystery, thank you - Oh for 48K more on the Pico, fingers crossed for a Pico 2.

Best wishes,

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

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2140
Posted: 12:58pm 02 May 2023
Copy link to clipboard 
Print this post

Is the recently introduced OPTION SYSTEM I2C...SLOW parameter still meant to work, or am I using it wrong?


> option list
PicoMiteVGA MMBasic Version 5.07.07RC8
OPTION SYSTEM I2C GP4,GP5
OPTION KEYBOARD US
OPTION DISPLAY 55, 128
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION RTC AUTO ENABLE
OPTION COUNT GP6,GP7,GP14,GP15

> OPTION SYSTEM I2C disable
> OPTION SYSTEM I2C GP4,GP5, slow
Error : Syntax

> OPTION SYSTEM I2C GP4, GP5, SLOW
Error : Syntax

> OPTION SYSTEM I2C GP4,GP5
>

Just the comma is enough for syntax error

OPTION SYSTEM I2C GP4, GP5,
Error : Syntax
Edited 2023-05-03 08:00 by phil99
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 11:06pm 02 May 2023
Copy link to clipboard 
Print this post


PicoMite MMBasic Version 5.07.07a29

Hello Peter,

I have a question about "WEB transmit". Is there a way to send a string directly? A diversion via a file is extremely inconvenient ...
Hopefully I only missed the command description :-)

...
ElseIf Instr(s$, "GET /json HTTP") Then
  Print "sending JSON ..."
  WEB transmit FILE a%, "jsontest.txt", "application/json"
EndIf


Content of the file or string e.g.:
{"ss":23,"internalVcc":3042}


Matthias
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 10:14am 03 May 2023
Copy link to clipboard 
Print this post

Hi Peter,

I know I'm pushing it, but is there any chance of this being added to MM_Misc.c#fun_info() as it will allow me to write unit-tests with better diagnostics:

else if (checkstring(ep, "LINE")) {
   if (!CurrentLinePtr) {
       strcpy(sret, "UNKNOWN");
   } else if (CurrentLinePtr >= ProgMemory + MAX_PROG_SIZE) {
       strcpy(sret, "LIBRARY");
   } else {
       sprintf(sret, "%d", CountLines(CurrentLinePtr));
   }
   CtoM(sret);
   targ=T_STR;
   return;
}


It returns a string, both so it can handle the UNKNOWN and LIBRARY cases, but also so it could in the future include the filename for platforms that support #INCLUDE.

Best wishes,

Tom
Edited 2023-05-03 20:22 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9131
Posted: 10:26am 03 May 2023
Copy link to clipboard 
Print this post

  Quote  Is there a way to send a string directly?


Not in this release

  Quote  Is the recently introduced OPTION SYSTEM I2C...SLOW parameter still meant to work, or am I using it wrong?


It will in the release

  Quote  but is there any chance of this being added


Done

  Quote  Can the SPRITE SHOW please have the same ability to ignore transparent pixels?


Already in the last RCs as per my post with an example on page 10 of the thread
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 10:35am 03 May 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  but is there any chance of this being added


Done


Thanks Peter, quick, push it out of the door before I have any more ideas .

Best wishes,

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

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6803
Posted: 01:29pm 03 May 2023
Copy link to clipboard 
Print this post

As if you would ...


:)
Mick

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

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 03:37pm 03 May 2023
Copy link to clipboard 
Print this post

Hello Peter.
  matherp said  
  Quote  Is there a way to send a string directly?


Not in this release



Oh, pity, you mean release and not release candidate, right?

I just tried this https://web.dev/introduction-to-fetch/
It works great so far. html, css, javascript -  top! Unfortunately, the only way to generate a JSON string is via a file. This is very counterproductive for quickly updating values on the site.
The advantage of this method is that only the updated data is sent to the client, not the whole website.
Can you put string transfer high on your wish list / to-do list :-) ? Or perform a small miracle? Thank you very much!
I will then also provide a demo ...

Matthias
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9131
Posted: 04:10pm 03 May 2023
Copy link to clipboard 
Print this post

Can you not define a file with a single string parameter in curly brackets. Then you just need to set that variable to the string you want to send. Just one file needed and very little overhead.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3151
Posted: 04:17pm 03 May 2023
Copy link to clipboard 
Print this post

  homa said  Hello Peter.
  matherp said  
  Quote  Is there a way to send a string directly?


Not in this release


Do you mean as if with netcat (nc) on a device with an operating system, e.g. from DOS or Linux command line:

echo "M 1 2 3 4" | nc 192.168.1.132 8086

or for UDP

echo "M 1 2 3 4" | nc -u 192.168.1.132 8086
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 09:10pm 03 May 2023
Copy link to clipboard 
Print this post

  matherp said  Can you not define a file with a single string parameter in curly brackets. Then you just need to set that variable to the string you want to send. Just one file needed and very little overhead.

Brilliant idea. So the variable is set in every type of file, not just the html files? I will try it tomorrow. Today I did not have the time ...
 
     Page 12 of 13    
Print this page
© JAQ Software 2024