I personally consider the approach very solid from an engineering perspective, however, it's definitely a hell of a work to implement: with more complex ISAs, e.g. Sharp LR25902 (the Gameboy Classic's), it becomes a very demanding work of balancing right level of abstraction; lowering the level too much will cause the generator to be intricate, raising it too much will make the generator too difficult to recycle for other architectures.<p>I did something very similar, going as far as automatically generating the test suites (note that this is a WIP):<p>- generator: <a href="https://github.com/saveriomiroddi/libemuls/tree/master/component_sharp_lr35902/extra" rel="nofollow">https://github.com/saveriomiroddi/libemuls/tree/master/compo...</a><p>- example cpu: <a href="https://github.com/saveriomiroddi/libemuls/blob/example_code_generation/component_sharp_lr35902/src/cpu.rs" rel="nofollow">https://github.com/saveriomiroddi/libemuls/blob/example_code...</a><p>- example test suite: <a href="https://github.com/saveriomiroddi/libemuls/blob/example_code_generation/component_sharp_lr35902/src/cpu_test.rs" rel="nofollow">https://github.com/saveriomiroddi/libemuls/blob/example_code...</a><p>The metadata itself is generated from another generator (!), then the required code is manually added, along with the autogenerated one.<p>I think the 6502 is a very good target for this type of work, as (AFAIK) it's very common in commercial contexts, so that the documentation is more rigorous. Since the GBC CPU was used just for a now obsolete console, the information sources are more or less hacked together.