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 V5.09.00 release candidates
Page 12 of 13 | |||||
Author | Message | ||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
A very minor issue, when using Option Base 1 Play LOAD SOUND WaveArray() gives Error : Array size Easily fixed by converting to Base 0 but Base 1 allowed an array index value to equal the harmonic numbers in the tone and simplified the wave generation function a little. eg fundamental had array index 1, 2nd harmonic had array index 2 etc. |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
Ok, got it. MAP sets the global palette, so it real time changes the video output regardless the content on screen. This could also be step one in effort to get 16 colors in RGB222 (needs 2 more PIO pins) format. If you desire so, I offer to look at the PIO code to make this work. 16 colors from a 64 color palette. Edited 2024-07-25 17:33 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2120 |
MAP demo working vga usb. It seem like amstrad 464. I'll try a demo I remember doing on amstrad 464 in the 80's. cheers, stan. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2120 |
although the demo works copying and pasting Dim integer cmap(6) 'Clear the screen MODE 2 Map reset CLS 'Set up 6 colours in the array cmap(1)=RGB(red) cmap(2)=RGB(green) cmap(3)=RGB(blue) cmap(4)=RGB(yellow) cmap(5)=RGB(magenta) cmap(6)=RGB(cyan) ' Do an initial update of the Colour map to set up our colours domap gives error domap unknown command |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
domap is a sub in this program Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9110 |
Can't replicate |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Ok, that has me stumped. At the command line I can't enter Option Base 1 so I put your lines in a program and it does not produce an error. Yet my program wouldn't run with Base 1 Later I will load RC7, convert it back to Base 1 and try again. PicoMiteVGA MMBasic Version 5.09.00RC5 Copyright 2011-2024 Geoff Graham Copyright 2016-2024 Peter Mather > option base 1 Error : Must be before DIM or LOCAL > Thanks for testing it. |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
Is there any way to use the EDIT fname$ command to edit other text files from within a running program? It works from the command line, but from a running program it gives an error ERROR : Invalid in a program |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9110 |
No: completely impossible as edit uses all the variable ram as its working buffer |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Re Option Base 1, couldn't find RC7 so loaded latest version of RC5 and it works. Found another odd thing, Play STOP is quite temperamental. When sounds are loaded, played and stopped in a loop (in a program) eventually Play STOP causes an error. [25] Play STOP Error : Invalid character: 0 Also at the command line characters after it or a space before it cause an error. > Play LOAD SOUND PLS02() : Play SOUND 3, B, U, 440, 25 > Play STOP 'error if anything after it, or a space before it Error : Unknown command > Play LOAD SOUND PLS02() : Play SOUND 3, B, U, 440, 25 > Play STOP Error : Unknown command > Edit. Only happens with a loaded sound, pre defined Q, W, S & T all ok. Edited 2024-07-27 23:23 by phil99 Footnote added 2024-07-28 08:30 by phil99 The error does not occur if the loaded array is empty. Footnote added 2024-07-28 09:08 by phil99 Filling the array directly also does not result in an error. for n=0 to 1023 : a%(n)=n*16 : next is ok There must be something wrong with my program, but can't see what. |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 213 |
Perhaps it is possible to organize a program that is running to stop it and start editing the selected file. The program selects the file to be edited, stops, and starts editing it. For example, the RUN fname$ command allows one program to start another. Edited 2024-07-28 02:01 by javavi |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2120 |
I think I figured cmap. a "3d moving matrix" demo where nothing is redrawn. 'map switching demo Dim integer cmap(13) 'Clear the screen MODE 2 Map reset CLS rgb(black) 'Set up colours in the array cmap(1)=RGB(white) cmap(2)=RGB(black) cmap(3)=RGB(black) cmap(4)=RGB(black) cmap(5)=RGB(black) cmap(6)=RGB(black) cmap(7)=RGB(white) cmap(8)=RGB(black) cmap(9)=RGB(black) cmap(10)=RGB(black) cmap(11)=RGB(black) cmap(12)=RGB(black) ' Do an initial update of the Colour map to set up our colours domap hline=76:hy=1:mch=1 line 0,75,319,75,,RGB(white) do'draw horizontal lines line 0,hline,319,hline,,map(mch) inc mch:if mch=7 then mch=1 hline=hline+hy:hy=hy+0.6 loop until hline>240 xb=-149:xt=10:mch=7 do'draw vertical lines line xb,239,xt,75,,map(mch) inc mch:if mch=13 then mch=7 xb=xb+8:xt=xt+4 loop until xb>=479 ' lr=0 do cmap(0)=cmap(6) For i=5 To 0 Step -1' move horizontal lines cmap(i+1)=cmap(i) Next if lr<40 then cmap(6)=cmap(12) For i=11 To 6 Step -1' move vertical lines cmap(i+1)=cmap(i) Next else cmap(12)=cmap(7) For i=7 To 12' move vertical lines cmap(i)=cmap(i+1) Next end if inc lr:if lr>80 then lr=0 domap pause 100 loop end Sub domap Local integer i Map (0)=RGB(black) For i=1 To 12 Map (i)=cmap(i) Next Map set End Sub |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Here we are, back in Venice with more ... Play LOAD SOUND. What am I doing wrong? PicoMiteVGA MMBasic Version 5.09.00RC5 Copyright 2011-2024 Geoff Graham Copyright 2016-2024 Peter Mather > LIST ' Print "Test for PLAY LOAD SOUND v00.bas" Option base 0 Dim a%(1023), b%(4095), n% For n% = 0 To 4095 b%(n%) = n% Next Memory PACK b%(), a%(), 4096, 16 Do Play LOAD SOUND a%() Play SOUND 1, B, U, 440, 25 Print "a%() now playing" Pause 500 Play STOP Pause 200 Loop End > > RUN a%() now playing a%() now playing a%() now playing a%() now playing [16] Play STOP Error : Unknown command > |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9110 |
Try this PicoMite.zip |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Thank you, that is perfect! |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
Standard Pico. Tried running my program @420MHz and the first try, it ran for a minute before throwing up something like illegal (or invalid?) Speed. The next attempt and error appeared immediately. On 400MHz, currently and running without a hitch for 20+ hours. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6780 |
At those speeds the RP2040 isn't guaranteed to be stable anyway. Your test could fail at 140MHz and it would still be well within spec. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
Granted but nothing froze. It was a complaint from MMBasic but it allowed me to set the speed in the first place. Update on Volhout's PIO quad decode/counting. I have had a system running almost continuously @378MHz, spinning a motor, since I got the quad decode. I don't know how many billions of counts I have but it hasn't skipped a single pulse. Motor runs @3000RPM, stops, starts, reverses, all kinds of acceleration and deceleration rates....really loving this. Basic interpreter and I'm running at the same rates (sample rate) as the industry big-boys |
||||
georgestheking Newbie Joined: 21/12/2021 Location: BelgiumPosts: 26 |
Hi, With the new firmware version this line give me an error : SETPIN GP16,CIN ' right encoder Best regards Georges |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9110 |
User manual: page 32 |
||||
Page 12 of 13 |
Print this page |