PSP Coding


 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Cheat Library Functions

Go down 
AuthorMessage
-_Z3R0_-



Posts : 1
Points : 3
Reputation : 0
Join date : 2010-10-09

PostSubject: Cheat Library Functions   Sat Oct 09, 2010 12:52 pm

This is something that, Ive used to applied cheats in a prx. Thanks to Dmonchild.

Link:
Code:
http://www.sendspace.com/file/2avlfe

Quote :
Here are a few things that can make creating a cheat plugin about 1000000 times easier,
but ironicly its only easier if you know what you're doing to begin with so those of you who know what you're doing enjoy.

Some functions have been removed and the function prototypes are changed..
AGAIN.... read the header for new info, (this lib is not backwards
compatible with the older versions boo hoo).

ONLY SUPPORTS REAL ADDRESSING (NO NITEPR / CW) you will have to convert.
now works on KMEM and VRAM as well.

Pointers within these memory ranges are validated otherwise ignored
0x08800000 0x0A000000 //user
0x08000000 0x08800000 //kernel
0x04000000 0x06000000 //vram

All the prototypes have been changed, the lib's been re-arranged
functions are back to being type oriented (they are easier to remember).

oh yeah i tossed those stupid print debug functions they are stupid and annoying.

Code:
///////////////////////////////////////////////////////////////////////
// store type functions
///////////////////////////////////////////////////////////////////////

/**
 * @address - address of info you wish to edit
 * @value - the float value you wish to insert @ the defined address
 */
void setFloat(unsigned int address, float value);

/**
 * @address - address of info you wish to edit
 * @offset - the dma offset
 * @value - the float value you wish to insert @ the defined address
 */
void setFloatDMA(unsigned int address, unsigned int offset, float value);

/**
 * @address - address of info you wish to edit
 * @value - the float value you wish to insert @ the defined address
 */
void setChar(unsigned int address, unsigned char value);

/**
 * @address - address of info you wish to edit
 * @offset - the dma offset
 * @value - the float value you wish to insert @ the defined address
 */
void setCharDMA(unsigned int address, unsigned int offset, unsigned char value);

/**
 * @address - address of info you wish to edit
 * @value - the float value you wish to insert @ the defined address
 */
void setShort(unsigned int address, unsigned short value);

/**
 * @address - address of info you wish to edit
 * @offset - the dma offset
 * @value - the float value you wish to insert @ the defined address
 */
void setShortDMA(unsigned int address, unsigned int offset, unsigned short value);

/**
 * @address - address of info you wish to edit
 * @value - the float value you wish to insert @ the defined address
 */
void setU32(unsigned int address, unsigned int value);

/**
 * @address - address of info you wish to edit
 * @offset - the dma offset
 * @value - the float value you wish to insert @ the defined address
 */
void setU32DMA(unsigned int address, unsigned int offset, unsigned int value);

/**
 * @address - address of info you wish to edit
 * @value - the float value you wish to insert @ the defined address
 */
void setString(unsigned int address, unsigned char string[]);

/**
 * @address - address of info you wish to edit
 * @offset - the dma offset
 * @value - the float value you wish to insert @ the defined address
 */
void setStringDMA(unsigned int address, unsigned int offset, unsigned char string[]);


///////////////////////////////////////////////////////////////////////
// return type functions
///////////////////////////////////////////////////////////////////////

/**
 * @address - address of info you wish to edit
 * @value - the float value you wish to insert @ the defined address
 */
float retFloat(unsigned int address);

/**
 * @address - address of info you wish to edit
 * @offset - dma offset
 * @value - the float value you wish to insert @ the defined address
 */
float retFloatDMA(unsigned int address, unsigned int offset);

/**
 * @address - address of info you retreive
 * @returns - a unsigned char
 */
unsigned char retChar(unsigned int address);

/**
 * @address - address of info you retreive
 * @offset - dma offset
 * @returns - a unsigned char
 */
unsigned char retCharDMA(unsigned int address, unsigned int offset);

/**
 * @address - address of info you retreive
 * @returns - a unsigned short
 */
unsigned short retShort(unsigned int address);

/**
 * @address - address of info you retreive
 * @offset - dma offset
 * @returns - a unsigned short
 */
unsigned short retShortDMA(unsigned int address, unsigned int offset);

/**
 * @address - address of info you retreive
 * @returns - a unsigned int
 */
unsigned int retU32(unsigned int address);

/**
 * @address - address of info you retreive
 * @offset - dma offset
 * @returns - a unsigned int
 */
unsigned int retU32DMA(unsigned int address, unsigned int offset);

/**
 * @address - address of info you retreive
 * @returns - a string
 */
char retString(unsigned int address);

/**
 * @address - address of info you retreive
 * @offset - dma offset
 * @returns - a string
 */
char retStringDMA(unsigned int address, unsigned int offset);
Back to top Go down
View user profile
Emu



Posts : 21
Points : 29
Reputation : 0
Join date : 2010-10-04

PostSubject: Re: Cheat Library Functions   Sat Oct 16, 2010 2:10 pm

Wow thanks this will help me in my latest project Smile
Back to top Go down
View user profile
 
Cheat Library Functions
Back to top 
Page 1 of 1
 Similar topics
-
» pgnlib - a C++ Library for PGN
» Grandmaster Strategy Video Training Library
» pgnlib - a C++ Library for PGN
» Crafty Chess Interface
» The Lost Library - [RP APPS]

Permissions in this forum:You cannot reply to topics in this forum
PSP Coding :: PSP Programming :: PSP Programming Tutorials :: PRX/Plugin Programming Tutorials-
Jump to: