scemu icon indicating copy to clipboard operation
scemu copied to clipboard

Changing python run_until_api from step to run in order to make the python port run faster

Open acheron2302 opened this issue 9 months ago • 1 comments

run_until_apicall in python is using step to emulate each instruction, if we can change it to run and then hook on api address and return back to python, it can make the program run much faster than always change context for each step and check if it is api address.

https://github.com/sha0coder/mwemu/blob/main/pymwemu/src/lib.rs#L818

acheron2302 avatar Jun 26 '25 09:06 acheron2302

Hooks are already implemented in rust, but I tried several times to provide them on the python module and I couldn't find the way using pyo3.

Prolly you have to transfer the python object to the libmwemu, and use python stuff inside libmwemu.

Having hooks on python (and not based on steps) would be super great, if you want to try it

sha0coder avatar Jun 26 '25 16:06 sha0coder