Skip to content

Display

Anthony Logar edited this page Apr 29, 2019 · 4 revisions

The display is a 64x32 pixel monochrome output of the program is running. The data location of the screen sits from 0xF00 to 0xFFF in ram. Each row is represented by 8 bytes.

0xF00 .. 0xF07
0xF08 .. 0xF0F
0xF10 .. 0xF17
.
.
0xFE8 .. 0xFEF
0xFF0 .. 0xFF7
0xFF8 .. 0xFFF


Draw

The draw opcode (0xDxyn) is passed 3 variables.
x represents the the register index that contains the x coordinate.
y represents the the register index that contains the y coordinate.
n is the number of rows to print of the sprite.

The function will xor the sprite at location I to the current display starting at bit x, y. If any value goes from set to unset during the xor the Vf shall be set to 1.
Sprites that go outside the boundaries wrap around to the other side.

Clone this wiki locally