XenonRecomp icon indicating copy to clipboard operation
XenonRecomp copied to clipboard

Is there a tutorial on how to recompile a 360 game?

Open 6ui99uhkllj opened this issue 9 months ago • 19 comments

6ui99uhkllj avatar Mar 02 '25 21:03 6ui99uhkllj

There's some hints in the README, but from what I understand (from attempting this), it mostly goes like this:

  1. Obtain a .xex file by dumping the contents of the title you want somewhere.
    1. Optionally obtain a title update package (the latest is usually what you want) and unpack the xexp file associated with the .xex file to the same directory you have dumped the xex.
  2. Point XenonAnalyse at the .xex file, specifying an output location for the switch/jump table.
  3. Check if the output of XenonAnalyse was non-empty, if it is, you will need to modify the recompiler to know how to handle the provided xex. This might require disassembling the binary to find where useful information is.
  4. Create a title configuration file containing the path to the main binary and switch/jump table.
  5. Attempt to run XenonRecomp with the title configuration file and the ppc_context.h file included in XenonUtils.
    • Also specify the xexp as the patch if you have one.
    • You will be coming back to this step a few times, with a disassembler to find the required fields specified for the other values.
  6. Hope you don't get an assertion or Segmentation fault or Access violation (from path format being wrong being the most likely reason as of writing).
  7. Attempt to compile the generated code in the output directory.
  8. Run the generated binary.
  9. Observe results.
    1. The title works.
    2. The title doesn't go anywhere because of unimplemented instructions. (This should result in a debug trace)
    3. Something else happened.

There will probably be official instructions for usage and implementation added to this project one day, but I can not comment on that right now.

yellows111 avatar Mar 02 '25 23:03 yellows111

Yeah, I'm busy with bug reports for Unleashed Recompiled at the moment, I'll eventually write proper instructions for this.

blueskythlikesclouds avatar Mar 02 '25 23:03 blueskythlikesclouds

Don't get too excited even if everything works, you still have to setup rendering, etc and re-implement missing 360 kernel functions. The recompiler is not a silver bullet.

matty45 avatar Mar 04 '25 17:03 matty45

There's some hints in the README, but from what I understand (from attempting this), it mostly goes like this:

  1. Attempt to compile the generated code in the output directory.

  2. Run the generated binary.

  3. Observe results.

    1. The title works.
    2. The title doesn't go anywhere because of unimplemented instructions. (This should result in a debug trace)
    3. Something else happened.

There will probably be official instructions for usage and implementation added to this project one day, but I can not comment on that right now.

Thanks. I'm stuck on part 7, 8 in general of your note. Because I have no idea how I should compile the code generated by XenonRecomp (ppc_config.h, ppc_context.h, ppc_func_mapping.cpp, ppc_recomp_shared.h)

ImanCol avatar Mar 05 '25 17:03 ImanCol

XenonRecomp (ppc_config.h, ppc_context.h, ppc_func_mapping.cpp, ppc_recomp_shared.h)

Compile those with all of the ppc_recomp.*.cpp files. That should be it for step 7?

yellows111 avatar Mar 05 '25 20:03 yellows111

There's some hints in the README, but from what I understand (from attempting this), it mostly goes like this:

  1. Obtain a .xex file by dumping the contents of the title you want somewhere.

    1. Optionally obtain a title update package (the latest is usually what you want) and unpack the xexp file associated with the .xex file to the same directory you have dumped the xex.
  2. Point XenonAnalyse at the .xex file, specifying an output location for the switch/jump table.

  3. Check if the output of XenonAnalyse was non-empty, if it is, you will need to modify the recompiler to know how to handle the provided xex. This might require disassembling the binary to find where useful information is.

  4. Create a title configuration file containing the path to the main binary and switch/jump table.

  5. Attempt to run XenonRecomp with the title configuration file and the ppc_context.h file included in XenonUtils.

    • Also specify the xexp as the patch if you have one.
    • You will be coming back to this step a few times, with a disassembler to find the required fields specified for the other values.
  6. Hope you don't get an assertion or Segmentation fault or Access violation (from path format being wrong being the most likely reason as of writing).

  7. Attempt to compile the generated code in the output directory.

  8. Run the generated binary.

  9. Observe results.

    1. The title works.
    2. The title doesn't go anywhere because of unimplemented instructions. (This should result in a debug trace)
    3. Something else happened.

There will probably be official instructions for usage and implementation added to this project one day, but I can not comment on that right now.

Do you have discord at all?

TheNotZen364 avatar Mar 05 '25 22:03 TheNotZen364

@yellows111

TheNotZen364 avatar Mar 05 '25 22:03 TheNotZen364

XenonRecomp (ppc_config.h, ppc_context.h, ppc_func_mapping.cpp, ppc_recomp_shared.h)

Compile those with all of the ppc_recomp.*.cpp files. That should be it for step 7?

Hey I'm also confused about what to do here, could you go into more detail or msg me on discord, my user is toastyyy123

PopTartsWasTaken avatar Mar 06 '25 03:03 PopTartsWasTaken

i also need a tutorial, please! @eepcheep on discord

eepcheep avatar Mar 06 '25 19:03 eepcheep

XenonRecomp (ppc_config.h, ppc_context.h, ppc_func_mapping.cpp, ppc_recomp_shared.h)

Compile those with all of the ppc_recomp.*.cpp files. That should be it for step 7?

Ok, I just don't know what tool should be used in that case for the build. It mentions something about Xenia Build, but I didn't find any information.

ImanCol avatar Mar 11 '25 13:03 ImanCol

is there anyone that can help me im trying to recompile other 360 games and i havent a clue discord username is jonh07evans

smartwheelie7 avatar Mar 13 '25 21:03 smartwheelie7

Is there like a community discord server because it seems many people have many questions and probably many are repeated and it would be nice if it got documented on a server or somewhere.

SuzuyaRose avatar Mar 16 '25 10:03 SuzuyaRose

and it would be nice if it got documented on a server or somewhere.

If by document you mean "obscure behind a wall", then sure.

The whole point of this project not having a ~~private~~ "community" discussion board is to prevent discussion obfuscation. Hiding information that helps others does not help the community, it makes it weaken.

I've personally dealt with community fragmentation due to people deciding to keep their solutions behind a ironclad fortress. Nobody wants this. Nobody should ever want this.

If you want help, make it public.

Is there like a community discord server

No.

Do you have a personal discord?

Even worse question. No.


Ok, I just don't know what tool should be used in that case for the build.

Most likely clang++.

That being said, if anyone has technical issues, feel free filing them here.

yellows111 avatar Mar 16 '25 14:03 yellows111

and it would be nice if it got documented on a server or somewhere.

If by document you mean "obscure behind a wall", then sure.

The whole point of this project not having a ~private~ "community" discussion board is to prevent discussion obfuscation. Hiding information that helps others does not help the community, it makes it weaken.

I've personally dealt with community fragmentation due to people deciding to keep their solutions behind a ironclad fortress. Nobody wants this. Nobody should ever want this.

If you want help, make it public.

Is there like a community discord server

No.

Do you have a personal discord?

Even worse question. No.

Ok, I just don't know what tool should be used in that case for the build.

Most likely clang++.

That being said, if anyone has technical issues, feel free filing them here.

I know where you are coming from and I can only agree a public discord may prevents from knowledge being spread or easily findable. I just saw many throw out their discord name and thought maybe something like a discord where people exchange infos there was a thing.

Anyway, could you help me with my issue too if you have time and energy. https://github.com/hedge-dev/XenonRecomp/issues/110 I am kinda lost on where to go next. I have knowledge in programming and little in decompilation(Never did a recomp). But I still feel I have no plan on takling the thing of recomping a xbox360 game or how I can like "train" for something like this.

SuzuyaRose avatar Mar 16 '25 20:03 SuzuyaRose

just waiting for the official usage guide and beating my brains out without it

derlineUn avatar Mar 19 '25 01:03 derlineUn

Yeah, I'm busy with bug reports for Unleashed Recompiled at the moment, I'll eventually write proper instructions for this.

Any more news on a guide for this?

s0l1d-exist3nce avatar Jun 01 '25 02:06 s0l1d-exist3nce

Any more news on a guide for this?

Not yet. I'm taking a break from all of this altogether for a while.

blueskythlikesclouds avatar Jun 01 '25 07:06 blueskythlikesclouds

Yeah, I'm busy with bug reports for Unleashed Recompiled at the moment, I'll eventually write proper instructions for this.

Any more news on a guide for this?

I want to create simple guide for this (I'm stuck in stage with border problems) https://github.com/hedge-dev/XenonRecomp/discussions/149

testdriveupgrade avatar Jun 05 '25 12:06 testdriveupgrade

Há algumas dicas no README, mas pelo que entendi (depois de tentar fazer isso), é basicamente assim:

  1. Tente compilar o código gerado no diretório de saída.

  2. Execute o binário gerado.

  3. Observe os resultados.

    1. O título funciona.
    2. O título não aparece devido a instruções não implementadas. (Isso deve resultar em um rastreamento de depuração)
    3. Outra coisa aconteceu.

Provavelmente haverá instruções oficiais de uso e implementação adicionadas a este projeto um dia, mas não posso comentar sobre isso agora.

Obrigado. Estou preso na parte 7 e 8 em geral da sua nota. Porque não tenho ideia de como compilar o código gerado pelo XenonRecomp.(ppc_config.h, ppc_context.h, ppc_func_mapping.cpp, ppc_recomp_shared.h)

Were you able to recompile any games?

6ui99uhkllj avatar Jul 20 '25 13:07 6ui99uhkllj