Virtualization Challenge III – Acorn ARM Minix

(This is a guest post from Antoni Sawicki aka Tenox)

Recently came across this unfinished port of Minix 1.5 to Acorn Archimedes A310. According to the readme file this is a set of patches that needs to be applied on a standard Minix 1.5.10 code base on a Unix machine. The code then needs to be to transferred to Risc OS machine for compilation. Once complete then you need to manually create boot records and a file system. Sounds like a fun little project.

What I want is pretty standard:

  • A ready to use working disk image that anyone can unpack and run on a modern machine under an emulator of your choice (commercial OK).
  • Aclock binary and screenshot.

First person to deliver these gets a prize of £100 (that is 100 GBP / Pound Sterling). I strongly encourage to coordinate your efforts via comments.

If needed I can supply licenses for commercial Acorn emulators and C compiler for Risc OS, albeit I only have license for a modern ROOL DDE. I hope ancient version is not needed, but this part of the challenge. Note that I can’t just give away the licenses to anyone, I will only share or purchase new licenses for serious contenders on one to one basis.

Let the challenge begin!

Windows 10 ARM64 on QEMU

(This is a guest post by Antoni Sawicki aka Tenox)

Microsoft is releasing Windows 10 for ARM64 CPUs and this time, unlike Windows RT fiasco, there will be a full desktop app support including a dynamic binary translator to allow running existing x86 apps on ARM CPU, much like FX!32 on Alpha NT or Rosetta on Mac OS X.

Latest Visual Studio updates now bring official ARM/ARM64 support for Desktop Apps, little hidden, but here is how to enable it.

Being able to compile Windows ARM apps, I wanted to try to actually run them, but … on what exactly? There are some developer evaluation boards. Apparently someone managed to run it on Raspberry PI. Most importantly however you can run Windows 10 ARM64 on QEMU. This is some serious Fun With Virtualization!

Windows 10 ARM64 running on QEMU

I’m not claiming to be the first. Clever people have already done it. I just wanted to make it little easier for the lazier of us. Here is how.

Follow the link above but skip the shady UUP business in step #3 and download ready made iso instead. You can google the iso image from windows.cmd and it will take you to this link. You need the rest of the files like UEFI firmware and virtio drivers.

For the even more impatient here is a ready to run image with Windows pre-installed. Because QEMU now comes with DLL HELL I’m not including it in the archive. You will have to install it separately.

If you want to transfer files in/out of the image a tip from Pete Batard of Rufus:

Create a folder named say “transfer” and add the following option to the launch script:
-hdb fat:rw:transfer

This will create a second FAT32 formatted disk, that maps your transfer\
directory to the QEMU virtual machine. In our case, Windows 10 will see it
and make it automatically accessible as “QEMU VVFAT (D:)”. You can even
use this to write file from the VM to the host (though, depending on how
fast Windows flushes its disk cache, they may take a while to appear).

Go have fun and port some apps to ARM64 with free community edition of Visual Studio. I’m going to start with Aclock 🙂

Torbjörn Granlund’s Excellent resource on running free OS’s on Qemu

Ever get tired of x86 on x86?  yeah me too.

How to solve that problem?

Simple, grab QEMU, and jump off into all those cool RISC processors of the 1990’s that were going to save us all from the WINTEL hegemony!

Lots of instructions, samples, images, and hints here:

https://gmplib.org/~tege/qemu.html

It’s really more comprehensive than I’ve sat down to do, so yeah it’s awesome!

Supported platforms include:

mips32,mips64,sparc32,sparc64,ppc32,ppc64,arm32,arm64,s390x,alpha

Virtual Acorn – Fun with Virtualized RISC OS

(this is a guest post from Antoni Sawicki aka Tenox)

VirtualRPC-SA let’s you run virtual RISC OS on a Windows or Mac OS X host similarly to VMware, VirtualBox or Qemu. The company page features this picture:

acorn1… in reality you you probably don’t want to do that!

As of time of writing of this article there is a sale going on! You can buy VirtualRPC-SA for only about $100. My primary reason for getting it was porting aclock to RISC OS. In addition to the VM I also purchased the original compiler and developer tools (DDE). It allows to target the funky 26 bit CPU. Otherwise GCC is available for free.acorn-cVirtualRPC comes “pre-installed” with the RISC OS in a virtual ROM image. The OS at first glance is quite nice looking and seems fun in to explore and play around. You can browse the web and use a bunch of weird applications from alien world. You can find a lot of software apps here and here and here. However I personally could not use this for anything more serious.

riscos-webPorting of aclock to RISC OS was by far one of most difficult ones if not the most difficult. To display text on the screen you need to use system calls directly, for which you use a special function called _swi() or _swix(). There is no concept of sleep() so I had to improvise an empty loop. Fortunately there are screen codes that allow to position the cursor, clear screen etc.

void cls(void) {
     (void) _swix(OS_WriteI + 12, 0);
}

The result is far from pretty but it will do for v1:

aclock-riscosSome funnies, which actually weren’t that funny at the time:

A directory separator in RISC OS is “.” (yes a dot) for example: root.folder.subfolder.file. The C compiler expects .c as a file extension as it would on any normal OS. The problem is that naming file aclock.c would make a directory aclock with c file in it. Fortunately, or maybe not, extensions in RISC OS are prefixing, not postfixing a file. So you have c.aclock or o.aclock. Except, as previously explained c and o are directories. You can see c and o folders in the screenshot above. Are you confused yet?

