GenesisFan64

SpinballTextEd

Jul 26th, 2021 (edited)
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. # SPINBALL text insert, byte-edit only
  2. # notes:
  3. # PEA (label).l | 0x4879 label
  4.  
  5. # User
  6. Tag_File = "str_list.txt"
  7. Rom_File = "Sonic Spinball (U) [!].bin"
  8.  
  9. input_file = open(Tag_File,"r")
  10. output_file = open(Rom_File,"r+")
  11.  
  12. # *********************************************
  13. # Start
  14. # *********************************************
  15.  
  16. looping=True
  17. while looping:
  18.  a = input_file.readline().split("|")
  19.  if len(a) == 0:
  20.   looping=False
  21.  else:
  22.   b = a[1]
  23.   output_file.seek(int(b))
  24.   a = a[2]
  25.   b = len(a)-2
  26.   c = a[1:b]
  27.   d = len(c)
  28.  
  29.   #print(c)
  30.   #print(hex(output_file.tell()))
  31.   for e in range(d):
  32.     a = c[e]
  33.     output_file.write(a)
  34.  
Add Comment
Please, Sign In to add comment