 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
mydipper
Joined: 05 Oct 2008 Posts: 6
|
Posted: Thu Dec 04, 2008 12:45 am Post subject: Questions about in-game prx programming |
|
|
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: |
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? |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Thu Dec 04, 2008 7:48 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|