Wednesday, November 25, 2009

Migrated to the Windows API Pack, started work on both Z80 and 68k

Continuing my long tradition of changing directions, I spent some time moving all my code off of SlimDX and over to the Windows API pack. So far it's apples and apples, but moving forward I would expect the MSFT wrapper to change it's API's less, respond to bugs faster, and provide better resources when it comes to debugging.

The default help file, however, is only marginally more useful than what SlimDX provides, but at least it'll link back to the DirectX pages on msdn.

Theres' a lot more than D3D in the API pack. I really want a tablet so I can play with the accelerometers and light sensors, though the next toy to play with will be some of the new explorer extensions, especially the thumbnailing.

So I got bored of the framework stuff, and started fleshing out the emulation core itself. I added BCD instructions to my 6502, and XML files to go with them to describe a 6507 and 6510 (6510 is still short all it's IO features), and started both a Z80 emulation, and a 68k.

The 6507, of course, is for atari 2600 support, which seems a pretty soft target. 6510 will be for commodore 64, though the oddest thing is, despite having grown up on the c64, and knowing the thing inside and out, I can't really psyche myself up to write a full emulator for it. But I do plan on adding SID support, and there are SID files that actually run in BASIC, and some that use the VIC chip for timing, so even a fully functional SID player is a 90% complete c64 emulator, so if I went that far why not finish it?

But I think the platform I'm most eager to taget is genesis, just because there seems to be this sense that the 68000 is some kind of monster of a beast to emulate, when I see it as one of the more straightforward CPU's that's ever been released. I shunned SNES for genesis, since the SNES is basically all custom hardware, and any code I wrote couldn't really be reused - and I want to target Neo Geo if and when I get genesis done - emulating it's graphics hardware on the GPU would actually be pretty fun.

The Z80 can take me lots of places too.. SMS, gameboy, playchoice 10 support for my NES emu, and a handful of Big N's arcade boards I'm interested in, like Donkey Kong, Popeye, etc.

I'd really like to go after PCE/TG16, as it's really a pretty neat machine, but am having a hell of a time finding any really detailed technical documentation on it.

Of course, I'll code it all myself, because that's the whole fun.

I think I may be the only person to write any sort of emulator from scratch in any managed language. Everything else I've come across is a half-assed port with lots of hacky pointer-to-array stuff, and buffer.BlockCopy junk.

That's a great way to make a slow emulator, and perpetuate the myth that managed code is slow, though I'm trying to prove the opposite (even if only to myself), and I think I've done that, for the most part.


And, oh yes, I have the WPF content embedded into D3D10 very nicely now, performance is even more than acceptable, and I still have some really good options for further optimization.

No comments: