Conversation
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
are these legitimate type casts as part of decompilation or has this (and potentially a lot of this PR) just been copy and pasted from jak 3's
There was a problem hiding this comment.
Not sure what type casts you mean, but yes, about all code up until 246fb8f is copy-pasted from jak3. I wanted to start off with something that builds. So this is intended as a draft branch -- did I miss an option to mark it as such?
I just pushed some commits to move over updated code from Jak X's kernel: https://github.com/yodaxtah/jakx-c-kernel-decompiled/tree/main/elf/kernel
They appear above your comment.
As I don't see any other way to check for bugs, I'm currently just adding these updates one by one and rebuilding. I guess I'll just deal with the run-time problems afterward then. Fortunately, the code is very similar ^^
This attempts to get into master whatever work was done in this PR / it's earlier PR #3965 I don't want this work to be lost / floating around in massive PRs. However the changes are: - switch to ntsc_v1 instead of PAL as the development target, as we have done for all other games - remove most of the copied-from-jak2/3 changes as they need to be confirmed during the decompilation process not just assumed - avoids committing any changes to `game/kernel/common` as it was not clear to me if these were changes made in jak x's kernel that were not properly broken out into it's own functions. We don't want to accidentally introduce bugs into jak1-3's kernel code. - in other words, if the change in the kernel only happens in jak x...it should likely be specific to jak x's kernel, not common. --------- Co-authored-by: VodBox <dillon@vodbox.io> Co-authored-by: yodah <greenboyyodah@gmail.com>
A draft branch to integrate the next ckernel code. Most of the labeling and decompiling has already been done, this list includes the hardest/remaining parts:
Decompile track list
UNDERLRD.IRX(not part of CKernel, but necessary)common/kmachine.cpp:CPadGetData(uses never module, still necessary ?)common/kmachine.cpp:CPadOpen(uses never module, still necessary ?)C++ port track list
common/kmachine.cpp:InitVideojakx/klink.cpp:link_control::jakx_begin(comparememcpy, investigate random decomp var)jakx/klink.cpp:link_control::jakx_workjakx/klink.cpp:link_control::jakx_work_v5jakx/klink.cpp:link_control::jakx_finish(structure alignment mismatch aside addedversioncheck)jakx/klink.cpp:ultimate_memcpyjakx/kmachine.cpp:InitIOPjakx/kmachine.cpp:InitMachinejakx/kprint.cpp:format_impl_jakxReferences
content
Compare between versions:
Discussion/knowledge track list (new to old)
Original post
content
Here is the code I'm working from. See this Discord discussion for more details: https://discord.com/channels/756287461377703987/1386044162326921346
The currently stubbed jak3 code builds when I hit "Build all" in Visual Studio, but that's about all I can say about it. Still searching for a way to test the new code without too much overhead.
I've built further upon the code from PR #3633 and updated the branch as it was 10 months behind.
After commit 246fb8f, I'll be adding commits with changes from the decompiled project that will make the code incompatible with Jak 3 (probably), but hopefully I can at least setup something without having to test everything at once at the end.