Saturday, March 11, 2017

Nand2Tetris Screen Addressing

http://www.nand2tetris.org/lectures/PDF/lecture%2005%20computer%20architecture.pdf


So, you have 256 rows each 1 pixel thick.
You have 32 columns each 16 bits thick, or 512 columns, each 1 pixel thick.

So, to set pixel at x,y where x,y within (0-511, 0-255) :

Set (black) the y % 16 bit of the word addressed by Screen[ x*32 + y/16]

where Screen[X] implies memory address 16384 + X.

No comments:

Post a Comment