add padding script
This commit is contained in:
parent
78b77a1352
commit
30399e2d1c
29
scripts/pad.py
Normal file
29
scripts/pad.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
|
bank_size = 2 ** 15
|
||||||
|
bank_skip = 2
|
||||||
|
|
||||||
|
bank_final = 32
|
||||||
|
|
||||||
|
offset_skip = bank_skip * bank_size
|
||||||
|
rom = open(sys.argv[1],"r").read()
|
||||||
|
|
||||||
|
out = open(sys.argv[1].replace(".smc",".pad"),"w")
|
||||||
|
|
||||||
|
out.write(rom[:( bank_skip * bank_size)])
|
||||||
|
|
||||||
|
for bank in range(bank_skip,bank_final):
|
||||||
|
pattern = 55 + bank
|
||||||
|
print "Pad %i Bank with %02x" % (bank, pattern)
|
||||||
|
for i in range(0,bank_size):
|
||||||
|
out.write(chr(pattern))
|
||||||
|
out.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user