Idiot Newbie Question (Pico)
Ben Newsam (3089) 13 posts |
How do I install a Module with SWIs and everything into Risc-OS Pico? There are no directories to install stuff in! |
Rick Murray (539) 13400 posts |
Pico is a minimal system. There’s no desktop or anything like that. Think of it like a really fast BBC Micro. |
Ben Newsam (3089) 13 posts |
Pico is exactly what I need to create a turnkey system on the Raspberry Pi with no graphical output at all. I can easily use the GPIO module from BASIC (SYS “GPIO_WriteData”, etc.), and can get it to boot into a BASIC program (saving a short BASIC program 10CHAIN"MyDir.MyProg" as !Boot worked just fine!). I guess I will have to add *RMLoad at the front of that, and hope it works. What I am trying to do is play concurrent sounds through the headphone socket, and I am looking for the most suitable module to do that. |
Martin Avison (27) 1417 posts |
There may be no desktop, but that does not stop modules being loaded. I have just downloaded PiCo for the first time, unpacked to an SD card, and also copied on to it my ArmSort module and a SortSimple Basic program. Put into my RPi it started quickly, straight into Basic.
and I could see that the module had been used from Basic. |
Chris Evans (457) 1614 posts |
I’m not sure how memory management works on the Pico. I’d not expect it to have a ‘next’ memory setting. If you enter BASIC are you given all the available memory? |
Michael Emerton (483) 136 posts |
IIRC the ‘Language’ is set to auto boot into BASIC? |
Martin Avison (27) 1417 posts |
There is certainly some memory management – there is an RMA which is used for the workareas of the ROM modules. It seems to be about 1760KB, of which about 1510KB is used and 250KB free. I am not sure if the size can be changed. Basic is entered on startup, and seems to be allocated about 220MB application space … just a bit more than a BBC! |
Rick Murray (539) 13400 posts |
For newbies, writing BASIC programs using the Wimp is non trivial. |
Ben Newsam (3089) 13 posts |
Aha! Thanks Martin Avison! All it needed was the *SetType. So simple once you know! |
Rick Murray (539) 13400 posts |
Bottom of the page… https://usborne.com/browse-books/features/computer-and-coding-books/ |
Chris Hall (132) 3500 posts |
There is certainly some memory management – there is an RMA which is used for the workareas of the ROM modules. My programme Fruit Machine for the Pico uses the following command: to set up the sprite area if not set up.
|
Michael Emerton (483) 136 posts |
Cheers, I think that is a line I will need when I test if my app can use it! :@) |
Ben Newsam (3089) 13 posts |
I got PlayIt working, but it doesn’t seem capable of playing concurrent sounds. Does anyone know of anything suitable? |
Martin Avison (27) 1417 posts |
It suprised me at first, because I had written them on RISC OS (with correct filetypes) … but I supect it is because it was written using Fat32FS and read using SDFS, so perhaps a slight incompatibility. |
Ben Newsam (3089) 13 posts |
In my case I think it was because I populated the SD card on my PC. Same thing I suppose. |
Ben Newsam (3089) 13 posts |
Is there some kind of disk cache in operation? If I save a BASIC program and reboot the Pi, quite often I can only reload a previous version or a corrupted one. I noticed this with a BASIC program as !Boot. I added 40CHAIN"MyDir.MyProg", SAVE"!Boot". On powering down and up again, line 40 is missing, or I get the dreaded “Bad Program” message. |
John Williams (567) 768 posts |
Is there a newline at the end of line 40? |
Michael Emerton (483) 136 posts |
If you are playing samples, DiskSample from DigitalCD nice easy manual, good control, and appears to work on everything from a RiscPC to a Pi3 (not tested on anything else, but it should just work. And you can play up to (IIRC) 3 concurrent sounds, this limit was for the RiscPC, so if it is still there, maybe André could look at lifting that?
If Fat32FS is being used (I would assume due to the way you create the SD card, then yes there is… you might want to dismount the card before restarting |
Martin Avison (27) 1417 posts |
Was the Add line 40 & SAVE done on PiCo, or PC? |
André Timmermans (100) 620 posts |
If you are playing samples, DiskSample from DigitalCD nice easy manual, good control, and appears to work on everything from a RiscPC to a Pi3 (not tested on anything else, but it should just work. The limit of 3 is a limit in the decoder modules for MP3, Ogg Vorbis and AC3 that DiskSample calls because at the time the RISC PC would not take any more load anyway. In DiskSample is 10 so you could actually play 10 FLAC files or 10 PCM wave files. That said if Ben’s need for concurrent playing of sound effects instead of MP3 files, I’d recommand TimPlayer and it’s FX SWIs which will provide more control over things like panning or pitch (see section “Playing Notes” in the StrongHelp doc). |
Ben Newsam (3089) 13 posts |
I obtained both DiskSample and TimPlayer (thanks for the suggestions) and they both RmLoad nicely. Now what I need is a way to read the documentation! |
Ben Newsam (3089) 13 posts |
OK, I found StrawHelp for that. Onwards and upwards! :-) |