The following warnings occurred:
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/printthread.php(287) : eval()'d code 2 errorHandler->error_callback
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



Mario Kart Wii Gecko Codes, Cheats, & Hacks
PyiiASMH 3 (ASM Compiler + Decompiler) - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Hacks/Modding (https://mariokartwii.com/forumdisplay.php?fid=14)
+--- Forum: Coding & Hacking General Discussion (https://mariokartwii.com/forumdisplay.php?fid=23)
+--- Thread: PyiiASMH 3 (ASM Compiler + Decompiler) (/showthread.php?tid=1529)

Pages: 1 2


PyiiASMH 3 (ASM Compiler + Decompiler) - JoshuaMK - 05-24-2020

PyiiASMH, ported to Python 3!

I also fixed a prominent bug, simplified some of the code, and made error text more descriptive

It can be downloaded here: https://github.com/JoshuaMKW/pyiiasmh



If running from the python .py files, you need to have Python 3.8.x or newer installed, and set to your PATH variable.

You also need to have PyQt5 installed, which can be found here: https://pypi.org/project/PyQt5/
This can be auto installed using command "pip install PyQt5" in cmd, or it can be manually installed

Once you've gotten these things installed, you can simply double click pyiiasmh.py (or send command "python pyiiasmh.py" in the same directory as the py file) and the program will run.



If you are instead running from the Windows 64bit or Linux 64bit exe using the given installers, you don't need python or anything. Simply run the exe like you would any other.

This also allows you to call pyiiasmh from the terminal at any location, by entering "pyiiasmh" into the terminal, or "pyiiasmh -h" for help on interfacing with the cli api of pyiiasmh



I hope you all enjoy this, I was personally very happy to make a successful port and upgrade Tongue


RE: pyiiasmh 3 - Vega - 05-24-2020

Nice work Tongue

The next step imo, is to create a HBC app for PPC compiling/decompiling. With the Broadway Manual handy, you can be absolutely sure to cover all instructions & all the varying elements of the instructions.

I would have done this personally, but writing that all in ASM would be silly. Would be best to write most of it in C and cover odd-ball situations with ASM.


RE: pyiiasmh 3 - JoshuaMK - 05-24-2020

Yeah, I have already helped in creating a JIT compiler for gecko codes, so I am pretty familiar with it

I have slowly gotten more and more into wanting to make a HBC app, so I may do this sometime soon


RE: PyiiASMH 3 (ASM Compiler + Decompiler) - JoshuaMK - 05-30-2020

BIG UPDATE:
PyiiASMH 3 now supports the 06 codetype, has multiple bug fixes that were present in the original PyiiASMH, and also has an option
to remove the 4E800020 00000000 end stub from a C0 code in case you have an exit point already defined (for example, a code compiled
in C/C++).

Lastly, PyiiASMH 3 also has some big GUI changes, like the textboxes now resizing, and the codetype layout being changed

I hope you all enjoy this big update!


RE: PyiiASMH 3 (ASM Compiler + Decompiler) - JoshuaMK - 07-11-2020

Updated again.

PyiiASMH 3 now has loose support for the 04 codetype, the cli has been completely overhauled, and additional formatting has been provided for the disassembly output


RE: PyiiASMH 3 (ASM Compiler + Decompiler) - JoshuaMK - 10-30-2020

Major update!

v3.0.0 - Changelog

1. Dark Theme
2. Added builtins functionality for faster to write and easier 3. to read programming
4. ; Comments are now supported
5. Subprocess calls are no longer broken
6. Fixed support for Linux and Mac
7. Windows and Linux executable support
8. New installer system
9. Calling pyiiasmh in the terminal with arguments invokes pyiiasmh_cli


RE: PyiiASMH 3 (ASM Compiler + Decompiler) - Deflaktor - 11-26-2020

How can I make a simple Value Replacement?
E.g.

Write nop to 0x8007e148

Would help if the tool would come with some examples.


RE: PyiiASMH 3 (ASM Compiler + Decompiler) - Vega - 11-26-2020

(11-26-2020, 02:01 PM)Deflaktor Wrote: How can I make a simple Value Replacement?
E.g.

Write nop to 0x8007e148

Would help if the tool would come with some examples.

Cheat codes on the Wii use the Gecko Codehandler. The Handler comes with a variety of formats to use for RAM Writes, String Writes, Insert ASM, Execute ASM, etc.

https://mkwii.com/showthread.php?tid=434

This thread covers the very basic stuff.

You will want to use the 32 bit RAM Write (04XXXXXX YYYYYYYY) X = Address (not including the 0x80), and Y = Value to write.

So.. 0407E148 60000000.

The Write gets written every frame (whenever the Hook of the Handler is called; usually this is the Video Interface hook and it executes 60 times a second).

The thread I linked above is part of a thread index/series I made to help anyone go from a beginner to a decent ASM Coder for the Wii. https://mkwii.com/showthread.php?tid=1114

And thank you for joining mkwii.com!


RE: PyiiASMH 3 (ASM Compiler + Decompiler) - Deflaktor - 11-27-2020

Hi thanks for the quick reply.
My question is geared more towards how to use the tool pyiiasmh rather than how to make basic gecko codes. Since a minimal working example is not provided, I have no idea how to start using it.


RE: PyiiASMH 3 (ASM Compiler + Decompiler) - Vega - 11-27-2020

Select Code Type 04/14, set the Memory Address

Enter in the ASM instruction in the 'PPC Opcodes' box. Click the right arrow to compile.

Though this isn't really needed, just quicker to write it by hand.