|
link to this page:
http://pastebin.antiyes.com/pastebin/index284.html
download this file: click here
|
description/question: a function to grab text from a buffer and store it to an address + offset using the while loop to count the next bite store and repeat the cycle , it only reads / writes 1 bite @ a time.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
|
/*-----------------------------------------------------------------------*/
//a few important integers
/*-----------------------------------------------------------------------*/
int keySelected=1;
int fliptext=0;
int dumptext=0;
int textcount=0;
int shift=0;
unsigned char chattext[64];
unsigned char textBuffer[40];
int count2=0; //the offset for chat & storage
int storage2=0x00800398+0x08800000; //(where text is stored)
unsigned int *teamallspeak=(unsigned int*)(0x0055B5C4+0x08800000);
//more text function
void keyboardInput(){
int chat=0x00F982A4+0x08800000; //(where text is shown)
int storetext=0;
int count1=0; //the offset for chat & storage
/*-----------------------------------------------------------------------*/
//text reading features
/*-----------------------------------------------------------------------*/
//read the buffer from ram
while(count1 < 63){
//copy text chat into buffer
chattext[count1]=*((unsigned char*) ((unsigned int)chat+count1));
//if the buffer is blank in anyspot
if(chattext[count1]==NULL){
//skip the rest of the buffer
goto stopcount;
}
//count up
count1++;
}
//stopcount lable loop goes here if buffer has imporper values.
stopcount:
//input the text input buffer to ram
while(count2 < textcount){
//copy the input chat into the ram
*((unsigned char*) ((unsigned int)storage2+count2))=textBuffer[count2];
//count up
count2++;
}
/*-----------------------------------------------------------------------*/
//text dumping features
/*-----------------------------------------------------------------------*/
//dump text function hehe
if(dumptext){
int fd;
fd=sceIoOpen("ms0:/ftb2chat.txt", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_APPEND, 0777);
if(fd<=0) { sceIoClose(fd); return;}
if(fd>0){
sceIoWrite(fd, buffer, buffer[count1]);
}
sceIoClose(fd);
}
}
|
|
|
|
|