Finding an Alchemist in Saltmarsh

Blessed Joramy sent us onwards from the Serpents Eye, towards what men know as “civilization”. Well my first impression of civilization on approach to Saltmarsh was it smells like Torbaks tent the morning after a night on the fermented yaks milk the desert tribes trade. Piss shit and puke mixed with something rotten. I already longed for a return to the mountains with their fresh smell of brimstone.

A couple of drinks in what they call an inn was all it cost us to find the location of the alchemist from the local drunk. Apparently his home is know known as the haunted house and was just outside town. Apparently he abandoned his friend who died in the house by ghosts. These civalized men have no stomach for adventure it seems. I trusted in blessed Joramy and doubted the house was haunted, we would be looking for more mundane fiends.

So off to the house we travelled, as the drunk had told us it was massively run down and in poor state. The well was unmaintained and dry, the doors off their hinges. On exploration of the house we found what I beleive to be the 2nd item of power Joramy has lead us to. A suit of armour, but the corpse it still wrapped was infested with rot grubs. So until we located the alchemist I was unable to retreive the armour.

An exploration of the house turned up no sign of the alchemist or his expected laboratory. We did find a strange fellow tied up in one of the rooms, he claimed to have been “exploring” the house when someone bashed him on the head. He did sport a head wound but his story did not ring true to us so we kept a close eye on him looking for proof of deceipt. Later in the day he was to show his true colours.

Eventually we discovered a hidden entrance we had missed in our first pass of the house. Down we went into a hidden cellar of the house. Disturbing a bunch of gentlemen in their business. They attacked us as was predictable as we charged in weapons drawn. After a relatively bloodless fight helped by the mages stunnind ability to put people to sleep we had captured the business men and tied them to their beds. I had to use Joramy’s blessing on the business mens mage as he had met an accident thanks to our brutal and bad tempered dwarf. But Joramy was generous and his wounds closed over.

While the businessmen were recovering we discovered the alchemists lab in a secret room guarded by skeletons. Another of Joramy’s blessings on some pebbles I had picked up earlier allowed the mage to decimate the skeletons with some expertly thrown stones. Inside the alchemists lab we found some form of seeing device. This device allowed the mage to read the proficy of doom.

Returning to the room where we had tied up the businessmen we got into a heated debate about their fate. I put forward my argument that they were business men, we had actually been the instigators of the violence and left to their own devices they would escape in an hour or two by the time we were well on the road and out of danger from retaliation. The mage seemed to agree in part with my argument, he seemed a good chap and not wishing to slaughter people just becuase we can. The rest of our group though are much more bloodthirsty. Led by the brutal grumpy dwarf the others were all for slaughtering the men in their beds. I am doubting Joramy’s wisdom in some of my companions. Eventually I convinced the monk of the right of our ways and the Mage, Monk and myself left to recover the armour. With their help I was able to burn out the rot grubs and recover the armour of power.

I to this day do not know the fate of those businessmen, I hope the dwarf and ranger eventually saw sense and left them be, but I fear their dark sides won over that day and there is a basement of skeletons.

The Finding of the Serpents Eye

Ah blessed Joramy, her ways are weird!

Sent out into the desert for Joramy know what reason (she said I would find someone to help me find the weapons of power we need to defeat the giants) I find a strange mage struggling through the sands on his last provisions. No idea how he got there but I lead him back to the safety of the mountains and found him some fresh water. Camping for the night when this grumpy dwarf trudges in and demands to share the fire. He claims he got bored of his clan and headed out adventuring, but from his look I think he is on the lam.

Joramy then sends me to a mountain monastery for another of the companions for my quest. Odd place totally deserted from the looks of it when we approached, but we could already smell the stench of Garlic. Inside is a lone monk, crazed as a hermit (no wonder with that Garlic smell). Who am I to argue with the blessed Joramy, the monk and his Doom Bell (mounted on his cart for some strange reason) joined our little questing group. We do not seem to be able to persuade him to wash though.

“You must find the serpents eye”, says Joramy, “there you will find a friend and a book” (What the fuck is a book?), the mage seems to know though so thats ok! “It is over in the mountains yonder beyond the great plain of grass”, says Joramy. Ok some trudging to be done there then. But its ok by Joramys blessing a number of Great Rocs swooped down and scooped us up carrying us to their nest.

