Created
January 16, 2017 00:44
-
-
Save Jacajack/163c83ce055422139707c694a1cb0550 to your computer and use it in GitHub Desktop.
PPM to raw VGA (or whatever, 320x200) data in assembly format. Never tested
This file contains hidden or 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/python | |
width = 320 | |
height = 200 | |
with open( "splash.ppm", "r" ) as fin: | |
ppm = fin.read( ).splitlines( True ) | |
#print( ppm[4] ); | |
#print( ppm[58396] == "255\n" ); | |
print( "splash:" ); | |
for i in range( 320*200 ): | |
if ( ppm[4+(i*3)] == "255\n" ): | |
print( "\tdb 0x7" ); | |
else: | |
print( "\tdb 0x0" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment