Warning, long post ahead


Over the last couple of days I've been trying to get a BBC Model B core running on the Papilio Duo (my FPGA board of choice at the moment):
http://papilio.cc/index.php?n=Papilio.P ... dwareGuide
http://papilio.cc/index.php?n=Papilio.C ... tingShield
There has been quite a bit of recent activity on Beeb FPGA cores on the Replay and Mist forums:
http://www.fpgaarcade.com/punbb/viewtopic.php?id=448
http://www.atari-forum.com/viewtopic.php?t=27906
I did think about starting with one of these, but both have got quite complex due their respective hardware platforms.
So instead I started with Mike Stirling's original work from 2011, which was attached to this thread:
http://www.mike-stirling.com/retro-fpga ... gn-detail/
I removed everything that was non-essential (e.g. the debugger), and ported what was was left from Altera to Xilinx.
I fairly quickly got something running that would boot and run Basic programs reliably, so the next step was to try to add in BEEB.MMC support.
I tried the original SUPERMMC ROM without much success. Then I realized I would need something more recent, as I needed SDHC support. So today I've been trying to get Dukkie's latest build (0210) working. Finally, after fixing a really subtle 6522 core bug relating to the operation of the shift register, it's now working perfectly.
I've been testing a few games from the STH archive and most seem to work. For example, Elite, Snapper, Chuckie Egg and Rocket Raid all work. But frustratingly, Planetoid (my favourite game) doesn't. It hangs after drawing the initial screen.
I'm aware the Planetoid uses the User VIA in an unusual way, i.e. PB7 toggling under Timer 1 control. This caused problems with early versions of BeebEm. But I'm pretty sure this functionality is present and working. Snapper, I think, also uses it, and this works fine.
I've tried updating the T65 core to the latest version, and also tried switching to AlanD's core. Neither of these things helped.
A bit of a long shot, but I wonder if anyone reading this has used a Beeb FPGA core recently (either on Mist, Replay, or an Altera board)? It would be great to know if Planetoid works on these systems.
Anyway, here's my roadmap for this project:
1. The ROMs are currently implemented with FPGA Block RAM, which is pretty scarce. Instead, I'd like to try to use write-protected external SRAM for as it's much more plentiful. There obviously a bootstrapping issue (i.e. how to load the ROM images into the external RAM), but the solution here looks really neat: http://papilio.cc/index.php?n=Playground.Bootstrap.
2. Once I free up some Block RAM, I can probably include ICE-T65 which should make debugging much easier.
3. Look at whether there are any bug fixes from either the Mist or Replay work that should be back-ported. Stephen Leary's name seems to come up a lot. He's been working on the Archie and Beeb Mist cores. Anyone know him?
4. Try to get character rounding working in Mode 7, which probably means fixing interlaced video.
5. Add a scan doubler for VGA output.
6. Implement the additional hardware present on a Master 128 and make "master mode" (and OS) jumper selectable.
7. Have a go at making a multi-boot image that contains the Atom, Electron, BBC Model B and BBC Master 128 designs.
This may take some time.....



Does anyone else have a Papilio Duo and Classic Computing shield?
Dave
PS, As always, the code is on github:
https://github.com/hoglet67/BeebFpga