A bit of progress on our Beeb816 project

I managed to do the merest modicum of 65816 assembly programming today - pair-programming with @Revaldinho, updating the boot rom for the Beeb816 project, which accelerates a BBC Micro to 14MHz. A previous iteration looked like this:
image

That iteration could take a fast clock input on a flying lead, but we’re not doing that any more.

The project was started 10 years ago but has been on hiatus for about 4. We got it kind of working, and put it down, and more recently picked it up again and figured out the final pieces of the puzzle. We’ve also cooked up some ways to improve the offering.

The idea - not entirely new - is to fit a fast CPU and fast local memory, with glue logic in a CPLD, on a board which goes into the original 6502’s socket.

We picked a 65816 because it’s in production and it’s available in a convenient package. We thought it might be a nice extension to 6502 but we’re no longer sure of that. It has the advantage of having easy access to more than 64k of memory space, so we aim to fit the board with 512k: it can mirror the main RAM, the OS, up to 8 ROMs, shadow the video memory, and still offer some free banks for native '816 code.

The Acorn scene presently has lots of modern add-ons and upgrades, one of which is PiTubeDirect, offering a 300MHz second 6502. Speeding up the Beeb itself is a nice extra win: a very fast second processor becomes limited by the host’s ability to write to screen. We’ve seen a 6x speedup in benchmarks.

8 Likes

@Revaldinho has produced the theatrical trailer for the Beeb816 Mk2:

Here’s the Mk2 board (there’s a clock divider so this 53MHz clock generator will used in divide-by-4 mode):

5 Likes

Time has passed! In January @Revaldinho presented an update to a virtual ABUG meetup - and we’ve made a little more progress since then.

Long story short, the latest hardware swaps out the CPLD for one which is in current production and runs partly at 3.3V. It also now works in Acorn’s Electron and Master, as well as the Beeb. Those machine don’t originally come with socketed CPUs but it’s not uncommon to have desoldered the original and fitted a socket. The Electron gets the biggest gain, as it has some performance deficit compared to the Beeb, because of the cost-reduced design. I think in all cases Beeb816 now runs stably at 16MHz and has been seen running at 19MHz.

Here are a few select slides from the presentation (Google doc: videos within) and from the thread on stardot:

Note that the host speedup also benefits programs running on the second processor especially when it’s a fast PiTubeDirect:

Here’s Mark 2B, with new choice of obtainable CPLD (surface mount) which takes about half the power, running as it does partly at 3.3V:

4 Likes

Oops, double update - @Revaldinho has reminded me of an update (Google Doc) - here are some slides from it:

and we also have the two (quite complex) memory maps, one for the simpler Beeb and Electron and the other for the more complex Master:

(The Master was sold as Master 128, having 128k of RAM which was split up and mapped in various complicated ways, as a backward-compatible extension to the original Beeb memory map. The net effect was to make much more RAM available to an application, as well as 4 banks of sideways RAM for extension ROM images or for more general use. A Basic program on the Beeb might have less than 6k of space available, whereas on the Master the same screen mode and filing system could be in use and still have 29k for a Basic program. As it happens, a Beeb with Beeb816 can do a similar thing, delivering 26k.)

2 Likes

Well, that’s impressive. – Could this have been done in 1983, when the 65816 was launched, or were there still components missing, required in order to go into the teens ranges of MHz?

(I guess, we were lucky that Acorn didn’t go that road, so we got ARM…)

I don’t think Acorn would have put any effort into in-socket acceleration, as the second processor story was always the main story. The Beeb816 itself has needed a pretty big CPLD, which wouldn’t have been available then, but of course Acorn had experience with custom chips… mixed experience!

