fixed tools for python3

This commit is contained in:
Steven Hugg 2019-01-09 09:51:04 -06:00
parent 26a91fa038
commit 132e4c5993
5 changed files with 9 additions and 12 deletions

View File

@ -89,6 +89,7 @@ TODO:
- https://www.crowdsupply.com/tinyfpga/tinyfpga-bx
- HTTPS warning
- Safari: scope doesn't show while CRT in use
- recording video indicator
WEB WORKER FORMAT

View File

@ -887,6 +887,7 @@ function _recordVideo() {
};
f();
});
return true;
}
function setFrameRateUI(fps:number) {

View File

@ -50,7 +50,7 @@ with open(args.bdffile,'r') as f:
if bytes[y] & (0x40 >> x):
b |= 0x0f
output.append(b)
print('const char CH_%d[] = { %s };' % ( chord, string.join([tohex2(x) for x in output], ',') ))
print('const char CH_%d[] = { %s };' % ( chord, ','.join([tohex2(x) for x in output]) ))
chars[chord] = 'CH_%d' % chord
elif inbitmap and len(toks) == 1:
byte = int(toks[0],16)

View File

@ -99,27 +99,22 @@ def tohexv(v):
for arr in [output]:
if args.asmhex:
print('\thex ' + string.join(list(map(tohex,arr)),''))
print('\thex ' + ''.join(list(map(tohex,arr))))
if args.asmdb:
for i in range(0,len(output),height):
print('.DB', string.join(list(map(tohex2,arr[i:i+height])),','), ';%d'%(i/height+lochar))
print('.DB', ','.join(list(map(tohex2,arr[i:i+height]))), ';%d'%(i/height+lochar))
if args.carray:
print("static char FONT[%d][%d] = {" % (hichar-lochar+1, height))
for i in range(0,len(output),height):
print('{', string.join(list(map(tohex2,arr[i:i+height])),','), '},', end=' ')
print('{', ','.join(list(map(tohex2,arr[i:i+height]))), '},', end=' ')
print()
print("};")
if args.flatcarray:
print("static char FONT[%d] = {" % ((hichar-lochar+1) * height))
print(string.join(list(map(tohex2,arr)),','))
print(','.join(list(map(tohex2,arr))))
print("}");
if args.verilog:
j = 0
for i in range(0,len(output),height):
#print "rom["+str(j)+"] = 32'h" + string.join(map(tohex,arr[i:i+height/2]),'') + ";"
#j += 1
#print "rom["+str(j)+"] = 32'h" + string.join(map(tohex,arr[i+height/2:i+height]),'') + ";"
#j += 1
#print "rom["+str(j)+"] = 64'h" + string.join(map(tohex,arr[i:i+height]),'') + ";"
print(string.join(list(map(tohexv,arr[i:i+height])),',') + ", //%d" % (i/height))
print(','.join(list(map(tohexv,arr[i:i+height]))) + ", //%d" % (i/height))
j += 1

2
tss

@ -1 +1 @@
Subproject commit d630ddcb29d74a178cde043d74188fac35d6a21f
Subproject commit 61a1691a1de05dca3b694bf603db49ffbaf572cf