Skip to content

Commit

Permalink
I am bad at separating changes mainly because I don't care
Browse files Browse the repository at this point in the history
  • Loading branch information
comex committed Jul 2, 2011
1 parent 9ddbb59 commit 60cf29f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions catalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
PROT_EXEC = 4


mode, version, cachefile, kernfile, patchfile, kcode, outfile = sys.argv[1:8]
mode, device, version, cachefile, kernfile, patchfile, kcode, outfile = sys.argv[1:9]
four_dot_three = '4.3' in version

assert mode in ['dejavu', 'untether']
Expand Down Expand Up @@ -243,7 +243,7 @@ def do_main_thing():

kstuffp = ptr(kstuff + '\0'*32)
zerop = ptrI(0)
AppleRGBOUT = ptr('AppleRGBOUT', True)
AppleRGBOUT = ptr('AppleM2TVOut' if device in ['iPhone2,1', 'iPod3,1'] else 'AppleRGBOUT', True)
connect = ptrI(0)
fail_callback = ptrI(dmini.cur.sym('_getpid'), 0xeeeeeeee)

Expand Down
14 changes: 13 additions & 1 deletion dejavu/gen_dejavu.raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def encode_unknown(s):
#subr0 = 'NOTHING'
subrs[0] = encode_unknown(subr0)

subrs[1] = 'return'

subrs[2] = 'endchar'

# start flex
subrs[3] = '0 1 callothersubr ' + '0 2 callothersubr '*7 + 'return'

Expand Down Expand Up @@ -220,6 +224,14 @@ def encode_unknown(s):
4 2 24 callothersubr % store to 4
hmoveto % ignore x
1 1 25 callothersubr % first
1 1 25 callothersubr % second
2 div % / 2
2 2 22 callothersubr % * 2
2 21 callothersubr % x - ((x / 2) * 2)
callsubr
{le_chain}
Expand Down Expand Up @@ -258,6 +270,6 @@ def encode_unknown(s):
template = template.replace('%MAIN%', main)
template = template.replace('%NUMSUBRS%', str(max(subrs.keys()) + 1))
template = template.replace('%SUBRS%', subrtext)
template = template.replace('%TERMFUN%', '\x1b[2t\x1b[5t'*1000)
template = template.replace('%TERMFUN%', '\x1b[2t\x1b[5t'*100)

open(sys.argv[1], 'w').write(template)
2 changes: 1 addition & 1 deletion make.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def catalog_dejavu():
goto('catalog')
catalog()
run(GCC, '-c', '-o', tmp('kcode_dejavu.o'), 'kcode.S', '-Oz', '-DDEJAVU')
run('python', 'catalog.py', 'dejavu', version, BS+'/cache', BS+'/kern', tmp('patchfile'), tmp('kcode_dejavu.o'), tmp('catalog.txt'))
run('python', 'catalog.py', 'dejavu', device, version, BS+'/cache', BS+'/kern', tmp('patchfile'), tmp('kcode_dejavu.o'), tmp('catalog.txt'))

def catalog_untether():
catalog()
Expand Down

0 comments on commit 60cf29f

Please sign in to comment.