made some progress with the timing
minor refactoring for better reading
minor improvement for rom detection
cycle accurate scanline timing