|
Forum Index : Microcontroller and PC projects : PC emulator for Micropython on the Pico Computer 3
| Author | Message | ||||
| dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 880 |
I'm using Mint21.3 Cinammon as well and have compiled and packed it with this version. This runs perfect on Mint21.3 Cinammon (my PC) itself but also on unmodified Mint22.3 live session and on Ubuntu 26.04 Desktop-amd64 live session if you install libsdl2-dev, both tested under Oracle Virtual box. |
||||
| okwatts Regular Member Joined: 27/09/2022 Location: CanadaPosts: 78 |
@matherp I tried both of the environment settings and still seg faulted. The gdb output refers to a library for the nvidia card driver I have in that box. I am trying to revert to the standard xserver and will give that a try. In the mean time I have installed on my Win11 box and that works fine. I will keep trying to sort this out. I take some comfort from @dddns that this is possible so I will try again with a clean install on another system. |
||||
| okwatts Regular Member Joined: 27/09/2022 Location: CanadaPosts: 78 |
I can report that reverting to the standard xserver solved the problem. The emulator works amazingly fast, which could be a real challenge for developing animations to run on the actual Pico Computer 3. I know that Nvidia drivers are not supported well on older versions of Linux and especially for older graphics cards (In my case an NVIDIA GEForce GTX 1050Ti). There is obviously some incompatibility in the libraries for those cards. It's a shame as I use those older machines running Linux for experimenting with CUDA to take advantage of the compute power in the GPU. My Win11 desktop has a RTX5060 Ti with 16GB memory for playing around with local AI models and the emulator under WSL and Ubuntu26.04 works great there. |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 608 |
I have test it on Fedora 44. It ran without any issues. |
||||
| scruss Senior Member Joined: 20/09/2021 Location: CanadaPosts: 111 |
like @okwatts, built from source, but emulator crashed despite any startup options. MicroPython thread crashed in gdb, with similar nvidia library yelling. I'm running current Debian with Wayland, and won't be going back to X11 to try other options. It was enough work getting this new(ish) machine working with the latest nvidia graphics that I don't want to mess with it any further. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11668 |
Too many different distros, multiple releases LTS/current etc., totally impossible to ship an executable that just works. The source is there, if you can make it work fine, if not sorry but nothing I can do. If you use windows and follow the WSL instructions it will work and I've also tested building on a basic Ubunbtu machine and that also worked perfectly. Various users above have made it work on various flavours of Linux as reported above so there is clearly nothing fundamentally wrong. All I can suggest if it doesn't work is to use a VM with a known good environment and build within that This runs perfect on Mint21.3 Cinammon (my PC) itself but also on unmodified Mint22.3 live session and on Ubuntu 26.04 Desktop-amd64 live session if you install libsdl2-dev, both tested under Oracle Virtual box. |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6549 |
If I can get it working, anyone can... Mint22.1 Cinnamon in a virtualbox on W11 Did an update to my Mint system. copy and paste the instructions from Peter. I then made a launcher which also worked out-of-the-box Jim VK7JH MMedit |
||||
| dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 880 |
I think it's due to the interaction between the NVIDIA drivers and libsdl2. My desktop runs on an old Intel onboard chipset, and VBox has its own as well. As a test, you could log in to the NVIDIA machine from a second non-Nvida PC via SSH and set up an X tunnel or forward/export the display to the test PC. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8978 |
Nvidia has a long history of complete non-cooperation with the Linux project. Don't ever expect full and accurate operation of any Nvidia hardware, The Linux driver(s) that exist have been painstakingly reverse-engineered from the hardware and are very basic. Use any other video system on Linux, just not Nvidia. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 880 |
Last thought: if this would run under your NVIDIA/Wayland setup within Virtual box it would be almost a proof. |
||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4355 |
Here a pc3emu-bin which is happy with a much earlier GLIBC. John pc3emu-bin.zip |
||||
| scruss Senior Member Joined: 20/09/2021 Location: CanadaPosts: 111 |
I mean, I could, except that Wayland doesn't tunnel/forward/whatever. SDL is also not very usable on this large screen: large SDL displays get very slow. The Nvidia drivers are much better behaved than they used to be. They're still binary blobs, but they work. The open-source Nouveau drivers aren't accelerated at all. |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 608 |
Hi Peter I had this weird behaviour when using the os shortcuts functions (chdir, ls, etc). My example tries to change the directory with chdir and os.chdir, and list it with ls and os.listdir. The os version works fine. I also had an issue when trying to run the script with run() after changing the directory. EDIT: chdir() should be cd(). Even so, after using the os version of the command, the other ones doesn't work Pico Computer 3 emulator flash -> /home/leo/.pc3emu/flash sd -> /home/leo/.pc3emu/sd display: window open, console 'both' -- type in the window or here exit: Ctrl-D at the prompt; paste into the window: Ctrl-V MicroPython v1.29.0-preview.673.g6cb77783f4.dirty on 2026-07-18; PICO COMPUTER 3 v0.9 emulator Type "help()" for more information. >>> ls() <dir> 2026-07-22 05:10 sd 1 item >>> chdir("sd/aw") Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'chdir' isn't defined >>> import os >>> os.listdir() ['sd'] >>> os.chdir("sd/aw") >>> ls() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pcshell.py", line 57, in ls OSError: [Errno 2] ENOENT >>> os.listdir() ['main_odroid_go.py', 'hal_unix', 'justfile', '.git', 'aw', 'tools', 'README.md', 'hal_odroid_go', 'game', 'tests', 'docs', 'main.py', '.gitignore'] >>> run("main.py",".","--sld") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pcshell.py", line 117, in run OSError: [Errno 2] ENOENT Edited 2026-07-23 03:01 by LeoNicolas |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11668 |
The command is cd("dirname") The emulator maintains disk context within itself, by using os commands you are probably confusing the .... out of it Edited 2026-07-23 04:06 by matherp |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 608 |
[DELETED] Edited 2026-07-25 00:06 by LeoNicolas |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 608 |
Peter Where are the global functions like keydown(), screen(), etc. imported from? I'm trying to use keydown() and other pico3 global functions from inside a class that is inside a module imported on my main.py and these functions are not available there. I can only call them from the main.py. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11668 |
This should be included in the manual - I'll update it Global name Real source keydown, keymaps from keyboard import keydown, keymaps screen, palette, keymap pcconfig play, beep, tone, sound, volume, stop, … pcaudio Display + colour constants (RED, WHITE, …) pcgfx draw_jpg / draw_bmp / draw_png, load_image, save_image pcimage touch import touch then touch.query(...) mouse, mouse_speed import mouse then mouse.query(...), mouse.speed(...) gamepad import gamepad then gamepad.query(...) (constants live on the module) Turtle / TileMap / plot / fm pcturtle / pctilemap / pcplot / pcfm settime, gettime, synctime ds3231 wifi, ntpsync, tz pcnet USBSerial / xrecv, xsend usbserial / xmodem Edited 2026-07-25 04:04 by matherp |
||||
| LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 608 |
Please, can you add page numbers as well? |
||||
| dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 880 |
A question: fm() displays all files on the SD card as having a length of 0 bytes, but I can still access everything. Is this my mistake? Otherwise, I can say that this emulator is great. I can keep it up to date, and for now, I don't need anything else to try to follow the development. Thank you very much! Edit: When I try to play an MP3 file, nothing happens. When I press + or - continuously, I hear snippets of the song. Edited 2026-07-27 02:41 by dddns |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11668 |
emulator updated on https://github.com/UKTailwind/micropython/releases/tag/v0.14 |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |