Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:55 21 Aug 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.01.00 betas

     Page 3 of 7    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10364
Posted: 01:45pm 01 Aug 2025
Copy link to clipboard 
Print this post

mozzie, please try this (HDMIUSB)
PicoMite.zip
Greyscale should work and I have reduced the 1024x600 frequency from 252 to 250MHz which is what it was before (gives about 59Hz)
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 171
Posted: 03:33pm 01 Aug 2025
Copy link to clipboard 
Print this post

G'day Peter,
Good news, the Gray/Greyscale command now works in all resolutions, tested in mode 3  

Not so good news: 1024x600 still no joy  
For reference:
PicoMiteV6.00.03b2 works:
Main monitor shows 1024x600 @ 60Hz @ 250000khz cpuspeed
Waveshare DVI monitor works
Elecrow HDMI monitor works

PicoMiteV6.00.03b5 + latest download
Main monitor shows 1024x600 @ 30hz @ 250000khz cpuspeed (both)
Waveshare DVI monitor no display
Elecrow HDMI monitor - intermittent sync only

I was also testing on another waveshare HDMI 1024x600 but might have damaged a plug so a bit of repair work to do before trying it again.

Also no real hurry to get this sorted, put it on the "to do" list if it suits  

Regards,
Lyle.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10364
Posted: 03:53pm 01 Aug 2025
Copy link to clipboard 
Print this post

OK - I think I understand the issue

Try again


PicoMite.zip
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 171
Posted: 04:57pm 01 Aug 2025
Copy link to clipboard 
Print this post

G'day Peter,
Excellent News, that's fixed it      

All screens now rock solid at 1024x600 @ 60Hz  

Not sure about anyone else but looking at LCD's working at other than there native resolution ends up giving me a headache  

The Waveshare Pico DVI is really clear and bright, just a shame it needs an adapter board to align the HSTX pins correctly.

My thanks again.

Regards,
Lyle.
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1613
Posted: 01:02pm 04 Aug 2025
Copy link to clipboard 
Print this post

Hi Peter,
this is a feature request for the next (or the one after) version:
Is it possible to allow this syntax (analogous to Xmodem) for the Flash commands:

Flash Save, Overwrite, Load, Erase, Run, and Chain

alternatively:

Flash S, O, L, E, R and C?


Another question (a request) concerns custom sounds:
PLAY LOAD SOUND array%()

Is it possible to expand the array size so that the sound lengths can be increased? I'm thinking quadrupling it. This would expand the range of useful sound effects and sounds integrated into the program.
"Memory Pack" wouldn't necessarily have to be changed. This could easily be done in Basic. If there are compelling reasons for maintaining the 1024 element limit, please disregard this request.

Another request regarding the command is an "automatic" time limit with an additional, optional parameter in ms.
PLAY LOAD SOUND array%(), duration

This would allow a single sound to be output instead of an endless loop, without having to resort to any tricks on the user side. I know – Phil explained it – that the command was originally only intended for single waveforms (one period).

Kind regards
Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10364
Posted: 02:02pm 04 Aug 2025
Copy link to clipboard 
Print this post

The 1024 limit and continuous repeat is hardwired into the way play sound works. An alternative approach could be to implement something like

PLAY ARRAY l%(), r%(), freq [,terminationinterrupt]

This would require packed arrays (could be the same array for left and right) of 16 bit values in the range -32768 to 32767 and would output the values in the array at the frequency specified.

This is effectively the same as PLAY WAV except that the values would be read from the array rather than from a disk file and so would be immediately available with no overhead

  Quote  Is it possible to allow this syntax (analogous to Xmodem) for the Flash commands:

Flash Save, Overwrite, Load, Erase, Run, and Chain


Don't understand what you are wanting
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1613
Posted: 03:45pm 04 Aug 2025
Copy link to clipboard 
Print this post

Hi Peter,

PLAY ARRAY l%(), r%(), freq* [,terminationinterrupt]

I like it!

But I would prefer "PLAY ARRAY l%(), r%(), (freq) multiplier *[, duration]"

*"freq" is identical to "freq multiplier"
A sound snippet usually doesn't have a single frequency.

The "termination interrupt" probably doesn't achieve the desired result.
The problem lies in the fixed Array() size (I'm now thinking of PLAY LOAD SOUND array%()) of the sound array and the fact that the length of the sound effects doesn't necessarily match it. If the arrays for "Play Array" are of any size (to be set by the user), then the time limit (duration) is unnecessary!
I was thinking of a (intern interrupt-controlled) time limit. But if that’s not possible, I’ll just have to turn off the sound externally. Ideally, I would like to have the option to play only part of the sound snippet.

  matherp said  
  Quote  Is it possible to allow this syntax (analogous to Xmodem) for the Flash commands:

Flash Save, Overwrite, Load, Erase, Run, and Chain

Don't understand what you are wanting


My suggestion is to simply enable "Flash O 2" instead of "Flash Overwrite 2". This could perhaps also be done with "RAM" for PSRAM.
I'm so lazy!

Thanks for your attention!
Michael
Edited 2025-08-05 02:14 by twofingers
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10364
Posted: 04:31pm 04 Aug 2025
Copy link to clipboard 
Print this post

freq is the rate that the system will clock out the samples and therefore the size of the array and the freq determine the duration. If you want more fexibility I could  add

PLAY ARRAY l%(), r%(), freq [,start] [,end] [,terminationinterrupt]

This would allow you to play a subset of the array.


  Quote  My suggestion is to simply enable "Flash O 2" instead of "Flash Overwrite 2".


No chance
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1613
Posted: 04:39pm 04 Aug 2025
Copy link to clipboard 
Print this post

That's fine with me.

Many thanks! & Kind regards
Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10364
Posted: 10:06am 05 Aug 2025
Copy link to clipboard 
Print this post

Michael

What version would you like to test with (preferably one of the RP2350 ones) ?
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1613
Posted: 10:15am 05 Aug 2025
Copy link to clipboard 
Print this post

  matherp said  Michael

What version would you like to test with (preferably one of the RP2350 ones) ?

Hi Peter,
RP2350+ HDMI+USB

I look forward to it!

Best regards
Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10364
Posted: 10:47am 05 Aug 2025
Copy link to clipboard 
Print this post

PicoMite.zip

PLAY ARRAY l%(), r%(), freq [,startsample] [,endsample] [,terminationinterrupt]


Option base 0
Dim l%(4095),p%(16383)
Timer =0
For i=0 To 16383
p%(i)=Sin(Rad(i*10))*16000
Next
Memory pack p%(),l%(),16384,16
Play array l%(),l%(),16000,4000,15000,myint
Print MM.Info(sound)
Do
Loop Until MM.Info(sound)="OFF"
Print Timer

Sub myint
Print "done"
End Sub
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1613
Posted: 01:29pm 05 Aug 2025
Copy link to clipboard 
Print this post

Hi Peter,
Thanks for the test firmware.
Your example works for me.

But unfortunately, it doesn't do what I want. For example, I want to generate a 440 Hz (fundamental frequency) gong tone or store an ADSR waveform in an array and play it back with Play Array(). If I want to play a 440 Hz waveform as 880 Hz, I should be able to do that by specifying Freq=2. This is how it works for me with PLAY LOAD SOUND.

I suspect we've misunderstood each other. It's not suitable for the intended purpose. But I'd like to test some more.

Another thing: Have you changed the syntax for do/loop? Is DO UNTIL now prohibited?

Do Until 1
Loop
End


[1] Do Until 1
Error : Syntax

Kind regards
Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10364
Posted: 01:44pm 05 Aug 2025
Copy link to clipboard 
Print this post

You are misunderstanding. The frequency you specify is the frequency of the samples being clocked out.

Suppose you create your 440 gong which lasts 2 seconds as 17600 elements in the packed array. Then you specify a frequency of 8800.
If you change the frequency to 17600 then the gong will be twice the frequency and last half as long

DO UNTIL has never been valid and is now properly blocked. Previously the results were indeterminate
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1613
Posted: 02:01pm 05 Aug 2025
Copy link to clipboard 
Print this post

  matherp said  You are misunderstanding. The frequency you specify is the frequency of the samples being clocked out.


I imagined Play Array would work like Play Load + Play Sound. It used to be possible to set the frequency to 1 and play the samples at the original frequency. That's no longer possible with Play Array. Too bad.


  matherp said  DO UNTIL has never been valid and is now properly blocked. Previously the results were indeterminate


Good to know.
It's not difficult to correct, but it does mean that some older programs terminate with an error message.

Regards
Michael
causality ≠ correlation ≠ coincidence
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 689
Posted: 09:06am 06 Aug 2025
Copy link to clipboard 
Print this post

Hello,

I have report a possible bug (a least MMBASIC crashes & reboots) PicoMiteHDMI:

Problem: I have a (bigger) program, which has an image viewer function. The program itself works in general in:

Resolution 720 MODE 3   (to have 16 colours and biggest resolution)

Now, for my image viewer I switch to MODE 4 in program to view the image in 32768 colours.

After some time it crashes and reboots. This occurs after 10 or sometimes after 24 and even after 60 iterations. It crashes with ALL my images (!)

So I made a small test program and it is perfectly reproducable (but as said maybe it takes 60+ iterations, bu often it crashes around ~25...

Here is the program, to be safe, I also packed it with the image (bmp) I used into a *.zip.


'crash in resolution 720p when loading an image
Option Explicit

Dim Integer count=0

Do
 CLS
 MODE 3
 Print @(50,50),count
 Pause 1000
 MODE 4
 Pause 1000
 Load image "mole"
 Pause 1000
 Inc count
Loop



My settings:



And the complete zip with program & example image:

crash.zip


Edit: I`ve done some experiments, the Pause doesn't seem to have an influence of he crash, increasing (up to 3000) or decreasing (100) it doesn't change he liklyhood of this crash event. But with my last crash I even manged to do some more harm! Now my pico has done a full reset. All my settings are lost! No a problem. But maybe worth to mention?  



Greetings
Daniel
Edited 2025-08-06 19:42 by Amnesie
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5156
Posted: 10:12pm 06 Aug 2025
Copy link to clipboard 
Print this post

I am not sure it is allowed to define variables before changing the mode.
Since changing video changes the RAM memory map, so also RAM that could be asigned to a variable (i.e. count).

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10364
Posted: 08:59am 07 Aug 2025
Copy link to clipboard 
Print this post

Daniel

Was able to reproduce, nothing to do with variables, nothing to do with loading images - does it without that statement. The issue is the timing of the mode change relative to the video scan. I've now constrained that and it now works for me (count at 335 and still running)- please test HDMI (non-USB) version attached.


PicoMite.zip

PS thanks for the perfect simple diagnostic program  
Edited 2025-08-07 19:06 by matherp
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 689
Posted: 09:47am 07 Aug 2025
Copy link to clipboard 
Print this post

Peter!

Ha! I can confirm, it is fixed, wasn' able to crash it again. Rock solid! Great work, now I can preview nice images. Ahhh I love this HDMI version now      


Greeings
Daniel
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1613
Posted: 11:07am 07 Aug 2025
Copy link to clipboard 
Print this post

Hi Peter,
I think I have to apologize. I've thoroughly tested "Play Array()" again and found that it meets all requirements. My mistake was probably assuming that "freq" would work like "Play Sound." Unfortunately, I still don't fully understand it, but I can handle it. The maximum achievable sound length – at low quality – is about 30 seconds. That's much longer than expected and allows for multiple sound effect snippets in one array. To save memory space, I write directly to a packed array.

Great work! Thank you very much!

My Play Array() test program is attached.
testplay.zip
Kind regards and thank you for your patience
Michael
causality ≠ correlation ≠ coincidence
 
     Page 3 of 7    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025