Skip to content

Instantly share code, notes, and snippets.

@jonrandy
Created February 28, 2021 08:22
Show Gist options
  • Save jonrandy/24e43ebac2f56c0b59d26f67832d1dd2 to your computer and use it in GitHub Desktop.
Save jonrandy/24e43ebac2f56c0b59d26f67832d1dd2 to your computer and use it in GitHub Desktop.
Speccy Memory Y-coordinates
// Speccy memory addresses for y-coords on screen (first byte)
let list = [], third, midblock, fine, i;
for (i=0;i<192;i++) {
third = i&192 ;
midblock = (i&56)>>3 ;
fine = (i&7)<<3 ;
list.push(midblock+third+fine)
}
document.body.innerHTML += list.join();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment