Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:25 04 Dec 2026 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 : Unix on the Pico Computer 3

     Page 10 of 10    
Author Message
Bleep

Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 890
Posted: 05:08pm 10 Sep 2026
Copy link to clipboard 
Print this post

Hi Peter,
Thanks for the explanation about THUMB_BUDGET & BCODE_ONLY, I have now got PETSCII running, though I still wonder if I'm not doing something wrong as I'm seeing a much greater slow down than 2.7X if I use BCODE_ONLY, I'm seeing about 10X slower?
Also thanks for the pointer about the Frame bufferlayers, I forgot that Fuzix effectively uses the LCD model for layers. :-(
I have also been looking at problems I am having using Vi.
First thing I have found is that if I use Tera Term, Vi seems to behave well, but If I use just a USB keyboard and a HDMI monitor I have problems.
1. Vi doesn't work in Mode 1, it only uses the top half of the screen, and then does not scroll when the cursor gets to the last line of the file as displayed on the screen, that last line changes as you scroll down further, but the lines above it do not move up.
2. when using the monitor, in Mode 2 the first line of a file is missing, this puts all subsequent lines 1 line too high, so for example if I scroll down to a line and do yy (yank line to buffer) then immediately do p (put line(s) in buffer at cursor) the line that is inserted is not the one I (appeared to) copy from the screen, the inserted line also gets put in apparently the wrong place, so things now start to get very confusing, if you redraw the screen, I do it with G followed by 1G (go to end of file, go to line 1 of file) the positioning of the line is now corrected, but it is still not the line I yanked.
This is a poor explanation, if you have both a terminal and a monitor going side by side it will become obvious.
Getting Mode 1 would be nice, more screen area, but not essential, but getting it working in Mode 2 would be a nice minimum. Thanks.
Regards Kevin.
Edited 2026-09-11 04:07 by Bleep
 
Arne
Regular Member

Joined: 05/01/2025
Location: Germany
Posts: 67
Posted: 10:44am 11 Sep 2026
Copy link to clipboard 
Print this post

Hello,

I have connected an US keyboard and have the following problem, when I press the @ character I get “ and vice versa.The keys seem to be swapped ?

Any idea?

Arne
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9425
Posted: 11:39am 11 Sep 2026
Copy link to clipboard 
Print this post

It looks like the US and UK settings are swapped. What do you get on Shift-3?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3479
Posted: 11:49am 11 Sep 2026
Copy link to clipboard 
Print this post

US keyboard.
Shift   ~!@#$%^&*()_+
Normal  `1234567890-=
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9425
Posted: 12:00pm 11 Sep 2026
Copy link to clipboard 
Print this post

UK keyboard (mine anyway!)
¬!"£$%^&*()_+
`1234567890-=

Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
Arne
Regular Member

Joined: 05/01/2025
Location: Germany
Posts: 67
Posted: 12:55pm 11 Sep 2026
Copy link to clipboard 
Print this post

On Fuzix:
~!“#$%^&
°1234567

Printed on keyboard:
~!@#$%^&
`1234567
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3374
Posted: 01:00pm 11 Sep 2026
Copy link to clipboard 
Print this post

The keyboard defaults to UK.  To get the US layout enter:
picoctl keymap us
The picoctl command can set the keyboard to a variety of layouts including us uk de fr es be.  When you have got used to the editor in Unix you can add the picoctl command to the file /etc/rc and the keyboard will then be automatically configured when you login as root.

Geoff
Geoff Graham - http://geoffg.net
 
Arne
Regular Member

Joined: 05/01/2025
Location: Germany
Posts: 67
Posted: 01:26pm 11 Sep 2026
Copy link to clipboard 
Print this post

With your hint: picoctl keymap us its o.k.

Thanks,

Arne
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 694
Posted: 10:29am 16 Sep 2026
Copy link to clipboard 
Print this post

If someone needs to transfer files from the Pico running Fuzix to e.g. a PC it can be done easily with the FUZIX webserver and a curl command on the PC side (Linux shoud do as well, of course).

- Start a webserver in the file system root (e.g. "cd /" -> "httpd 80 &")

- and at the PC in a terminal window type e.g.
 "curl http://pc3_ip/root/MMBasic/eclipse.bas > exclipse.bas"
 where pc3_ip is the IP or DNS-name of the FUZIX node.
This transfers the file eclipse.bas in /root/MMBAsic from Fuzix to the host system.

Binary files probably must be uue encoded before transfer, but haven't tried it. At least the filesize is the same on both ends also with binary files. Didn't check if they are byte-identical.

The transfer is lightning fast and no need to swap SD cards. Unfortunately the webserver does not understand POST or PUT requests, so no transfer from PC to FUZIX the same way.

Gerald
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12322
Posted: 10:40am 16 Sep 2026
Copy link to clipboard 
Print this post

Also, if you replace the sd image with the one from github it now includes a tftp server which will transfer files very fast
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 694
Posted: 11:01am 16 Sep 2026
Copy link to clipboard 
Print this post

Peter,

if you mean from https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.27 I can't find a tftp server binary ...
where should it be in the directory tree?
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12322
Posted: 11:49am 16 Sep 2026
Copy link to clipboard 
Print this post

Should be there now
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 694
Posted: 02:20pm 16 Sep 2026
Copy link to clipboard 
Print this post

Thank you Peter, perfect !!
                                                                 
73 de OE1HGA, Gerald
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 694
Posted: 02:30pm 16 Sep 2026
Copy link to clipboard 
Print this post

btw, DIG delivers garbage ...

#
# dig router-1
qust: 1, ans: 1, ns: 1, add: 3
questions:
router-1.              
answers:
router-1.              A     0.254.192.12
authority:
              ???  
additional:
              ???  
              ???  
              ???  
#

the IP should be 192.168.0.254
                                                                 
73 de OE1HGA, Gerald
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 694
Posted: 03:36pm 16 Sep 2026
Copy link to clipboard 
Print this post

Peter,

tftpd makes the system instable, tending to panic. I can reproduce it with

wifi -f
tftpd / &
man setdate (several times)

and the system panics with

panic: validblk: invalid blk

Without tftpd running there is no tendency to panic.

Gerald
                                                                 
73 de OE1HGA, Gerald
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 694
Posted: 07:26am 17 Sep 2026
Copy link to clipboard 
Print this post

there seems to be a bug in ntpdate:

ntpdate does not take any of it's arguments (-o -O) to set the timezone one lives in. It always uses UTC. Also -p -d -s are not obeyed. From what I can see in the source, these params should be usable.

Gerald
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12322
Posted: 10:29am 17 Sep 2026
Copy link to clipboard 
Print this post

V0.28 is now available on https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.28
Fixes a nasty kernel bug and a bug in the sdcard image causing the system panics
Note: command line parsing in Unix 7 is not as flexible as modern Linux - see the manual for correct ntp usage.
You are highly recommended to move to this release with a newly imaged sdcard.
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 694
Posted: 01:37pm 17 Sep 2026
Copy link to clipboard 
Print this post

Thanks Peter.

It is running now rock-solid as far as I could test it. Great work and I really pull my hat as an answer to your reaction time and expertise in the analysis!!!

Gerald

P.S. DIG still produces garbage, but not an issue atm.
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12322
Posted: 05:45pm 03 Dec 2026
Copy link to clipboard 
Print this post

Fuzix for the Pico Computer 3 and 2: release 0.31

3 December 2026. Compared with 0.28, the last release announced on the Back Shed. 0.29 and 0.30 were released on GitHub without a word on the forum: what they brought is here, with what has come since.

This is Fuzix, a small Unix, for the Pico Computer 3 and the Pico Computer 2: one kernel for both boards, which works out at boot which one it is. With it comes a C compiler and an MMBasic translator that run on the machine itself, so a BASIC program is written, translated, compiled and run without leaving it. Please report problems on the Back Shed forum.

The files are at https://github.com/UKTailwind/FUZIX/releases/tag/pc3-v0.31 : fuzix.uf2, the kernel for both boards; pc3-sd-cc.img.gz, the SD card with the compiler and the BASIC corpus; FUZIX-PC3-MANUAL.pdf, the manual; and PC3-C-MANUAL.pdf, programming the machine in C.

Since 0.28:

• The translator follows the PicoMite to V8 (0.29 to V7, 0.31 to V8): LIBRARY LOAD, DRAW3D, #INCLUDE and #DEFINE, MEMORY COPY, SAVE PNG, TILEMAP LOAD, the raster commands and much more. MM.VER answers 8.000005, the PicoMite version it follows.
• FRAMEBUFFER WARPH, WARPV, AFFINE and SPAN, and BLIT RESIZE, run by the kernel.
• Forty games on the card (0.29), Zork I among them.
• The network: large TLS downloads, TLS writes, wifi scan and WEB SCAN, WEB CONNECT's rejoin, and the web server's fixes.
• USB: a mouse behind the hub, a device plugged in later, and a hub's over-current.
• Pictures: progressive JPEGs, compressed BMPs and PNGs from SAVE IMAGE, more kinds of PNG.
• A BBC envelope with no pitch steps no longer locks the machine (0.29).
• A fault is reported on the screen (0.30), where it stopped after fourteen characters on the serial console.
• mmbedit keeps a paste (0.29) and colours V8's keywords (0.31).


Before you update
Flash the new fuzix.uf2 and write the new card image: both have changed. The card's programs are built for this kernel. Flash the kernel the usual way: hold BOOT, click RESET, and drag fuzix.uf2 onto the drive that appears. Write pc3-sd-cc.img.gz, ungzipped, to a card of 1GB or more with any raw-image tool; the whole card is overwritten, so copy off anything of your own first. Then connect a monitor and a USB keyboard, switch on, and log in as root. There is no password.

/etc/wifi.conf ships a placeholder, so wifi -f on a fresh card joins nothing until you put your own network in it. Its auth must now be a digit, 0 to 3.

PETSCII Robots needs THUMB_BUDGET=70000 (it was 140000 at 0.28, 130000 at 0.29 and 120000 at 0.30): the runtime has grown, and with more native code the program leaves no room for playmod, the helper that plays its music, and stops with "Could not play the MOD file". Build it on the machine with

# cd /root/MMBasic/robots
# THUMB_BUDGET=70000 cc robots.bas
# ./robots.bc


and run it with the root filesystem read-write.


What is new
The translator: PicoMite V7, then V8
0.29 brought mmbc up to PicoMite V7, and a review against the firmware closed twenty more differences: operators take the firmware's precedence, so 2^3^2 is 64; MAX and MIN return a float; PRINT's comma counts to 8-column stops; ON ERROR SKIP counts statements as the firmware does; SUB MM.END runs at END; SETTICK PAUSE and RESUME take their target; and an error the firmware raises only when a line runs is raised when the translated line runs.

0.30 added LOAD DATA, SAVE DATA and MM.INFO(FREE SPACE), and gave mmbc 40K of stack: translating PETSCII Robots ran off the end of 16K and took the machine down with it.

0.31 follows V8:

• LIBRARY LOAD, whole-array assignment a() = b(), #INCLUDE and #DEFINE, DIM ... AS, a nested structure assigned whole, OPTION PICOMITE and OPTION MILLISECONDS.
• DRAW3D, the PicoMite's 3D engine, whole.
• FRAMEBUFFER WARPH, WARPV, AFFINE and SPAN, and BLIT RESIZE, run by the kernel: 0.9 to 8.9 milliseconds for a MODE 2 screen.
• MEMORY COPY and MEMORY SET, PEEK(VAR v, n), BASE$, MATH CLAMP, and MATH SCALE and ADD between float and integer arrays.
• RESOLUTION 640, RESTORE with an expression, TIME$ = n, and a command's name used as a variable, as in font = 3.
• SAVE PNG, SAVE COMPRESSED IMAGE, OPTION PRINTSCREEN, TILEMAP LOAD, SPRITE(B) and the PicoMite's October sprite fixes, image slots 1 to 8, and DefineFont 1 to 16.
• PLAY MODSAMPLE's rate, pan and LOOP, and PLAY MODSAMPLE CHANGE and STOP.
• MM.INFO(HEAP), (PIN n), (PSRAM SIZE), (FONT), (BBC BUFFER), (FCOLOUR) and (BCOLOUR); MM.INFO$(LCDPANEL), (SYSTEM I2C), (SDCARD) and (USBDRIVE).

What mmbc is for (0.30): it translates programs that already run correctly under MMBasic, and such a program prints, draws and computes here what it does there. Error messages and ON ERROR behaviour may differ from the firmware's, and the translated code does not pay for error paths a correct program never takes. What mmbc does not translate it lists by name and comments out, and the translation carries on.

Fixes a correct program can see
• 0.31:
    ◦ A FOR or DO opened and closed inside a single-line IF is translated as MMBasic runs it.
    ◦ DIR$ looks in the directory its spec names, and A:/ is the drive's top.
    ◦ PEEK(INTEGER) of an array no longer stops with "Address not divisible by 8": arrays and structures are laid out as gcc lays them out.
    ◦ FORMAT$ gives exactly the firmware's digits.
    ◦ A PAUSE with a SETTICK armed wakes when the tick is due.
    ◦ The C compiler combined the constants of x + 35200.0 + 2.0 as bit patterns and compiled it as x. It no longer regroups a floating sum, in C programs too.
    ◦ DIM a$(n) LENGTH m = (...), a fixed-length string array with its values, is translated; it stopped with "expected ')'".
    ◦ A program with more than about a thousand functions, structures and arrays, the runtime's included, stopped the machine's C compiler with "narg". PETSCII Robots crossed that line in 0.31.
    ◦ A helper such as PLAY MODFILE's player or LOAD IMAGE's decoder inherited every file its program had open, and a big program left it too few of its own sixteen: the music never started. A helper now starts with only its input and output.
• 0.30:
    ◦ A LOCAL array sized when the routine runs was never given back, so a SUB called often enough ran out of memory.
    ◦ A single-line IF inside ON ERROR SKIP could leave an error pending.
    ◦ STR$ with a wide field wrote past its buffer.
    ◦ The program is read as LOAD reads it.
• 0.29:
    ◦ FORMAT$ with a long text around its specifier wrote past its buffer.
    ◦ TAB in a graphics mode could loop for ever.
    ◦ When a program's bytecode ended on an odd byte, every call from native code into the runtime landed a byte early: a HardFault before the program printed anything.

Pictures and sound
• SAVE IMAGE writes the PicoMite's compressed BMPs (0.31), a MODE 2 screen in 3 to 4K where it took 230K, and saveimage -p writes a PNG.
• loadjpg decodes progressive JPEGs (0.31), the kind most cameras and web sites make, held in PSRAM: 1920 x 1080 loads, 4000 x 3000 is refused.
• loadpng takes 8-bit RGB, grey and grey with alpha, crops a large picture and takes the image offsets (0.31), and stays inside its buffers (0.29): a 15-bit code length wrote past an array, and a bad back-reference read before the output.
• V4 and V5 BMPs read their colour masks (0.31).
• PLAY VOLUME left, right keeps the two channels apart in the synthesiser, and a PLAY VOLUME before the first note counts (0.31).
• PLAY BBC SOUND and ENVELOPE play through the synthesiser BBC BASIC uses, and the BBC note queues are 16 deep (0.31).
• A BBC ENVELOPE with no pitch steps, the usual amplitude-only shape, restarted its empty pitch sections for ever inside the audio interrupt and locked the machine on its first note (0.29).

The network (Pico Computer 3)
• TLS: a large download no longer stalls, a write larger than one record no longer panics the kernel, tlsca no longer breaks open connections, and reads and writes of 64K are right (0.31).
• wifi scan and WEB SCAN list the networks in reach (0.31).
• WEB CONNECT with no arguments rejoins a dropped link (0.31).
• The web server keeps a request that arrives in pieces, gives a slow client 5 seconds without progress rather than 5 seconds in all, and takes {expressions} of up to 253 characters in WEB TRANSMIT PAGE (0.31).
• dig's answers were two bytes off and are right (0.31).
• C programs get send, recv, shutdown, getpeername and getsockname (0.31).

USB
• A low-speed mouse behind the hub no longer stops every USB device (0.31).
• A device plugged in later can no longer take the keyboard's input (0.31).
• A hub's ports are powered again after an over-current, and a port the hub disabled is enumerated again (0.31).
• Two faults that panicked now print one line each: "USB: stale buffer arming ... cleared" and "USB: no endpoint left ... too many USB devices" (0.31).

The kernel
• PSRAM runs at the speed its datasheet gives, 94.5MHz where 126MHz overran a part rated for 109, and a board without PSRAM no longer hangs the boot (0.31).
• The Olimex RP2350pc is recognised (0.31).
• A fault is reported on the screen (0.30): the exception, the fault registers, the program counter, the registers and where the program was loaded. It went through the serial console, which cannot drain at that moment, and stopped after fourteen characters.
• A failed system call returns -1 with errno set, as Fuzix means it to, and a kernel allocation that fails returns ENOMEM instead of panicking (0.31).
• fat put writes in an order that leaves the old file or the new one whole after a reset (0.31).
• mkdir -p with a full path, mkdir -p /tmp/www, gave the directory a nonsense mode and left another with a nonsense name and no permissions in the current directory. It makes what it is asked for now (0.31).

Games and the editor
• Forty games (0.29): the Scott Adams and Brian Howarth adventures, Super Star Trek, Space Invaders, 2048, dopewars, Hamurabi, four games from Unix V7, and Zork I, which Microsoft released under the MIT licence in 2025, on the z3 Z-machine player. /usr/games is on the PATH, every game has a manual page, and three that were broken are fixed.
• mmbedit keeps a paste (0.29): everything after the first line or so was lost. The file's last line keeps its ending, Esc leaves even with a line too long to save, and F9 says why a file did not load.
• mmbedit colours V8's keywords, THREAD and SQL among them, saves the screen at the Print Screen key, and pages up without leaving a blank top row (0.31).


What behaves differently
• MM.VER and MM.INFO(VERSION) are 8.000005 (0.31), where they were the Fuzix release (0.3 at 0.30).
• Expressions follow the PicoMite (0.29): 2^3^2 is 64, NOT and INV bind to the value after them, integer ^ integer is an integer, MAX and MIN return a float.
• /* and */ follow the manual (0.30): each must be the first thing on its line and outside any SUB or FUNCTION, and a line that breaks the rule is refused.
• Some constructs are refused rather than translated wrongly (0.30): a string member passed by reference to a routine that changes its structure, a two-dimensional STATIC with a run-time bound and a list of values, and an array of a TYPE dimensioned again after ERASE with other bounds.
• PLAY VOLUME 50 sets the left channel alone, as a PicoMite does; PLAY VOLUME 30, 70 sets each (0.31).
• PIXEL() after MAP reads MMBasic's fixed colours, not the live palette's (0.31).
• ON KEY k no longer fires for a k typed before it was armed (0.31).
• A bare FRAMEBUFFER CLOSE closes every buffer, and a MODE change drops the layer (0.31).
• JSON$ follows V8's path rules: arr[0] returns its value (0.31).
• The music stops when the program ends, however it ends, as on a PicoMite (0.31). PLAY MP3, WAV, FLAC and MODFILE played on after END or Ctrl-C, and the player stopped remount / ro until it was killed.
• A BLIT of width 0 draws nothing, where it was an error (0.31).
• SAVE IMAGE writes a compressed BMP (0.31).
• C programs: a failed call returns -1, a TLS write sends at most one 2,048-byte record, and structures may be laid out differently (0.31).


Tested
On a Pico Computer 3 with this kernel and card:

• the boot banner and MM.VER
• a BASIC program and a C program, each written, compiled and run on the machine
• wifi -f, ntpdate, tlsca and a TLS fetch with certificates checked
• httpd serving a 20K program byte for byte
• PETSCII Robots built on the card at THUMB_BUDGET=70000 and played with a USB keyboard, music and all
• a program's music stopping when it ends, by END, by Ctrl-C and by kill, and mkdir -p

On a Pico Computer 2 with the same kernel and card: the boot banner, wifi saying there is no radio, BASIC and C, mkdir -p, the music test, and a clean read-only remount.

On a PC, the translator's 224 tests through both translators, and through the board's own compiler passes.


Known problems
• Threads are not on this machine yet: THREAD translates, and THREAD START stops the program with "Threads are not available on this machine yet". They run on a PC, in pc3host.
• Serial ports are not on this machine yet: OPEN "COM..." and LIST SERIAL PORTS translate and stop with "Serial ports are not available on this machine". They run on a PC, in pc3host.
• MM.INFO(THREAD FREE) is translated as MM.INFO(THREAD n) with FREE a variable, and MM.INFO(STACK FREE) is refused; they come with threads.
• Bluetooth and MQTT are not here.
• The USB hub's recovery after an over-current has not been made to happen on the machine.
• The new PLAY MODSAMPLE forms have been translated and checked against the firmware's calls, but not yet listened to on the machine.
 
     Page 10 of 10    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026