XenonRecomp icon indicating copy to clipboard operation
XenonRecomp copied to clipboard

Jump Tables Guide Skate 3

Open Roigo21 opened this issue 9 months ago • 22 comments

Hey guys, im new to reverse engineering. So, as the title says, I will try to at least get Skate 3 decompiled, but the XenonAnalyser is unable to find the jump tables. So i started looking through the default.xex file and found a pattern that appears through all the code (it looks to be the only one there). Tried to adapt it in the C++ code but the constant PPC_INST_SLWI doesnt exists there (only SLW), so no output still. Example Image:

Image

the part that repeats is after the cmplwi. If anybody wants to join me in this journey, i would be very appreciated, since skate 3 is a great title to be playing 60fps+

Roigo21 avatar Mar 09 '25 03:03 Roigo21

it took me some time to figure it out myself, heres how you find your switch tables

cmplwi (or in this case 0x823C544) is your base and also specifies what r = (in this case its r = 11) and how many entries your table should have (in this case 109, because it will always be the number provided (in this case 0x6C) +1 6C = 108 + 1 = 109) your bgt (in this case 0x823C548) is your default and just below your bctr should show you what should be in your table

so your table for this would look like so

[[switch]] base = 0x823C544 r = 11 default = 0x823C548 labels = [ insert 109 entries that should be listed just below bctr (or in this case 0x832C2560) ]

if you run xenonrecomp with missing tables it shoud tell you where its finding switch cases without jump tables otherwise xenonanalyse shouldve found the tables for you

masterspike52 avatar Mar 12 '25 02:03 masterspike52

Was anyone of you able to recompile the game? Ive wanted to do it myself, but no reason to do it if somebody did it and is willing to send the files

Noob-Master-XD avatar Mar 12 '25 14:03 Noob-Master-XD

it took me some time to figure it out myself, heres how you find your switch tables

cmplwi (or in this case 0x823C544) is your base and also specifies what r = (in this case its r = 11) and how many entries your table should have (in this case 109, because it will always be the number provided (in this case 0x6C) +1 6C = 108 + 1 = 109) your bgt (in this case 0x823C548) is your default and just below your bctr should show you what should be in your table

so your table for this would look like so

[[switch]] base = 0x823C544 r = 11 default = 0x823C548 labels = [ insert 109 entries that should be listed just below bctr (or in this case 0x832C2560) ]

if you run xenonrecomp with missing tables it shoud tell you where its finding switch cases without jump tables otherwise xenonanalyse shouldve found the tables for you

I have given up for skate 3 for now, skate 1 will be a great point of starting, the switches patterns are the same as sonic's and with the fork from an user ive found (you can see in the pr's its like #60 or #22 i dont remember) its only missing like 5 instructions and the rest is just switches statements out of spot EDIT: i found in an issue a game that had the same pattern and the user did the needed changes to get the switches addresses, but only the absolutes switches were retrieved.

Roigo21 avatar Mar 12 '25 14:03 Roigo21

Was anyone of you able to recompile the game? Ive wanted to do it myself, but no reason to do it if somebody did it and is willing to send the files

Well, i can give you the uncompressed xex file and the config.toml for skate 1 and skate 3 (trust me, skate 1 looks way easier and i dont know reverse engineering)

Roigo21 avatar Mar 12 '25 15:03 Roigo21

Was anyone of you able to recompile the game? Ive wanted to do it myself, but no reason to do it if somebody did it and is willing to send the files

Well, i can give you the uncompressed xex file and the config.toml for skate 1 and skate 3 (trust me, skate 1 looks way easier and i dont know reverse engineering)

If you could send them it would be great, thanks. But how will you send?

Noob-Master-XD avatar Mar 12 '25 15:03 Noob-Master-XD

Was anyone of you able to recompile the game? Ive wanted to do it myself, but no reason to do it if somebody did it and is willing to send the files

Well, i can give you the uncompressed xex file and the config.toml for skate 1 and skate 3 (trust me, skate 1 looks way easier and i dont know reverse engineering)

If you could send them it would be great, thanks. But how will you send?

join this dc: https://discord.gg/kKsfaPAY and ping me there. it was created strictly for this

Roigo21 avatar Mar 12 '25 17:03 Roigo21

Was anyone of you able to recompile the game? Ive wanted to do it myself, but no reason to do it if somebody did it and is willing to send the files

Well, i can give you the uncompressed xex file and the config.toml for skate 1 and skate 3 (trust me, skate 1 looks way easier and i dont know reverse engineering)

If you could send them it would be great, thanks. But how will you send?

join this dc: https://discord.gg/kKsfaPAY and ping me there. it was created strictly for this

Do you mind reposting the discord link as it has expired. Thanks

Ston3Cold avatar Mar 22 '25 05:03 Ston3Cold

update on this??

quimodotcom avatar Apr 10 '25 10:04 quimodotcom

update?

Evhanpy avatar Jun 04 '25 14:06 Evhanpy

update?

irolup avatar Jun 20 '25 21:06 irolup

https://discord.gg/6vyNqrbz

testdriveupgrade avatar Jun 24 '25 13:06 testdriveupgrade

any updates on this recomp?

vitouau avatar Sep 03 '25 13:09 vitouau

@Roigo21 @testdriveupgrade is the project still active? both discord links are deprecated.

vitouau avatar Sep 03 '25 13:09 vitouau

yes, alive, but I have less time and impression to work on this project. But some people of course continue make new tools and updates for recomp

testdriveupgrade avatar Sep 03 '25 14:09 testdriveupgrade

@Roigo21 @testdriveupgrade is the project still active? both discord links are deprecated.

https://www.youtube.com/watch?v=w-1Pgn5V3wY https://discord.gg/qxCnD9Vm

testdriveupgrade avatar Sep 03 '25 14:09 testdriveupgrade

@Roigo21 @testdriveupgrade is the project still active? both discord links are deprecated.

https://discord.gg/3TuDRFy6

testdriveupgrade avatar Sep 03 '25 14:09 testdriveupgrade

you keep posting links that are only active for 48 hours

KuruptNiGHTS avatar Sep 21 '25 13:09 KuruptNiGHTS

How post perm links?

testdriveupgrade avatar Sep 22 '25 06:09 testdriveupgrade

@Roigo21 @testdriveupgrade is the project still active? both discord links are deprecated.

nop, its mostly dead. we don´t have the needed knowledge for this

Roigo21 avatar Sep 24 '25 15:09 Roigo21

@Roigo21 @testdriveupgrade is the project still active? both discord links are deprecated.

https://discord.gg/3TuDRFy6

can you post new link?

jmd924 avatar Nov 14 '25 01:11 jmd924

@Roigo21 @testdriveupgrade is the project still active? both discord links are deprecated.

https://discord.gg/3TuDRFy6

can you post new link?

Read the message above :/

Roigo21 avatar Nov 14 '25 01:11 Roigo21

@Roigo21 @testdriveupgrade проект ещё активен? Обе ссылки на Discord устарели.

https://discord.gg/3TuDRFy6

можете ли вы разместить новую ссылку?

Прочитайте сообщение выше :/

https://discord.gg/J8HrCqUY

@Roigo21 @testdriveupgrade проект ещё активен? Обе ссылки на Discord устарели.

https://discord.gg/3TuDRFy6

можете ли вы разместить новую ссылку?

https://discord.gg/J8HrCqUY

testdriveupgrade avatar Nov 17 '25 10:11 testdriveupgrade