Tuesday, July 28, 2015

Master System WIP


It took some time, but here it is: Emux now supports quite a few Sega Master System games! At least in my work-in-progress branch, as not so much has been integrated into the master branch yet. The Z80 processor is quite different than the GB80 which I originally based my implementation on - it has more registers, more instructions (and different ones with the same opcodes, which was the cause of some nasty bugs I ran into), different interrupt modes, port access, etc. The VDP (video display processor) was on the other hand pretty straight-forward to develop compared to the NES PPU due to the fact that my current implementation is not fully cycle-accurate (information is pretty hard to gather to get it emulated at that level). Below are some screenshots of other games so far proven to run correctly (I didn't even know Mortal Kombat was back-ported to that system!):


A good amount of unofficial Z80 instructions are not properly emulated at this time and some are unfortunately used by some games. Code cleanup is next in line once I add support for those as well as fix a few timing issues leading to scanline interrupts occurring too early for some titles.