News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Removing Modchip detection from Sakura tetris PSX  (Read 5769 times)

Drag0nscythe

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Removing Modchip detection from Sakura tetris PSX
« on: June 12, 2019, 04:48:52 am »
The tetris Sakura game for the PSX has an anti-PS1-modchip check which prevents some emulators from playing the game. This is particularly a problem for the PS Vita where the 6.10 pops fails to pass the check. Thankfully a code was generated and shared on reddit which can bypass the check using the cwcheat plugin.


https://www.reddit.com/r/PSP/comments/4j3snf/has_anyone_ever_managed_to_make_tetris_with/

Is it possible to take the code and modify the iso to bypass the check automatically?

Mugi

  • Sr. Member
  • ****
  • Posts: 298
  • Personal text
    • View Profile
    • Blacklabel-translations
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #1 on: June 12, 2019, 06:00:20 am »
im not really familiar with how CWCheat addresses work, but it should be just a matter of converting those addresses to the addresses
in the iso and applying the changes to it directly.

someone more knowledgeable regarding how CWCheat works shouldn't have much issues dealing with it i believe.
In PSP we trust.

Z3R0X

  • Jr. Member
  • **
  • Posts: 55
  • My name's not shane, kid.
    • View Profile
    • My YT channel with mini tools.
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #2 on: June 12, 2019, 12:08:14 pm »
The tetris Sakura game for the PSX has an anti-PS1-modchip check which prevents some emulators from playing the game. This is particularly a problem for the PS Vita where the 6.10 pops fails to pass the check. Thankfully a code was generated and shared on reddit which can bypass the check using the cwcheat plugin.


https://www.reddit.com/r/PSP/comments/4j3snf/has_anyone_ever_managed_to_make_tetris_with/

Is it possible to take the code and modify the iso to bypass the check automatically?

That is not hard if you already have the RAM patch code.

Drag0nscythe

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #3 on: June 13, 2019, 02:51:48 am »
From the documentation I can find about cwcheat, the plugin edits the PSP ram locations which in turn edits the game.

