Beispiel #1
0
from Common import replaceRegion


fsrc = open("Chip6502_Tick.cs","rt")
fileContents = fsrc.read()
fsrc.close()
switch = open("vm.cs","rt").read()
fileContents = replaceRegion(fileContents, "SWITCH", "\n"+switch+"\n")

fdest = open("Chip6502_Tick.cs","wt")
fdest.write(fileContents)
fdest.close()
Beispiel #2
0
	else:
		s2+= 'AddressMode.%s, '%(modeHelpers[i.modename])
	n += 1
	if n == 4:
		s2 += '\n'
		n=0

s3 = '\n'
n=0
for i in encodings:
	if i is None:
		s3 += '0,'
	else:
		s3 += '%d,'%(modeTypes[i.modename])
	n+=1
	if n == 16:
		s3 += '\n'
		n=0
print s3
		
fsrc = open("Disasm.cs","r")
fileContents = fsrc.read()
fsrc.close()
fileContents = replaceRegion(fileContents, "OPNAMES", s1)
fileContents = replaceRegion(fileContents, "MODES", s2)
#fileContents = replaceRegion(fileContents, "GENERATED", '\n'+s+'            ')
#print fileContents

fdest = open("Disasm.cs","wt")
fdest.write(fileContents)
fdest.close()
Beispiel #3
0
    else:
        s2 += 'AddressMode.%s, ' % (modeHelpers[i.modename])
    n += 1
    if n == 4:
        s2 += '\n'
        n = 0

s3 = '\n'
n = 0
for i in encodings:
    if i is None:
        s3 += '0,'
    else:
        s3 += '%d,' % (modeTypes[i.modename])
    n += 1
    if n == 16:
        s3 += '\n'
        n = 0
print s3

fsrc = open("Disasm.cs", "r")
fileContents = fsrc.read()
fsrc.close()
fileContents = replaceRegion(fileContents, "OPNAMES", s1)
fileContents = replaceRegion(fileContents, "MODES", s2)
#fileContents = replaceRegion(fileContents, "GENERATED", '\n'+s+'            ')
#print fileContents

fdest = open("Disasm.cs", "wt")
fdest.write(fileContents)
fdest.close()