Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:44 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 5 of 13    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 11:24am 19 Apr 2023
Copy link to clipboard 
Print this post

My guess (and it's pure fantasy speculation) is that generating the increased PWM carrier frequency at higher CPU speed is to blame assuming that the CPU time it takes is now a constant % irrespective of the speed.

Previously:

@252000 MHz, ~12% = 30000 Mhz were used for PWM leaving 222000 MHz

Now (here comes the fantasy):

@252000 MHz, ~23% = 80000 Mhz were used for PWM leaving 172000 MHz

Which would be 22% slower c.f. my 30+% estimate from earlier.

But it may all be fantasy - I will test.

Best wishes,

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 11:38am 19 Apr 2023
Copy link to clipboard 
Print this post

don't bother - load RC5 again - your command fix should be there

Also try OPTION FAST AUDIO ON at the top of your program
This suppresses click removal and is a temporary option - default OFF
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3816
Posted: 11:53am 19 Apr 2023
Copy link to clipboard 
Print this post

b30.zip
b32.zip

V5.07.07bnn uf2 files

John
b30.zip

b32.zip
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 11:58am 19 Apr 2023
Copy link to clipboard 
Print this post

Thanks Peter and John.

I've got a gRPC client to write now, but will hopefully have time to shake this out tonight - apologies for being the slow link in the chain.

Best wishes,

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4255
Posted: 01:55pm 19 Apr 2023
Copy link to clipboard 
Print this post

@John, Tom, Peter,

Using picofrog as reference

- b30 (thanks John) is still fine
- b32 is still fine
- RC1 is slow
- RC5 does not fix it
- RC5 option fast audio on, first line of program, does not fix it

Somewhere between b32 and RC1 the change happened apparently
This changed in between (much to do with audio)...


V5.07.07RC1
Fixes bug in PLAY SOUND when switching from B to L or R
Implements PLAY FLAC - same as PLAY WAV but for FLAC files

V5.07.07b34/ Web version 5.07.07b4

LIBRARY LIST ALL implemented
Support for mono output in PLAY SOUND
PLAY SOUND chan, M, waveform, freq [,vol]
When M is set the right channel is set to to be the invert of the left
Support for user load sound profiles
Use PLAY SOUND LOAD array%() to load a sound
array%() must be a 1024 element array loaded with 4096 16-bit sound levels between 0 and 4095
Use PLAY SOUND chan, L/R/B, U, freq to output the loaded sound
Array%() is easily created from a normal 4096 element array using
MEMORY PACK inarray%(),array%(), 4096, 16

V5.07.07b33/ Web version 5.07.07b3

Support for MCP4822 DAC (8 pin version) for audio output
USE:
OPTION AUDIO SPI CSpin, LDACpin, SCKpin, SDIpin
to enable this. NB: SCKpin and SDIpin must be valid SPI TX and CLK pins as per the manual. The SPI channel is dedicated to the DAC and can't be shared. This mode will also use the PWM channel associated with the CLK pin chosen.
e.g OPTION AUDIO SPI GP0, GP1, GP2, GP3 uses SPI and PWM 1
USE standard syntax for PWM AUDIO output

b33/b3 also changes the frequency used for PWM and SPI output for audio as follows

CPU frequency 48-251MHz - 44100Hz
CPU frequency 252-377MHz - 88200Hz
CPU frequency 378MHz -132300Hz


Volhout
Edited 2023-04-20 00:01 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 02:45pm 19 Apr 2023
Copy link to clipboard 
Print this post

Thanks for doing the leg-work @Volhout,

Here is b34

Hopefully @JohnS or @Lizby can provide b33.

Best wishes,

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4255
Posted: 02:47pm 19 Apr 2023
Copy link to clipboard 
Print this post

Maybe the interrupt code has grown out of the cache or RAM...?

Volhout
P.S. Tom: tonight I can test again... not immediately...
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 03:23pm 19 Apr 2023
Copy link to clipboard 
Print this post

  Volhout said  P.S. Tom: tonight I can test again... not immediately...


Please, it means that if I get any time tonight I can spend it getting more of my firmware test-suite running on the PicoMite instead of chasing this.

Best wishes,

Tom
Edited 2023-04-20 01:23 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3816
Posted: 03:23pm 19 Apr 2023
Copy link to clipboard 
Print this post

Sadly I don't have b33 - missed it :(

John
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 03:25pm 19 Apr 2023
Copy link to clipboard 
Print this post

  JohnS said  Sadly I don't have b33 - missed it :(


No worries, it's on the list provided earlier by @lizby so presumably he does have it.

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 03:36pm 19 Apr 2023
Copy link to clipboard 
Print this post

Please all stop wasting your time. I know the change which made the difference - i.e. that the audio could take the same percentage of CPU at higher clock speeds as at lower and will back it out in the next release candidate. This will be when I get to the bottom of whether Frank has found a bug or is just misunderstanding how layers work with SPI displays
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 03:41pm 19 Apr 2023
Copy link to clipboard 
Print this post

Guess I'm not as daft as I look ... sorry, couldn't resist .

Speaking for myself I wasn't wasting time, I was being proactive. Much as I appreciate it, it shouldn't be up to you to spoon feed us.

Thanks as ever for all your efforts.

Tom
Edited 2023-04-20 02:01 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 10:42pm 19 Apr 2023
Copy link to clipboard 
Print this post

Hi Peter,

My firmware tests are looking very good on the PicoMite, though I haven't got through them all yet; some more work is required to get them fully automated on the PM.

One bug:

> Dim a$ = String$(200, "a")
> Dim b$ = String$(200, "b")
> Dim c$ = a$ + b$
Error : String too long
> Inc a$, b$
>


CMM2, MMB4W and MMB4L all report a "String too long" error for the INC command.

One query:

Is it correct that user ERRORs on the PicoMite are not reported with line numbers ?

> list "errors.bas"
Print "Hello"
Error "foo"
End
> run "errors.bas"
Hello
Error : foo
>


Best wishes,

Tom
Edited 2023-04-20 08:50 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 02:01am 20 Apr 2023
Copy link to clipboard 
Print this post

Hi All,

  JohnS said  Sadly I don't have b33 - missed it :(

John


I know this may all now be moot but I have b33 in my history (unzipped) I re-zipped and the file is only 1.5MB and I get a File too large (TBS should support 10MB)

The error displayed is

413 Request Entity Too Large
nginx/1.14.1

If anyone wants it PM me and I can email it to you.

Regards,

Mick

EDIT **

I will try individual uf2 files


PicoMiteV5.07.07b33.zip

PicoMiteVGAV5.07.07b33.zip

PicoMiteWebV5.07.07b3.zip

Hmm, that seems to work.

Regards,

Mick
Edited 2023-04-20 12:04 by bigmik
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 09:35am 20 Apr 2023
Copy link to clipboard 
Print this post

V5.07.07RC6

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

Bug fix to LOAD JPG
Error now generated by  CAT/INC command when arrays exceed 255
Optimisations for PLAY WAV and PLAY SOUND when left and right channels are the same or (SOUND only) inverted
WebMite can now overclock to 378MHz
"Click removal" overhead of changing volume or type of sound for PLAY SOUND can now be removed using OPTION FAST AUDIO ON/OFF in a program - defaults to OFF
Interrupt frequency for Audio now reduced to max of 44100 or WAV/FLAC frequency irrespective of CPU speed

I've done detailed analysis of the overhead of using audio on running a CPU intensive program and these are the results. The number is the time taken in seconds to compute a solar eclipse over a period of 30 days

At 252MHz without audio the VGA version is 9.7% slower than the PicoMite and the WebMite is 18% slower.
Best case audio is a mono tone on the PicoMite at 378MHz which has just a 7.1% impact on performance.
Worst case is FLAC playback on the PicoMiteVGA at 126MHz which has a 143.8% impact.


        Normal    Tone**    Sound**    Wav      Flac
PicoMite
133MHz   66.04     78.70     86.33     114.23   153.58
252MHz   34.62     38.17     39.95      48.69    59.80
378MHz   23.06     24.69     25.39      29.70    36.00

PicoMiteVGA
126MHz   75.34     91.13    101.33     137.43   183.71
252MHz   37.98     41.75     43.69      53.27    64.70
378MHz   25.49     27.18     27.97      32.66    39.18

WebMite (wifi connected)
133MHz   78.58     96.06    105.90     129.84      *
252MHz   40.85     45.42     47.94      55.16      *
378MHz   27.15     29.36     30.25      33.90      *
* Not enough memory for flac and program
** Best case - mono output




Edited 2023-04-20 19:35 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 10:39am 20 Apr 2023
Copy link to clipboard 
Print this post

Hi Peter,

Initial smoke tests show that the performance is restored - Hurrah!    

However:
> option list
PicoMiteVGA MMBasic Version 5.07.07RC6
OPTION KEYBOARD UK
OPTION CPUSPEED (KHz) 252000
OPTION SDCARD GP13, GP11, GP12, GP10
OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3
> list
Play Sound 1, B, S, 200
Play Sound 2, B, S, 300
Play Sound 3, B, S, 400

Pause 1000

Play Sound 1, B, O
Play Sound 2, B, O
Play Sound 3, B, O

Do : Loop
> run


After the PAUSE it plays noise instead of shutting the sound off ?

Also regarding MONO playback, is that simply a case of replacing B with M ? When I naively do that I get no, or extremely choppy output - is that because I am currently playing out of a stereo speaker (a cheap Anker desktop can) and the in-phase and out-of-phase sounds are cancelling each other out ?

Best wishes,

Tom
Edited 2023-04-20 20:40 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4255
Posted: 10:43am 20 Apr 2023
Copy link to clipboard 
Print this post

Peter,

Confirmed that picofrog is running fine on RC6.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 11:26am 20 Apr 2023
Copy link to clipboard 
Print this post

  Quote  Also regarding MONO playback, is that simply a case of replacing B with M ? When I naively do that I get no, or extremely choppy output - is that because I am currently playing out of a stereo speaker (a cheap Anker desktop can) and the in-phase and out-of-phase sounds are cancelling each other out ?


Yes. In M mode the two signals are a differential pair

  Quote  However:


Oops

}
}
if(monosound[i]==1)rightv+=j;
else rightv-=j;


instead of

}
if(monosound[i]==1)rightv+=j;
else rightv-=j;
}


I've updated the download - no version change

NB: the performance gain with sound is with both "B" and "M"
Edited 2023-04-20 21:30 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4047
Posted: 11:33am 20 Apr 2023
Copy link to clipboard 
Print this post

  matherp said  I've updated the download - no version change


Thanks.

One query:

Is it correct that user ERRORs on the PicoMite are not reported with line numbers ?
> list "errors.bas"
Print "Hello"
Error "foo"
End
> run "errors.bas"
Hello
Error : foo
>


I don't mind (other than it's nice to have it the same on all platforms), but if it is meant to be different from the CMM2/MMB4W then I will update my firmware tests appropriately for the PM.

Best wishes,

Tom
Edited 2023-04-20 21:34 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 12:37pm 20 Apr 2023
Copy link to clipboard 
Print this post

Appears so - presumably I copied from MM2

void cmd_error(void) {
unsigned char *s;
if(*cmdline && *cmdline != '\'') {
s = getCstring(cmdline);
    CurrentLinePtr = NULL;                                      // suppress printing the line that caused the issue
error(s);
}
else
error("");
}
 
     Page 5 of 13    
Print this page
© JAQ Software 2024