Earlier this year I gave another presentation on jsbeeb at the GOTO Chicago conference. The good folks at GOTO have just uploaded the video to YouTube and you can watch it here:
The slides are available (use the arrows to navigate), and of course you can play with the emulator on the jsbeeb site.
A quick one this. Last night while I ought to be doing more micro-architecture research I was instead reading the Wikipedia article on Beebdroid.
I noticed it had the top 20 played games…and I thought I’d do the same for jsbeeb.
So for the period 1st January 2015 to 16th February 2016, the top 20 disc images loaded from the “Stairway to Hell” archive are:
Image | Number of loads | Percentage |
---|---|---|
10OfTheBestGames | 374 | 4.00% |
Elite | 318 | 3.40% |
2002 | 192 | 2.06% |
Airwolf | 128 | 1.37% |
3DPool | 123 | 1.32% |
Exile | 117 | 1.25% |
Elite-v1.0_B | 111 | 1.19% |
3DBombAlley | 101 | 1.08% |
Elite-MasterAndTubeEnhanced | 99 | 1.06% |
Arcadians | 84 | 0.90% |
ChuckieEgg | 84 | 0.90% |
180Darts | 82 | 0.88% |
Repton | 81 | 0.87% |
3DGrandPrix | 78 | 0.83% |
Frak | 72 | 0.77% |
10OfTheBestEducation_B | 72 | 0.77% |
3DConvoy | 68 | 0.73% |
Pacman | 67 | 0.72% |
CastleQuest | 65 | 0.70% |
1984 | 61 | 0.65% |
Last year I gave a presentation at work on my favourite open source project, jsbeeb – “Emulating a BBC Micro in Javascript”.
I’ve been given permission to release the video; so here it is, warts and all:
The slides are available, and of course you can play with the emulator on the jsbeeb site.
Last year I gave a presentation at work on my favourite open source project, jsbeeb – “Emulating a BBC Micro in Javascript”.
The slides are now available online. Hopefully they make enough sense by themselves to be interesting. Please note that you can go both left/right and up/down: Some slides have more information if you go down.
The slides were made using reveal with a bit of custom work to get the 6502 assembly syntax highlighted.
Update: I’ve just been given permission to release the video.
Over the last few weeks I’ve really been concentrating on shoring up the emulation quality of jsbeeb, mainly by adding test cases for all the undefined opcodes. Thankfully, there are some processor test suites out there and I’ve been able to get them running in jsbeeb as part of the continuous build. It now takes about 40 minutes to run all the tests, but I’m pretty darned sure jsbeeb has an accurate NMOS 6502 emulation.
Most recently I’ve been taking a glance over the BBC Master emulation, both in terms of hardware and the slightly different CMOS 65SC12 chip it used.
With a little help from my friends on the stardot forums I was able to get some tests run on real Masters and compare the output of the few instructions I couldn’t find info for. Most notably the unusual behaviour of the 6502 when in Binary Coded Decimal mode has mostly been fixed in the 65SC12.
This is the fourth post in my series on emulating a BBC Micro in Javascript. I’d recommend reading the previous part on 6502 internal timings before reading this post. It’s also handy to have read read the first part which covers general stuff, and the second part which focuses on the video hardware.
Again thanks to my good chum Rich Talbot-Watkins who helped demystify what goes on in the Beeb.
Like most CPUs, the 6502 has a physical pin (the IRQ line) which causes an interrupt when brought low: the current instruction is completed and then instead of proceeding to the next instruction, the CPU enters interrupt mode (which disables further interrupts) and jumps to an operating system handler. This handler then deals with the interrupt — a timer firing, a keyboard event, disc activity and so on. The handler is responsible for:
This is the third post in my series on emulating a BBC Micro in Javascript. You might find it instructive to read the first part which covers general stuff, or the second part which focuses on the video hardware. This post will cover the subtleties of the 6502’s instruction timings. In the next post I’ll cover how interrupts and hardware timers fit into the mix.
This time around the thanks really have to go to my good chum Rich Talbot-Watkins. He and I have been friends since we were twelve years old and have been programming together since we met. His knowledge of the Beeb is legendary — he still writes games for it even now. His help in getting the timings spot on in jsbeeb was invaluable.
Getting the instruction timings right is paramount for good emulation. I covered some of this in the first post, but so many tricks on the BBC required intimate knowledge of the instruction and hardware timings that if an emulator didn’t account for them properly, some things wouldn’t work right.
Following on from my previous post, I’m going to talk a bit about emulating the video hardware of a BBC Micro. Firstly, a big credit to Tom Walker for his b-em emulator upon which much of the jsbeeb video code is based. Thanks Tom!
When most people think of a BBC Micro, they think of the iconic “Teletext” display, referred to as MODE 7. It was the default screen mode and had some great benefits: it had high-resolution, clear text, many colours, and some cool effects. The fact it only took up 1KB of memory was nice too, especially when that may be 1/16th of your whole RAM.
Matt Godbolt is a C++ developer living in Chicago. Follow him on Mastodon or Bluesky.