Search This Blog

Wednesday, 21 December 2016

Caches, Latency, RISC & CISC: How Does a 386 Beat a 1.6GHz Celeron?

I'm rewriting this article, because I've decided it was a bit shit.

Ultimately, it costs more to complete certain instructions on a CPU that's designed to work with cache, especially when there are 3 levels of it, than it does to complete on a simpler architecture like the 80386. I'll explain it better at some point soon.


Monday, 14 November 2016

Amstrad Adlib Clone: Restoration

Home Page

A Brief Introduction to PC Sound

Up until the Pentium II came out (or thereabouts), desktop PCs did not generally come with a built-in sound card. As they were still mostly considered to be 'business machines', audio was not compulsory by any means and businesses were unwilling to pay the additional cost for this unnecessary hardware. I'll save the history of sound cards for another entry and say, for now, that one obviously had to invest in additional equipment to give their PC sound-producing capabilities back then.

Enter The Adlib

One of my AdLib Replicas
The AdLib sound card was one of the first of these, and enabled a PC to produce synthesised sounds from Yamaha's OPL2 FM chip (the kind of sounds you would have heard from an old portable keyboard at school or something). When we upgraded our first PC with a 'multimedia kit' some time in 1993 or 1994, it came with what I think was probably an AdLib clone. I know it wasn't the real deal because it came with a joystick, which required a 'game port' and the AdLib lacked one of these. I sold this card to someone at my school for £10 a couple of years later when I upgraded to a SoundBlaster AWE32, which allowed digitised sound in addition to wavetable (more realistic) music, so what need did I have for the crappy AdLib then?

Well, twenty years later I'm messing around with old computers again and, for some games, an AdLib card is one of the few ways to enable authentic period-correct audio. One of the reasons for this is that it is an 8-bit card, so it will work in any PC as old as the original IBM PC or XT. For a while I had been missing the authentic sounds of the OPL2 I had grown up with so I was keen on acquiring one. Because these cards are becoming increasingly rare, they are sought after and fetch pretty big prices on eBay. I say big prices: over $360 is pretty big for a 30 year old device that cost $245 when it was new on the market. Its successor, the AdLib Gold, is even more rare and has consistently sold for well over $3,000 in the last year.

