Epsxe/pcsxr notepad++ regex cheat conversion

This isn’t scripted or anything, it’s just an approach to use the regex functionality of Notepad++ to convert cheats to a base format that needs less tweaking.

Caveats:

ePSXe format for each cheat heading (name) starts with #.

pcsxr encapsulates the heading in square brackets [ ] and can indicate an always enabled cheat with [*name]. You’ll probably want to search and replace the asterisk * with an empty space.

Windows format End Of Line (EOL) is CR/LF whille Mac uses CR and Linux uses LF. This affects the \v\v shown below. If you’re on Mac/Linux change it from two \v to just one.

For Grandia SCUS-94457 I’ll grab my first two cheats:

(ePSXe format)

#Inf Money
80010164 FFFF
#Time is 0:00:00
8003D684 0000
8003D686 0000



Search: ^#(.*)
Replace: [\1]


(to pcsxr format)

[Inf Money]
80010164 FFFF
[Time is 0:00:00]
8003D684 0000
8003D686 0000



Search: ([[:xdigit:]]{8}).([[:xdigit:]]{4})
Replace: \1+\2+


[Inf Money]
80010164+FFFF+
[Time is 0:00:00]
8003D684+0000+
8003D686+0000+



Search: \[(.*)\]\v\v
Replace: cheat0_desc = "\1"\n


cheat0_desc = "Inf Money"
80010164+FFFF+
cheat0_desc = "Time is 0:00:00"
8003D684+0000+
8003D686+0000+



Search: ([[:xdigit:]]{8}.[[:xdigit:]]{4}.*\+)\v\v
Replace: \1


cheat0_desc = "Inf Money"
80010164+FFFF+cheat0_desc = "Time is 0:00:00"
8003D684+0000+8003D686+0000+



Search: ([[:xdigit:]]{8}.[[:xdigit:]]{4}.*)\+
Replace: cheat0_code = "\1"\ncheat0_enable = false \n\n


cheat0_desc = "Inf Money"
cheat0_code = "80010164+FFFF"
cheat0_enable = false 

cheat0_desc = "Time is 0:00:00"
cheat0_code = "8003D684+0000+8003D686+0000"
cheat0_enable = false 



Add header of "cheats = 2 " and rename "cheat0" to 
reflect 0 +1 sequentially to the last cheat where the 
header total is the last numbered cheat +1 (since we 
start at 0):


cheats = 2 

cheat0_desc = "Inf Money"
cheat0_code = "80010164+FFFF"
cheat0_enable = false 

cheat1_desc = "Time is 0:00:00"
cheat1_code = "8003D684+0000+8003D686+0000"
cheat1_enable = false 
1 Like

Im still learning about all this. I bought a Raspberry Pi 3 just recently and still trying to figure things out but for the most part most of the main consoles have cheats for the most part. I’m hoping to put some money aside to help create a way to make cheats like the magic engine emulator for Turbo Graphics 16 and PC engine CD games. I thank you for that above information hopefully more people will support what you’re trying to do as well as help me create a bounty so I can put some money towards some of the things that I would like to see and I think others would enjoy… I know you can patch games on PC engine and PC engine CDs but I haven’t figured out how to patch pc engine cd based games. I’m hoping in the future the emulators they use for the PC engine stuff will have proper cheat support where you can randomly pick codes for both CD based games and regular pc engine games to turn them on and off at random during gameplay as well. I’m not sure if this device will do that or not

hi noabody i have try to use regex on notepad++ but [(.*)]\v\v won’t work

notepad says find: can’t find the text “[(.*)]\v\v”

Edited the post to put Search/Replace information inside the code blocks so the website doesn’t absorb the escaped characters. Same caveat applies. \v\v if CR/LF EOL otherwise just one \v.

The first step in my guide was effectively converting ePSXe format cheat heading to pcsxr so that if you were starting with pcsxr formatted cheats you would begin at the second step.

To convert from pcsxr to ePSXe:

(pcsxr format)

[Inf Money]
80010164 FFFF
[Time is 0:00:00]
8003D684 0000
8003D686 0000



Search: ^\[(.*)\]
Replace: #\1


(to ePSXe format)

#Inf Money
80010164 FFFF
#Time is 0:00:00
8003D684 0000
8003D686 0000