quick-and-dirty port of my Zymosis Z80 emulation engine to D. code was built from scratch and not using huge tables to generate huge sources (it's just one module with source size ~64KB).

it properly emulates all known Z80 quirks (including MEMPTR register) and passes all 1335 tests from FUSE.

sorry, it uses GDC @attribute("forceinline") feature, so you need latest GDC to build it. it's not strictly necessary though (speed optimizations? who needs that speed optimizations with current CPUs?!) and can be hacked away with this piece of code:

version(GNU) {
  import gcc.attribute;
} else {
  private struct Attribute(A...) { A args; }
auto attribute(A...) (A args) if (A.length > 0 && is(A[0] == string)) { return Attribute!A(args); }
}

i'm pretty sure that this is the first Z80 emulator written in D. %-)

ah, nearly forgot to give repo URL: http://repo.or.cz/w/zymosis.d.git

Reply via email to