Saturday, 10 January 2015

V-Blank timings are fixed in sgherm (and some thoughts on documentation in code)

Anna managed to fix LCDC timings by complete accident, and now Link's Awakening works. One minor caveat: the intro doesn't scroll properly. I think this is due to STAT interrupt timing or not firing (Link's Awakening doesn't use them), but this is progress! This makes me happy.

Incidentally, MESS's documentation is a disaster — I can't make heads nor tails of it, and it seems neither could they. They tried to write specifications intermixed with code, and failed so hard, I see why their GB emulation was never finished.

This is why I believe in a clean separation of specifications and code. Comments are for annotating code and explaining the reason something is done; specifications, theory, and higher-level views belong in a separate document. In the process of mixing code and specifications, the algorithms get lost, and with it, the clarity of what you're trying to do.

No comments :

Post a Comment