You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What we could use is a full-fledged decompiler. For that, the existing NWScript IR produced by the disassembler could be leveraged. More analysis on said IR would be necessary, of course.
The IR itself might also need to be modified, to bring it more in line with usual compiler IR. And the disassembler could probably also profit from this task.
Owning the different BioWare games would be useful here, since more functionality was added to the script over the years. And testing the decompiler over a wide variety of scripts is paramount. As a starter, though, a few (Neverwinter-Nights-era) script sources and their bytecode are here: scripts.zip
Like the rest of the xoreos-tool, the decompiler should be written in C++. xoreos-tools is currently fully C++03, but I'm opening it up to C++11 now. I don't necessarily want to see a PR with thousands line diffs changing everything in xoreos-tools the C++11 way, but feel free to use C++11 features in new code.
The text was updated successfully, but these errors were encountered:
As discussed with @DrMcCoy several times (including in issue #57), I've been working on an implementation of an ncs2nss compiler. I've made the repository public at https://github.com/lachjames/ncs2nss.
My ultimate goal is certainly to integrate this into xoreos-tools (I already rely on ncsdis to disassemble the files). However, it's written in Python and xoreos-tools is (of course) C++. So there are several options here:
As discussed on DeadlyStream, I'd be happy to work with AmanoJyaku on a decompiler that could eventually be integrated into xoreos-tools.
I'd also be very happy to discuss/help anybody who wants to implement a C++ version of my tool, using my implementation as a guide.
I could have a go at implementing the decompiler myself for xoreos-tools in C++, though I admit I've never really used C++ for any serious project before (however, I'm confident I could do it if necessary).
There's always the possibility of integrating my Python code with xoreos-tools directly, though I imagine @DrMcCoy wouldn't want to go that route, (quite reasonably) preferring a pure C++ implementation. That said, I'd be happy to work with you on creating an integration if you'd like.
Currently, we have a disassembler for NWScript bytecode, ncsdis. For an explanation for what NWScript is and how it works internally, please see here: https://xoreos.org/blog/2016/01/12/disassembling-nwscript-bytecode/
What we could use is a full-fledged decompiler. For that, the existing NWScript IR produced by the disassembler could be leveraged. More analysis on said IR would be necessary, of course.
The IR itself might also need to be modified, to bring it more in line with usual compiler IR. And the disassembler could probably also profit from this task.
Owning the different BioWare games would be useful here, since more functionality was added to the script over the years. And testing the decompiler over a wide variety of scripts is paramount. As a starter, though, a few (Neverwinter-Nights-era) script sources and their bytecode are here: scripts.zip
Like the rest of the xoreos-tool, the decompiler should be written in C++. xoreos-tools is currently fully C++03, but I'm opening it up to C++11 now. I don't necessarily want to see a PR with thousands line diffs changing everything in xoreos-tools the C++11 way, but feel free to use C++11 features in new code.
The text was updated successfully, but these errors were encountered: