Description
The Gameboy stores tiles as 2 bit-per-pixel 8x8 images, thus 16 bytes. Every two bytes is a complete row with all of the Low-bits of each pixel in the first byte, and all of the High-bits of each pixel in the second.
Input
Input will be exactly 16 bytes, received through Standard IO in one of the following forms:
- Array of bytes or strings
- 16 byte string
Per the Standard IO, these may be in a language convenient form (Deliminated string, on the stack, etc.)
Output
An image, Rendered or Saved, of the Gameboy Tile.
Scale and Aspect Ratio of each pixel is not fixed.
Each 2 bit colour of the Pallet may be anything so long as the Manhattan Distance of the RGB256 representation is atleast 48. Eg. #FFFFFF, #AAAAAA, #555555, #000000
. Traditionally, although not a requirement, 00
is the lightest colour, and 11
is the darkest.
Examples
[FF, 00, 7E, FF, 85, 81, 89, 83, 93, 85, A5, 8B, C9, 97, 7E, FF]
[7C, 7C, 00, C6, C6, 00, 00, FE, C6, C6, 00, C6, C6, 00, 00, 00]
Final Notes
- Standard Loopholes apply
- An online demo, and more in-depth explanation of the implementation can be found HERE
- This is code-golf, so fewest bytes wins! (The Gameboy only had 65536 bytes of Address Space, after all!)
- Have Fun!
7C 7C 00 C6 C6 00 00 FE C6 C6 00 C6 C6 00 00 00
should look like a letter A as shown at the HERE link \$\endgroup\$