XboxDev / nxdk

The cross-platform, open-source SDK to develop for original Xbox: *new* xdk
437 stars 66 forks source link

cxbe: Support non-kernel imports #642

Closed abaire closed 1 year ago

abaire commented 1 year ago

This implements handling for dwNonKernelImportDirAddr in DEBUG mode, allowing nxdk-based XBEs to make use of xbdm.dll and other non-kernel imports.

JayFoxRox commented 1 year ago

Interesting, I didn't realize we were missing this functionality, because I've already used xbdm before... from a dxt: https://github.com/JayFoxRox/nxdk/pull/10

abaire commented 1 year ago

Interesting, I didn't realize we were missing this functionality, because I've already used xbdm before... from a dxt: JayFoxRox#10

Same here, it took me a day of pondering to even suspect the exe -> xbe conversion might be at fault. For my dxt-like loader I'd been using xbdm to resolve the imports before injecting the image.

I wonder if the DXT path just isn't the same as the XBE and it reads the normal PE import table? Given that the XBE import descriptor is dramatically different than for XBE's including the switch from char -> char16_t it seems like it'd be impossible for it to work any other way.

abaire commented 1 year ago

Note: The macOS CI failure doesn't seem to be related (fails before even making it to the build)