Converted more of bsnes in c.