how to make PS1 trainer patching cheats codes

General Programming help in C, C++ or ASM, Compiling / Debugging, and R3000A Central Processing Unit (CPU) information
User avatar
alimadhi
Active PSXDEV User
Active PSXDEV User
Posts: 56
Joined: Aug 07, 2013
PlayStation Model: DTL-H1101
Location: From the Hell

Post by alimadhi » April 2nd, 2021, 6:04 pm

Unfortunately it just works with EPSXE v2.0.5 and its freezing with original hardware
EDIT:
its work fine need good redump game
Last edited by alimadhi on April 3rd, 2021, 7:37 am, edited 2 times in total.
Fmicome (*3) Nintendo NES (*8) MegaDrive (*6) MegaDrive II (*7) Dreamcast (*4)
PlayStation : SCPH-5000, SCPH-5502, SCPH-7000, SCPH-7502 (*5), SCPH-9000, SCPH-9002 (*6)
PlayStation 2 : SCPH-50000 (*4), SCPH-50004 (*2), SCPH-70000(*2), SCPH-70004, SCPH-77004
PlayStation 3 : CECH-2004B, CECH2012B, CECH-2512B, CECH-2503A

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » April 2nd, 2021, 9:52 pm

Ok, do i understand it right?
It is working for you with epsxe 2.0.5
But it does Not work if you burn it on a CD and try to play on real Hardware, the play Station?
To burn this game correctly on a CD, we must need a 1:1 cdrwin bin and cue file. Not this copied Version that exist in the net.
But i could not find a original ps1 disc. I have the Original EU disc, but it's only german.

User avatar
Dedok179
Serious PSXDEV User
Serious PSXDEV User
Posts: 86
Joined: Jun 11, 2015
I am a: Programmer, Beginning reverser
PlayStation Model: SCPH-5502
Discord: Dedok179#2632
Location: Tula,RU

Post by Dedok179 » April 3rd, 2021, 2:36 am

inc^lightforce, Thank you for the fairly simple and efficient menu structure! I used his basic principle on PS2.

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » April 3rd, 2021, 2:47 am

Plain and simple ;) that's the way.

Props for your trainer for SH 3
Loved this game.

User avatar
alimadhi
Active PSXDEV User
Active PSXDEV User
Posts: 56
Joined: Aug 07, 2013
PlayStation Model: DTL-H1101
Location: From the Hell

Post by alimadhi » April 3rd, 2021, 4:52 am

@inc^lightforce
its works fine
Fmicome (*3) Nintendo NES (*8) MegaDrive (*6) MegaDrive II (*7) Dreamcast (*4)
PlayStation : SCPH-5000, SCPH-5502, SCPH-7000, SCPH-7502 (*5), SCPH-9000, SCPH-9002 (*6)
PlayStation 2 : SCPH-50000 (*4), SCPH-50004 (*2), SCPH-70000(*2), SCPH-70004, SCPH-77004
PlayStation 3 : CECH-2004B, CECH2012B, CECH-2512B, CECH-2503A

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » April 10th, 2021, 11:47 pm

alimadhi wrote: April 3rd, 2021, 4:52 am @inc^lightforce
its works fine
thanks for feedback. Image

Rabatini
Interested PSXDEV User
Interested PSXDEV User
Posts: 8
Joined: Nov 04, 2020

Post by Rabatini » April 11th, 2021, 2:14 am

Hello dear Fellows.

a nice information:
i did test a lot emulators and consoles and i can tell you guys this:
All alteration like, splash, trainer, selector, etc...
will work in every emulators and original console.

except in EPSXE below 2.0.5, like 2.0.2, 1.90, 1.70 etc.
the game will not work, will give you an error of opcode after your splash/trainer/etc...

Regards.

User avatar
ShadowGeist
Interested PSXDEV User
Interested PSXDEV User
Posts: 7
Joined: Mar 20, 2021
I am a: nobody

Post by ShadowGeist » April 11th, 2021, 5:41 am

inc^lightforce wrote: April 2nd, 2021, 7:41 am Tomb Raider 1 US NTSC to PAL Selector +6.
:cool:

Gran Turismo 60fps would be kinda cool. ;)

User avatar
szalay_1
Active PSXDEV User
Active PSXDEV User
Posts: 41
Joined: Jan 22, 2019
I am a: Cheat Device Code Creator
PlayStation Model: 5502-7502
Location: Hungary
Contact:

Post by szalay_1 » April 12th, 2021, 2:27 am

