While I was looking back through my photos on my phone a few days ago - I think I was looking for a picture of my PET that I restored (currently in storage) - I stumbled across some of the screenshots I'd taken of my Amiga A2000. To try and help work out what was wrong with this machine I'd used the most excellent 'DiagROM' by John 'Chucky' Hertell.
![]() |
| Amiga A2000 Motherboard with DiagROM |
Anyone serious in repairing Amiga computers will know all about DiagROM and what it can do. For everyone else, it's a new ROM that replaces the Kickstart ROM and which runs diagnostics from the second the Amiga receives power. Even if your Amiga won't start, DiagROM gives some clues with its graphical display and serial output to point you in the direction of potential faults. In short, it's an essential tool for diagnosing and repairing anything Amiga.
![]() |
| DiagROM Main Menu |
![]() |
| Machine info.. |
![]() |
| Memory testing |
But my Torch Triple X, although based on a similar CPU (the slightly uprated 68010) does not have a DiagROM. And this makes me sad as my hardware, when it's switched on, sits on a pale blue startup screen and does nothing. Well, not quite. There is supposed to be sound out of it with an error beep sequence. For some reason I don't get that out of my Torch motherboard but I can see it if I probe the right pin on the Hitachi HD6303 service processor.
The architecture of the Torch is also very different to the Amiga as it includes the 6303 service processor, a 68010 main CPU as well as the appropriate 68451 MMU and 68450 DMA controller (required to run the Unix OS).
Well, after some of the exploring with the emulator I seriously started to wonder if it would actually be possible to create a standalone ROM for this machine that ran diagnostics, similar to DiagROM. The issue with my motherboard is that the beep sequence I get, now worked out to be the 68010 highlighting a main RAM failure, doesn't say which bit of RAM has failed. It could be the data paths, address bus, /CAS or /RAS issues, or it could just be a single RAM chip has failed. Without knowing where this has happened it's very easy to wander around possibilities, potentially missing the actual solution every time.
The essential idea would be to use as little functioning hardware as possible initially, then progressively test and enable more of the machine. Most importantly, the earliest diagnostics wouldn't assume that the RAM, interrupts, video hardware or operating system are working. And to take on the ideology of Mr H, don't assume anything works until you've tested it!
Let's get started. (It's a bit of a long one. You might need a cuppa halfway through.)
I had to get a toolchain set up for the HD6303 processor so I installed ASxxxx assembler. This supports the 6303 just by using the processor directive .hd6303 at the start of any assembler source. Which is nice (and easy for my simple brain to comprehend). And, of course, I needed a toolchain for the 68010. For this I installed VASM which also 'just works'(R).
And there's a very good reason to use assembly instead of something like 'C'. The original Caretaker ROM is 16KB and so is burned onto a 16KB EPROM with sections of code for the 6303 and the 68010. That means we only have 16KB to play with so we have to be VERY efficient in anything that we need to write. For comparison the Amiga either uses a 256KB ROM (up to KS1.3) or a 512KB ROM (KS2.0) so DiagROM has rather more room to play with (although I suspect Chucky may still say that's not enough).
Here's a brief history of the work done so far (which has taken far longer than this little - but getting longer - summary might suggest!) :
Phase 1 - Getting to Know You
There are a few names you might see in this blog, all related to the various programs that make the original Torch start up. Here's some brief introductions:
Caretaker - This is first thing that runs when the Torch is switched on. He's responsible for starting up the HD6303 service processor and necessary hardware, along with testing the video RAM and performing some early hardware tests. If faults are found at this stage Caretaker will signal this with a series of four beeps of different lengths. If everything is OK then he copies ERMA (see below) into video RAM and releases the MC68010 main processor from reset.
ERMA - This is a small bootstrap program responsible for getting the main processor running. Caretaker copies approximately 12 KB of code from its EPROM into video RAM, where the 68010 can execute it without requiring working main DRAM. ERMA's main responsibilities include testing the main system RAM, initialising some host side hardware, providing the initial 68010 startup code, and locating and loading WERMA from boot media (see below).
WERMA - This is a much larger and more sophisticated program than ERMA, consisting of the WERMA executable of approximately 78 KB (version 2.10c apparently). WERMA is reponsible for generating the startup interface, handling the disk operations and loading the disk toolkit if requested, managing the the key disk authorisation and serial number information, and loading and launching the Unix OS.
And now I've done all that, I'll drop the bombshell that once we get going properly, we won't use any of them in the final ROM. But we will use a similar way to get things going...
On with the show!
The first diagnostic screens
For this first foray I decided to keep it simple (stupid). So I modified the original Caretaker ROM to replace the normal boot sequence with a basic diagnostics display, reusing ERMA's text handling routines. Along the way I found out that the Caretaker uses an 'additive' checksum so as soon as I added or removed anything that affected that, it didn't work (beep flippin' beep). That got fixed immediately to save my beepin' sanity..
![]() |
| Not too bad... |
(All of these initial tests were done using the Torch emulator by the way. There's a little while to go before we hit real hardware, just so you know.)
Along the way I added a 'real' test to check 4KB of main RAM (start small) using the pattern $5A5AA5A5 which for 32-bits (which is the internal bus size of the 68010) is actually:
0101 1010 0101 1010 1010 0101 1010 0101
And then I made a mess of calculating a displacement jump which triggered an 'illegal instruction' trap in Caretaker. He was NOT happy..
![]() |
| Trap indeed... |
And then to top it all, once I fixed that, I made it so it entered the test routine two bytes early, which caused writes to the video RAM with somewhat unfortunate results...
![]() |
| Hmm. I think we might just have f***ed up here.. |
After fixing that I added some more detailed information to identify any memory faults (by this point I had already added a flag in the emulator to introduce a memory fault - hence why it says 'fail').
From there I extended the RAM info to include the failed address, and expected vs actual data along with the XOR difference.
The XOR difference is a very clever way to identify which particular bits of memory might be faulty. It stands for 'exclusive OR' and is an 'OR' gate with a couple of extra conditions. Basically, the output is true if either input is in a different state to the other, but is FALSE if the inputs are both the same. Here's the truth table for it:
Input 1 Input 2 Output
0 0 0
0 1 1
1 0 1
1 1 0
The impact of doing this is that where the system sees a difference between actual and expected bit value and XORs it, then the output will always be 1. This then corresponds to the bit number that is incorrect. Easy. Really, it is, honest...
Anyway, I found out that the formatting routines in the Caretaker ROM weren't very standard so my first attempt at useful info resulted in everything saying '8X'. Very useful..
![]() |
A fail, yes. But in formatting, mostly... |
![]() |
Proof I can sometimes get it right... |
Next thing, I extended the RAM test to cover the whole of the 1MB main system RAM. In reality, I could only test about 960KB because WERMA rather inconsiderately loaded loads of stuff into the first 64KB. Never mind.
![]() |
| Another pass. Nice. |
The test basically consisted of checking the memory in 240 blocks of 4KB. The emulator showed that this worked fine with both no RAM errors present and with a RAM error set.
Let's get real..By now I'd decided it was time to stop playing with the existing ROM and to start setting up a dedicated ROM image, without WERMA and without Caretaker, just the TorchDiag. I'd certainly learned a lot from the experiments and messing about with the current ROM but it was too tied up in bringing a fully working system to the point of operation. What I needed was a bare bones set of tests that increase in complexity as more of the system is verified OK (or not) and this just wasn't going to be practical squeezing in with the existing ROM.
So, on to Phase 2 (ooooh!). At which point I restarted the numbering and renamed the files just to confuse everyone..
(Also, because the majority of initial checks in the standalone ROM rely on beep sequences, there aren't many screenshots in this bit. Just keep thinking 'beep beep' and you'll be fine...)
Phase 2 - Creating a Standalone Diagnostic Firmware
The first version of the standalone ROM was not exactly 'useful'. That's not strictly true but it did initialise the service processor (HD6303) and its timer while holding the 68010 in 'reset'. It made two little beeps to say it had done that. At the first attempt, there were no beeps but it turned out I'd missed setting Port 2 direction register. But once that was changed we got a happy 'Beep! Beep!'. Nice!
This was very small but proved that it was possible to create a firmware that could operate the speaker without Caretaker, ERMA, WERMA or the 68010 CPU.
It's ALIVE!
Next came a slightly more ambitious set of tests, by adding a real HD6303 controlled video RAM test. This tested almost all of the 64KB of video RAM - but not all. The reason being that the emulator (still not on real hardware yet, remember!) uses the last byte of each bank for.... some reason...
To check that what was added would work, there was also a minor update to the emulator to add the 'TORCH_VRAM_FAULT' variable.
And this was actually the first useful “is it dead?” diagnostic that didn't require the main CPU to function - and it worked perfectly! Not exactly DiagROM but a big step for this project.
Next came another big step. The Caretaker ROM actually contains code for the HD6303 service processor as well as the 68010 CPU. This next update would be the first version to include 68K style code alongside the 6303 code too. All that this update did was to run the existing VRAM test but then copied a tiny VASM assembled 68010 bootstrap into video RAM, but most importantly, it then released the 68010 from reset using Port 1 bit 3. The 68010 then executed code directly from VRAM and wrote a value into a shared memory mailbox. The 6303 was looking for the acknowledgement value and reported success (or timeout) using the beeper.
By this point there was a bit of a series of beep codes:
- VRAM PASS : two short beeps
- 68010 acknowledged : three short beeps
- 68010 timeout : long short short beeps
- VRAM fail : repeated long beep
Getting this working was another huge step. For the first time, both processors were running the firmware and communicating with each other (in the emulator remember), even if the 68010 really didn't do much other than say "Hello there!".
Phase 3 - Diagnosing Main RAM without using Main RAM...
Some very quick notes on this phase (before things get more interesting at Phase 4):
Early main RAM test
- Extended the VRAM-resident 68010 bootstrap to test 4 KB of main DRAM at $110000 to $110FFF.
- Kept executable code, stack, exception vectors and communication mailbox entirely in video RAM.
- Added complementary memory patterns and a walking one test.
- Introduced TORCH_EARLY_RAM_FAULT=1 in the emulator to simulate a stuck-low D3 bit during the new memory test.
- Added a bus-error exception handler as the foundation for detecting inaccessible memory.
- Expanded the success sequence to two, three, then four short beeps.
- Used two long beeps for a detected RAM data mismatch.
- Successfully verified normal startup, injected VRAM failure and injected main RAM failure.
This was a particularly important breakthrough i.e. the diagnostic could detect faulty main RAM without needing that RAM to execute its own code.
Full 1 MB RAM testing and BERR handling
- Expanded the 68010 memory test to cover the entire original 1 MB of main DRAM, from $100000–$1FFFFF.
- Removed the earlier need to protect the first 64 KB, because the diagnostic now runs entirely from VRAM - Yay!
- Tested 256 blocks of 4 KB using complementary patterns and walking one checks.
- Added a progress counter in shared VRAM so the HD6303 could monitor the 68010 during longer tests. (Emulator runs this very quick - real hardware needs testing!)
- Implemented a bus-error exception handler using vector 2, with the handler and stack remaining in VRAM.
- Added TORCH_EARLY_RAM_BERR=1, simulating a bus error at $180000.
- Used distinct audible failure patterns (similar to real Caretaker errors):
- RAM data mismatch: two long beeps.
- Bus error: two long and one short.
- RAM test timeout: three long beeps.
- Successfully verified all three tests: healthy RAM, injected D3 failure and injected BERR.
At this stage, TorchDiagROM could test the whole original main memory and survive simulated data faults and bus errors.
Phase 4 — Creating the real diagnostic display
This is where things get properly interesting..
Making noise is great but we needed to be displaying some useful information. To do this required understanding how to create 68010 graphics. My first experiment was writing pixel data directly into the Triple X video framebuffer to create a 'T' on screen. Again, not exactly useful but a good start. Or it would have been if it actually worked. Initially, all I got was a blank screen but this was because the emulator was expecting the HD6303 to read $0F from $43F0 before it would expose the framebuffer. Odd but OK.
And that worked. 😁 We could now draw stuff on screen.
![]() |
| More 'T' vicar? |
But to show useful information, we need a font. And Caretaker already has one, so I pinched it. 😆
![]() |
| Eh? Oh! "A". |
This consisted of 95 printable ASCII characters, occupying 760 bytes. Very nice. So, after re-organising the memory 'map' in the diagROM, I added character and string rendering routines (which may look suspiciously like the Caretaker routines..) to produce an actual readable display using the authentic Torch font.
The memory layout now looks like this:
- Reset vectors and interprocessor mailbox in low VRAM.
- Diagnostic display region in the middle.
- 68010 executable code in upper VRAM around $8000.
- Original font around $9000.
- Supervisor stack in a separate upper-memory region.
![]() |
| I'm a real boy! |
The 'garbage' and bar across the screen are actually the font and program information - remember that all this is being executed from VRAM! But the main thing now is that TorchDiagROM now looked like a real Torch diagnostic utility! GET IN!
Next on the agenda was an extended diagnostic display to report the first failed main RAM address. This captured and displayed the expected value, actual value and the XOR difference before triggering the text rendering. The existing early 6303 tests were kept with their beeps too. As an added bonus, it was relatively easy to extend the main RAM tests to also carry out a test on the Limpet RAM expansion. Nice.
![]() |
| All systems nominal, Captain.. |
One of the things that had started to bother me was that the screen setup in the emulator was actually cheating slightly. There was an artificial routine early on in the emulator to force the screen through the pale blue startup then dark blue caretaker screens. This meant that the colours on the emulator would not be the colours on the real hardware. So, to make sure there would be no nasty surprises, the ROM was updated to correctly initialise the CTRC. This was relatively straightforward and, in the ROM, required that the foregrond and background colours were specificed.
The emulator was also updated to include a 'TORCH_RAW_VIDEO' mode. This worked really well as there was code in there to actually initialise everything properly and so it actually worked with the emulator starting up the real Caretaker ROM too, so it was well worth doing. But the results for the diagROM were great. I chose a black background with a pale green text. Very terminal like. 😁
![]() |
| 1980's Terminal vibe. |
One thing that the diag didn't currently do was check the tiny bit of internal RAM that the 6303 processor has. There's about 128 bytes so it was worth adding a check for them before going any further.
And so, finally, we've reached the moment you've been waiting for. Let's get this on to a real EPROM and try it in the Torch.
I had an EPROM lurking around from my PET shenanigans a while ago. And I still have my phone sanitiser that works as an excellent single EPROM eraser, and my T48 EPROM writer with Xgpro software.
![]() |
| The dynamic duo.. |
One sanitiser session later, and I had version 1.1.2 on the EPROM. But did it work?
![]() |
| It's real! It works! Wa-hoo! |
Oh, yes. And the results were encouraging. The main RAM was working OK (foreshadowing...) but the Limpet was reporting nothing and so triggered a 'BERR' (bus error).
But this is EPIC!
From this it was confirmed that:
- the HD6303 is working and executing code
- the HD6303 internal RAM is working correctly
- the video RAM is working correctly
- the main 1MB RAM is working correctly (for now...)
The only thing not working was the Limpet RAM. This was not really unexpected but was a bit annoying. But based on everything I'd learned about the Torch I was sure that I should be able to remove RAM from the Limpet and the system would still boot. The mechanism that the Torch uses to work out if there is additional RAM is stupidly simple. At the initial RAM test, just keep going up through the address space until no RAM responds i.e. BERR. This should mean that if I removed the RAM one bank at a time then it might highlight where the issue with the Limpet was. So I took out the first bank of RAM.
![]() |
| Well, darnit. I didn't expect that.. |
Oh. Bugger.
The main 1MB of RAM is now showing a fault. What. The. Heck??
Fortunately, the diagnostics were actually helpful and showed that the test failed at the first address ($100000) and the XOR value was $04000000. From this I could see which bit was failing:
![]() |
| Bits and bobs.. |
So it was the third bit of the lower nybble of the second byte. This corresponds to data bit D10 on the system.
Just one point on the number presented by the Torch diagROM. It's actually a 32-bit number even though the processor has a data bus of 16-bits i.e. it's presented as $04000000. Internally, the processor can use 32-bits, but when it works with this number externally it does it in two 'hits'. But then why do we only see one error? If the fault is there and we're reading using the same data lines then surely it would affect both 16-bit portions of the readback?
The 68000 series of CPUs are what they call 'big endian' which means they look at the most significant byte first (interestingly the term 'big endian' and 'little endian' originate from the novel Gulliver's Travels and refer to the way to eat an egg). So our test sets the memory for a 32-bit value and reads back the first 16 bits. Because this has an error the test stops immediately, so it never actually gets to the second half of the 32 bit number, leaving it as all zero.
In any case, we have a fault.
To see if this was a single fault that just so happened to be the first address in main memory (it could be but that would be a massive coincidence) I added another RAM test, this time specifically aimed at address $1000000. This would write $0000 to that address and read it back 256,000 times, then it would write $FFFF and read that back 256,000 times. Then it would write and read $0000 and write and read $FFFF 256,000 times each. Over a million tests. Hmmm.
And the results were interesting...
![]() |
| Veeerrryyy interesting. Really. |
This told me that there were exactly half of the tests failing ($7D000 is 512,000). And the XOR of the test showed what I suspected. With a value of $04000400 this meant that when the Torch was reading 32-bit values the data line D10 was faulty on both cycles.
I extended the test a bit more to include details of how many tests failed for each run through. It confirmed one thing. Writing and reading $0000 was fine i.e. no failed tests, but EVERY test requiring a readback of $FFFF failed with the XOR value of $0400.
![]() |
| Hmmm. Not sure things have improved.. |
This was very weird as it showed that of the 512,000 tests, 266,240 had failed and all with the same $04000400 XOR value.
By now I needed to start probing around the motherboard and, to be honest, it was not easy. The Limpet board is mounted over the main RAM which makes it impossible to reach the main RAM when the machine is on. Remember that the Torch will NOT start at all without the Limpet attached because IC169 is removed (and presumably discarded) when the Limpet is installed.
I had to come up with a way to lift the Limpet away from the motherboard but leave it plugged in. And this is what I came up with..
![]() |
| I see you, RAM. |
After several hours of crimping the tiniest most fiddly stupid crimp things onto ribbon cable I had a working set of extensions for the Limpet. And, fortunately, they just worked. I also discovered that the connector that links to all the er... links.. on the motherboard is not required and is presumably there to make sure that no links have jumpers on when the Limpet is installed.
Anyway, now that I can get to the RAM I can do some probing. Looking at the schematics I could see that the DRAM chips responsible for data line D10 were IC105 and IC113. Sadly, after many hours of probing and analysing I could see nothing untoward in any of the signals. I checked the data in/out, /CAS, /RAS and /WE signals and they all seemed to be a) the right voltage and b) the right timing.
I decided to go a bit more mechanical and dismantled all the cables and reseated all the chips. For the main three Motorola chips I actually removed them completely. They were the 68010 CPU, the 68450 DMA controller and 68451 MMU. And would you believe it, underneath the CPU was the tiniest sliver of copper wire. It was an offcut from when I had previously repaired a trace. Of course I removed it.
Then I began to wonder if any other debris might be lurking in there. So I lifted the motherboard, turned it upside down and shook it like a polaroid picture. Well, not quite, but I did give it a bloody good shake and, would you believe it (again), a piece of metal dropped out that looked like an offcut from a component leg - something like a resistor or capacitor.
Back to the shed!
Hooking up everything took a few minutes but then I was ready for another switch on and, well, things were a bit different...
![]() |
| Still got an error but...wait a minute..!! |
In case you can't see it, the Limpet 1MB memory is now no longer reporting a bus error. Instead it's showing that the 1MB memory on the Limpet passed all its tests.. What. The. Heck!!
This is GLORIOUS news! It means that the memory control to the Limpet is working correctly, all the PAL chips are fine (I was worried that they had died and they are the ultimate unobtainium), and all the DRAM is working too. What a result!
But what about the main RAM error?
After my success with the more physical maintenance I decided to have a go at reflowing the sockets for IC105 and IC113. It couldn't hurt and at least I'd be able to tick it off the list of things I'd done. So I did, using my newly purchased liquid flux (because I can't find my old flux since the move from Crashed Towers).
And here's the result of that little escapade:
![]() |
| Speechless. |
No errors. No. Errors. NO ERRORS!!
NO ERRORS!!
It appears that all of the issues I had been having with this machine were down to:
- A sliver of copper wire under the CPU
- A 4mm piece of resistor leg offcut lurking goodness knows where
- Dodgy solder joints on two DRAM sockets
So, I immediately replaced the diagnostic ROM with the original Caretaker.
![]() |
| YES! |
The 'SCSI controller 0 not present' error was because I hadn't connected up the SCSI cable or even plugged in the OMTI SCSI controller for the floppy drive. I connected everything up and tried again.
And got the same error.
Arse.
So, something is not right with the SCSI on the motherboard. And I'm fairly sure it is the motherboard and not the OMTI controller. I have a BlueSCSI connected as SCSI ID0 which the Torch should boot from. This should just work, even if the OMTI board isn't working. But then if the BlueSCSI was faulty (and assuming the OMTI is working) I should be able to use the Gotek floppy drive emulator to load the key disk immediately.
Both the BlueSCSI and OMTI failing at the same time is unlikely so it looks like I still have motherboard gremlins.
Great.
But at least there is a working diagnostic ROM for all the other Torch Triple X users out there (all one of them).






