(Acorn did make an '816 machine, the Communicator, but it was only 2MHz and marketed as a business-to-business offering, and got very little traction)

Third parties did make in-socket accelerators, even up to 4MHz. See here for a 1986 example from Solidisk - but it’s 65C02, not '816.

Edit: speed of RAM would have been a major difficulty. Acorn’s Turbo product for the Master was also a 4MHz 65C02. I don’t know if it would have been possible, or economic, to cook up a faster RAM system. Notably, the ARM went for wider RAM as the easiest way to improve throughput - as well as using in-page accesses where convenient, for a bit more speed.

Edit: Transwarp II for the Apple II seems to be from 1989, aiming for over 7MHz. Up to then, 4MHz seems to be the limit. (I haven’t searched exhaustively!)

2 Likes

Regarding historical options, as I understand it, Acorn actually had a brief look into WDC processors, but then decided to go there own route with ARM.
(On the other hand, as is demonstrated here, choosing the 65816 they could have upgraded the existing line to match any new platform, I guess, – thanks to the impressively versatile architecture of the Beeb. If this would have been a wise decision business-wise, is another question.)

1 Like

Yes, that’s my understanding too. No CPU they looked at could make good use of a fast wide memory system. But WDC were a tiny outfit making a CPU, and together with the RISC papers gave Acorn the idea that a DIY solution might fly.

I’m guessing memory access for a 4MHz 65816 would have been the equivalent of 8MHz for 68000? I mean, the famously affordable Atari ST had 512K+, so the RAM in it couldn’t have been particularly expensive. (Well, not in 1985. In 1983 would be a different story.)

Other than that, maybe Apple ][ accelerators were always something of a niche market, and there simply wasn’t much of a speed benefit going up beyond 4MHz. What software would benefit from it? Would people be using an Apple ][ to do it?

Here in the USA, there were three very popular 6502 computers which really could have been adapted into very successful backwards compatible 16 bit next generation computers. The wildly popular Commodore 64, of course, the Atari 8-bits, and the Apple ][. Unfortunately, all three companies would go all in on 68000 machines that lacked any backwards compatibility. Steve Jobs crippled the Apple IIGS demanding a slow CPU so it wouldn’t kill off the Mac, and it still managed to sell well. Commodore yanked Amiga away from Jack so they just had to go all in on it. The Commodore 128 would end up having mediocre specs to avoid tripping up Amiga (compare the 2MHz C128 CPU with the 2.8MHz Apple IIGS CPU). Jack, of course, driven by enraged spite, demanded a next-gen 68000 system to undercut the Amiga.

The results were bitter dead ends, with tons of floppies of data unreadable by next generation systems.

1 Like

First, I really do not want to derail this nice thread, which is certainly not about Apple, but I think there are more general aspects to this, as well. Namely, aspects of thermal design.

So there is this narrative about Jobs maliciously crippling the IIGS to protect his own baby, the Mac. However, we may also consider the very situation Apple was in at that time: Apple had just gone from one of the fastest growing companies to the brink of bankruptcy thanks to the thermal disaster that was the Apple III with its warping board and the subsequent recalls. At that time, Apple had a quite extensive line-up, with various flavors of the Apple ][, the high-end business package that was the Lisa (which was actually performing better than the marketing forecasts), the Mac, the ill-fated Apple III (as Apple’s future in the education market and in the low-end business segment), and the new machine (which was at that time reported as a possible, somewhat cubic shaped Apple IV) in the making. With the financial strain put on the company by the Apple III disaster, Apple had to radically reduce the line-up and also somewhat straighten it a bit. (Mind that we’re not only speaking about cost of production, but about marketing, as well.)
Keeping the aging Apple ][, which was still making for the better part of Apple’s revenues, was some of no-brainer, especially, when the company was in need of cash-flow. The Lisa was to go (with as little as ceremony as possibly, compare the land-fill dump), Mac was to stay to revolutionize the computer market and was now to cover what remained of the business market, as well, the Apple III would see some minimal commitment (I guess, for brand credibility), but was otherwise to be forgotten as soon as possible, and the new machine seemed to have been delayed. In the light of this, it may have been also about not risking another machine running too hot, which may have well been the end of the company. Also, there wasn’t really much room for the IIGS in this new, restructured line-up, besides transitioning the Apple ][ community eventually to the Mac. Playing this safe, may not have been an entirely weird idea.

Much of this also adheres to existing 8-bit platforms. E.g., the C64 was already running hot at 1MHz. Transitioning any of this towards the teens range of MHz wouldn’t have left much resemblance to the existing architecture, while other, 68000-based high-speed platforms were already in the making. Which may have also been the major strategic flaw of the 65816: existing systems weren’t to be upgraded into anything with much of a future (if possible at all, considering what was else on those motherboards), while, in the short run, these machines could still pose a major threat to any new platforms which were already maturing in development or were already out on the market.

It really should have been the Mac that was dropped in favor of the Apple IIGS, which incidentally was designed in a way that made after market cooling fan mods easy (and popular). The Mac would have sunk the company if Apple ][ sales hadn’t remained profitable to keep Apple going. The Mac was a horribly expensive mistake, and everything the Mac could do the IIGS could have done much better.

Now, Commodore also had a hot-head resulting in a lot of overheating problems, but they ejected him so it would be possible for their computers to have cooling fans. It really wasn’t rocket science. Engineers knew how cooling fans solved cooling problems.

Note that the dominant 68000 systems stuck with 8MHz or slower for the most popular models into the 1990s. A 65816 running at 4MHz would have been just fine during that time. Had the 65816 been running on any popular hardware, it would have been straightforward to upgrade with higher speed accelerator boards. The Amiga 2000 shows a possible paradigm - include a CPU accelerator slot that allows expansion with a faster CPU along with its own faster RAM. That allows combining cheaper slow expansion RAM on the main bus with faster more expensive RAM on the accelerator card.

I had an Amiga 2000 with 28MHz 68030 accelerator card. It worked well, although I did wish that the 68000 weren’t limited to just sitting there unused.

At the risk of bringing this back on topic, this accelerator card approach was, IMHO, superior to the second processor approach. It might have been slightly less efficient, with the original CPU going to waste, but it meant that almost all software would work without modification.

Also sorta back on topic, the Amiga 500 also had numerous accelerator boards, that plugged into the 68000 socket. So, for the most part an Amiga 500 could be expanded as a less expensive accelerated system than an Amiga 2000, despite not being designed for it.

Regardless, all of the 68000 systems ultimately failed. The Macintosh finally limped into some semblance of profitability in the 1990s, only to get dropped in favor of PowerPC. The Apple IIGS could have been generating healthy profits all that time, only to get dropped in favor of PowerPC.

From a company/business perspective, I’m not so sure. Mind that these would have been probably Apple ][ customers and/or customers that would have (eventually) bought the Mac anyway. In terms of an additional market segement that Apple couldn’t reach otherwise, it may not have been that significant. Why go through the hassles of developing and marketing multiple lines, when you could do about as much with a single line at a fraction of the expenses? What could the IIGS do for Apple in terms of growth, beyond holding a position they already had with the Appple ][? (Meaning, it was addressing the same market segment and was still much of a hobbyist/home/education machine. While that segment would have loved it, it didn’t lend itself that much to business deployment to compete with IBM’s PC & clones. – Mind that this was already 386 era with former mainframe applications transitioning to the PC. – Had Acorn successfully entered the US market, it could have been Apple’s answer to the BBC machines, while a bit late, But, as it was…)

It’s true that the early 68000 machines were not that impressive as they could have been (the Mac had an 8-bit board and the Lisa was built around the pre-production emulator of the chip, which couldn’t go beyond 5 Mhz). However, I guess, analysis may have shown that there was more potential in this platform, esp. given the rather obvious effects of Moore’s law. While the 65816 rooted in an 8-bit past, the 68K was basically a mainframe architecture on a chip with all the prospects that came with that.
While an alternate history could have worked out quite differently, I can somewhat understand what happened in this one. :slight_smile:

That said, is great to see (at the example of this project) what can be done with the 65816 at its full potential!

The Apple IIGS could have done EVERYTHING the Macintosh did, but better and at a lower price point, and it would also have had a huge software library, and people’s investment in Apple ][ peripherals would have made it an even less expensive computer (remember that at the time, floppy drives were somewhat expensive, and could even cost more than the computer).

Of course, the 1984 ad campaign for the Macintosh should not have gone to waste, and the humiliation of dropping the Macintosh after just a couple years should have been avoided. Instead, the Apple IIGS could have been named the Macintosh GS, so Apple could pretend it was just upgrading the line rather than admit the truth that it was abandoning an inferior product.

And given all the amazing things the “Macintosh GS” could do that the original Mac couldn’t, the fact that it wasn’t object file compatible could have been spun as simply the cost of all the added features. It had higher resolution and color graphics (including a rather clever way to make high resolution mode very colorful - the palettes of even and odd x coordinates were different). It offered backwards compatibility with existing software and hardware, along with a vastly more compelling software library. It was also simply more powerful in raw terms. It was more expandable. It had an INCREDIBLE sound chip. It was a better product all around.

As for being rooted in an 8-bit past … I don’t know if you noticed, but the computing world got taken over by IBM PC clones, which were rooted in an 8-bit past. Backwards compatibility was a huge factor - and one which Intel would learn the hard way when trying to jump to 64 bit without the backwards compatibility that AMD would offer.

Mind that in 1986, the Mac had been already on the market for two years and eventually found its niche thanks to square pixels and what was to become desktop publishing. The PC world, on the other hand, had entered into new territory with the i386, way beyond of what IBM had envisioned for it. (As I see it, the 386s weren’t really PCs at all, but a new thing, and the PC in its original concept was a rather short lived phenomenon rather than being disruptive. This disruption really came with the i386 and this was now a new game. And, to common opinion of the time, a business computer had neither color nor sound… Even the Mac, which to its reputation lacked color, but still had high-resolution sound, was considered more of a toy than a “real” computer suitable for business.)

However, a variant of the story that is closer to the topic, may be also interesting: Had the BBC Micro been introduced in the US successfully, it could have easily stood its ground against the IBM 1550 and even surpassed it in most categories, but for memory. Could the 65816 have helped it to hold up with this new generation of 32-bit competitors? Are these boards, as shown here, “i386 killers”?

I think we need to note that there are several realities, or viewpoints: the technical one, the marketing one, and the managerial one. Acorn and Commodore both struggled, in different ways, with their management weaknesses. Apple too, I think, but they did ultimately survive.

As for technology, the 65816 in some ways bears comparison with the 68008 - it runs on an 8 bit memory bus. That’s good for economy - hence Sinclair’s QL - but not so good for performance. As noted, Acorn went straight from 8 bit busses to 32 bit busses, in search of performance. Whereas Commodore (Amiga) and Atari went to 16 bit busses - somewhat faster and not quite so expensive. Also, using commodity CPUs. And from a marketing perspective, “16 bit” might have been a useful label, for all that it’s actually quite a subtle and complex question. Hence “ST” I suppose: sixteen/thirty two.

Different people, once they’ve programmed the '816, come away with different opinions. Some find it acceptable, some find it awkward. Acorn’s Communicator shows that it’s possible to make an OS for a 512k machine without too much obvious 64k bank granularity. I don’t know about the GS in this respect. But I think that’s key: the 816’s banks and the x86’s segments are ideally made as invisible as possible. The 68k, of course, offers a simple flat memory model, which I found rather attractive.

If Acorn hadn’t tackled the US at all, they wouldn’t have run out of money and been acquired by Olivetti, perhaps. But if they had conquered the US education market, that would have been a huge win. Could they have taken any market share in the business world? Doubtful, I think, although the ABC machines were rather impressive, including the ACW as a scientific workstation. Again, we see that the second processor was Acorn’s preferred way to move forward.

Regarding the BBC Micro in the US market: I think, networking may have been a huge selling point. Also, that this was readily available in BASIC. Since software was still much of a custom affair, this would have been quite an advantage. You could have made software of the next generation out of the box… The BBC label could have lent some officious credibility to the machine, as well.
Reportedly, they had been devoloping a GUI for the US, so that may have been interesting, as well. (Maybe, this was just GEM?)

I’ll admit I am sorely unfamiliar with the BBC Micro, so I really don’t know how much of a chance it would have had in the USA if it hadn’t been for the various issues that delayed it.

What I can say is that here in the USA, PBS aired The Computer Programme, and this made me (and presumably a lot of others) want the computer showcased in it (the BBC Micro). So I think this would have generated some interest. However, even by this time the Commodore 64 had a dominating lead and Jack’s price war was decimating the competition all over the place. I don’t think the relatively expensive BBC Micro would have stood a chance anyway. The Computer Programme might have gotten some feet walking into stores, but then they’d see the Commodore 64 and buy that.

1 Like

Having been working on the '816 over the past year or 2, despite 40+ years of 6502 experience, I’ve not found it comfortable to work with and those 64K banks have limitations which, if it were me “back in the day”, that day being 1984, I’d have jumped ship to another CPU without a 2nd glance. My own way to remove that bank granularity was to write a VM for it to make the banked addressing transparent to the higher level programs I am interested in - the crux of that is now the 8-bit data bus… Being able to halve the cycles needed to move data between registers and RAM would be a big win for me.

However both the Communicator and //gs have shown what is possible with good software (and presumably a team writing it rather than just me as a hobby)

The //gs seems to have required a degree of software compatibility with the //e and the Communicator did have a good base of software or at least software ideas and specifications which may have made their task easier.

I’m not sure I’ll be doing another '816 project though - like others in the past, there are other CPUs tempting me - my advantage is that I’ve managed to make the leap to a relatively machine independent high level language - a bit like Unix did even earlier, so maybe there is something in that too…

Cheers,

-Gordon

3 Likes

The 65816 was more efficient and higher performance than the 68008, though. Despite the seemingly low 2.8MHz clock speed, the Apple IIGS actually had performance reasonably competitive with the 7-8MHz Amiga and Atari ST competition. You can see this in various high profile software ports where the IIGS versions run smoothly. The IIGS’s incredible sound chip allowed for enhanced versions, even, such as Another World/Out of this World. I remember watching a longplay on YouTube and when the enhanced music kicked in I was shocked.

I don’t think anyone in the computer market cared about “bit wars” at the time. What mattered was that the Apple IIGS looked just as impressive in stores as the ST and Amiga … oh, if you saw one at all. But the sad fact is that Apple didn’t push the IIGS because they didn’t want to harm the struggling Mac, while both Commodore and Atari were pushing their 68000 machines as hard as they could.

Still, Apple was real lucky that retailers HATED Jack, having been burned by him too many times in the past. The Macintosh looked really bad next to the Atari ST with monochrome monitor. The Mac had a small screen that was only 512 pixels wide. This prevented the Mac from making much headway in word processing and desktop publishing - already at the time a good 80 column display was seen as essential. The ST, with its 640x400 resolution, could do both a good 80 column display and Mac style WYSIWYG. The Mac couldn’t, and it cost three times as much as the ST (yes, including monitor). The Apple IIGS could do a good 80 column display, and in retrospect should have included higher vertical resolution like the ST or maybe Amiga. (The Amiga had interlaced modes, which are flickery but the existing Apple Monitor /// had long persistence pixels that eliminated interlace flicker.)

Oh, another noteworthy competition between 65816 and 68000 would be SNES vs Mega Drive/Genesis. Okay, the main CPU wasn’t as important on them, but nevertheless the SNES basically won the performance contest, regardless of nominally slower CPU clock speed.

1 Like

Something possibly worth noting in the context of Acorn and the Beeb: Acorn, or perhaps specifically Sophie, were very keen on using interrupts in a certain way, and demanded fast interrupt response. The 68k scores rather badly on that metric, at least for the worst case. The 816 is presumably about as good as the 6502, although the ISR will need to store (and restore) whichever registers it needs to use, which will take a few cycles. The ARM, perhaps unsurprisingly, goes so far as to have dedicated registers for the ISR.

It could be that the SNES makes good use of interrupt response. AFAICT the SNES doesn’t make use of the 6502 mode.

1 Like