extensive changes to lua api, allowing for use of x86 emulation code through lua