Chap rebuilds BBC Micro in JavaScript

Revisit classic space-trading Elite in vintage form


Matt Godbolt, a developer whose day job sees him work at a securities trading outfit, has used his personal time to rebuild the Acorn BBC Micro in JavaScript.

JSBeeb, running here and downloadable from Github is the product of about two months' work.

The emulator reproduces a 32K BBC Micro and when loaded into your browser produces the command prompt. Menus promise the chance to download software for the micro from various online sources, but proved a little flaky in our brief tests. If you experience the same problem, he's also built versions of the emulator that boot straight into classics like Elite and Repton.

Godbolt has blogged about the project, writing that a big challenge was figuring out how to synch the emulated 6502 processor's clock cycles and the CPU's handful of imperfect features bugs.

“As I generate the instructions I keep track of which cycle within the instruction memory accesses would occur,” he explained. “I then ensure the peripheral state is updated to take into account passing time before I read or write to memory.”

The emulator appears to be a faithful reproduction, makes suitably hideous sounds at boot-up, and offers zippy performance, something the original BBC Micro was not entirely famous for – but was certainly famous for other worthy reasons.

Godbolt promises to blog about screen and peripheral emulation in the future; posts that'll be worth seeking out for those who enjoy this kind of thing as his work is nicely detailed and includes lots of code samples and links to projects that will help others attempting similar resurrections. ®

Bootnote

For fans of in-browser emulation, there's also a JavaScript Electron (a cut-down BBC Micro) and Atari ST by various authors, plus plenty more over at the Internet Archive. What piqued our interest in Godbolt's work, however, was his nice writeup on how his cleanly written code works – and the promise of more.

Similar topics

Broader topics


Other stories you might like

  • Emma Sleep Company admits checkout cyber attack
    Customers wake to a nightmare as payment data pilfered from UK website

    Emma Sleep Company has confirmed to The Reg that it suffered a Magecart attack which enabled ne'er-do-wells to skim customers' credit or debit card data from its website.

    Customers were informed of the breach by the mattress maker via email in the past week, with the business saying it was "subject to a cyber attack leading to the theft of personal data" but not specifying in the message when it discovered the digital burglary.

    "This was a sophisticated, targeted cyber-attack on the checkout process on our website and personal information entered, including credit card data, may have been stolen, whether you completed your purchase or not," the email to customers states.

    Continue reading
  • Microsoft Azure developers targeted by 200-plus data-stealing npm packages
    Another day, another attack on the software supply chain

    A group of more than 200 malicious npm packages targeting developers who use Microsoft Azure has been removed two days after they were made available to the public.

    Security firm JFrog on Wednesday said that earlier this week its automated analysis system began raising the alarm about dubious uploads to the npm Registry, the most popular public source of software libraries for the JavaScript ecosystem. This group of packages grew from about 50 to at least 200 by March 21.

    "After manually inspecting some of these packages, it became apparent that this was a targeted attack against the entire @azure npm scope, by an attacker that employed an automatic script to create accounts and upload malicious packages that cover the entirety of that scope," observed security researchers Andrey Polkovnychenko and Shachar Menashe in a write-up. "Currently, the observed malicious payload of these packages were PII (Personally identifiable information) stealers."

    Continue reading
  • Microsoft proposes type syntax for JavaScript
    Long overdue innovation or an affront to all that developers hold dear?

    Type-fans rejoice! Plans (or a proposal, at least) are afoot to pop some type-checking into the infamously dynamically typed JavaScript.

    The proposal planned from Microsoft and others, including devs from the Igalia Coding Experience program and Bloomberg, is all about adding "types as comments" to the language.

    The theory is that it would become possible to have a syntax for types that could be used by tools that need those hooks (such as Microsoft's own TypeScript) and ignored by those that do not.

    Continue reading

Biting the hand that feeds IT © 1998–2022