Nest was full of shite and a cheery little Kobold fella, an even stranger companion. Ah, now we see when Joramy placed us here, we can see the serpent river and its eye glinting in the distance. Luckily we have foreseen to bring some rope so descending from the Roc’s nest on the spire was not too difficult. Once down in the valley we started the long trudge to the island we had seen from the top.

The valley was filled with the strangest of creatures, its almost like the God’s were testing our patience as we progressed down, undead, mudmen, hermits, overlarge crows, animated trees, and carnivorous rabbits were all sent to test us. But with the blessings of Joramy we finally made it to the island we sought. Somewhere along the line the monk and the dwarf seem to have had a barney. And the monk is scared of water. Thats a bit difficult when your travelling down a river. I am sure Joramy had her reasons, or maybe she just wants my hair grey.

Just before the Island our final companion joined us, apparently as punishment for a crime he was sent up the river (where we just came from) for the serpents eye, boy was he pissed at his elders when we told him where it was.

On the island we met one of his elders and decoded the cryptic writing (to be honest the mage was invaluable for this) and discovered about the caves under the island. We had to swim to the entrance of the caves across a fiery pool. I went first only to discover there was again some barney involving the monk and the rest of the group back where I had come from. I think eventually they just stuffed the monk on a sack and told him to shut up. Anyway they all made it across eventually.

Into the caves and the dwarf showed his battle prowess by picking a fight with the undead snakes. By Joramy’s blessing I am sure we could have just walked past them but he was insisted they needed a good kick to the head. Who am I to argue with his prowess. Once past the snakes we found a tunnel that descended to behind a waterfall, not a good exit and a vertical shaft to another level. Obviously these caves had been worked by some creatures in the past.

On the lower level were more caves, we discovered a giant serpent keeping a fairy trapped with its hypnotic powers, serpent quickly dispatched by the Blessing’s of Joramy.

We were exploring further when some dwarfs attacked us, our dwarf insists they are a different breed but I find it difficult to see the differences, short, grump, hairy. Anyway myself and the mage took some serious wounds in that fight but Joramy’s Blessings allowed us to recover. We discovered the serpent its eye and the pile of arse wipings that is apparently a book. We returned the serpent to the elder above to fulfil our final companions quest then headed off over the grasslands to our next destination, a salty marsh!

PXE Grub and All in One Images

So one little advertised feature of grub is grub-mkstandalone. Over the past week I have been playing with grub-mkstandalone to create grub.efi for a new board. We had an issue that the default grub with CentOS 7 performs badly on some EFI firmware when using tftp and it suddenly occured to me that grub-mkstandalone allows you to put file into the grub.efi itself.

So for the arm64 server I was working on.

grub-mkstandalone -O arm64-efi -o grub.efi boot/grub/grub.cfg Image

The contect of the boot/grub/grub.cfg

set timeout=5

