Joyce & Anne, compiled for the ARM platform
Last updated: 17-Apr-12 14:39
This is a port of the
(PCW8256/8512 etc.) Amstrad PCW emulator - which also includes the 'Anne' PcW16
emulator - to various flavours of the ARM platform.
Although it works, this port should be considered incomplete, due to issues
with libpng that I was not able to sort out (see below).
I have fixed it!1 - but only for the EABI version: the binaries for the
2.6-kernel ARM/Versatile system compiled flawlessly. This perplexes me
because yesterday, I couldn't get anything to compile without patching.
Be sure to get the
file, because the other ones were from yesterday's error-prone compilation
1: I did nothing more than stop messing with it, and it worked.
I have tested the 2.6-kernel version with an SL-C860 Zaurus, running Angstrom
2011.1 (unstable/current). The emulator was usable, but a little slow. The
'Speed' readout showed that it was running at 158%, though it didn't feel like
it! XJoyce uses a lot of memory and on a 64MB Zaurus, you need to stop X and
shut down any memory-hogs.
AnneXAnne also worked, but was very slow. For the setup phase, I had
trouble with the disk file emulation: where the rescue disk is requested, I
used Cliff Lawson's 'pcwos.zip' disk image, which I
found on the
Internet Wayback Machine.
Initially, the emulator wouldn't read the image and segfaulted, so I used the
to convert the CFI image to a DSK.
That seemed to work a little better, although before it wrote the emulated
EEPROM, the emulator repeatedly asked me to press the Power key, when it could
not read the disk. After about four Power key presses, it accepted it and a
screen appeared, showing the EEPROM-writing process. From that point on,
setup was all via the Roseanne OS, which is very intuitive. I am running
the display over the wireless network; you may have better luck with a
To start xanne, I used the PcW16 ROM from MESS, and I typed this command
LD_LIBRARY_PATH=$PWD ./xanne -E pcw045.sys -A Disks/anne_boot112.dsk
ANNE PcW16 Emulator v2.2.4
I/O warning : failed to load external entity "/home/lex/Joyce/annehw.xml"
ANNE will emulate a PcW 16 with 2048 Mb memory
sh: lpr: not found
The LD_LIBRARY_PATH environment variable is necessary because I don't have
libstc++.so.6 on the Zaurus, so I copied it over from.. somewhere. Where did
I get it? Perhaps I could edit this later, when I'm a little less tired.
The following text is from yesterday's session. As usual with my projects,
Using a Debian ARM system2 - running on QEMU - I compiled the Joyce PCW
emulator for the ARM platform, with a 2.6 EABI kernel. This compiled the
'xjoyce' and 'xanne' binaries.
2: (I think that the site that I read to set-up the ARM QEmu
environment was aurel32.net. I forget the full URL.)
The 2.6-kernel/EABI version - hereafter referred to as 'the EABI version' - was
compiled at the end of almost 24 hours of non-stop source-code 'tweaking' and
waiting, because I started by compiling this on an OpenZaurus Sharp SL-5500
(Collie) with GNU gcc/binutils and everything mounted over NFS (over Wi-Fi!).
This had to be the most batty project so far, and it was a real test of my
patience. Compilation was very slow -- as you'd expect for a
206 MHz StrongARM-based system with only 64MB of RAM -- and all file I/O went
through a wireless link. I had to observe the entire procedure, because gcc
regularly bailed-out with errors relating to recent changes in libpng, or the
fact that I had all of the includes and libs in a non-standard location.
Daylight arrived and I stacked up lots of boxes at the window, in a futile
attempt to keep the light out, and fend off the tiredness. The next time I do
this, I might put the development system on a CF card and login to the SL-5500
via USB or IrDA (yes, it is possible to have a shell running over an infra-red
After a long time, the 'xjoyce' binary compiled. 'xanne', unfortunately, was
not so straight-forward: after a bit of clanking and whirring, the SL-5500
(the name being 'Attraction', after the famous horse) aborted the compilation with
an out-of-memory error.
root@attraction:/# dd if=/dev/zero of=swap bs=1M count=64
root@attraction:/# mkswap swap
root@attraction:/# swapon swap
Here is where I did something very unwise: I added a 64MB swap file, and the
filesystem was on an SD card. On the SL-5500, the SD card is generally a lot
slower than the CF card; because the WLAN adaptor was in the CF slot, I
couldn't use CF - it had to be SD.
After adding swap, I resumed the compilation with the simple
command 'make'. "Well, it's all going fine!" I exclaimed, and then tried to
switch screens to see how
much swap it was using. Attraction did not respond.
I pressed Ctrl-C: no response. I pressed Ctrl-Z, Ctrl-D and any other key
that might abort it - no response..
The combination of slow SD, limited network bandwidth and lack of memory had
essentially killed the system, as soon as I'd typed that 'make' command. Still
optimistic about rebooting cleanly, I waited for 10 hours and ran tcpdump to
see whether anything was going on, over the network. Attraction wasn't making
any NFS requests and although it responding to a ping, it would not let me
login: if I typed 'ssh attraction', it wouldn't reply and the connection would
eventually time out. At this point, I started wondering whether a 'SysRq on
ping' facility existed, where you could activate a SysRq function by using
just the 'ping' command. I found out that it does, but it's only for the 2.6
kernel, and Attraction has the good ol' 2.4.18-rmk7-pxa3-embedix kernel.
Fortunately, the SD card's filesystems were okay - my use of NFS had saved the
loop filesystem from damage (at least I did something right!). I should
explain that OpenZaurus goes through several stages of boot:
- The kexecboot loader starts, from flash.
- The OpenZaurus kernel - or other - loads from the SD card.
- AltBoot runs and offers a choice of booting from internal flash, booting
from SD or CF card, or running a 'rescue shell'.
- AltBoot loads its filesystem from a loop file on the SD card.
- GPE starts and the wireless card is activated.
- NFS mounts are initialised and the serial shell starts.
From this mess, one binary emerged, almost-unscathed: 'xjoyce'.
Due to issues with recent changes in libpng, I was not able to get the
dot-matrix printer emulation to work - so I disabled this part of the emulator.
Everything else seems to work okay. I should mention that 'xanne' compiled
okay (2.6-kernel only) but I have not tested it. Please note that when I
compiled Joyce on 17th April, I didn't need to patch anything - so the printer
emulation should work. I say 'should' because I haven't tested it.
Please see the 'Files' page for downloads, and I'm
sorry that you had to read all of the above first.
If you'd like to read some more 'waffling', there's the
Lex (mail: brooknet at imap dot cc), 16th April 2012
The projects page
Site index page