Interestingly RISC OS does have concept of a command line interface and a terminal window. However try to figure out the commands!

  • dir – change directory aka “cd” on the planet Earth
  • cat – list directory aka “ls” or “dir” in your normal OS

riscos-cmdThere is more, so I encourage you to try yourself just for the fun!

Windows RT

Windows 8 RT from pocketables.com

Just before the tidal wave comes in on the Windows 8 launch, let me just spell out one thing… Windows 8 RT will *NOT* run any existing Windows applications.

I don’t know why we even have to go back down this road, but it’ll be Windows NT on the MIPS or PowerPC all over again.

And to be too honest, the price is just too damned high for what it is, and that is an evolutionary dead end.  Expect there to be some kind of post Christmas fire sale, once people find out they can’t play minecraft or sims on it.

But apparently it comes with Microsoft Office (Word & Excel?) no idea if it includes PowerPoint & Outlook..   I guess the one safe thing is that it won’t run x86 exploits/buffer overflows, so maybe this is a good PHB, ‘mom’ device.

Me?  I’m still using a 1st gen iPad.

Microsoft Giano

I stumbled across this the other day, Giano, a simulation framework.

Included is a bunch of stuff, like a basic x86 / cepc (with Windows CE 6.0 image), an Xbox 360 emulator, a SPOT emulator, some eval boards (AT91EB63?) with both MIPS and ARM cpus that even include a doom kernel like experience! A Macintosh G5 (I wonder if it’d boot with Apple ROMS..?) Oh and..

A VAX.

The VAX code is taken from SIMH but I guess to show how extensible the framework is, they mashed in enough microvax to get it going.

SIMH in a way you’ve never seen it…

At any rate, here is some other screen shots of Giano in action….

CEPC

xbox 360 alpha test

xbox360 console

And of course….

Giano MIPS doom

DOOM

Also buried in there is a new MIPS variant, the emips along with a donated NetBSD port!

Sadly I had no luck running NetBSD….

Default: 0/ace(0,0)/netbsd
boot: 0/ace(1,0)/netbsd
Loading: 0/ace(1,0)/netbsd
5085072+70448=0x4eae14
Starting at 0x80020000

memory segment 0 start 00000000 size 10000000
memory segment 1 start 10000000 size 00100000
Too much memory in cluster 0, trimming memory to range 00000000..08000000
Too much memory, ignoring memory range 10000000..10100000
pmap_steal_memory: seg 0: 0x50b 0x50b 0x7fff 0x7fff
pmap_steal_memory: seg 0: 0x54b 0x54b 0x7fff 0x7fff
pmap_steal_memory: seg 0: 0x54d 0x54d 0x7fff 0x7fff
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

NetBSD 5.99.48 (RAMDISK) #0: Tue Mar 15 01:01:14 UTC 2011
[email protected]:/home/builds/ab/HEAD/emips/201103142200Z-obj/home/builds/ab/HEAD/src/sys/arch/emips/compile/RAMDISK
Xilinx ML50x (eMIPS)
total memory = 128 MB
avail memory = 120 MB
sysctl_createv: sysctl_create(no_sa_support) returned 22
mainbus0 (root)
cpu0 at mainbus0: Toshiba or Microsoft eMIPS CPU (0x70401) Rev. 1 with software emulated floating point
cpu0: 64 TLB entries
ebus0 at mainbus0
pid 0(system): trap: cpu0, TLB miss (load or instr. fetch) in kernel mode
status=0x2000000, cause=0x8, epc=0x8002d5c8, vaddr=0xd0000000
tf=0x8054cc78 ksp=0x8054cd18 ra=0x8002d5b8 ppl=0xd0000000
kernel: TLB miss (load or instr. fetch) trap
Stopped in pid 0.1 (system) at 0x8002d5c8: lw v0,0(s0)
db>

Maybe someone else will have better luck.

— edit, it seems Microsoft has a NetBSD 4.01 download, here. And it boots!

Qemu ARM, MIPS & PowerPC images…

Well I was thinking of building something like this, but someone did the work for me….

You can find various images here.

So needless to say, a special thank you goes to the dietpc guy… These are all set for MS Windows users, just download the VM you want, and you are ready to go. The only ‘issue’ I had with the PowerPC one, is that I needed to run fsck on the root and reboot it…. (remember the root password is foobar).

Other then that it seems happy as it can be.

root@dietpc3-dev-ppc:/usr/src/f2c# cat /proc/cpuinfo
processor : 0
cpu : 740/750
temperature : 62-64 C (uncalibrated)
clock : 1000.000000MHz
revision : 3.1 (pvr 0008 0301)
bogomips : 40.44
timebase : 16605783
platform : PowerMac
model : Power Macintosh
machine : Power Macintosh
motherboard : AAPL,PowerMac G3 MacRISC
detected as : 49 (PowerMac G3 (Silk))
pmac flags : 00000000
pmac-generation : OldWorld

I wouldn’t dream of really benching it, but this is better then blindly cross compiling as you can check your work…

The downloads are quite sizable about 450mb each… but it is a complete run & go linux environment.

And here is a gratuitous screenshot: