bucanero / ArtemisPS3

An Open Source PlayStation 3 Hacking System created under the Project Artemis initiative
http://www.gamehacking.org/artemis
MIT License
148 stars 36 forks source link

Codetype 5 - Enable a code when unloading. #22

Closed leiburj closed 2 years ago

leiburj commented 3 years ago

Hello, i have a doubt about if codetype 5 is still implemented in the latest version.

I don’t remember if it was on r5 or if it was a modded version, but with codetype 5 you can enable a code when pressing select on xmb. The use for this was for example to disable the no collision code on fallout 3/nv

Here is a post from haxxxen explaining this.

3E24D509-BB92-46D9-BAFF-E6C84693A383

I tried using a code in the latest release and it didn't work.

Thank you.

bucanero commented 3 years ago

no, that's not available on the current releases of Artemis.

but if you can get the plugin file from that haxxen message, then you can just replace the artemis_ps3.sprx file and use it with Artemis r6.2 . It should work.

btw, if you do find the plugin file he mentioned, please upload it here, so I can try it and add it to the next version.

leiburj commented 3 years ago

Ill try, thanks for answering.

leiburj commented 3 years ago

Found it, here it is:

artemis_ps3.zip

And here is an example on how to make a code to disable another:

No Collision
0
0 0113156D 01
#
(OFF) No Collision
0
5 0113156D 00

It should also be noted that you can enable any code when exiting using codetype 5 not only the original code whithout modification.

Tested it with fallout 3 and it works perfectly.

Gracias de nuevo.

leiburj commented 3 years ago

I was looking at the source and I’m not sure if I’m missing something, but for adding the plugin to the code I think this is the code that needs to be changed.

ARTEMISPS3-GUI/src/main.c

const char* plugin_opts[] = {"< Artemis r5 >", "< mod/Haxxxen >", "< JokerSelect >", NULL};

void plugin_callback(int index, int sel)
{
    if (sel < 0)
        sel = 0;
    if (sel = 1)
        sel = 1;
    if (sel > 2)
        sel = 2;

    char tmp[128];
    snprintf(tmp, sizeof(tmp), ARTEMIS_PATH "artemis_r%d.sprx", 5+sel);

    sysLv2FsUnlink(ARTEMIS_PATH "artemis_ps3.sprx");
    sysLv2FsLink(tmp, ARTEMIS_PATH "artemis_ps3.sprx");
    menu_options_selections[index] = sel;
}

That way the plugin would be named artemis_r7.sprx. And it would appear as JokerSelect in the plugin options.

I don’t know much about programming but I’ll appreciate it if anyone corrects me if I’m wrong.

bucanero commented 3 years ago

thanks for sharing the mod plugin file and the code examples

I'll try it out, and if works ok I'll include it in a next release 👍