pikuma_6502_nes/bgnam.py
2022-12-04 23:13:27 -05:00

11 lines
238 B
Python
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

with open('background.nam', 'rb') as f:
i = 0
while True:
hexdata = f.read(1).hex()
if len(hexdata) == 0:
break
if i % 32 == 0:
print()
print('$' + hexdata.upper(), end = ',')
i = i + 1