pikuma_6502_nes/bgnam.py

11 lines
238 B
Python
Raw Normal View History

2022-12-05 04:13:27 +00:00
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