Skip to content

Conversation

@tomcl7
Copy link

@tomcl7 tomcl7 commented May 29, 2025

All of the instructions have been tested against Xenia's CPU tests and are passing.

The only remaining unimplemented instructions from the CPU tests are vslo and vrlo.

@testdriveupgrade
Copy link

testdriveupgrade commented Jun 4, 2025

Your instructions are very useful. Shall you implement these functions: (fsqrte, lq) - they are used in a lot of projects(but I don't understand how to use xenia/test-bin for debug). I'm working on some recomp project.

@Grien25
Copy link

Grien25 commented Jun 17, 2025

Hello there, I just wanted to say you've done a great job in terms of translating all the oppcodes in the reccompiler.

I'm trying to translate a different game (SM Edge of Time), but I am running into an issue where I don't have all the oppcodes recognized.

bdnzt
bdzf
lbzux
ldux
lfdu
lfsu
lfsux
lhau
lhzu
lhzux
lwzux
stbux
stdux
stfdu
stfsu
stfsux
sthu
sthux

Any chance you could help guide me in the right direction?

@testdriveupgrade
Copy link

testdriveupgrade commented Jun 18, 2025

Hello there, I just wanted to say you've done a great job in terms of translating all the oppcodes in the reccompiler.

I'm trying to translate a different game (SM Edge of Time), but I am running into an issue where I don't have all the oppcodes recognized.

bdnzt bdzf lbzux ldux lfdu lfsu lfsux lhau lhzu lhzux lwzux stbux stdux stfdu stfsu stfsux sthu sthux

Any chance you could help guide me in the right direction?

You can try this: https://github.com/testdriveupgrade/XenonRecompUnlim (works without simd_wrapper, but less commands)
or this (but there is simde_wrapper which works bad on windows, only in linux: https://github.com/Fable2Recomp/XenonRecomp And also my other fork of it with biggest count of commands(at this moment): https://github.com/testdriveupgrade/XenonRecompUnlimited/ (There some new and some from fable2recomp changed to implemented in this merge. (they works better)

@Grien25
Copy link

Grien25 commented Jun 18, 2025

@testdriveupgrade The one that you made https://github.com/testdriveupgrade/XenonRecompUnlimited/ mostly works!
Here's my console log. It seems I am only missing one instruction: vrlimi128. Any chance you know how to place it in your code?
ConsoleLog2.txt

@testdriveupgrade
Copy link

maybe I've forgotten to add it, just borrow from this:
case PPC_INST_VRLIMI128: { constexpr size_t shuffles[] = { _MM_SHUFFLE(3, 2, 1, 0), _MM_SHUFFLE(2, 1, 0, 3), _MM_SHUFFLE(1, 0, 3, 2), _MM_SHUFFLE(0, 3, 2, 1) }; println("\t_mm_store_ps({}.f32, _mm_blend_ps(_mm_load_ps({}.f32), _mm_permute_ps(_mm_load_ps({}.f32), {}), {}));", v(insn.operands[0]), v(insn.operands[0]), v(insn.operands[1]), shuffles[insn.operands[3]], insn.operands[2]); break; }

@Grien25
Copy link

Grien25 commented Jun 19, 2025

I actually managed to fork the repository that you made and edited the code myself with the proper translation. I have already updated my repository and it works!

https://github.com/EOT-RecompTest/XenonRecompUnlimited

My next issue that I have is that I cannot find the sizes of the addresses/functions for the jump tables. Do you happen to have a tutorial on how to do that?

Address Function Instruction
.text:8208F99C sub_8208F830 bctr # switch jump
.text:82116124 sub_821160A8 bctr # switch jump
.text:8211EA08 sub_8211E968 bctr # switch jump
.text:8216EBA0 sub_8216EA88 bctr # switch jump
.text:82176994 sub_82176948 bctr # switch jump
.text:8217F850 sub_8217F728 bctr # switch jump
.text:82180784 sub_82180528 bctr # switch jump
.text:82180E8C sub_82180D20 bctr # switch jump
.text:821ABF10 sub_821ABC88 bctr # switch jump
.text:821B1FF4 sub_821B1F88 bctr # switch jump
.text:821B27F8 sub_821B27C8 bctr # switch jump
.text:821BEA8C sub_821BEA50 bctr # switch jump
.text:821BEC04 sub_821BEBD0 bctr # switch jump
.text:821C0A10 sub_821C09F0 bctr # switch jump
.text:821C0AA8 sub_821C0A88 bctr # switch jump
.text:821C0B64 sub_821C0B28 bctr # switch jump
.text:821C0E58 sub_821C0E20 bctr # switch jump
.text:821C12A8 sub_821C1270 bctr # switch jump
.text:821C21D0 sub_821C2190 bctr # switch jump
.text:821DA0DC sub_821DA0A0 bctr # switch jump
.text:82272060 sub_82272020 bctr # switch jump
.text:82274270 sub_822740E0 bctr # switch jump
.text:822C7690 sub_822C75F8 bctr # switch jump
.text:822F0708 sub_822F0660 bctr # switch jump
.text:822F0CE0 sub_822F0C60 bctr # switch jump
.text:822F74C4 sub_822F7428 bctr # switch jump
.text:8230C728 sub_8230C5C0 bctr # switch jump
.text:82315C70 sub_82315C08 bctr # switch jump
.text:8231C5C8 sub_8231C570 bctr # switch jump
.text:8232BA78 sub_8232B8F0 bctr # switch jump
.text:8232F620 sub_8232F4C0 bctr # switch jump
.text:823333D4 sub_82333068 bctr # switch jump

@testdriveupgrade
Copy link

testdriveupgrade commented Jun 19, 2025

1)try to find setjmp and longjmp, game can use them(by finding RtlUnwind , or if not, it means game not use them):
https://github.com/hedge-dev/XenonRecomp?tab=readme-ov-file#longjmp--setjmp
My projects aren't use it, then I'm not sure in this stage
2)Use this script to collect the boundaries: (there are some instruction): #98

@tomcl7 tomcl7 closed this Jun 28, 2025
@blueskythlikesclouds
Copy link
Member

Why did you close it?

@tomcl7
Copy link
Author

tomcl7 commented Jun 28, 2025

It seemed there was no interest from the maintainers of this repository. I will reopen a PR if there is interest.

@testdriveupgrade
Copy link

testdriveupgrade commented Jun 29, 2025

Why did you close it?

This is the reason, why a lot of developers create their own forks(like Xenia Canary for example). Also what are you think about my guide (it's a first part: https://www.youtube.com/watch?v=w-1Pgn5V3wY). Later I'll make it better and we can add on the main page in readme.md for helping to begginers

@blueskythlikesclouds
Copy link
Member

It seemed there was no interest from the maintainers of this repository. I will reopen a PR if there is interest.

It's not that there's no interest, we're just taking a break from recompilation projects. The PRs will take a while to get reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants