Okay... so here's the 'State of the Dragon' Address.
Many things are working now... it's been a bit of a struggle to get to a level of accuracy I'm happy with and there is a long way to go.
I started with the Dragon 32 Emulation (released under the generous MIT license) here:
https://sites.google.com/site/eyalabraham/dragon-32-computer
This is a Raspberry Pi Zero 'bare metal' emulator that handles the basics of a Dragon 32.
First off, I'm indebted to
eyalabraham for the codebase - the code was as clean and as readable as anything I've encountered in my retro-travels over the past 5 years. A true joy to integrate.
Having said that... there were problems with the code. The CPU emulation was too slow for the venerable DS - but more importantly, the HALT emulation of the CWAI instruction was not correct and this caused problems in games like Dungeons of Daggorath that relied on it.
The PIA emulation is also very 'down the middle of the plate' - meaning that if someone is using it 'textbook', it will work... but it's not accurate enough for some games. For example, the VSYNC bit in the status register is set no matter whether VSYNC interrupts are enabled or not (that is, the VSYNC will toggle and stay active for the entire VSYNC flyback period whether or not the SW enables or disables interrupts... and some games like Time Bandit will poll it in a fast-loop). Secondly, it is possible for a game/program to reverse the use of columns/rows for keyboard scanning - and, once again, Time Bandits plays the role of spoiler by doing just that.
So the PIA emulation needed to be more generic - tracking which ports are configured as inputs and outputs and handling things more universally. I'm not done with that (right now I have a hack in place to let Time Bandits work).
Many IO Ports are also mirrored... though I haven't run into anything specifically that relies on it... but I'll probably make that work just in case.
Tandy CoCo and Dragon 32 both have non-centering Analog Joysticks (yuck!)... But I've managed to cobble together a reasonable analog joystick driver for the DS and it works pretty well. Most games will be playable.
Right now the emulation hits the DS pretty hard... the DSi can handle it but the DS can't... at least not yet.
I should have some kind of beta available by next weekend if all goes well.
Oh... and I did start a repository for the emulator... just a few graphics up there. But feel free to STAR it