hmm - "Invincibility" code.. interesting
who made these cheat codes ?
also what about jokered codes like moonjump etc ?

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » April 12th, 2021, 3:15 am

There are so many Codes. But i used this 6. This was the request

User avatar
szalay_1
Active PSXDEV User
Active PSXDEV User
Posts: 41
Joined: Jan 22, 2019
I am a: Cheat Device Code Creator
PlayStation Model: 5502-7502
Location: Hungary
Contact:

Post by szalay_1 » June 20th, 2021, 8:28 am

hey x7502x, sent PM.

User avatar
alimadhi
Active PSXDEV User
Active PSXDEV User
Posts: 56
Joined: Aug 07, 2013
PlayStation Model: DTL-H1101
Location: From the Hell

Post by alimadhi » September 25th, 2022, 5:11 am

EDIT: i forget put (Decrunch) and (Exec address) :) now its working

Where is the problem with this?
I tried to add Trainer to the Dino Crisis (U) (SLUS-00922)
I just changed MAIN.C and trainer.asm
and file SLUS-00922 to GAME.RNC
Everything is fine, but after pressing X or O, the game freeze at Trainer menu :(
all project from TR1US-PSX_Patch from @inc^lightforce
menu ok;
Image

freezing after X or O;
Image
Last edited by alimadhi on October 12th, 2022, 10:36 am, edited 1 time in total.
Fmicome (*3) Nintendo NES (*8) MegaDrive (*6) MegaDrive II (*7) Dreamcast (*4)
PlayStation : SCPH-5000, SCPH-5502, SCPH-7000, SCPH-7502 (*5), SCPH-9000, SCPH-9002 (*6)
PlayStation 2 : SCPH-50000 (*4), SCPH-50004 (*2), SCPH-70000(*2), SCPH-70004, SCPH-77004
PlayStation 3 : CECH-2004B, CECH2012B, CECH-2512B, CECH-2503A

User avatar
alimadhi
Active PSXDEV User
Active PSXDEV User
Posts: 56
Joined: Aug 07, 2013
PlayStation Model: DTL-H1101
Location: From the Hell

Post by alimadhi » September 26th, 2022, 12:34 am

Question: How do I add more than one code to trainer ?

Example: add 2 codes to the trainer.asm
#Play Bio Hazard 2 Mode
D000E3A4 0000
300CFB74 0000

Code: Select all

Mode:
LUI     a0,0x8000                        
ORI     a0,a0,0xE800          ;
ORI     t0,zero,0x0001        ;v0 == 1               
LB      t9,0x0000(a0)         ;load a byte from a0 8000E800 to v1
NOP 
BNE     t0,t9,pop_stack         ;compare v0 and v1
NOP 

li	  t0,$!!!!!!!!  		;ar part 1   
ori	  s0,zero,0x!!!!  		;the value to be written ar part2
nop
sh	  s0,0x00(t0)		;write the value
nop 
Fmicome (*3) Nintendo NES (*8) MegaDrive (*6) MegaDrive II (*7) Dreamcast (*4)
PlayStation : SCPH-5000, SCPH-5502, SCPH-7000, SCPH-7502 (*5), SCPH-9000, SCPH-9002 (*6)
PlayStation 2 : SCPH-50000 (*4), SCPH-50004 (*2), SCPH-70000(*2), SCPH-70004, SCPH-77004
PlayStation 3 : CECH-2004B, CECH2012B, CECH-2512B, CECH-2503A

User avatar
alimadhi
Active PSXDEV User
Active PSXDEV User
Posts: 56
Joined: Aug 07, 2013
PlayStation Model: DTL-H1101
Location: From the Hell

Post by alimadhi » September 28th, 2022, 8:39 pm

please help me
EDIT:
It's not easy but i got it :D
Example:
Open All The Copters
E00EB1D3 0001
300EB1D3 0004

if you want to add 2 values it will be like this

Code: Select all

Copters:
 LUI a0,0x8000 
 ORI a0,a0,0xE800
 ORI t0,zero,0x0001
 LB t9,0x0000(a0)
 NOP
 BNE t0,t9,pop_stack
 NOP
 LUI a0,0x800E            //first value
 ORI a0,a0,0xB1D3      //first value
 LB t9,0x0000(a0)
 ORI t0,zero,0x0001
 BNE t0,t9,pop_stack
 nop
 XOR s0,s0,s0
 li t0,$300EB1D3   //second value
 ori s0,s0,$0004
 nop
 sb s0,0x00(t0)
 nop
Fmicome (*3) Nintendo NES (*8) MegaDrive (*6) MegaDrive II (*7) Dreamcast (*4)
PlayStation : SCPH-5000, SCPH-5502, SCPH-7000, SCPH-7502 (*5), SCPH-9000, SCPH-9002 (*6)
PlayStation 2 : SCPH-50000 (*4), SCPH-50004 (*2), SCPH-70000(*2), SCPH-70004, SCPH-77004
PlayStation 3 : CECH-2004B, CECH2012B, CECH-2512B, CECH-2503A

Gsscc
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 04, 2022
PlayStation Model: SCPH-1001
Location: Brasil

Post by Gsscc » November 16th, 2022, 10:42 pm

Gsscc wrote: alimadhi I can't find this project to download, would you be able to send this project to my email? [email protected]

Image

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » November 17th, 2022, 11:01 am

I'm so sorry, but i don't have time at the moment to help you all. Trainer coding is really very easy. i hope i find time around xmas to help with all your questions. i think i create a Workshop especially for trainer coding

by the way.


i helped month ago and wrote the trainer for Resident Evil. why is this game still discussed?

Gsscc
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 04, 2022
PlayStation Model: SCPH-1001
Location: Brasil

Post by Gsscc » November 20th, 2022, 4:21 pm

Gsscc wrote: inc^lightforce How do I edit the font and enlarge the two lines of the Trainer Cheats picker?

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » November 23rd, 2022, 3:47 am

the font is a transparent bmp image. if you wanna use another font, you must use another font-image.bmp

more lines can be added in the main.c and in the trainer.asm file

Example for Main.C

Code: Select all

//-------------------------------------------------------------------------------
// THE TRAINER MENU LINES
//-------------------------------------------------------------------------------
void init_Menu()
{
	int	i;
	for(i=0;i<NUMTRAIN;i++)
	{
		choice[i]=0;
	}
	//-----------------
	// Line 1-1/2
	//-----------------
	mline[0].attribute=0;
	mline[0].x0=36;	mline[0].y0=170-1;
	mline[0].x1=160;mline[0].y1=170-1;
	mline[0].r0=0;	mline[0].r1=43;
	mline[0].g0=0; mline[0].g1=250;
	mline[0].b0=0;mline[0].b1=250;//line color 1/2 / 4
	//-----------------
	// Line 1-2/2 
	//-----------------
	mline[1].attribute=0;
	mline[1].x0=160;mline[1].y0=170-1;
	mline[1].x1=282;mline[1].y1=170-1;
	mline[1].r0=43;mline[1].r1=0;///ro 255 vert
	mline[1].g0=250;mline[1].g1=0;
	mline[1].b0=250;mline[1].b1=0;
	//-----------------
	// Line 2-1/2
	//-----------------
	mline[2].attribute=0;
	mline[2].x0=36;	mline[2].y0=170+FONT_H-1;
	mline[2].x1=160;mline[2].y1=170+FONT_H-1;
	mline[2].r0=0;	mline[2].r1=43;
	mline[2].g0=0; mline[2].g1=250;
	mline[2].b0=0;mline[2].b1=250;
	//-----------------
	// Line 2-2/2
	//-----------------
	mline[3].attribute=0;
	mline[3].x0=160;mline[3].y0=170+FONT_H-1;
	mline[3].x1=282;mline[3].y1=170+FONT_H-1;
	mline[3].r0=43;mline[3].r1=0;
	mline[3].g0=250;mline[3].g1=0;
	mline[3].b0=250;mline[3].b1=0;
}
//-------------------------------------------------------------------------------
// Options-Menu showing
//-------------------------------------------------------------------------------
void do_Menu()
{
	int	h,i,j,k=0;
	int	numSprites=0;
	int	yPos=145;
	int	len,offi;
	static int startat=0;
	static int colcnt=30,coladd=4;
	static int coly=144,coloff=0;		
	//--------------------------------------
	// calculate the corresponding sprites
	//--------------------------------------
	for(h=0;h<5;h++)//////nombre de trainer +1
	{
		offi=startat+h+(choice[startat+h]*NUMTRAIN);
		len=strlen(options[offi]);
		for(i=0;i<len;i++)
		{
			numSprites++;
			for(j=0;j<anzfontabc;j++)
			{
				//-------------------------------------------------
				// if SPACE just doesn't display sprites
				//-------------------------------------------------
				if(options[offi][i]==' ') // tab ??
				{
					sprMenu[k++].w=0;
					break;
				}
				//------------------------------------------------
				//  enter the sprite corresponding to the letter
				//------------------------------------------------
				if(options[offi][i]==fontabc[j])
				{	
					fontspr1[j].g=(logosin[logosinoff2]%110)+130;//200;  //color text trainer
					fontspr1[j].r=43;
					fontspr1[j].b=250;
					sprMenu[k  ]=fontspr1[j];
					sprMenu[k  ].x=(160-(len*FONT_W)/2)+(i*FONT_W);
					sprMenu[k++].y=yPos;
					break;
				}
			}
		}
		yPos+=FONT_H;
		if((h+1)==NUMTRAIN)
		{
			break;
		}
	}
	//-----------------------
	// Sprites entries
	//-----------------------
	for(i=0;i<numSprites;i++)
	{
		GsSortFastSprite(&sprMenu[i],&othWorld[currentBuffer],0);
	}
	//------------------------------
	// Y-Position of Selector-Bars
	//------------------------------
	mline[0].y0=mline[0].y1=(coloff*FONT_H)+coly;
	mline[1].y0=mline[1].y1=(coloff*FONT_H)+coly;
	mline[2].y0=mline[2].y1=(coloff*FONT_H)+coly+FONT_H;
	mline[3].y0=mline[3].y1=(coloff*FONT_H)+coly+FONT_H;

	if(--colcnt==0)
	{
		colcnt=60;
		coladd*=-1;
	}
	//------------------------
	// Selector-Bar entries
	//------------------------
	GsSortGLine(&mline[0],&othWorld[currentBuffer],0);
	GsSortGLine(&mline[1],&othWorld[currentBuffer],0);
	GsSortGLine(&mline[2],&othWorld[currentBuffer],0);
	GsSortGLine(&mline[3],&othWorld[currentBuffer],0);
	//---------------
	// Check Joypad 
	//---------------
	if(delay==0)
	{
		//-------------------
		// Joypad still up?
		//-------------------
		if(PADstatus&Pad1Up)		// coloff == bar position 0..6
		{				// startat == menu position 0..NUMTRAIN
			if(coloff==0)		// if the bar is at the top of it`s range
			{
				if(startat!=0)  //  if the first option is not at the top of menu
				{
					startat--;	// shift menu DOWN one position
				}
			}
			else
			{
				coloff--;	// reduce the position fo the bar by one if it is 						// not at the top of it`s range
			}
		}
		//--------------------
		// Joypad down?
		//--------------------
		if(PADstatus&Pad1Down)
		{
			if((coloff==2)||(coloff==NUMTRAIN-1)) // 10 values option 0..9
			{				    //if option bar is at bottom of range
							    //or if the bar is at the final 							    //trainer option
				if((startat+3)<NUMTRAIN)    // if more options to be shown
				{
					startat++;	// first option on display +1 position
				}
			}
			else
			{
				coloff++;	// coloff == position of option bar
			}
		}
		//-------------------------
		// Joypad to the left(NO)?
		//-------------------------
		if(PADstatus&Pad1Left)
		{
			choice[startat+coloff]=0;
		}
		//---------------------------
		// Joypad to the right(YES)?
		//---------------------------
		if(PADstatus&Pad1Right)
		{
			choice[startat+coloff]=1;
		}
	}
}

Gsscc
Interested PSXDEV User
Interested PSXDEV User
Posts: 9
Joined: Apr 04, 2022
PlayStation Model: SCPH-1001
Location: Brasil

Post by Gsscc » November 26th, 2022, 6:06 am

inc^lightforce What is your contact email address?

User avatar
inc^lightforce
Verified
Psy-Q Enthusiast
Psy-Q Enthusiast
Posts: 248
Joined: Mar 07, 2013
I am a: Programmer Windows+PS1, GFX Artist
PlayStation Model: Black
Location: Germany

Post by inc^lightforce » November 27th, 2022, 9:48 am

Gsscc wrote: November 26th, 2022, 6:06 am inc^lightforce What is your contact email address?
You can add me in Skype. I think it's the easiest and fasted way.
Since Microsoft took over Skype, i'm not sure which name of my account is correct to reach me.
Try: alien5ive or a5recordings
One of them must lead you directly into my account.
Please leave a message that include, you are from here, the psxdev.net.


Have a nice Weekend.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests