PyiiASMH

Started by hawkeye2777, December 28, 2009, 07:17:12 AM

Previous topic - Next topic

hawkeye2777

Quote from: dcx2 on June 02, 2010, 04:21:24 AM
Try to make a C0 code out of the following

ori r30,r30,2562

And you will get

C0000000 00000001
63DE0A 4E800020

It should be

C0000000 00000001
63DE0A02 4E800020

Amusingly, if you try to run the correct code backwards into opcodes, it works correctly.

Does it work on Link's ASM Helper Tool?
Currently "retired" from hacking codes.

dcx2

Yes.  It only supports C2 codes, but here's the result of the ori.

C2000000 00000001
63DE0A02 00000000

hawkeye2777

#17
Found the cause of the bug: 0x0A is the newline character, and my function only read the first line (considering I didn't think there'd be more than one line in a binary file, but the 0x0A is considered a newline character). Should have a fix up soon.

EDIT: Version 0.9.3 released, fixes the above bug.
Currently "retired" from hacking codes.

WiiOs-Ozelot

hi, i have problems with python.
i becomes error message from python:

C:\Python26>python PyiiASMH.py
Traceback (most recent call last):
  File "PyiiASMH.py", line 21, in <mod
    from PyQt4 import QtCore, QtGui
ImportError: No module named PyQt4


i have installed this, but i becomes a error message again ???

can you compile the py file to exe or programming to win32 executable?
I'm make Gamecube Codes with SD Media Launcher and Gamecube Console (Not Wii) ^^

hetoan2

Thats why there are readme's Ozelot. So that you can follow them in the case that things dont work the way you want them to.

Make sure you've installed PyQt4 for python 2.6.X


Check out my site with codes obviously...
http://hetoan2.com/

and youtube...
http://youtube.com/hetoan2

hawkeye2777

Quote from: -Ozelot- on June 19, 2010, 10:13:21 AM
hi, i have problems with python.
i becomes error message from python:

C:\Python26>python PyiiASMH.py
Traceback (most recent call last):
  File "PyiiASMH.py", line 21, in <mod
    from PyQt4 import QtCore, QtGui
ImportError: No module named PyQt4


i have installed this, but i becomes a error message again ???

can you compile the py file to exe or programming to win32 executable?

http://www.riverbankcomputing.co.uk/software/pyqt/download

Download the one for Python 2.6.x and install.
Currently "retired" from hacking codes.

dcx2

I tried using psq_l and psq_st but PyiiASMH is complaining about unrecognized opcode.

hawkeye2777

Quote from: dcx2 on July 23, 2010, 05:29:19 AM
I tried using psq_l and psq_st but PyiiASMH is complaining about unrecognized opcode.

Can't do much about that... sounds like a problem with the powerpc-eabi-* executables.
Currently "retired" from hacking codes.

dcx2

But WiiRDGUI and Gecko.NET can dis/assemble the paired single instructions...doesn't PyiiASMH use the same external apps?

I've been reduced to assembling them in Gecko.NET, and then copy/pasting the machine code over as a .long.  This is quite a laborious and error-prone process...

hawkeye2777

Quote from: dcx2 on July 23, 2010, 05:03:59 PM
But WiiRDGUI and Gecko.NET can dis/assemble the paired single instructions...doesn't PyiiASMH use the same external apps?

I've been reduced to assembling them in Gecko.NET, and then copy/pasting the machine code over as a .long.  This is quite a laborious and error-prone process...

I think they use powerpc-gekko... I can't find the cross-platform versions of those executables online nor can I find the source to properly build them... hence why I packed powerpc-eabi (which is what devkitPro uses).

If you happen to find those executables (win32, linux, and osx) or the source code to it... I'll rewrite PyiiASMH to use it.
Currently "retired" from hacking codes.

dcx2

That makes sense, paired singles are a Gekko-specific extension to the PowerPC architecture.

Would it be possible to allow specification of the external executable to call?  That way you can default to powerpc-eabi, and the Win32 folks can specify powerpc-gekko if they want paired single support.

hawkeye2777

I could, but I would not be able to make the proper change until around August 5... kinda booked up right now with stuff to do.

In the meantime, you could just copy the powerpc-gekko executables to the same location of powerpc-eabi (delete the eabi ones), then just rename them to powerpc-eabi instead of powerpc-gekko.

Or, you could edit eabi.py to use powerpc-gekko. Find this code snippet:

# Win32, OSX, Linux are supported
# Other os's may work, but they are unsupported
self.eabi_as = "./ext/"+sys.platform+"/powerpc-eabi-as"
self.eabi_ld = "./ext/"+sys.platform+"/powerpc-eabi-ld"
self.eabi_objcopy = "./ext/"+sys.platform+"/powerpc-eabi-objcopy"
if (sys.platform == "win32"):
    self.eabi_as += ".exe"
    self.eabi_ld += ".exe"
    self.eabi_objcopy += ".exe"


then change 'powerpc-eabi' to 'powerpc-gekko'. Make sure you keep the indentation intact; Python requires it. Also, make sure you delete "eabi.pyc"; otherwise the change will not work.
Currently "retired" from hacking codes.

dcx2

Okay, thanks for the workaround.  I'll try it tonight.

It would be nice for PyiiASMH to support this at some point.  I'm getting ready to release a Paired Singles tutorial soon.

dcx2

#28
I tried replacing -eabi exe's with -gekko exe's, renamed.  Didn't work.

Went in and replaced the code in eabi.py with gekko.  Didn't work.

Even copied vdappc, which appeared to be different from the one that came with the win32 distributable.

:'(

EDIT: This is the instruction I put in

psq_l f0,0(r12),0,0

And this is what I got out

./tmp/code.txt: Assembler messages:
./tmp/code.txt:1: Error: Unrecognized opcode: `psq_l'

hawkeye2777

Quote from: dcx2 on July 24, 2010, 04:48:03 AM
I tried replacing -eabi exe's with -gekko exe's, renamed.  Didn't work.

Went in and replaced the code in eabi.py with gekko.  Didn't work.

Even copied vdappc, which appeared to be different from the one that came with the win32 distributable.

:'(

EDIT: This is the instruction I put in

psq_l f0,0(r12),0,0

And this is what I got out

./tmp/code.txt: Assembler messages:
./tmp/code.txt:1: Error: Unrecognized opcode: `psq_l'

Does it work on Link's tool? If not, maybe it's a GDN/WiiRd added feature...
Currently "retired" from hacking codes.