Lawmakers advance bill to study energy from waves and tides