found here (https://github.com/hrydgard/ppsspp/issues/3551)


As it affects the RAM, Do I create a patch that runs before the game to patch the RAM upon loading?

Very new to hacking psx games especially in removing DRM.

Z3R0X

  • Jr. Member
  • **
  • Posts: 55
  • My name's not shane, kid.
    • View Profile
    • My YT channel with mini tools.
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #4 on: June 13, 2019, 04:12:12 am »
From the documentation I can find about cwcheat, the plugin edits the PSP ram locations which in turn edits the game.

found here (https://github.com/hrydgard/ppsspp/issues/3551)


As it affects the RAM, Do I create a patch that runs before the game to patch the RAM upon loading?

Very new to hacking psx games especially in removing DRM.

I can do a patch to remove the check.
I need the full game name, version (if they exist) and region.

Drag0nscythe

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #5 on: June 14, 2019, 10:41:45 am »
Thanks a bunch

The details of the game are as follows. I pulled this from the redump website:

Tetris with Cardcaptor Sakura Eternal Heart
テトリス with カードキャプターさくら エターナルハート

System   Sony PlayStation
Media   CD
Category   Games
Region   Japan
Languages   Japanese
Serial   SLPS-02886
EXE date   2000-06-11
Edition   Original
EDC   Yes
Anti-modchip   Yes
LibCrypt   No
Errors count   0
Number of tracks   1
Write offset   +1

 and If possible, is it possible to explain what you did to make the patch?

Z3R0X

  • Jr. Member
  • **
  • Posts: 55
  • My name's not shane, kid.
    • View Profile
    • My YT channel with mini tools.
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #6 on: June 15, 2019, 12:36:11 pm »
Here is the patch, that has EDC/ECC correction just for the sake of it :thumbsup:
http://www.mediafire.com/?9njoje999l952bo
Let me know if the game run as intended.
How I did the patch?
I use the CW codes that you post to get the offsets of the DRM instructions and saw a bunch of branch instructions, I just modify the conditional branches for always branches and that it.

Here are the actual offsets that I modify:
RAM means RAM offsets and ROM means the actual BIN offsets both in HEX, the 4th line is the original MIPS instruction and the last line after the <> is the modified MIPS instruction.
Code: [Select]
Check 1
RAM = 0x80016B58
ROM = 0x00016090
06 00 62 14
<>
15 00 00 10

Check 2
RAM = 0x800217C4
ROM = 0x000225EC
05 00 62 14
<>
0F 00 00 10

Check 3
RAM = 0x800201B0
ROM = 0x00020D78
05 00 82 14
<>
0F 00 00 10

Enjoy man! ;D
« Last Edit: June 15, 2019, 12:42:31 pm by Z3R0X »

Drag0nscythe

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #7 on: June 15, 2019, 11:36:10 pm »
Works fantastically. Thanks a bunch,

And thanks for the explanation as well.  :thumbsup:

kw1kw1

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #8 on: May 19, 2020, 08:42:52 am »
Hello everyone, I'm sorry to arrive a bite late in this conversation. The download patch doesn't work anymore :(
Is it possible for you Z3R0X to make it available again ?

FAST6191

  • Hero Member
  • *****
  • Posts: 3124
    • View Profile
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #9 on: May 19, 2020, 10:26:44 am »
Hello everyone, I'm sorry to arrive a bite late in this conversation. The download patch doesn't work anymore :(
Is it possible for you Z3R0X to make it available again ?

The block in the code section at the end there says what you need to do, even gives the option to make it into a cheat ( https://doc.kodewerx.org/hacking_psx.html for a breakdown of how PS1 cheats work) if you would rather that than patch the game itself. Also says what you expect to originally find there so you know you have the right location -- you might even be able to search for those values in a hex editor to find the right one.

My only reservation is if you have another format of game downloaded, or that it might instead be referring to a file within it rather than whole however many hundreds of megs the game clocks in at. That said it does say what it expects there, and if push comes to shove all those addresses should be within the same sort of code so should be that far from each other.

If you are new to hex editors then they have three main sections in the main part of the window.
Usually on the left is the location. This will be the address at the start of the middle section. What each line counts up in will vary with how big the middle section is. The 0 at the start of the addresses is just that can be be ignored just liked 00000000000000000156 is still just 156. 0x does mean something in some discussions but can be ignored here.
Usually in the middle is the data in the file itself
Usually on the right is the ASCII or some other text decoding of the file itself.
Somewhere usually down the bottom is what location the cursor has been clicked on. Click on a few different ones while looking around down there and it should be obvious what it is.
If you need an editor then for a basic editor we will probably be suggesting https://mh-nexus.de/en/hxd/ these days. It is good, it is free, you don't even have to install anything if you don't want to.
The hex editor itself is usually not much more complicated than a word processor/text editor, which is to say click on what you want to edit and type. In this case you will want to overwrite data so press the insert key (usually near home, delete, page up and page down) and you will see OVR flash up just like a word processor. Now anything you type will be overwriting rather than adding new data in or deleting it from the file itself.

If you are not familiar with hexadecimal then as computers count in binary you can't easily fit more than 3 binary numbers in the 0 through 9 values we normally count in during to day to day life. 4 values (which is a whole lot more useful) then needs extra characters so the characters A through F are used to extend the different possibilities to 16 values. Hex editors will tend to use this as it is more useful.

If I have read that right then
Go to 16090 in the ROM/ISO. There in the middle data section should be the value 0600 6214. Change this to 1500 0010
Go to 225EC in the ROM/ISO. There in the middle data section should be the value 0500 6214. Change this to 0F00 0010
Go to 20D78 in the ROM/ISO. There in the middle data section should be the value 0500 8214. Change this to 0F00 0010

(ignore the spaces, they are just there to make it easier to read)

If you are familiar with a hex editor you could probably do that in under a minute (goto location or find commands are great things), if you are new to them then maybe 5 minutes (10 if you are taking your time and wander off to answer the phone or something).

kw1kw1

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Removing Modchip detection from Sakura tetris PSX
« Reply #10 on: May 20, 2020, 11:55:30 am »
Wow it looked like science fiction for me when I looked your message, but step by step it took me half an hour and It works perfectly fine now.
Thank you very much your explanation was very clear !!  :thumbsup: :thumbsup: