Re:Code generating a WebAssembly 6502 emulator from specific...
by ChickeNES on Monday November 16, 2020 @06:23PM
(#25118389)
> Sharp LR(3)5902
This really should be referred to as the Sharp SM83, as original Sharp documentation has now been found for the microcontroller that was used in the Gameboy's SoC.
I did something very similar, going as far as automatically generating the test suites (note that this is a WIP):
- generator: https://github.com/saveriomiroddi/libemuls/tree/master/compo...
- example cpu: https://github.com/saveriomiroddi/libemuls/blob/example_code...
- example test suite: https://github.com/saveriomiroddi/libemuls/blob/example_code...
The metadata itself is generated from another generator (!), then the required code is manually added, along with the autogenerated one.
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.