00333300
03111130
31111213
31111113
31211113
31221113
03111130
00333300
Created
May 15, 2014 14:48
-
-
Save ork/6523b8af7008d6251bd7 to your computer and use it in GitHub Desktop.
Print GameBoy VRAM tiles in your terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import fileinput | |
#http://nocash.emubase.de/pandocs.htm#vramtiledata | |
colors = ('\033[97m\033[107m', # White | |
'\033[90m\033[100m', # Dark gray | |
'\033[37m\033[47m', # Light gray | |
'\033[30m\033[40m', # Black | |
'\033[0m') # Escape color | |
if __name__ == '__main__': | |
for line in fileinput.input(): | |
if fileinput.isfirstline() is True: | |
print("==> {}".format(fileinput.filename())) | |
for point in line.strip(): | |
print("{0} {1}".format(colors[int(point)], colors[4]), end='') | |
print('') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment