News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

JIPS under Linux - is it buggy for anyone else?

Started by metalsubstance, April 16, 2011, 10:15:23 PM

Previous topic - Next topic

metalsubstance

Hi all,

Is anyone else having problems applying patches using JIPS 3.0 under Linux?  I am running Xubuntu 10.10.  The issue that I'm having is that many of the patches are showing up with random glitches and unusual bugs, and I can't pinpoint whether it's an issue with the patches or whether JIPS is misapplying them.

If you need more details, I'll be more than happy to provide them.

zephyrtronium

I wrote a Python mini-program a couple years ago which applies IPS patches. It almost certainly works correctly. Python 2.6+ will run it and py3k should run it but I no longer have the facilities properly to test it.

Attached.

Zhs2

Seems to work fine under both Python 2.7.1 (r271:86832, Apr 13 2011, 16:28:33) and Python 3.2 (r32:88445, Feb 21 2011, 01:54:01).

I'd recommend the former, though. Just because Python3.x is fundamentally different.

metalsubstance

#3
I have just confirmed that JIPS 3.0 was indeed the culprit for my broken ROMs.  I have been applying the IPSs "soft-patched" through snes9x-gtk and the glitches went away.

I couldn't get your script to work with the two IPS files that I tried.  In python2.7 I get this error:


Traceback (most recent call last):
 File "/usr/local/lib/ipspi/ipspi.py", line 181, in <module>
   main().cmdloop()
 File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
   stop = self.onecmd(line)
 File "/usr/lib/python2.7/cmd.py", line 219, in onecmd
   return func(arg)
 File "/usr/local/lib/ipspi/ipspi.py", line 96, in do_apply
   ips.apply(dest, offset = offset)
 File "/usr/local/lib/ipspi/py_libips.py", line 112, in apply
   for loc in cls.data:
AttributeError: type object 'IPS' has no attribute 'data'

And in python3 I get this error:


Traceback (most recent call last):
 File "/usr/local/lib/ipspi/ipspi.py", line 181, in <module>
   main().cmdloop()
 File "/usr/lib/python3.1/cmd.py", line 139, in cmdloop
   stop = self.onecmd(line)
 File "/usr/lib/python3.1/cmd.py", line 216, in onecmd
   return func(arg)
 File "/usr/local/lib/ipspi/ipspi.py", line 95, in do_apply
   ips = IPS(patch)
 File "/usr/local/lib/ipspi/py_libips.py", line 47, in __init__
   self.data = self.parse(self.file)
 File "/usr/local/lib/ipspi/py_libips.py", line 53, in parse
   raise ValueError('Invalid IPS file.')
ValueError: Invalid IPS file.

I simply unpacked ipspi to /usr/local/lib and didn't change any of the file paths or contents.  The commands I tried were:

python2.7 /usr/local/lib/ipspi/ipspi.py
apply /tmp/a.bin /tmp/a.ips

python3 /usr/local/lib/ipspi/ipspi.py
apply /tmp/a.bin /tmp/a.ips

I am using xubuntu 10.10 (Maverick Meerkat) as my Linux distribution.

Edit: I'm attempting to debug it to see what the problem could be with python2.7 at least.  I wonder too if there is something wrong with my Python install that came with Ubuntu?  I clearly see where self.data is defined in class IPS.  I'll try building from source to see if that could fix it.

Edit 2: I compiled python 2.7.1 from source and got the same error as the first error above.

zephyrtronium

I'm going to assume that happens because I made things be class methods instead of just methods. I would fix it, but I don't think anyone uses it, so there's really no point.

metalsubstance

It's not a problem at all, as I've used an old Perl script (ips.pl from zophar.net) to apply patches and it has been working like a charm.  If I end up fixing the issue on my own, I'll be more than happy to send you a patch.