I am working on the Fill.asm project for Chapter 4 and am having a problem with the Screen GUI in the CPU Emulator. I first started testing my own script, which instead of using a loop simply stored -1 in the first 24 memory slots mapped to the screen (beginning at 16384), which I confirmed represents 16 1's in binary by switching the "Format" dropdown at the top right of the screen from "Decimal" to "Binary." The only effect this had was to put a black pixel in what I am assuming is the first screen coordinate (1,1). I then decided to search for a full solution which I found at the following location: https://code.google.com/p/nand-to-tetris/source/browse/trunk/project+04+-+Machine+Level+Programming/fill/Fill.asm?r=9. Using this script, I found no difference...still only one black pixel at (1,1). I have attached a screenshot of what the script looks like while running (Animation on) to confirm that it is in fact looping through each screen memory slot and writing a -1 in it. I have also confirmed that no difference is seen in the Screen GUI when turning animation off (No animation).
Re: CPU Emulator Screen GUI Component Not Working!
Solved this during the current Coursera run of the course in the forums. Reposting my solution here as it solved this for me and others having this issue with the CPU Emulator on OSX.
I was having this same 1 pixel issue, and have now fixed it for my iMac.
I thought I had installed the latest Oracle Java as I could see the latest version in the Java Control Panel. It turns out I had only installed the JRE and not the JDK, this had only installed the latest version for use in web browsers and not from the command line.
I checked the version from the command line and saw this:
$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
I installed the latest JDK and now see this:
$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
My fill code now displays correctly in the CPU Emulator. I guess it is not compatible with the Apple version of Java I had installed.