asic and offset from side and row.
Calculating with a formula instead of switch statements. Also note a few previous commits. I guess I should add a test case before this can be merged. (It is ok to do other things, also that breaks this merge request in the meantime.)