Questions about in-game prx programming

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
mydipper
Posts: 6
Joined: Sun Oct 05, 2008 2:51 am

Questions about in-game prx programming

Post by mydipper »

1.

I want to make a program which shows the memory data by real-time during the game.

This function is already supported by cwcheat program, but I need to see several data values at once. (cwcheat supports only one..)

So, I programmed as below, but it causes my PSP to stop right after the game is selected.

Please teach me what the problem is..

Code: Select all

int module_start (SceSize args, void *argp)
{
	SceUID thid;
	
	thid = sceKernelCreateThread("MEMPrint",memprint,8,0x10000,0,NULL);
	if (thid >= 0) sceKernelStartThread(thid,args,argp);

	return 0;
}

int memprint(SceSize args, void *argp)
{
	int *mempos;
	char line[MAX_LINE_SIZE];
	int data;

	while (1) {
		mempos = (int *) (0x0036F870);
		data = (*mempos);
		sprintf(line, "0x%08X", data);
		blit_string(3, 9, line, 0xFFFFFFFF, 0);
		sceKernelDelayThread(100);
	}

	sceKernelSleepThread();
	
	return 0;
}


2.

Please give me the program codes which hold the game progress temporarily and makes it run again.

The program code which I found does not work..



3.

To print a text in the PSP screen, I use the 'blit_string' function of 'blit.c' file.

However, the text is too blinking, because the game graphic is overwritten every frame.

cwcheat program shows non-blinking texts while the game still goes one..

How can I print the non-blinkng text while the game still runs?



4.

During the game, I want to find the instruction memory address which accesses a specific address of data memory.

Is this possible using debugging mode of 'psplink'?

I am not sure that psplink supports to debug in the actual game mode.

If not, is there any way to find that instruction address?
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

1. You can't simply call blit_string. It needs some initial setup like finding the address of the current display buffer, the display mode, etc. This will need to be found every frame you want to blit as games will double buffer.

2. To freeze the game search for the 3.71 remotejoy and screenshoot plugin, it comes with source.

3. To stop the blinking, you will need to hook the wait for vblank function and blit your text first before calling the original function. In this case you will probably have to blit to the draw buffer instead of the display buffer.

4. I've never used PSP link. If it supports some kind of BPM (break point on memory access) then it can be done. Otherwise you will have to dump memory and search manually.
Post Reply