Yep, I needed a new train project. I spent my time when travelling to work by train on a small notebook (HP Pavilion 1030ed) reading blogs, browsing the internet and all. Every now and then I have a pet project that I like to do. Hardly ever does it amount to anything useful, but it’s the pleasure and focus of thing that interest me.
I combined my love for the Atari Lynx machine with the Microsoft platform. It seems like a nice exercise write an emulator for the Atari Lynx. I will allow me to learn more of the internals of the Lynx machine, processor and hardware emulation and various older chipsets that I knew from my teen ages. When I was 13-15 years old I spent quite some time on the Commodore 64 machine, wrote some childish C64 Basic programs and even a little assembly. I had no idea what I was doing at the time, but I do remember stuff like LDA (load accumulator). Bringing it all together I thought it would be nice to write an emulator for the Atari Lynx using the .NET Framework. This will allow it to be used on a variety of platforms:
- Windows based operating systems with DirectX or maybe Windows Presentation Foundation (WPF) and the Media Integration Layer
- Windows Phone 7
- XNA Game Studio, which allows targeting both Windows and XBox360
- Silverlight inside cross-platform browsers
At the moment there are two emulators available for the Windows OS: Handy and MetaLynx. The latter is old, not feature complete and it has no source code that I could find. The first however is very good, with source code in C++ (for Visual Studio). It has been ported to a number of other devices, such as the PSP, GP2X, MacOS and many more.
I could do a straight port of the source code of Handy. I think it is doable, but will be error-prone. It will also defeat the purpose of learning about emulation, the processors inside the Atari Lynx, the other hardware and so on. That’s why I want to rewrite the code, refactor it where necessary and improve it where possible. It will be rewritten “from scratch”. I do not mean from scratch literally, because I intend to have the Handy source code right next to me, to take a look at how it is done there.
Ideally, I will document everything I learn along the way, so anyone can learn some or all of what I have encountered. I have no idea if this will ever get finished, but the fun is what counts.
Let’s get started.