Anyway, that's more than I'm willing to pay for the sake of nostalgia, especially when there are other FM synthesis options out there such as cards featuring the YMF718 (aka OPL3-SAx). These cost around $10, have an ISA interface (almost essential for DOS gaming - PCI doesn't play nice) and they give you the AdLib sound, plus digitised sound effects. I have one of these in my 386 desktop and it works fine. The downside is that it's 16-bit, and requires the loading of drivers in order to work. This eats up valuable RAM.

But then...

Seller's picture of the card.

A Clone Appears

I'm a member over at the Vogons forums (Very Old Games On New Systems), which started out with an emphasis on emulation, but now has a huge hardware interest as well. They have a long-running thread where people watch eBay for stuff of interest and, if it's not of interest to the person who found it, they share it with everyone else. Well, someone posted up that someone was selling an Amstrad AdLib clone and I got curious. Bidding started at 99p so I thought 'what the hell'. What I actually did was chuck a £25 max bid in and thought nothing more of it. A few days later it turned out I'd won the thing! It was only then I noticed what terrible condition it appeared to be in (which is why it went for £25 rather than the usual £50 a clone would normally sell for). The volume control, game port and gold edges appeared to be corroded or at least rusted from where the card has been stored in damp conditions.

People bad-mouth clones but, when you've got a computer with only 2 ISA slots like I do, you need to save space as much as possible. Having the built-in game port is a bonus as far as I'm concerned, and some people are more interested in functionality rather than collectability.

So, a bit of history on the card. Amstrad began manufacturing 'affordable' IBM PC clones in the '80s following the relative success of the CPC. They were a bit late to the game, only releasing it in 1986, hence why Amstrad were able to manufacture them so cheaply. Over the next decade or so, they released a number of models intended for home users based on the 8088, 286 and 386, culminating in the Mega-PC. Soon after this they withdrew from the PC market (just as it became popular!)

The Amstrad Mega PC. Source: Wikipedia

This particular sound card (model 3100-015P-4) was bundled with the PC5286, which was marketed as a gaming PC. It's likely the system's designers considered including the AdLib in their machines, but the lack of game port would have required either including one on their motherboard design or taking up an additional ISA slot with a controller card of some kind. On balance they must have decided it made economical sense to manufacture their own YMF3812-based card, with a game port included.

So it was only when the card arrived that I fully realised what bad condition it was in:

Corrosion around the ISA contacts
Rusted volume dial, plus various discolouration elsewhere

Rust around the game port: at best, unattractive; at worst, indicative of damage

I'd been reading a lot about cleaning up old equipment and had picked up a few tricks, so I got straight to work.

Step One

Remove the metal items (the bracket / volume control) and the capacitors:

The silkscreen indicated polarity and gave each component a number, so I wrote down each corresponding rating for each capacitor. The bracket and game port shield came off easily and I submerged them in vinegar. The potentiometer was tricky because I don't have a soldering station with vacuum, only a solder sucker, so I had to spend time doing this bit by bit without scorching the PCB. This is how it looked once I removed it:

Step Two

I used vinegar again (no isopropyl alcohol here) and some cotton buds to swab the board, contacts, etc. I left some vinegar on the rusted pot contacts for a few minutes as well. I then rinsed the board and dried it. I used washing up liquid and a scouring pad to clean up the gold contacts and the rusty spots and this technique worked quite well:

So the 'corrosion' wasn't corrosion at all, just oxidation of the copper traces under the gold. Here's the board in its rejuvenated state:

And here's my attempt at a composite before / after shot:

Step Three

I removed the metal items from the vinegar, rinsed and dried. Most of the actual rust had come off but I used the scouring pad additionally to get off as much of the actual corrosion as I could, as it had darkened the metal.

Step Four

Resoldered the pot, which was looking much better than before. Looked through my collection of components and, luckily, had replacements for all the caps. This isn't a high-load card or one that will get hot so I wasn't bothered about using solid caps, just reliable ones. Soldered them all back in, then replaced the shield and bracket:

How the back of the card looks following the elbow grease

And a final overview of the card. Looks literally good as new. I had a big grin on my face.

Step Five

Testing!! The moment of truth. I dug out a 486 motherboard. At first it seemed to clash with the video card as I got no signal but, once I'd moved it to another slot, it worked fine! No popping caps, no smoking, no unpleasant noises from the speakers. It did seem to be picking up quite a bit of noise from the hard drive I/O though (I have seen this mentioned on the web). Fired up Wolfenstein 3D and saw that magic indicator!

At first I had no audio coming out of the speakers whatsoever and I was a bit disappointed (but not surprised). However, I realised that audio had merely been disabled in the options. The reward for my hard work: an Adlib clone for £25, and pure, unadulterated OPL2 audio!!!

And this is the moment that makes all this nostalgia stuff seem worthwhile: I felt like a teenager again. For about half an hour I played Wolf 3D and it was like the first time. It's a difficult feeling to explain if you weren't there at the time.

Postscript: a few weeks later the board stopped working. I'm currently looking into reverse-engineering the card and making a replacement: it will be a clone of a clone!

Friday, 27 May 2016

Windows 10: Don't Panic

(this post is dated My 2016 and is mostly no longer relevant. It's here for historical purposes only)

Windows 10: shouldn't I or shouldn't I?

The short answer is: yes, but only because Microsoft wants you to.

The right answer is: it depends (skip to the end for more info on this).

"But it's free!". It still depends.

"But time is running out!". It still depends.

Microsoft don't want you using an older operating system, even if the old one works better than the new one.

Your operating system (OS) underpins everything your computer does. Without it, your computer is useless. Also, if your OS doesn't work properly, your computer won't work properly. Upgrading an application, such as Photoshop, to the latest version often makes sense because it introduces new features and often can improve performance and increase stability. Equally, upgrades can introduce new problems or worsen performance, especially if your computer is older than 5 years. In this situation, rolling back to the old version is usually trivial. Rolling back an OS is usually complicated.

So before upgrading your OS, you should always make sure it's the right one for your computer. Microsoft don't really care, so who's going to tell you whether it is or not? You won't get the answer from friends and family because some will say it's great, some will say it's a nightmare and some might think you're talking about double glazing. The only real way to get the answer is to find someone else with the same model computer as you who has upgraded and ask them how it went. Either that or suck it and see.

The box pictured above is the one people are currently seeing. All seems good, right? Microsoft have been roundly mocked by the Internet community for having to reassure people that their files will be right where they left them. The most important tick, however, is the one about this PC being 'compatible'. This is not a full check so, if there are compatibility problems with your computer and Windows 10, you won't find out about it until it's too late.

Around this time last year, people on Windows 7 and 8 started getting invitations to upgrade to Windows 10 for free. In the last month or so, these have become more insistent because the window for a free upgrade is closing soon. Microsoft are hoping this will pressure the last few adopters into a decision. I took the plunge last year, but not on my main computer. I installed it on the computer the kids use because, if it didn't work for a few days or a week, no big deal. Most people can't do without their main computer for that long, especially if they're running a business from it. After being generally impressed with the upgrade on that computer and seeing many improvements over Windows 8, I decided to upgrade my main laptop.

The problems began almost immediately. I couldn't create extra accounts for other users to log in, some of my software didn't work but, most annoyingly, WiFi didn't work. I had to plug in a separate USB dongle to get it working. I struggled on with these problems for a while because I don't mind doing that and because I think I will eventually fix them. Recently, further problems made me change my mind and admit that some of these problems can't be fixed. So I went back to Windows 8.1. And that took days to do.

The bottom line is, never take an operating system upgrade lightly. It used to be a significant effort to do such a thing - you would need to install from a DVD or CD and the whole process required some degree of conviction to actually get started. Now, it only takes one click, so it feels trivial.

It's not.

Also, while it may be free at the moment, if it goes wrong or if your computer isn't actually compatible, it will probably cost you money to fix. The old adage is true: if it ain't broke, don't fix it. 

So for a longer answer to your question (and if you are currently using Windows 7 or 8):

- If your computer is working fine, don't upgrade. You current Windows version will continue to receive minor updates for a few years yet.

- If your computer isn't working fine, an upgrade won't necessarily fix the problem and could make it worse. Try to fix the existing problem - if upgrading is a solution to that problem, go ahead.

- If you need to use a new piece of technology or software not supported by your current computer (such as games using DirectX 11), you will have to upgrade Windows to use it. You will probably have to upgrade your whole computer anyway in most cases.

- If you want to give it a go and don't really care about having a partially working computer, go ahead. There are lots of guides on the Web to help you upgrade (and fix it if it goes wrong). Just backup your data first.

If you have any specific questions about this topic, please feel free to leave a comment below and I'll do my best to give a helpful answer.

Monday, 8 February 2016

YouTube Channel Up & Running

A very quick note to link my YouTube channel which has a grand total of


videos on it. More to follow. And blog entries to back up each video / add information, plus articles on various things.