|
Forum Index : Microcontroller and PC projects : Unix on the Pico Computer 3
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
v0.6 just posted on https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.6 This has major internal changes and validates against all the test programs I have used so far. Performance is increased by about 15% for C and MMBasic. Manual is updated. Remember this is Unix V7 so for anything Unix that isn't in the manual just look up V7 documentation. Many of the programs in the VGA demos thread will now run if they rely on PIXEL and or LINE drawing - try them |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
I've just got V0.5 running, which has graphics, so I compiled versions of Mandebrot and a recursive Mandelbrot. at the same clock speed I got. Mandelbrot in MMBasic 15.22 seconds compiled on Fuzix 2.01 seconds Recursive Mandelbrot in MMBasic 14.04 seconds compiled on Fuzix 2.96 seconds. Oh bugger in the time I was writing Peter updated it, I'll try again Edited 2026-08-04 03:37 by Bleep |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
v0.6 Mandelbrot 1.74 sec. Mandelbrot recursive 2.58 sec. |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2056 |
Would this be something of a concern for an embedded system? |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9080 |
Yes. You need supply failure detection and something to hold up the supply for long enough to shut down. You *can* rely on fsck -a -y to clean things up on boot but it's not good practice really as it delays the boot sequence - sometimes by a lot because it's a full filesystem check. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2056 |
A-ha. I use a 5V UPS anyway and so I would detect that the machine power is lost and the system can be instructed to shut down in an orderly fashion |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 713 |
When I try to run BBCBasic, I get panic: swapin: no memory It used to run under 0.4 |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 713 |
Even though the website says 0.6, the .uf2 reports 0.5 Also, the KnivD benchmark doesn't print "Calculating..." It just goes on to the calculations. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
Tom: thanks for testing. The bbc one is probably that I forgot to re-compile after the new kernel. Will fix and let you know when updated. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
New release now available on https://github.com/UKTailwind/FUZIX/releases/latest See the release notes for the changes |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2056 |
So I have been reading and reading in an attempt to avoid having to ask irritating questions but what's the deal with BBCBASIC. Is there a good reason to use it? |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
Lots of progress today: Making a start on I/O from compiled MMbasic 3 MMbasic compiled processes running at the same time each doing math and flashing LEDs Performance improvements - Grainbench now at 37500, solar eclipse at 2.25 seconds Mp3 player running at the same time as grainbench and only reducing performance to 33000 Size of compiled processes reduced I'll post a new release tomorrow morning |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
v0.8 now available https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.8 This release gives the machine music, pins, and MMBasic's own text — and fixes a C library constant that was wrong for every program on the card. Flash the kernel and write the card together. The card's programs are statically linked, so a new kernel with an old card runs the old C library — and this release rebuilt every one of them. Sound MP3 playback. PLAY MP3 f$ plays a file while your program carries on running. The decoder is a separate process feeding a 1.5-second buffer in the kernel, and the sound hardware empties that buffer by DMA, so playback needs nothing from the program once it has started — MMBasic has to refill its audio from the interpreter's idle loop, and there is no idle loop here to do it in. A translated benchmark measured 89% of its full speed with a track playing, and the decoder runs at about six times real time. PLAY VOLUME n (0–100, logarithmic, remembered between statements) and PLAY STOP PLAY STOP asks the kernel which process holds the sound output rather than remembering what it started, so it also stops a player left running by a program that was interrupted — which is the case it is most often wanted for. One player at a time, enforced by the kernel. Two decoders writing into the same buffer interleave their samples and it sounds exactly like that. A second PLAY MP3 gives sound output in use; a second playmp3 from the shell names the pid that has it. A player that is killed strands nothing: the kernel hands the sound output back when its owner is gone. playmp3 is an ordinary program too — playmp3 track.mp3 40 & from the shell. T The RP2350's FPU is enabled for the decoder. Soft float decodes at 0.59× real time, which stutters; the FPU reaches 6.14×. BASIC SETPIN and PIN across all 48 GPIOs of the RP2350B, not the 28 an RP2040 has — which is why the PC3's real-time-clock alarm on GP32 was previously out of reach. SETPIN n, DIN|DOUT, PIN(n) = v, and the PIN(n) function. The number is the GPIO number, not MMBasic's connector-pin numbering. TEXT and FONT, with all nine of MMBasic's built-in fonts held in flash for zero RAM. MAP, statement and function, and CLS [colour]. The sixteen colours can be remapped exactly as in MMBasic, and the defaults are now MMBasic's own HDMI values rather than an approximation. PAUSE gives the CPU up instead of spinning, so a waiting program no longer holds the machine. The part it cannot sleep is bounded at 99 ms however long the pause. Programs are much smaller. MMBasic's scratch memory is sized per program rather than fixed: a translated program's static data went from 61,904 bytes to 12,748. Speed Maths runs on the DCP. SIN, COS, EXP and the rest are shared out of kernel flash and use the RP2350's double-precision co-processor — about 2.7× faster than the soft-float copy that used to be linked into every program, and it costs no program memory. There is no MMU, so a program calls them directly at their flash addresses. Fixes <limits.h> declared INT_MAX as 32767 on a machine whose int is 32 bits. Any program that compared against it, or sized something with it, was working from a number two thousand times too small — it is what made a valid MP3 file report as invalid. Every binary on the card has been rebuilt. The display no longer flecks under load. A decoder working out of PSRAM saturated the memory controller that the flash the kernel executes from shares; moving its working set into process memory fixed the picture and made it twice as fast at the same time. mmedit was still colouring Play, Pin( and SetPin as keywords the translator does not know. Documentation Both manuals are updated: PLAY and SETPIN/PIN sections, the note that the synthesiser and MP3 playback share one piece of hardware, and Appendix C regenerated from the translator's own tables. The C manual gains the PCM streaming interface, SNDIOC_PCMOWNER, the shared maths library, and the floating-point rule — soft float for everything except the audio player, because no FP register state is saved across a context switch. |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
On release 0.8 I have just got starfield running compiled it's plotting & blanking 1900 points in 0.028mS compared with 71mS in standard MMbasic (yes I did allow for timer now being uS). A few observations using a USB keyboard & HDMI screen, no terminal. Vi no longer seems to be present? mmedit doesn't work in Mode 2 If I escape from MMedit, I get the Y/N question, but then nothing happens I have to ctlC out. F3 in MMedit doesn't seem to be working, it never finds anything? If I exit a program that is using using Mode 2, how do I change mode from the command line, for now I've created a program to do it. Some of the Math functions are present & working Math Add for example, but the Math C_ functions are not currently there, I don't know if this is intentional? in Starfield I have a line Loop Until Inkey$ <> "" this now only exits with the Enter key? Otherwise looking good. Regards Kevin Edited 2026-08-07 06:24 by Bleep |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9080 |
Was vi ever there? The standard editor for Fuzix is levee, which is vi based but a lot smaller. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
Hi Mick, yes Vi was present in V0.4, because I commented on it previously, however on V0.9 I've just tried levee which Peter has now aliased to vi and it's sort of working, one gotcha is it doesn't support the arrow keys, you have to use Ctl-h, j, k, l. The editor window isn't scrolling, as I scroll down the line at the bottom of the screen changes, but doesn't scroll up, similarly with scrolling up, however I can move around by using 50 shift-g, which goes to line 50, but o which should open a new line below the one the cursor is on doesn't, possibly because of the screen scrolling not working? Otherwise I re-ran my original Mandelbrot & Recursive Mandelbrot, which were taking 1.74s and 2.58s respectively, now take 1.26s and 1.68s so between 40 & 50% faster than V0.6 or 1208% & 835% faster than interpreted MMbasic! Kevin. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11779 |
You can use mmedit - try it very recognisable - function keys should now work both from teraterm and connected USB keyboard |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
Hi Peter, That is the editor I am defaulting to at present, were you aware it doesn't work properly in Mode 2? and the F3 search does not work, it never finds anything. |
||||
| karlelch Guru Joined: 30/10/2014 Location: GermanyPosts: 353 |
Hi Peter, very exciting! If I wanted to run FUZIX on a robot, what would be the minimum hardware for a headless installation? Pico2, SD card, 8 MB PSRAM? Thanks and best Thomas |
||||
| Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 842 |
p.s. just for the hell of it I tried increasing the number of stars in Starfeild to see how high it could now go, on a MMbasic RP2350 1900 was about the maximum before running out of memory, however when compiled I'm able to plot 6500, b4 it complains, those 6500 points, which are also being blanked by over plotting, so 13000 pixel plots per screen update, which takes 88.3mS so approximately 150000 pixel plots per second, but also far more memory for large arrays. :-) I've also now compiled the pure Basic version of Bubble Universe, plotting 10000 points and that's managing 74.2mS per frame, that is also doing two Sines two Coses and some other FP multiplies and adds for every one of those points, not too shabby. Edited 2026-08-08 04:03 by Bleep |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |