PicoCalc x86 - 8086/80186 emulation on Pico 2

Hi PicoCalc lovers, I want to present you my new project PicoCalc x86, 8086/80186 emulation for Pico 2 with PicoCalc hardware support.

It is heavily modified port of the well known PC emulator 8086tiny project by Adrian Cable to Pico 2 (RISC-V) with PicoCalc display, keyboard, SD Card and PC Speaker support and optimized for RISC-V cores on rp2350.

Readme file contains all info you need to install and make own HDD disk, connect to modem/serial, telnet BBS access etc.

In Release section you could find uf2 image for Pico 2, and simple bootable images like DOS 4.0, SvarDOS or FreeDOS disk image.

Current Release version: 0.0.3

Feedback is much appreciated.

Screenshots

Why? Because why not.

Always wanted portable DOS device with QWERTY keyboard.

Features

  • RAM 432 KB conventional memory
  • CGA text modes support, grpahics mode 4 and mode 6 support, text output in video mode broken for now, PC Speaker works, keyboard works, simple shortcuts also works like CTRL+O etc, all keys without modifiers works too.
  • Software that can work with ~430kb free memory , I tested QBASIC, NC 3.0, NC 4.0, Turbo Pascal 5.5, Turbo C 2.0, TASM, Qmodem, Telix, msdos 6.22 etc.

18 Likes

This is great work! Thank you!

1 Like

This is a really cool project. What DOS games can I play with this firmware?

1 Like

Text games, CGA adapter games, in plans to add MCGA mode 13h Mode 13h - Wikipedia

1 Like

When I installed the .UF2 file on my boot manager, and tried to boot into your X86 emulator, it just gave a blank screen and nothing else. So, I tried to install it directly onto the PicoCalc (Pico 2W) itself and got the same thing.

Does your X86 require the upgraded keyboard/screen BIOS? I have an older PicoCalc, and have not upgraded yet - it looks like this may give me the motivation to upgrade.

The BIOS is fine, I have Pico 2W without pin headers, will solder them tomorrow and test it might be Pico 2W ↔ Pico 2 firmware issue

There is the chance that it may not be compatible with the loader, as not all software is compatible with uf2loader (my zeptoforth isn’t).

1 Like

Yeah, I thought of that - that is why I installed the .UF2 file directly onto the Pico. I then replaced that with the PicoMite BASIC latest version - no go. That also gave me a blank screen - I’m pretty sure that later versions of PicoMite BASIC require the newer versions of the keyboard/screen BIOS, so that’s why I’m guessing that the X86 needs the newer BIOS as well. So, it’s time to upgrade; I just need the spare time to do that - hopefully soon, as I really want an MS-DOS system in my pocket.

1 Like

I made a new release 0.0.2,

Firmware for pico2 and pico2w separated.

Now PicoCalc x86 have working serial as COM1 and working terminal/file transfer.

Also via modem emultion on the host I was able to connect to telnet BBS with perfect ANSI view

and good serial speed (57600)

File transfers also possible now. I updated the Readme with instructions.,

Changelog:

  • Fix for hd disk larger than 32mb
  • Update/fix scrolling
  • Font fixes
  • int15 4f keyboard intercept
  • Serial support passthrough via Pico 2 UART0 as COM1
  • Update shift modifiers
  • CGA render update
  • BIOS model reporting
3 Likes

So I can confirm my firmware files not suppoted yet the uf2 loader, probably that loader running on ARM cores, but my firmware uses RISC-v and it fails to switch to another ARCH. Even direct uf2 placement will not work since bootloader in another partition, only nuke and then flashing the firmware for now with uf2 loader.

1 Like

This is an amazing project! If it works properly, it will be able to completely replace MMBASIC - this means that support for GPIO, I2C and next UART would be necessary.

I can imagine running applications developed on a PC, for example in TurboPascal and compiled for 86/186, as well as anything written in “standard” QBASIC, directly on the PicoCalc.

What is the current speed of emulation compared to a standard PC XT?

Are you planning to be able to access GPIO, I2C and UART? That would be great, I would definitely use it for that…

1 Like

Sorry, I missed the performance figure. About 1 MIPS corresponds roughly to a PC XT, theoretically clocked somewhere around 10 MHz, that’s not bad - and sufficient for many applications. Nice!

1 Like

I was thinking about trying Turbo Pascal on it too. But while the speed should be usable, the free memory is a problem. Not sure if it’s possible or planned, but if there is a way to free up more memory for DOS (maybe via PSRAM cleverness) then I think Turbo Pascal 5 and other classic tools and applications might run under it.

It’s already impressive work, and really cool!

1 Like

Yes, the speed is not a problem, since memory is fast, pico 2 running at 230mhz, we can go higher, I stick with 230mhz as safe clock that don’t require voltage increase for rp2350 stable run.

Always the problem is free dos memory, I have a branch that uses internal qmi PSRAM with boards that have it installed by default like pimoroni pico plus 2, yesterday I tried the pico 2 clone board form ali with soldered by hand PSRAM module on top of the flash and it’s working perfectly . So I made 736kb trick and it’s all available for DOS backed by qmi PSRAM, even EMS and XMS working fine. I even got wolfd3d (cga version) ( GitHub - jhhoward/WolfensteinCGA: Wolfenstein 3D with a CGA renderer · GitHub ) working with ems or xms.

On normal pico 2 build 408kb available for DOS, maybe I can find another 8k-16kb to add, will see.

Turbo C 2 is working but memory not enough to compile while in IDE mode.
Will test TP5.

PS
With latest commit I increased the RAM available from 408 to 424 KB.

2 Likes

Here is the TP5.5

1 Like

The latest SDK lets you use XIM RAM … it’s only another 16K, but if that’s what you need… maybe it’s worth it.

1 Like

yeah I will try for sure, if it does not affect performance too much

I must add that this is a really cool project, even if my own PicoCalc will remain a Forth machine.

1 Like

Has FreeDOS been tested with this?

I was going to ask the exact same question.