menuentry 'Centos Image' --class os {
echo 'Loading Linux ...'
linux (memdisk)/Image earlycon=uart8250,mmio32,0x80300000 console=ttyS0,115200 acpi=force ip=dhcp root=/dev/nfs rw

# echo 'Loading initial ramdisk ...'
# initrd (tftp)/boot/initrd

And can now load Image without using the tftp implementation in grub 😀

Enter the Volcano

Being in Iceland this was the essential trip to make, to go down into the magma chamber of an extinct volcano.

The trip starts with a quick 3km hike across an old lava field to base camp. We hadn’t counted on this being the coldest spring for 30 years though and the lava was still covered in snow.

Eventually you get to base camp and get split into groups of 5/6 to descend into the volcano. Being that we were in the last group we got to scoff the traditional Icelandic lamb soup early :-D. After that out into the elements to do the final climb up to the top of the volcano.

Waiting for us was one of those window cleaner thingies you see on the side of buildings. Slowly it lowered us into the volcano core where we could finally see what we had come for.

Example DSDT for FVP Base Model

As a follow-on from yesterdays post, for development work like the rest of the arm64 community we had to spend a long time working with the models as hardware was not available. So here is a example DSDT for FVP Base Model.

DefinitionBlock (
 "dsdt.aml", // output filename
 "DSDT", // table signature
 2, // DSDT compliance revision
 "RTSMVEV8", // table ID
 0x00000004) // OEM revision
 Scope (\_SB)
 Method (_OSC, 4, NotSerialized)
 /* Platform-Wide OSPM Capabilities */
 /* APEI support unconditionally */
 Return (Arg3)
 } Else {
 CreateDWordField (Arg3, Zero, CDW1)
 /* Set invalid UUID error bit */
 Or (CDW1, 0x04, CDW1)
 Return (Arg3)

 // Two Emulated aarch64 CPUs each with 4 cores
 Device(CPU0) { // Cluster 0, Cpu 0
 Name(_HID, "ACPI0007")
 Name(_UID, 0)
 Device(CPU1) { // Cluster 0, Cpu 1
 Name(_HID, "ACPI0007")
 Name(_UID, 1)
 Device(CPU2) { // Cluster 0, Cpu 2
 Name(_HID, "ACPI0007")
 Name(_UID, 2)
 Device(CPU3) { // Cluster 0, Cpu 3
 Name(_HID, "ACPI0007")
 Name(_UID, 3)
 Device(CPU4) { // Cluster 1, Cpu 0
 Name(_HID, "ACPI0007")
 Name(_UID, 4)
 Device(CPU5) { // Cluster 1, Cpu 1
 Name(_HID, "ACPI0007")
 Name(_UID, 5)
 Device(CPU6) { // Cluster 1, Cpu 2
 Name(_HID, "ACPI0007")
 Name(_UID, 6)
 Device(CPU7) { // Cluster 1, Cpu 3
 Name(_HID, "ACPI0007")
 Name(_UID, 7)

 // SMC91X
 Device (NET0) {
 Name (_HID, "LNRO0003")
 Name (_UID, 0)

 Name (_CRS, ResourceTemplate () {
 Memory32Fixed (ReadWrite, 0x1a000000, 0x00010000)
 Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, , , ) {0x2F}

 Device (SREG) {
 Name (_HID, "LNRO0009")
 Name (_UID, 0)

 Method (_CRS, 0x0, Serialized) {
 Name (RBUF, ResourceTemplate() {
 Memory32Fixed (ReadWrite, 0x1c010000, 0x1000)
 Return (RBUF)

 Device (VIRT) {
 Name (_HID, "LNRO0005")
 Name (_UID, 0)

 Name (_CRS, ResourceTemplate() {
 Memory32Fixed (ReadWrite, 0x1c130000, 0x1000)
 Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {0x4A}

 // UART PL011
 Device(COM0) {
 Name(_HID, "ARMH0011")
 Name(_CID, "PL011")
 Name(_UID, Zero)

 Name(_CRS, ResourceTemplate() {
 Memory32Fixed(ReadWrite, 0x1c090000, 0x1000)
 Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x25 }

Juno booting from ACPI tables.

So my work at Linaro for the last year and a half has been on bring ACPI to arm64. The first actual hardware platform that this work can be booted on is the Juno development board.

Using the ACPI tables devloped for MS Windows and published by ARM

And the kernel based on the series of patches published by Linaro on LKML

It is now possible to boot the Juno to userspace (using root on NFS as the USB support is not in mainline yet).

Here is dmesg of successful boot.

Initializing cgroup subsys cpu
Linux version 3.17.0-rc2+ (graeme@xora-haswell) (gcc version 4.8.3 20140401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC 4.8-2014.04) ) #168 SMP PREEMPT Fri Aug 29 17:11:37 BST 2014
CPU: AArch64 Processor [410fd030] revision 0
Detected VIPT I-cache on CPU0
Early serial console at I/O port 0x0 (options '')
bootconsole [uart0] enabled
efi: Getting EFI parameters from FDT:
EFI v2.40 by ARM Juno EFI Aug 7 2014 10:38:36
efi: ACPI=0xf9b80000 ACPI 2.0=0xf9b80014 
ACPI: Early table checksum verification disabled
ACPI: RSDP 0x00000000F9B80014 000024 (v02 ARMLTD)
ACPI: XSDT 0x00000000F9B7F0E8 00003C (v01 ARMLTD ARM-JUNO 20140727 01000013)
ACPI: FACP 0x00000000F9B42000 00010C (v05 ARMLTD ARM-JUNO 20140727 ARM 00000099)
ACPI: DSDT 0x00000000F9B3F000 000317 (v01 ARMLTD ARM-JUNO 20140727 INTL 20140424)
ACPI: GTDT 0x00000000F9B41000 000060 (v01 ARMLTD ARM-JUNO 20140727 ARM 00000099)
ACPI: APIC 0x00000000F9B40000 00020C (v01 ARMLTD ARM-JUNO 20140727 ARM 00000099)
On node 0 totalpages: 519952
 DMA zone: 7112 pages used for memmap
 DMA zone: 0 pages reserved
 DMA zone: 519952 pages, LIFO batch:31
ACPI: GICC (acpi_id[0x0002] address[000000002c02f000] MPDIR[0x100] enabled)
ACPI: GICC (acpi_id[0x0003] address[000000002c02f000] MPDIR[0x101] enabled)
ACPI: GICC (acpi_id[0x0004] address[000000002c02f000] MPDIR[0x102] enabled)
ACPI: GICC (acpi_id[0x0005] address[000000002c02f000] MPDIR[0x103] enabled)
ACPI: GICC (acpi_id[0x0000] address[000000002c02f000] MPDIR[0x0] enabled)
ACPI: GICC (acpi_id[0x0001] address[000000002c02f000] MPDIR[0x1] enabled)
ACPI: 6 CPUs enabled, 6 CPUs total
psci: probing for conduit method from ACPI.
psci: Using standard PSCI v0.2 function IDs
PERCPU: Embedded 11 pages/cpu @ffffffc07ea28000 s13760 r8192 d23104 u45056
pcpu-alloc: s13760 r8192 d23104 u45056 alloc=11*4096
pcpu-alloc: [0] 0 [0] 1 
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 512840
Kernel command line: console=ttySBSA0 earlycon=pl011,0x7ff80000 root=/dev/nfs nfsroot= ip=dhcp
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Memory: 2015420K/2079808K available (4039K kernel code, 256K rwdata, 1484K rodata, 221K init, 185K bss, 64388K reserved)
Virtual kernel memory layout:
 vmalloc : 0xffffff8000000000 - 0xffffffbdffff0000 ( 247 GB)
 vmemmap : 0xffffffbe00000000 - 0xffffffbfc0000000 ( 7 GB maximum)
 0xffffffbe01c00000 - 0xffffffbe037c8000 ( 27 MB actual)
 PCI I/O : 0xffffffbffa000000 - 0xffffffbffb000000 ( 16 MB)
 fixed : 0xffffffbffbdfe000 - 0xffffffbffbdff000 ( 4 KB)
 modules : 0xffffffbffc000000 - 0xffffffc000000000 ( 64 MB)
 memory : 0xffffffc000000000 - 0xffffffc07f000000 ( 2032 MB)
 .init : 0xffffffc0005e6000 - 0xffffffc00061d5c0 ( 222 KB)
 .text : 0xffffffc000080000 - 0xffffffc0005e5dd4 ( 5528 KB)
 .data : 0xffffffc00061e000 - 0xffffffc00065e1e0 ( 257 KB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
 RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:64 nr_irqs:64 0
clocksource_of_init: no matching clocksources found
Architected cp15 timer(s) running at 50.00MHz (phys).
sched_clock: 56 bits at 50MHz, resolution 20ns, wraps every 2748779069440ns
Console: colour dummy device 80x25
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=500000)
pid_max: default: 32768 minimum: 301
ACPI: Core revision 20140724
ACPI: All ACPI Tables successfully acquired
Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
No CPU information found in DT
hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 7 counters available
Remapping and enabling EFI services.
Freed 0x18cb000 bytes of EFI boot services memory
CPU1: Booted secondary processor
Detected PIPT I-cache on CPU1
Brought up 2 CPUs
SMP: Total of 2 processors activated.
devtmpfs: initialized
atomic64_test: passed
regulator-dummy: no parameters
NET: Registered protocol family 16
cpuidle: using governor ladder
cpuidle: using governor menu
vdso: 2 pages (1 code @ ffffffc000625000, 1 data @ ffffffc000624000)
hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
software IO TLB [mem 0xfe400000-0xfe800000] (4MB) mapped at [ffffffc07e400000-ffffffc07e7fffff]
Serial: AMBA PL011 UART driver
ACPI: Added _OSI(Module Device)
ACPI: Added _OSI(Processor Device)
ACPI: Added _OSI(3.0 _SCP Extensions)
ACPI: Added _OSI(Processor Aggregator Device)
ACPI: Interpreter enabled
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20140724/hwxface-580)
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20140724/hwxface-580)
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S3_] (20140724/hwxface-580)
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S5_] (20140724/hwxface-580)
ACPI: (supports S0)
ACPI: Using GIC for interrupt routing
SCSI subsystem initialized
Switched to clocksource arch_sys_counter
pnp: PnP ACPI init
pnp: PnP ACPI: found 0 devices
NET: Registered protocol family 2
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP: reno registered
UDP hash table entries: 1024 (order: 3, 32768 bytes)
UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
futex hash table entries: 512 (order: 3, 32768 bytes)
fuse init (API version 7.23)
msgmni has been set to 3985
io scheduler noop registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
console [ttySBSA0] enabled
bootconsole [uart0] disabled
ARMH9118:00 supply vdd33a not found, using dummy regulator
ARMH9118:00 supply vddvario not found, using dummy regulator
libphy: smsc911x-mdio: probed
smsc911x ARMH9118:00 eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ARMH9118:00-ffff:01, irq=-1)
smsc911x ARMH9118:00 eth0: MAC Address: 00:02:f7:00:58:7b
mousedev: PS/2 mouse device common for all mice
TCP: cubic registered
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
smsc911x ARMH9118:00 eth0: SMSC911x/921x identified at 0xffffff8000008000, IRQ: 192
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from, my address is
IP-Config: Complete:
 device=eth0, hwaddr=00:02:f7:00:58:7b, ipaddr=, mask=, gw=
 host=,, nis-domain=(none)
 bootserver=, rootserver=, rootpath=
 nameserver0=, nameserver1=
VFS: Mounted root (nfs filesystem) readonly on device 0:13.
Freeing unused kernel memory: 220K (ffffffc0005e6000 - ffffffc00061d000)

Sinclair QL

So recently I have been playing with one of my retro toys the Sinclair QL. This is the strange beasty Sinclair built after the ZX Spectrum, 68008 CPU which is familiar(ish) to Amiga/ST owners.

So far I have a SuperHermes replacement serial/keyboard board fitted. To one machine that allows the use of PC keyboards.

Another machine has the most excellent QL-SD fitted.

Like other Retro platforms there are also new hardware manufacturers appearing like Sandy where one of the first products announced in the new SupraRAM! Waiting for my SupraRAM to use with the QL-SD!

Sandy are for a short time also offering a 40% off their replacement microdrive pads (essential as they tend to turn to dust after 30 years) with the code CRAZY40!


CPC 6128 External Drive A Mod

So as a follow on from the last post it turns out the same issue is present on the 6128 classic drive port as well. Another wire link from Pin 4 of internal connector to Pin 25 of external can be made.

Here is a picture of this mod as well.


CPC 6128+ External Drive A Mod

For some reason Amstrad did not route NDSEL0 to the external drive connector so external drive accont be drive A. For me that was an issue as the internal drive on my 6128+ is broken. The fix is relatively easy and is just one wire link. You need to link the internal drive connector Pin 4 to the external drive connector Pin 9.

Here is a photo of the link which shows it in place.


Acorn Electron ROM Cart to Sideways RAM part 2

So I had a rethink about the Sideways RAM and I came to the conclusion that possibly there were some timing issues causing the instability. According to this post on stardot someone had managed to piggy back a SRAM on the internal ROM without the issues I was seeing.

With this information and due to the fact I was using a 62256 (32k x 8) I figured I could actually make the cartridge without the 74HCT139 as ROMQA (Edge-A16) could be connected directly to A14 of the ram chip. /OE (Edge-A2) could be connected to /OE and /CE of the ram chip. R/W (Edge A4) could be connected directly to /WE pin of the ram chip.

The easiest way to to this was to cut the 74HCT139 completely off the board so we can use its VIAS to make the connections. I had to restore the track I had cut on Edge-A4 (Edge-A11 is still not needed). I had to make a couple of new cuts to disconnect the A14 on the ram chip from be wired to Vcc.

Anyway this is the front of the PCB from the new version.

Care PCB Front2

And this is the back of the PCB where the real work with the wire links and cuts occurs.

Care PCB Back2

And just to show this is all working, *ROMS command issued just after switch on.

Care ROMS Blank

*ROMS command issued after loading 2 roms from disk.

Care ROMS Loaded

New welcome screen after break is pressed to initialise the new roms.

Care ROMS Break

And just to check roms are executing code the *HELP +1 command that Pres rom adds.

Care ROMS Pres Help

Im pretty happy with this project now. My only regret is that Edge-B10 is not populated on the cart (as no unused pads are). If so I would have wired it to the spare socket to provide ROM 13 and not wasted a socket.