This issue is linked to an incompatibility between the scaling of Windows, Java and the way the official tools are handling the screen output. I assume your Windows is set to 125% zoom factor. This leads to a problem in how the pixels of the screen output are scaled and effectively each 4 pixels from the nand2tetris screen output are mapped to 5 physical pixels on your screen. Therefore every 5th pixel on your screen appears blank. It is important to note that this is just an annoying issue how the screen is presented on your computer, but not a bug in the sense of the emulator.
There are a few ways to fix this:
- Install JDK version 8 in parallel and use it for the nand2tetris tools (this version was still ignoring Windows zoom settings).
or
- set your screen to 100% zoom rate
or
- edit the batch file that starts the tools and add the parameter -Dsun.java2d.uiScale=1.0 to the java call
(start javaw -Dsun.java2d.uiScale=1.0 -classpath...)
Example for the CPU Emulator:
CPUEmulator.bat